:root {
  --primary-color: #007bff;
  --secondary-color: #dc3545;
  --text-color-light: #f8f9fa;
  --text-color-dark: #343a40;
  --header-top-bg: #343a40; /* Dark background for header top */
  --main-nav-bg: var(--primary-color); /* Primary color for main nav */
  --button-login-bg: var(--primary-color);
  --button-register-bg: var(--secondary-color);
  --header-offset: 110px; /* Desktop: header-top (60px) + main-nav (50px) */
}

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

/* General Reset & Body */
body {
  margin: 0;
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-color-dark);
  padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: var(--primary-color);
}

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

/* Site Header (Fixed Navigation) */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  background-color: #fff; /* Base background for the entire header */
}

/* Header Top Section (Desktop) */
.header-top {
  background-color: var(--header-top-bg);
  min-height: 60px; /* Desktop height */
  display: flex;
  align-items: center;
  padding: 10px 0; /* Vertical padding */
}

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

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--text-color-light); /* Contrasting color for logo on dark background */
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block; /* Ensure logo is visible */
}

/* Desktop Navigation Buttons */
.desktop-nav-buttons {
  display: flex; /* Always visible on desktop */
  gap: 12px; /* Spacing between buttons */
}

.btn {
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: bold;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  white-space: nowrap; /* Prevent buttons from wrapping */
  text-decoration: none; /* Remove underline */
  font-size: 16px;
}

.btn-login {
  background-color: var(--button-login-bg);
  color: var(--text-color-light);
  border: none;
}

.btn-login:hover {
  background-color: #0056b3; /* Darker blue */
  transform: translateY(-2px);
}

.btn-register {
  background-color: var(--button-register-bg);
  color: var(--text-color-light);
  border: none;
}

.btn-register:hover {
  background-color: #c82333; /* Darker red */
  transform: translateY(-2px);
}

/* Main Navigation (Desktop) */
.main-nav {
  background-color: var(--main-nav-bg);
  min-height: 50px; /* Desktop height */
  display: flex; /* Always visible on desktop */
  align-items: center;
  padding: 5px 0; /* Vertical padding */
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: center; /* Center menu items */
  gap: 25px; /* Spacing between menu items */
  padding: 0 30px; /* Desktop padding */
}

.nav-link {
  color: var(--text-color-light);
  font-weight: 500;
  font-size: 16px;
  padding: 8px 15px;
  border-radius: 4px;
  transition: background-color 0.3s ease;
  white-space: nowrap; /* Prevent menu items from wrapping */
}

.nav-link:hover, .nav-link.active {
  background-color: rgba(255, 255, 255, 0.2);
}

/* Hamburger Menu (Hidden on Desktop) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  cursor: pointer;
  padding: 10px;
  z-index: 1001; /* Above mobile buttons */
}

.hamburger-menu .bar {
  width: 25px;
  height: 3px;
  background-color: var(--text-color-light);
  margin: 5px 0;
  transition: 0.4s;
}

/* Mobile Navigation Buttons (Hidden on Desktop) */
.mobile-nav-buttons {
  display: none; /* Hidden on desktop */
}

/* Mobile Menu Overlay (Hidden on Desktop) */
.mobile-menu-overlay {
  display: none; /* Hidden on desktop */
}

/* Footer Styles */
.site-footer {
  background-color: var(--header-top-bg); /* Use the same dark background as header-top */
  color: var(--text-color-light);
  padding: 40px 20px 20px;
  font-size: 14px;
}

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

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

.footer-col h3 {
  color: var(--text-color-light);
  font-size: 18px;
  margin-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 10px;
  text-align: left; /* Default alignment */
}

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

.footer-nav a {
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: var(--text-color-light);
}

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

.footer-bottom p {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
}

/* General body class for no-scroll */
body.no-scroll {
  overflow: hidden;
}

/* Media Queries for Mobile */
@media (max-width: 768px) {
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }

  .site-header {
    background-color: var(--header-top-bg); /* Entire header gets the top bar background */
  }

  .header-top {
    min-height: 60px; /* Mobile height */
    padding: 10px 15px; /* Smaller padding for mobile */
    background-color: transparent; /* Top bar will take site-header background */
  }

  .header-container {
    padding: 0 15px; /* Mobile padding */
    width: 100%;
    max-width: none; /* Crucial for mobile container width */
    justify-content: space-between; /* Hamburger left, logo center, space right */
  }

  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    order: 1; /* Leftmost */
    color: var(--text-color-light);
  }

  .logo {
    order: 2; /* Center */
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px;
  }

  /* Placeholder for empty space to balance logo centering */
  .header-container::after {
    content: '';
    order: 3;
    width: 45px; /* Approximate width of hamburger menu to balance logo */
  }

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

  /* Mobile Navigation Buttons (Always visible below header-top) */
  .mobile-nav-buttons {
    display: flex; /* Show mobile buttons */
    justify-content: center;
    gap: 10px;
    padding: 10px 15px;
    background-color: var(--header-top-bg); /* Same as header-top */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05); /* Slight shadow */
    min-height: 50px; /* Mobile buttons height */
  }

  .mobile-nav-buttons .btn {
    flex: 1; /* Distribute buttons evenly */
    max-width: 150px; /* Limit button width */
    font-size: 15px;
    padding: 8px 15px;
  }

  /* Main Navigation (Mobile - hidden by default, slides in) */
  .main-nav {
    display: none; /* Hidden by default */
    flex-direction: column;
    position: fixed;
    top: 0; /* Aligned with the top of the viewport */
    left: 0;
    width: 280px; /* Width of the mobile menu */
    height: 100%;
    background-color: var(--main-nav-bg);
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    transform: translateX(-100%); /* Start off-screen to the left */
    transition: transform 0.3s ease;
    padding-top: 70px; /* Space for hamburger/logo when menu is open */
    overflow-y: auto; /* Allow scrolling for long menus */
  }

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

  .nav-container {
    flex-direction: column;
    align-items: flex-start; /* Align menu items to the left */
    padding: 20px 15px;
    gap: 15px;
    width: 100%;
    max-width: none; /* Crucial for mobile container width */
  }

  .nav-link {
    width: 100%;
    text-align: left;
    padding: 12px 15px;
    font-size: 17px;
  }

  /* Hamburger menu active state (X icon) */
  .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 Menu Overlay */
  .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.5); /* Semi-transparent black */
    z-index: 999; /* Below menu, above content */
  }

  .mobile-menu-overlay.active {
    display: block; /* Show when active */
  }

  /* Footer Mobile Styles */
  .footer-container {
    flex-direction: column;
    gap: 0; /* Remove gap for vertical stacking */
  }

  .footer-col {
    min-width: unset; /* Remove min-width */
    width: 100%; /* Full width */
    margin-bottom: 25px;
  }

  .footer-col h3 {
    text-align: center;
    border-bottom: none; /* Remove border for cleaner look */
    padding-bottom: 0;
    margin-bottom: 10px;
  }

  .footer-nav {
    display: flex;
    flex-wrap: wrap; /* Allow links to wrap */
    justify-content: center; /* Center links */
  }

  .footer-nav li {
    margin: 5px 10px; /* Spacing between wrapped links */
  }

  .footer-bottom {
    padding-top: 15px;
  }
}
/* 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;
  }
}
