:root {
    --primary-color: #017439;
    --auxiliary-color: #FFFFFF;
    --register-login-btn-bg: #C30808;
    --register-login-btn-text: #FFFF00;
    --header-offset: 110px; /* Desktop: header-top (60px) + main-nav (50px) */
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333;
    padding-top: var(--header-offset); /* Apply header offset to body */
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--auxiliary-color); /* Fallback, specific sections have colors */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* General container for desktop */
.header-container, .nav-container, .footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* Header Top */
.site-header .header-top {
    background-color: var(--primary-color);
    color: var(--auxiliary-color);
    padding: 10px 0;
    min-height: 60px; /* Minimum height for header-top */
    display: flex;
    align-items: center;
}
.site-header .header-top .header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}
.site-header .logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--auxiliary-color);
    text-decoration: none;
    display: block;
    line-height: 1;
    white-space: nowrap;
}

/* Desktop Nav Buttons */
.desktop-nav-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}
.desktop-nav-buttons .btn {
    background-color: var(--register-login-btn-bg);
    color: var(--register-login-btn-text);
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}
.desktop-nav-buttons .btn:hover {
    background-color: #e02a2a; /* Slightly darker red on hover */
}

/* Main Navigation */
.site-header .main-nav {
    background-color: var(--auxiliary-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    min-height: 50px; /* Minimum height for main-nav */
    display: flex; /* Desktop default: visible and horizontal */
    align-items: center;
    width: 100%;
}
.site-header .main-nav .nav-container {
    display: flex;
    justify-content: center; /* Center nav items on desktop */
    align-items: center;
    gap: 25px;
    width: 100%;
}
.site-header .main-nav .nav-link {
    color: #333333; /* Dark text for white background */
    text-decoration: none;
    font-weight: 500;
    padding: 15px 0;
    white-space: nowrap;
    transition: color 0.3s ease;
}
.site-header .main-nav .nav-link:hover {
    color: var(--primary-color);
}

/* Hamburger Menu (hidden on desktop) */
.hamburger-menu {
    display: none;
}

/* Mobile Nav Buttons (hidden on desktop) */
.mobile-nav-buttons {
    display: none;
}

/* Mobile Overlay (hidden on desktop) */
.mobile-menu-overlay {
    display: none;
}

/* Footer */
.site-footer {
    background-color: #F5F5F5; /* Light grey for footer background */
    color: #333333;
    padding: 40px 0 20px;
    font-size: 14px;
}
.site-footer .footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
}
.site-footer .footer-column {
    flex: 1;
    min-width: 250px;
}
.site-footer .footer-column h3 {
    color: var(--primary-color);
    font-size: 18px;
    margin-bottom: 15px;
}
.site-footer .footer-column p {
    line-height: 1.6;
}
.site-footer .footer-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}
.site-footer .footer-nav li {
    margin-bottom: 8px;
}
.site-footer .footer-nav a {
    color: #555555;
    text-decoration: none;
    transition: color 0.3s ease;
}
.site-footer .footer-nav a:hover {
    color: var(--primary-color);
}
.site-footer .footer-bottom {
    border-top: 1px solid #e0e0e0;
    margin-top: 30px;
    padding-top: 20px;
    text-align: center;
}
.site-footer .footer-bottom p {
    margin: 0;
    color: #666666;
}

