:root {
    --header-offset: 100px; /* Desktop: header-top (60px) + main-nav (40px) */
}

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

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #E0E0E0; /* Light grey for general text */
    background-color: #1A202C; /* Main color as background */
    margin: 0;
    padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
    overflow-x: hidden; /* Prevent horizontal scroll on mobile */
}

/* Shared Container Styles */
.header-container, .nav-container, .footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

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

.header-top {
    background-color: #1A202C; /* Dark background for top section */
    width: 100%;
    padding: 15px 0;
}

.header-top .header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #FFD700; /* Gold color for logo */
    text-decoration: none;
    text-transform: uppercase;
    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, color 0.3s ease;
    white-space: nowrap;
    cursor: pointer;
}

.btn.login-btn {
    background-color: #FFD700; /* Gold for Login */
    color: #1A202C;
}

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

.btn.register-btn {
    background-color: #E53E3E; /* Red for Register */
    color: #FFFFFF;
}

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

.main-nav {
    background-color: #2D3748; /* Slightly lighter dark for main nav */
    width: 100%;
    display: flex; /* Desktop default: show nav */
    padding: 10px 0;
}

.main-nav .nav-container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 25px;
}

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

.nav-link:hover {
    color: #FFD700;
}

/* Hamburger menu (hidden on desktop) */
.hamburger-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    position: relative;
    z-index: 1001;
}

.hamburger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #FFD700;
    margin-bottom: 5px;
    transition: transform 0.3s ease, opacity 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);
}

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

/* Site Footer */
.site-footer {
    background-color: #1A202C;
    color: #E0E0E0;
    padding: 40px 0 20px;
    font-size: 14px;
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 30px;
}

.footer-section {
    flex: 1;
    min-width: 250px;
    margin-bottom: 20px;
}

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

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

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

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

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

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

/* Mobile Styles */
@media (max-width: 768px) {
    .header-container, .nav-container, .footer-container {
        width: 100%;
        max-width: none;
        padding-left: 15px;
        padding-right: 15px;
    }

    .header-top {
        padding: 10px 0;
    }

    .header-top .header-container {
        justify-content: space-between;
        flex-wrap: nowrap;
    }

    .hamburger-menu {
        display: block;
        order: 0; /* Leftmost position */
    }

    .logo {
        flex: 1;
        text-align: center;
        order: 1; /* Center position */
    }

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

    .main-nav {
        display: none; /* Hidden by default on mobile */
        position: fixed;
        top: var(--header-offset); /* Position below header content */
        left: 0;
        width: 80%; /* Sidebar width */
        max-width: 300px;
        height: calc(100vh - var(--header-offset));
        background-color: #2D3748;
        flex-direction: column;
        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 when active */
        transform: translateX(0); /* Slide in */
    }

    .main-nav .nav-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding: 20px 0;
    }

    .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;
        padding: 10px 15px;
        background-color: #2D3748; /* Same as main nav for consistency */
        width: 100%;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }

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

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

    body.no-scroll {
        overflow: hidden;
    }

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

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