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

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

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding-top: var(--header-offset);
    background-color: var(--secondary-color);
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

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

.header-top {
    background-color: #004D28; /* Darker green */
    min-height: 60px;
    display: flex;
    align-items: center;
    padding: 0 20px;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px; /* Ensures spacing from container edges */
    box-sizing: border-box;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--secondary-color);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.desktop-nav-buttons {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

.btn {
    padding: 10px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
    white-space: nowrap;
    display: inline-block;
    border: none;
    cursor: pointer;
}

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

.btn-register:hover {
    background-color: #A00707;
    box-shadow: 0 0 10px rgba(195, 8, 8, 0.5);
}

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

.btn-login:hover {
    background-color: #A00707;
    box-shadow: 0 0 10px rgba(195, 8, 8, 0.5);
}

.main-nav {
    background-color: var(--primary-color); /* Primary green */
    min-height: 50px;
    display: flex; /* Desktop default: visible and horizontal */
    align-items: center;
    padding: 0 20px;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: row; /* Desktop default: horizontal */
    justify-content: center;
    align-items: center;
    padding: 0 20px;
    box-sizing: border-box;
}

.nav-link {
    color: var(--secondary-color);
    text-decoration: none;
    padding: 10px 15px;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
    white-space: nowrap;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.hamburger-menu {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 24px;
    position: relative;
    z-index: 1001; /* Ensure it's above other elements */
}

.hamburger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--secondary-color);
    margin-bottom: 5px;
    transition: all 0.3s ease;
}

.hamburger-menu span:last-child {
    margin-bottom: 0;
}

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

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

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

.mobile-nav-buttons {
    display: none; /* Hidden on desktop */
    background-color: var(--primary-color);
    padding: 10px 15px;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    min-height: 45px;
}

.mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* For two buttons with 10px gap */
    box-sizing: border-box;
    padding: 8px 12px;
    font-size: 13px;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    text-align: center;
}

.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: 999;
    transition: opacity 0.3s ease;
}

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

/* Footer styles */
.site-footer {
    background-color: #222;
    color: #ccc;
    padding: 40px 20px;
    font-size: 14px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
}

.footer-section {
    flex: 1;
    min-width: 250px;
}

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

.footer-section p,
.footer-section ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-section ul li a {
    color: #ccc;
    text-decoration: none;
    padding: 5px 0;
    display: block;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

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

/* Mobile-specific styles */
@media (max-width: 768px) {
    .header-top {
        padding: 0 15px;
        justify-content: space-between;
    }

    .header-container {
        padding: 0;
        width: 100%;
        max-width: none;
        justify-content: space-between;
    }

    .hamburger-menu {
        display: block;
        order: 1;
    }

    .logo {
        order: 2;
        flex: 1 !important; /* Ensure logo takes available space for centering */
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        font-size: 18px;
        padding: 0 10px;
    }

    .desktop-nav-buttons {
        display: none;
    }

    .mobile-nav-buttons {
        display: flex !important; /* Ensure mobile buttons are visible */
    }

    .main-nav {
        display: none; /* Hidden by default on mobile */
        flex-direction: column; /* Vertical alignment */
        position: fixed;
        top: var(--header-offset); /* Position below fixed header */
        left: 0;
        width: 75%; /* Adjust as needed */
        height: calc(100% - var(--header-offset));
        background-color: var(--primary-color);
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
        transform: translateX(-100%); /* Slide out to the left */
        transition: transform 0.3s ease;
        overflow-y: auto;
        z-index: 1000;
        padding: 0;
    }

    .main-nav.active {
        display: flex; /* Must be set to show the menu */
        transform: translateX(0); /* Slide in */
    }

    .nav-container {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px;
        width: 100%;
        max-width: none;
    }

    .nav-link {
        width: 100%;
        padding: 12px 15px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

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

    .footer-container {
        flex-direction: column;
        gap: 20px;
    }

    .footer-section {
        min-width: unset;
        width: 100%;
        text-align: center;
    }

    .footer-section ul li a {
        display: inline-block;
        margin: 0 5px;
    }
    
    .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.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;
  }
}