/* Responsive styles */
@media (max-width: 768px) {
    :root {
        --header-offset: 120px; /* Mobile: header-top (60px) + mobile-nav-buttons (60px) */
    }

    body {
        padding-top: var(--header-offset);
    }
    
    .site-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .site-header .header-top {
        min-height: 60px;
        padding: 10px 0;
    }

    .site-header .header-top .header-container {
        padding-left: 15px;
        padding-right: 15px;
        position: relative;
        min-height: 40px;
    }

    .site-header .logo {
        flex: 1 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        max-width: calc(100% - 100px); /* Leave space for hamburger */
        font-size: 20px;
    }

    .hamburger-menu {
        display: block; /* Show hamburger on mobile */
        background: none;
        border: none;
        cursor: pointer;
        padding: 10px;
        position: relative;
        z-index: 1001;
        width: 40px;
        height: 40px;
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        align-items: center;
    }
    .hamburger-menu::before,
    .hamburger-menu::after,
    .hamburger-menu span {
        content: '';
        display: block;
        width: 25px;
        height: 3px;
        background-color: var(--auxiliary-color);
        transition: all 0.3s ease;
        border-radius: 2px;
    }
    .hamburger-menu.active::before {
        transform: translateY(8px) rotate(45deg);
    }
    .hamburger-menu.active::after {
        transform: translateY(-8px) rotate(-45deg);
    }
    .hamburger-menu.active span {
        opacity: 0;
    }

    .desktop-nav-buttons {
        display: none; /* Hide desktop buttons on mobile */
    }

    .mobile-nav-buttons {
        display: flex !important; /* Show mobile buttons */
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 10px 15px;
        overflow: hidden;
        gap: 10px;
        flex-wrap: nowrap;
        background-color: #222222; /* Dark background for mobile buttons */
        min-height: 60px;
        justify-content: center;
        align-items: center;
    }
    .mobile-nav-buttons .btn {
        flex: 1; min-width: 0;
        max-width: calc(50% - 5px);
        box-sizing: border-box;
        padding: 8px 12px;
        font-size: 13px;
        white-space: normal;
        word-wrap: break-word;
        overflow-wrap: break-word;
        text-align: center;
        border-radius: 5px;
        background-color: var(--register-login-btn-bg);
        color: var(--register-login-btn-text);
        font-weight: bold;
        text-decoration: none;
    }

    .site-header .main-nav {
        display: none; /* Hidden by default on mobile */
        position: fixed;
        top: 0;
        left: 0;
        width: 70%; /* Side menu width */
        height: 100vh;
        background-color: var(--primary-color);
        flex-direction: column;
        padding-top: 80px; /* Space for logo/close button */
        transform: translateX(-100%); /* Off-screen by default */
        transition: transform 0.3s ease;
        z-index: 999;
        box-shadow: 2px 0 5px rgba(0,0,0,0.2);
        overflow-y: auto;
    }
    .site-header .main-nav.active {
        display: flex; /* Show when active */
        transform: translateX(0);
    }
    .site-header .main-nav .nav-container {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px 15px;
        gap: 15px;
        width: 100%;
        max-width: none; /* Ensure container fills width */
    }
    .site-header .main-nav .nav-link {
        color: var(--auxiliary-color);
        width: 100%;
        padding: 10px 0;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    .site-header .main-nav .nav-link:last-child {
        border-bottom: none;
    }
    .site-header .main-nav .nav-link:hover {
        color: var(--register-login-btn-text);
    }

    .mobile-menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0,0,0,0.5);
        z-index: 998;
    }
    .mobile-menu-overlay.active {
        display: block;
    }

    /* Footer */
    .site-footer .footer-container {
        flex-direction: column;
        gap: 20px;
        padding-left: 15px;
        padding-right: 15px;
    }
    .site-footer .footer-column {
        min-width: unset;
        width: 100%;
    }

    /* Mobile content overflow protection */
    .page-content img {
      max-width: 100% !important;
      height: auto !important;
      display: block;
    }
    .page-content {
      overflow-x: hidden;
      max-width: 100%;
    }
    body {
      overflow-x: hidden;
    }
}

/* Body scroll lock for mobile menu */
body.no-scroll {
    overflow: hidden;
}
/* Payment Methods 图标容器样式 */
.payment-icons {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
  gap: 5px;
}

.payment-icons img,
.payment-icon {
  max-height: 50px;
  height: auto;
  width: auto;
  display: block;
}

/* Game Providers 图标容器样式 */
.game-providers-icons {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
}

.game-providers-icons img,
.game-provider-icon {
  max-height: 50px;
  height: auto;
  width: auto;
  display: block;
}

/* Social Media 图标容器样式 */
.social-media-icons {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
}

.social-media-icons img,
.social-media-icon {
  max-height: 50px;
  height: auto;
  width: auto;
  display: block;
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@media (max-width: 768px) {
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: hidden;
  }
}
