:root {
    --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) */
    }
}

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

body.no-scroll {
    overflow: hidden;
}

.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    background-color: #000000; /* Primary color */
}

.header-top {
    background-color: #000000; /* Primary color */
    min-height: 60px;
    display: flex;
    align-items: center;
    padding: 10px 0;
}

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

.logo {
    color: #FFFFFF;
    text-decoration: none;
    font-size: 28px;
    font-weight: bold;
    display: flex; /* For centering logo in mobile */
    align-items: center;
}

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

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

.btn-login {
    background-color: #FCBC45; /* Specified color */
    color: #000000;
}

.btn-register {
    background-color: #FFFFFF; /* Specified color */
    color: #000000;
    border: 1px solid #FCBC45;
}

.btn-login:hover, .btn-register:hover {
    opacity: 0.9;
}

.main-nav {
    background-color: #1a1a1a; /* Dark gray for contrast with header-top */
    min-height: 50px;
    display: flex;
    align-items: center;
    padding: 5px 0;
}

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

.nav-link {
    color: #FFFFFF;
    text-decoration: none;
    padding: 10px 15px;
    font-weight: 500;
    transition: color 0.3s ease, background-color 0.3s ease;
    white-space: nowrap;
}

.nav-link:hover {
    color: #FCBC45;
    background-color: rgba(255, 255, 255, 0.1);
    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: 1002;
}

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

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

.mobile-menu-overlay {
    display: none; /* Hidden on desktop */
}

/* Footer Styles */
.site-footer {
    background-color: #000000; /* Primary color */
    color: #FFFFFF;
    padding: 40px 20px 20px;
    text-align: left;
}

.site-footer .footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    padding: 0 15px;
}

.site-footer .footer-col h3 {
    color: #FCBC45; /* Highlight with accent color */
    font-size: 18px;
    margin-bottom: 15px;
}

.site-footer .footer-col p {
    font-size: 14px;
    line-height: 1.6;
    color: #CCCCCC;
}

.site-footer .footer-logo {
    color: #FFFFFF;
    text-decoration: none;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 15px;
    display: inline-block;
}

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

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

.site-footer .footer-nav li a {
    color: #CCCCCC;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.site-footer .footer-nav li a:hover {
    color: #FCBC45;
}

.footer-bottom {
    text-align: center;
    margin-top: 30px;
    border-top: 1px solid #333333;
    padding-top: 20px;
    font-size: 13px;
    color: #AAAAAA;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .site-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-container {
        width: 100%;
        max-width: none;
        padding: 0 15px;
        justify-content: space-between;
        min-height: 60px; /* Ensure consistent height */
    }

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

    .hamburger-menu {
        display: block;
        order: -1; /* Push to the left */
    }

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

    .logo {
        flex: 1 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        margin: 0;
    }

    .mobile-nav-buttons {
        display: flex;
        justify-content: center;
        gap: 12px;
        background-color: #000000; /* Match header-top background */
        padding: 8px 15px;
        width: 100%;
        min-height: 45px; /* Ensure consistent height */
        box-sizing: border-box;
    }

    .mobile-nav-container {
        width: 100%;
        max-width: none;
        display: flex;
        justify-content: center;
        gap: 12px;
    }

    .main-nav {
        display: none; /* Hidden by default */
        position: fixed;
        top: var(--header-offset); /* Position below the combined header */
        left: 0;
        width: 80%;
        max-width: 300px; /* Limit sidebar width */
        height: calc(100vh - var(--header-offset));
        background-color: #1a1a1a;
        flex-direction: column;
        padding: 20px;
        box-shadow: 2px 0 5px rgba(0,0,0,0.3);
        transform: translateX(-100%); /* Start off-screen */
        transition: transform 0.3s ease;
        overflow-y: auto;
        align-items: flex-start;
        box-sizing: border-box;
    }

    .main-nav.active {
        display: flex; /* Must set display to show */
        transform: translateX(0); /* Slide into view */
    }

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

    .nav-link {
        width: 100%;
        padding: 12px 0;
        border-bottom: 1px solid #333333;
        text-align: left;
    }

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

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

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

    .site-footer .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .site-footer .footer-col h3, .site-footer .footer-logo {
        text-align: center;
    }

    .site-footer .footer-nav {
        align-items: center;
    }

    .site-footer .footer-nav li a {
        text-align: center;
    }
    
    /* Mobile content overflow prevention */
    .page-content img {
      max-width: 100% !important;
      height: auto !important;
      display: block;
    }
    .page-content {
      overflow-x: hidden;
      max-width: 100%;
    }
    body {
      overflow-x: 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;
  }
}
