:root {
  --header-offset: 100px; /* Desktop: header-top (60px) + main-nav (40px) */
}
@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 */
  overflow-x: hidden; /* Prevent horizontal scroll on body */
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: #000000; /* Primary background for header */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  display: flex;
  flex-direction: column; /* Default stack for header sections */
}

.header-top {
  background-color: #111111; /* Dark grey for header top, distinct from main-nav */
  width: 100%;
  padding: 15px 0; /* Vertical padding */
  min-height: 60px; /* Ensure minimum height */
  box-sizing: border-box;
}

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

.logo {
  font-size: 28px;
  font-weight: bold;
  color: #FCBC45; /* Logo color */
  text-decoration: none;
  text-transform: uppercase;
  display: block; /* Ensure logo is visible */
}

.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;
  white-space: nowrap; /* Prevent buttons from wrapping */
  display: inline-block; /* Ensure padding and dimensions apply */
  text-align: center;
}

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

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

.btn-register {
  background-color: #FFFFFF; /* Register button color */
  color: #000000;
  border: 1px solid #FCBC45; /* Add a subtle border for contrast */
}

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

.main-nav {
  background-color: #000000; /* Black for main nav, distinct from header-top */
  width: 100%;
  display: flex; /* Desktop default: visible */
  flex-direction: row; /* Desktop default: horizontal */
  justify-content: center; /* Center menu items */
  padding: 10px 0; /* Vertical padding */
  min-height: 40px; /* Ensure minimum height */
  box-sizing: border-box;
}

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

.nav-link {
  color: #FFFFFF;
  text-decoration: none;
  padding: 5px 10px;
  font-weight: bold;
  transition: color 0.3s ease;
  white-space: nowrap; /* Prevent links from wrapping */
}

.nav-link:hover {
  color: #FCBC45; /* Highlight color on hover */
}

/* Hamburger Menu (hidden on desktop) */
.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 24px;
  position: relative;
  z-index: 1001; /* Above other elements */
}

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

.hamburger-icon::before,
.hamburger-icon::after {
  content: '';
  display: block;
  width: 100%;
  height: 3px;
  background-color: #FFFFFF;
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
}

.hamburger-icon::before {
  top: -8px;
}

.hamburger-icon::after {
  top: 8px;
}

.hamburger-menu.active .hamburger-icon {
  background-color: transparent;
}

.hamburger-menu.active .hamburger-icon::before {
  transform: translateY(8px) rotate(45deg);
}

.hamburger-menu.active .hamburger-icon::after {
  transform: translateY(-8px) rotate(-45deg);
}

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

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

/* Footer */
.site-footer {
  background-color: #000000; /* Dark background for footer */
  color: #FFFFFF;
  padding: 40px 0 20px;
  font-size: 14px;
}

.site-footer h3 {
  color: #FCBC45; /* Highlight color for footer headings */
  margin-bottom: 20px;
  font-size: 18px;
}

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

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

.footer-section p {
  line-height: 1.6;
  color: #CCCCCC;
}

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

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

.footer-section ul li a {
  color: #CCCCCC;
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.footer-bottom {
  text-align: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #333333;
  color: #CCCCCC;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .site-header {
    flex-direction: column; /* Stack header sections vertically */
  }

  .header-top {
    padding: 15px 0; /* Adjust padding for mobile */
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 60px;
  }

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

  .logo {
    flex: 1 !important; /* For centering the logo */
    display: flex !important; /* For centering the logo */
    justify-content: center !important; /* For centering the logo */
    align-items: center !important; /* For centering the logo */
    font-size: 24px; /* Adjust logo size for mobile */
  }

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

  .hamburger-menu {
    display: block; /* Show hamburger menu on mobile */
    order: -1; /* Place hamburger menu to the left */
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column; /* Vertical layout for mobile menu */
    position: fixed;
    top: var(--header-offset); /* Position below fixed header elements */
    left: 0;
    width: 80%; /* Menu width */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background-color: #000000; /* Same as desktop for consistency */
    transform: translateX(-100%); /* Slide out to the left */
    transition: transform 0.3s ease;
    overflow-y: auto; /* Enable scrolling for long menus */
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
    padding: 20px 0;
    box-sizing: border-box;
  }

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

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

  .nav-link {
    width: 100%; /* Full width for mobile menu items */
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .nav-link:last-child {
      border-bottom: none;
  }

  .mobile-nav-buttons {
    display: flex; /* Show mobile buttons */
    justify-content: center;
    gap: 10px;
    background-color: #000000; /* Match main nav background */
    padding: 10px 15px; /* Padding for the button area */
    width: 100%;
    box-sizing: border-box;
    min-height: 50px; /* Ensure minimum height */
  }

  .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 overlay */
    z-index: 999; /* Below menu, above content */
  }

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

  body.no-scroll {
    overflow: hidden; /* Prevent scrolling when menu is open */
  }

  /* Footer adjustments for mobile */
  .footer-container {
    flex-direction: column;
    padding: 0 15px;
  }

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

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