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

body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: #FFFFFF; /* Default text color for dark background */
  background-color: #FFFFFF; /* Page background as specified */
  padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
  overflow-x: hidden; /* Prevent horizontal scrolling on body */
}

/* Header Styles */
.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 */
  padding: 15px 0; /* Desktop padding */
  min-height: 40px; /* Adjust based on logo/content height */
}

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

.logo {
  font-size: 28px;
  font-weight: bold;
  color: #FFFFFF; /* Auxiliary color for logo text */
  text-decoration: none;
  display: block; /* Ensure logo is visible on desktop */
}

.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; /* Prevent buttons from wrapping */
  display: inline-block;
}

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

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

.btn.register-btn {
  background-color: #FFFFFF; /* Specified color */
  color: #000000; /* Contrast with button background */
}

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

/* Main Navigation */
.main-nav {
  background-color: #1a1a1a; /* Darker variant for contrast with header-top */
  width: 100%;
  display: flex; /* Desktop default: visible and horizontal */
  padding: 10px 0; /* Desktop padding */
  min-height: 30px; /* Adjust based on nav-link height */
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 0 20px; /* Desktop side padding */
  flex-wrap: wrap; /* Allow nav links to wrap if screen is too narrow */
}

.nav-link {
  color: #FFFFFF; /* Auxiliary color for nav links */
  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 {
  color: #FCBC45; /* Highlight on hover */
}

/* Mobile specific elements - hidden on desktop */
.hamburger-menu,
.mobile-nav-buttons,
.mobile-menu-overlay {
  display: none;
}

/* Footer Styles */
.site-footer {
  background-color: #1a1a1a; /* Dark grey variant */
  color: #FFFFFF;
  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: 30px;
}

.footer-column {
  flex: 1;
  min-width: 200px;
}

.footer-column h3 {
  color: #FCBC45; /* Highlight color for footer titles */
  font-size: 18px;
  margin-bottom: 15px;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

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

.footer-bottom {
  text-align: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #333333; /* Subtle separator */
  color: #CCCCCC; /* Lighter grey for copyright text */
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  .site-header {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  }

  .header-top {
    padding: 10px 0; /* Mobile padding */
    min-height: 40px;
  }

  .header-container {
    padding: 0 15px; /* Mobile side padding */
    width: 100%;
    max-width: none; /* Crucial for mobile container width */
    justify-content: space-between; /* Space between hamburger and logo */
  }

  .hamburger-menu {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001; /* Above logo and mobile buttons */
  }

  .hamburger-menu .bar {
    width: 100%;
    height: 3px;
    background-color: #FFFFFF;
    transition: all 0.3s ease;
    border-radius: 2px;
  }

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

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

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

  .logo {
    flex: 1 !important; /* Forces logo to take available space */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px;
  }
  
  .logo img { /* If logo is an image */
    display: block !important;
    max-width: 100%;
    height: auto;
    max-height: 40px;
  }

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

  .main-nav {
    display: none; /* Mobile default: hidden */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Start below the fixed header */
    left: 0;
    width: 70%; /* Mobile menu width */
    height: calc(100vh - var(--header-offset)); /* Full height below header */
    background-color: #000000; /* Menu background */
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
    transform: translateX(-100%); /* Hidden by default */
    transition: transform 0.3s ease;
    z-index: 999; /* Below hamburger, above overlay */
    overflow-y: auto; /* Allow scrolling for long menus */
  }

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

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

  .main-nav .nav-link {
    width: 100%;
    padding: 12px 15px;
    border-bottom: 1px solid #333333;
    font-size: 18px;
  }

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

  .mobile-nav-buttons {
    display: flex; /* Show mobile buttons */
    justify-content: center;
    gap: 10px;
    width: 100%;
    background-color: #000000; /* Same as header-top */
    padding: 10px 15px; /* Mobile padding */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 998; /* Below main-nav */
  }
  
  .mobile-nav-buttons .btn {
      flex: 1; /* Make buttons take equal space */
      text-align: center;
  }

  .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);
    z-index: 990; /* Below menu */
  }

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

  .footer-container {
    flex-direction: column;
    gap: 20px;
    padding: 0 15px;
  }

  .footer-column {
    min-width: unset;
  }

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

/* No-scroll class for body when mobile menu is open */
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;
  }
}
