:root {
    --primary-color: #017439;
    --accent-color: #FFFFFF;
    --register-btn-bg: #C30808;
    --login-btn-bg: #C30808;
    --btn-text-color: #000000; /* Adjusted for WCAG AA contrast with #C30808 */
    --header-offset: 120px; /* Desktop: header-top (min-height 70px) + main-nav (min-height 50px) */
}

@media (max-width: 768px) {
    :root {
        --header-offset: 110px; /* Mobile: header-top (min-height 60px) + mobile-nav-buttons (min-height 50px) */
    }
}

body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
    background-color: var(--accent-color);
    color: #333;
    overflow-x: hidden; /* Prevent body horizontal scroll */
}

/* Shared Container Styles */
.header-container, .nav-container, .footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px; /* Default desktop padding */
    box-sizing: border-box;
}

/* Site Header - Fixed Navigation */
.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    background-color: var(--accent-color); /* Fallback, specific sections will override */
}

/* Header Top Section (Desktop) */
.header-top {
    background-color: var(--primary-color); /* Darker green */
    color: var(--accent-color);
    padding: 10px 0;
    min-height: 70px;
    display: flex;
    align-items: center;
}

.header-top .header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px; /* Larger padding for desktop */
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: var(--accent-color);
    text-decoration: none;
    white-space: nowrap;
    display: block; /* Ensure it's not hidden */
}

/* Desktop Navigation Buttons */
.desktop-nav-buttons {
    display: flex;
    gap: 12px;
}

.btn {
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    white-space: nowrap;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.btn-register {
    background-color: var(--register-btn-bg);
    color: var(--btn-text-color);
}

.btn-login {
    background-color: var(--login-btn-bg);
    color: var(--btn-text-color);
}

.btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* Main Navigation (Desktop) */
.main-nav {
    background-color: #f0f0f0; /* Lighter background for main nav, contrasting with header-top */
    padding: 10px 0;
    min-height: 50px;
    display: flex; /* Desktop default: visible */
    align-items: center;
}

.main-nav .nav-container {
    display: flex;
    flex-direction: row; /* Desktop default: horizontal */
    justify-content: center; /* Center align menu items */
    gap: 25px;
    padding: 0 20px;
}

.nav-link {
    color: #333;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    padding: 5px 0;
    position: relative;
    white-space: nowrap;
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

/* Hamburger Menu (Mobile) */
.hamburger-menu {
    display: none; /* Hidden on desktop */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    cursor: pointer;
    z-index: 1001;
    padding: 5px;
}

.hamburger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--accent-color);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    transition: opacity 0.3s ease;
    opacity: 0;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

/* Site Footer */
.site-footer {
    background-color: #333;
    color: #fff;
    padding: 40px 0 20px;
    font-size: 14px;
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
}

.footer-col {
    flex: 1;
    min-width: 250px;
    max-width: 30%;
}

.footer-col h3 {
    color: var(--primary-color);
    font-size: 18px;
    margin-bottom: 15px;
}

.footer-logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    margin-bottom: 15px;
    display: block;
}

.footer-col p {
    line-height: 1.6;
    color: #ccc;
}

.footer-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-nav li {
    margin-bottom: 8px;
}

.footer-nav a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-nav a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #555;
    color: #aaa;
}

/* --- Mobile Specific Styles --- */
@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;
    }

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

    .header-top .header-container {
        padding: 0 15px; /* Smaller padding for mobile */
        justify-content: space-between;
    }

    .logo {
        flex: 1 !important; /* For text logo, helps centering */
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        font-size: 24px;
    }

    .hamburger-menu {
        display: flex; /* Show hamburger on mobile */
        order: -1; /* Place it to the left */
    }

    .hamburger-menu.active span:nth-child(1) {
        transform: translateY(11px) rotate(45deg);
    }

    .hamburger-menu.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger-menu.active span:nth-child(3) {
        transform: translateY(-11px) rotate(-45deg);
    }

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

    /* Mobile Navigation Buttons */
    .mobile-nav-buttons {
        display: flex !important;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 10px 15px; /* Padding for the buttons container */
        overflow: hidden;
        gap: 10px;
        flex-wrap: nowrap;
        background-color: var(--primary-color); /* Match header-top or choose contrasting */
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }

    .mobile-nav-buttons .btn {
        flex: 1; /* Distribute space equally */
        min-width: 0;
        max-width: calc(50% - 5px); /* Account for gap */
        box-sizing: border-box;
        padding: 8px 12px; /* Smaller padding for mobile buttons */
        font-size: 13px; /* Smaller font size */
        white-space: normal; /* Allow text to wrap */
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    /* Main Navigation (Mobile) */
    .main-nav {
        display: none; /* Hidden by default on mobile */
        position: fixed;
        top: var(--header-offset); /* Start below the fixed header */
        left: 0;
        width: 70%; /* Adjust width of mobile menu */
        height: calc(100% - var(--header-offset)); /* Fill remaining height */
        background-color: var(--accent-color);
        flex-direction: column; /* Vertical menu */
        padding: 20px 0;
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
        transform: translateX(-100%); /* Slide out to the left */
        transition: transform 0.3s ease-in-out;
        z-index: 999;
        overflow-y: auto;
    }

    .main-nav.active {
        display: flex; /* Show menu when active */
        transform: translateX(0); /* Slide in */
    }

    .main-nav .nav-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding: 0 20px;
        max-width: none; /* Remove max-width for mobile container */
        width: 100%;
    }

    .nav-link {
        width: 100%;
        padding: 10px 0;
        border-bottom: 1px solid #eee;
        color: #333;
    }

    .nav-link:last-child {
        border-bottom: none;
    }

    .nav-link::after {
        display: none; /* Hide hover effect on mobile menu */
    }

    .footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-col {
        max-width: 90%;
        min-width: unset;
    }

    .footer-nav {
        margin-top: 10px;
    }
    .footer-logo {
        margin: 0 auto 15px;
    }
}
/* 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;
  }
}
