:root {
    --header-offset: 100px; /* Desktop: header-top (60px) + main-nav (40px) */
}
@media (max-width: 768px) {
    :root {
        --header-offset: 120px; /* Mobile: header-top (60px) + mobile-nav-buttons (60px) */
    }
}

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Arial', sans-serif;
    color: #FFFFFF;
    background-color: #FFFFFF;
    line-height: 1.6;
    overflow-x: hidden;
}

body {
    padding-top: var(--header-offset);
}

.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column; /* Default for mobile, overridden for desktop */
}

.header-top {
    background-color: #000000; /* Primary dark */
    padding: 15px 0;
    width: 100%;
}

.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: #FCBC45;
    text-decoration: none;
    white-space: nowrap;
}

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

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

.btn-login {
    background-color: #FCBC45;
    color: #000000;
    border: 1px solid #FCBC45;
}

.btn-login:hover {
    background-color: #e0a73d;
}

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

.btn-register:hover {
    background-color: #f0f0f0;
}

.main-nav {
    background-color: #1a1a1a; /* Slightly lighter black for contrast */
    padding: 10px 0;
    width: 100%;
    display: flex; /* Default for desktop */
}

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

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

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

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

.hamburger-menu .bar {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #FCBC45;
    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 */
}

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

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

.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: 180px;
}

.footer-logo {
    font-size: 22px;
    font-weight: bold;
    color: #FCBC45;
    text-decoration: none;
    display: block;
    margin-bottom: 15px;
}

.site-footer p {
    font-size: 14px;
    color: #CCCCCC;
    margin: 0;
}

.site-footer h3 {
    color: #FCBC45;
    margin-bottom: 15px;
    font-size: 18px;
}

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

.site-footer li a {
    color: #FFFFFF;
    text-decoration: none;
    display: block;
    padding: 5px 0;
    font-size: 15px;
}

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

/* Mobile Styles */
@media (max-width: 768px) {
    .header-container {
        width: 100%;
        max-width: none;
        padding: 0 15px;
        justify-content: flex-start;
    }

    .hamburger-menu {
        display: block;
        margin-right: 15px;
    }

    .logo {
        flex: 1; /* Allows logo to take remaining space and center itself */
        text-align: center;
        margin-left: auto; /* Push logo to center */
        margin-right: auto; /* Push logo to center */
    }

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

    .main-nav {
        display: none; /* Hidden by default on mobile */
        position: fixed;
        top: var(--header-offset); /* Below the header-top + mobile-nav-buttons */
        left: 0;
        width: 80%; /* Menu width */
        max-width: 300px; /* Max width for menu */
        height: calc(100% - var(--header-offset));
        background-color: #000000;
        flex-direction: column;
        align-items: flex-start;
        padding: 20px 0;
        transform: translateX(-100%); /* Slide out to the left */
        transition: transform 0.3s ease;
        overflow-y: auto;
        z-index: 999;
    }

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

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

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

    .mobile-nav-buttons {
        display: flex;
        justify-content: center;
        gap: 10px;
        width: 100%;
        background-color: #000000;
        padding: 10px 15px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
        z-index: 1000; /* Ensure buttons are above overlay but below hamburger */
    }

    .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: 998; /* Below hamburger and menu */
    }

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

    body.no-scroll {
        overflow: hidden;
    }

    /* Footer Mobile Styles */
    .footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
    }

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

    .footer-col h3 {
        margin-top: 20px;
    }

    .footer-info p {
        margin-bottom: 20px;
    }

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