:root {
    --primary-color: #017439;
    --auxiliary-color: #FFFFFF;
    --btn-color-red: #C30808;
    --btn-font-color-yellow: #FFFF00;
    --dark-bg: #1a1a1a;
    --header-offset: 110px; /* Desktop: header-top (60px) + main-nav (50px) */
}

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

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

/* Site Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-top {
    background-color: var(--dark-bg); /* Distinct background from main-nav */
    padding: 15px 0;
    color: var(--auxiliary-color);
}

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

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

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

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

.btn-register {
    background-color: var(--btn-color-red);
    color: var(--btn-font-color-yellow);
}

.btn-login {
    background-color: var(--btn-color-red);
    color: var(--btn-font-color-yellow);
}

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

.main-nav {
    background-color: var(--primary-color); /* Distinct background from header-top */
    padding: 10px 0;
    display: flex;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 0 20px;
    flex-wrap: wrap;
}

.nav-link {
    color: var(--auxiliary-color);
    text-decoration: none;
    padding: 8px 15px;
    font-size: 16px;
    white-space: nowrap;
    transition: background-color 0.3s ease;
}

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

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

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

.mobile-nav-buttons {
    display: none; /* Hidden on desktop */
    background-color: var(--dark-bg); /* Match header-top background */
    padding: 10px 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

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

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

/* Site Footer */
.site-footer {
    background-color: var(--dark-bg);
    color: var(--auxiliary-color);
    padding: 40px 20px 20px;
    font-size: 14px;
}

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

.footer-col {
    flex: 1;
    min-width: 180px;
    margin-bottom: 20px;
}

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

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

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

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

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

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    margin: 0;
    color: var(--auxiliary-color);
}

/* Mobile Styles */
@media (max-width: 768px) {
    .header-top {
        padding: 10px 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .header-container {
        width: 100%;
        max-width: none;
        padding: 0 15px;
        position: relative;
        min-height: 30px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .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: 20px;
        padding-left: 30px; /* Offset for hamburger space */
        padding-right: 30px; /* Balance for hamburger space */
    }

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

    .mobile-nav-buttons {
        display: flex !important;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden;
        gap: 10px;
        flex-wrap: nowrap;
    }

    .mobile-nav-buttons .btn {
        flex: 1;
        min-width: 0;
        max-width: calc(50% - 5px); /* 50% minus half of 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;
    }

    .main-nav {
        display: none; /* Hidden by default */
        position: fixed;
        top: var(--header-offset); /* Position below fixed header and mobile buttons */
        left: 0;
        width: 80%;
        max-width: 300px;
        height: calc(100vh - var(--header-offset));
        background-color: var(--primary-color);
        flex-direction: column;
        transform: translateX(-100%); /* Slide out to the left */
        transition: transform 0.3s ease;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
        z-index: 1001;
        overflow-y: auto;
    }

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

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

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

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

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

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

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

    .footer-bottom {
        text-align: center;
    }

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

/* No scroll for body when menu is open */
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;
  }
}
