:root {
    --header-offset: 90px; /* Desktop: Calculated based on header-top (50px) + main-nav (40px) */
}
@media (max-width: 768px) {
    :root {
        --header-offset: 105px; /* Mobile: Calculated based on header-top (50px) + mobile-buttons (55px) */
    }
}

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

/* Global colors */
.site-header {
    background-color: #1a1a1a; /* Dark background for the whole header */
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column; /* Default to column for consistency, overridden for desktop */
    min-height: 90px; /* Matches desktop offset */
}

.header-top {
    background-color: #1E90FF; /* Auxiliary color for top bar */
    width: 100%;
    min-height: 50px;
    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: 10px 30px;
    box-sizing: border-box;
}

.logo {
    font-weight: bold;
    font-size: 24px;
    color: #FFD700; /* Primary color for logo */
    text-decoration: none;
    white-space: nowrap;
    display: block;
}

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

.btn {
    display: inline-block;
    background-color: #FFD700; /* Primary color for buttons */
    color: #1a1a1a;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    white-space: nowrap;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: #e6c200;
    transform: translateY(-1px);
}

.btn.register-btn {
    background-color: #FFD700; /* Primary color for register button */
}

.main-nav {
    background-color: #222; /* Darker background for main navigation */
    width: 100%;
    min-height: 40px;
    display: flex; /* Desktop default */
    flex-direction: row; /* Desktop default */
    align-items: center;
}

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

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

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

/* Hamburger Menu - Hidden on Desktop */
.hamburger-menu {
    display: none;
    width: 30px;
    height: 24px;
    position: relative;
    cursor: pointer;
    z-index: 1001;
}

.hamburger-menu span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: #FFD700;
    position: absolute;
    left: 0;
    transition: all 0.3s ease;
}

.hamburger-menu span:nth-child(1) { top: 0; }
.hamburger-menu span:nth-child(2) { top: 10px; }
.hamburger-menu span:nth-child(3) { top: 20px; }

.hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg);
    top: 10px;
}

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

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(-45deg);
    top: 10px;
}

/* Mobile Buttons - Hidden on Desktop */
.mobile-buttons {
    display: none;
}

/* Mobile Menu Overlay - Hidden on Desktop */
.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: 999;
}

/* Footer Styles */
.site-footer {
    background-color: #1a1a1a;
    color: #bbb;
    padding: 40px 20px;
    font-size: 14px;
}

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

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

.footer-description {
    margin-top: 15px;
    line-height: 1.8;
}

.site-footer h3 {
    color: #fff;
    font-size: 18px;
    margin-bottom: 20px;
    position: relative;
}

.site-footer h3::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background-color: #FFD700;
    margin-top: 8px;
}

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

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

.footer-nav a {
    color: #bbb;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-nav a:hover {
    color: #FFD700;
}

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

.copyright {
    color: #aaa;
    margin: 0;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .site-header {
        min-height: auto; /* Allow height to adjust for mobile layout */
    }
    
    .header-container {
        padding: 10px 15px;
        width: 100%;
        max-width: none;
        justify-content: space-between;
    }

    .hamburger-menu {
        display: block;
        order: -1; /* Move to the left */
        margin-right: 15px;
    }

    .logo {
        flex: 1 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        margin: 0; /* Override any desktop margins */
    }

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

    .mobile-buttons {
        display: flex;
        justify-content: center;
        gap: 10px;
        padding: 10px 15px;
        background-color: #1E90FF;
        width: 100%;
        box-sizing: border-box;
        min-height: 55px; /* Matches mobile offset calculation */
    }

    .main-nav {
        display: none; /* Hidden by default */
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        width: 80%;
        max-width: 300px; /* Limit sidebar width */
        height: 100%;
        background-color: #222;
        overflow-y: auto;
        transform: translateX(-100%); /* Off-screen by default */
        transition: transform 0.3s ease;
        z-index: 1000;
    }

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

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

    .nav-link {
        width: 100%;
        padding: 12px 0;
        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: 40px;
    }

    .footer-col {
        min-width: unset;
        width: 100%;
    }
    
    /* 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;
    }
}

/* Utility class to prevent body scroll */
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;
  }
}
