:root {
  --primary-color: #000000;
  --secondary-color: #FFFFFF;
  --login-btn-color: #FCBC45;
  --register-btn-color: #FFFFFF;
  --header-offset: 100px; /* Desktop: header-top (60px) + main-nav (40px) = 100px */
}

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

body {
  margin: 0;
  font-family: Arial, sans-serif;
  padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
  overflow-x: hidden; /* Prevent horizontal scroll on mobile */
}

/* 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: var(--primary-color); /* Default background for the entire header */
  color: var(--secondary-color);
}

.header-top {
  background-color: var(--primary-color); /* Dark background for the top bar */
  padding: 15px 0; /* Provides 60px height with 30px content */
}

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

.logo {
  font-size: 24px;
  font-weight: bold;
  text-decoration: none;
  color: var(--login-btn-color); /* Use login button color for prominence */
  display: block; /* Ensure logo is visible on desktop */
}

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

.btn {
  text-decoration: none;
  border-radius: 5px;
  padding: 8px 15px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
  white-space: nowrap; /* Prevent button text from wrapping */
}

.btn-login {
  background-color: var(--login-btn-color);
  color: var(--primary-color);
}

.btn-register {
  background-color: var(--register-btn-color);
  color: var(--primary-color);
  border: 1px solid var(--login-btn-color);
}

.main-nav {
  background-color: #333333; /* Slightly lighter dark for contrast with header-top */
  padding: 10px 0; /* Provides 40px height with 20px content */
  display: flex; /* Desktop default: visible */
  flex-direction: row; /* Desktop default: horizontal */
  justify-content: center;
  align-items: center;
}

.main-nav .nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
}

.main-nav .nav-link {
  color: var(--secondary-color);
  text-decoration: none;
  padding: 10px 15px;
  transition: color 0.3s ease, background-color 0.3s ease;
  white-space: nowrap;
}

.main-nav .nav-link:hover,
.main-nav .nav-link.active {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--login-btn-color);
  border-radius: 3px;
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1001; /* Above other header elements */
}

.hamburger-menu .bar {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--secondary-color);
  margin: 5px 0;
  transition: all 0.3s ease;
}

/* Mobile specific elements - hidden on desktop */
.mobile-nav-buttons {
  display: none; /* Hidden on desktop */
}

.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.7);
  z-index: 999; /* Below the mobile menu */
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

/* Footer styles */
.site-footer {
  background-color: var(--primary-color);
  color: var(--secondary-color);
  padding: 40px 20px;
  text-align: center;
}

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

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

.site-footer .footer-logo {
  font-size: 22px;
  font-weight: bold;
  text-decoration: none;
  color: var(--login-btn-color);
  display: block;
  margin-bottom: 15px;
}

.site-footer h3 {
  font-size: 18px;
  margin-bottom: 15px;
  color: var(--login-btn-color); /* Using login button color for headings */
}

.site-footer p {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
}

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

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

.site-footer .footer-nav a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;
}

.site-footer .footer-nav a:hover {
  color: var(--login-btn-color);
}

/* Media Queries for Mobile */
@media (max-width: 768px) {
  .header-container {
    padding: 0 15px;
    justify-content: space-between; /* Hamburger left, Logo center, space right */
  }

  .hamburger-menu {
    display: block; /* Visible on mobile */
    order: 1; /* Leftmost */
  }

  .logo {
    flex: 1 !important; /* Take available space */
    display: flex !important; /* Enable flex for centering */
    justify-content: center !important; /* Center the logo */
    align-items: center !important;
    order: 2; /* Center position */
    font-size: 20px; /* Smaller font for mobile */
  }

  /* Placeholder for the right side to push logo to center */
  .header-container::after {
    content: '';
    display: block;
    width: 45px; /* Match hamburger menu width for centering (approx hamburger + padding) */
    order: 3;
  }

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

  .mobile-nav-buttons {
    display: flex; /* Show mobile buttons */
    background-color: #222222; /* Darker background for mobile buttons, distinct from header-top */
    padding: 10px 0; /* Provides 50px height with 30px content */
  }
  
  .mobile-nav-buttons .nav-container {
    width: 100%; /* Ensure container takes full width */
    max-width: none; /* Remove max-width restriction */
    padding: 0 15px;
    justify-content: center;
    gap: 10px;
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: var(--header-offset); /* Start below the fixed header */
    left: 0;
    width: 250px; /* Width of the mobile menu */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    flex-direction: column;
    align-items: flex-start;
    background-color: var(--primary-color);
    box-shadow: 2px 0 5px rgba(0,0,0,0.3);
    transform: translateX(-100%); /* Slide out to the left */
    transition: transform 0.3s ease;
    overflow-y: auto; /* Allow scrolling for long menus */
  }

  .main-nav.active {
    display: flex; /* Show when active */
    transform: translateX(0); /* Slide in */
  }
  
  .main-nav .nav-container {
    width: 100%;
    max-width: none;
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 15px; /* Add padding to mobile menu links */
  }

  .main-nav .nav-link {
    width: 100%;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

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

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

  .site-footer .footer-container {
    flex-direction: column;
    align-items: center;
  }

  .site-footer .footer-col {
    min-width: unset;
    width: 100%;
    margin-bottom: 30px;
  }

  .site-footer .footer-col:last-child {
    margin-bottom: 0;
  }

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

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