:root {
    --primary-color: #017439;
    --secondary-color: #FFFFFF;
    --button-register-bg: #C30808;
    --button-login-bg: #C30808;
    --button-text-color: #FFFF00;
    --header-top-bg: #1a1a1a; /* Dark grey for header top */
    --main-nav-bg: var(--primary-color); /* Primary green 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;
    background-color: var(--secondary-color);
    padding-top: var(--header-offset);
    overflow-x: hidden;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

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

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

.logo {
    color: var(--secondary-color);
    font-size: 28px;
    font-weight: bold;
    text-decoration: none;
    white-space: nowrap;
    display: block;
}

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

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

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

.btn-register:hover, .btn-login:hover {
    background-color: #e00;
    transform: translateY(-2px);
}

.main-nav {
    background-color: var(--main-nav-bg);
    min-height: 50px; /* Ensures consistent height */
    display: flex;
    align-items: center;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: row;
    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;
    white-space: nowrap;
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

.mobile-nav-buttons {
    display: none; /* Hidden by default on desktop */
}

.hamburger-menu {
    display: none; /* Hidden by default on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    position: relative;
    z-index: 1002;
}

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

.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);
}

/* Footer Styles */
.site-footer {
    background-color: var(--header-top-bg);
    color: var(--secondary-color);
    padding: 40px 20px;
    text-align: center;
}

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

.footer-col {
    flex: 1;
    min-width: 200px;
    text-align: left;
}

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

.site-footer p {
    font-size: 14px;
    margin: 0;
    line-height: 1.5;
}

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

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

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

.footer-nav a {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

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

/* Mobile 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-container {
        padding: 0 15px;
        justify-content: space-between;
        position: relative;
    }

    .hamburger-menu {
        display: block;
        order: 1;
        margin-right: auto; /* Push logo to center */
    }

    .logo {
        order: 2;
        flex: 1 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        font-size: 24px;
        text-align: center;
    }
    
    .desktop-nav-buttons {
        display: none;
    }

    .mobile-nav-buttons {
        display: flex !important;
        width: 100%; max-width: 100%;
        box-sizing: border-box;
        padding: 10px 15px;
        overflow: hidden;
        gap: 10px;
        flex-wrap: nowrap;
        background-color: var(--header-top-bg); /* Match header top background */
        justify-content: 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;
    }

    .main-nav {
        display: none; /* Hidden by default, shown with JS */
        flex-direction: column;
        position: fixed;
        top: var(--header-offset); /* Position below fixed header and mobile buttons */
        left: 0;
        width: 70%;
        height: calc(100vh - var(--header-offset)); /* Full height below header */
        background-color: var(--main-nav-bg);
        transform: translateX(-100%); /* Off-screen by default */
        transition: transform 0.3s ease;
        overflow-y: auto;
        z-index: 999;
    }

    .main-nav.active {
        display: flex; /* Must be flex or block to show */
        transform: translateX(0);
    }

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

    .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;
        align-items: center;
        text-align: center;
    }

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

    .footer-nav {
        margin-bottom: 20px;
    }

    .footer-logo {
        margin-bottom: 10px;
    }
}

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

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

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