:root {
    --primary-color: #017439;
    --secondary-color: #FFFFFF;
    --button-bg-color: #C30808;
    --button-text-color: #FFFF00;
    --header-top-bg: #00502A; /* Darker variant of primary for contrast */
    --nav-bg: #017439; /* Primary color for main nav */
    --header-offset: 110px; /* Desktop: header-top (60px) + main-nav (50px) */
}

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

body {
    margin: 0;
    font-family: Arial, sans-serif;
    color: #333;
    line-height: 1.6;
    padding-top: var(--header-offset); /* Apply offset to body */
    overflow-x: hidden; /* Prevent horizontal scroll on body */
}

.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(--secondary-color); /* Fallback, main parts have their own bg */
}

.header-top {
    background-color: var(--header-top-bg);
    padding: 10px 0;
    min-height: 60px; /* Desktop height for header-top */
    display: flex;
    align-items: center;
    box-sizing: border-box;
}

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

.logo {
    font-size: 28px;
    font-weight: bold;
    color: var(--button-text-color); /* Yellow for contrast on dark green */
    text-decoration: none;
    white-space: nowrap;
    padding: 5px 0;
}

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

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

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

.btn-register:hover, .btn-login:hover {
    background-color: #A00707; /* Slightly darker red on hover */
    transform: translateY(-2px);
}

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

.hamburger-menu .bar {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--button-text-color); /* Yellow bars */
    margin: 5px 0;
    transition: all 0.3s ease;
}

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

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

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

.mobile-nav-buttons {
    display: none; /* Hidden on desktop, shown on mobile */
    background-color: var(--header-top-bg); /* Same as header-top for consistency */
    padding: 10px 20px;
    box-sizing: border-box;
    min-height: 50px; /* Mobile button area height */
}

.main-nav {
    background-color: var(--nav-bg);
    padding: 10px 0;
    min-height: 50px; /* Desktop height for main-nav */
    display: flex; /* Desktop default: flex */
    align-items: center;
    box-sizing: border-box;
}

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

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

.nav-link:hover, .nav-link.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--button-text-color);
}

.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.6);
    z-index: 999;
    cursor: pointer;
}

/* Footer Styles */
.site-footer {
    background-color: var(--header-top-bg); /* Use dark green for footer */
    color: var(--secondary-color);
    padding: 40px 20px;
    font-size: 14px;
    line-height: 1.8;
}

.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(--button-text-color); /* Yellow for footer headings */
    font-size: 18px;
    margin-bottom: 15px;
}

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

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

.footer-section ul li a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.copyright {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

/* 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 {
        justify-content: space-between;
        padding: 10px 0; 
    }

    .header-container {
        padding: 0 15px; /* Smaller padding for mobile */
        flex-wrap: nowrap;
        position: relative; /* For logo centering with absolute positioning */
        min-height: 40px; /* Ensure enough height for logo/hamburger */
    }

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

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

    .hamburger-menu {
        display: block;
        order: -1; /* Place hamburger on the left */
        margin-left: 0; /* Remove left margin on mobile */
        margin-right: auto; /* Push logo to center */
    }

    .mobile-nav-buttons {
        display: flex !important;
        width: 100%; max-width: 100%;
        box-sizing: border-box;
        padding: 10px 15px; /* Smaller padding for mobile */
        overflow: hidden;
        gap: 10px;
        flex-wrap: nowrap;
        justify-content: center; /* Center buttons if only one or two */
    }
    .mobile-nav-buttons .btn {
        flex: 1; min-width: 0;
        max-width: calc(50% - 5px); /* For two buttons, considering 10px gap */
        box-sizing: border-box;
        padding: 8px 12px;
        font-size: 13px;
        white-space: normal;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .main-nav {
        display: none; /* Hidden by default on mobile */
        flex-direction: column;
        position: fixed;
        top: var(--header-offset); /* Start below the fixed header + mobile buttons */
        left: 0;
        width: 100%;
        height: calc(100% - var(--header-offset)); /* Full height minus fixed header */
        overflow-y: auto;
        transform: translateX(-100%); /* Slide out to the left */
        transition: transform 0.3s ease;
        background-color: var(--nav-bg); /* Use primary color for mobile menu background */
        z-index: 1000; /* Below overlay, above body */
        align-items: flex-start; /* Align links to the left */
        padding: 20px 0; /* Padding inside the menu */
    }

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

    .nav-container {
        flex-direction: column;
        padding: 0 15px;
        width: 100%;
        max-width: none; /* Ensure it takes full width */
        align-items: flex-start;
    }

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

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

    .footer-container {
        flex-direction: column;
        gap: 20px;
    }
    .footer-section {
        min-width: unset;
    }
    .footer-section h3 {
        text-align: center;
    }
    .footer-section ul {
        text-align: center;
    }
    .copyright {
        margin-top: 20px;
    }
}

/* 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;
  }
}
