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

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

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  background-color: var(--secondary-color); /* Default background for entire header */
  transition: background-color 0.3s ease;
}

.header-top {
  background-color: var(--primary-color); /* Darker background for the top bar */
  color: var(--secondary-color);
  padding: 15px 0; /* Desktop padding */
}

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

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--secondary-color);
  text-decoration: none;
  padding: 5px 0; /* Adjust padding to match header-top height */
  display: block; /* Ensure it's not hidden */
}

.desktop-nav-buttons {
  display: flex; /* Always flex for desktop */
  gap: 10px;
}

.btn {
  padding: 8px 15px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease;
  white-space: nowrap;
  display: inline-block; /* Ensure button styling applies */
  border: none; /* Remove default button border */
}

.login-btn {
  background-color: var(--login-btn-color);
  color: var(--primary-color); /* Ensure contrast */
}

.login-btn:hover {
  background-color: #e5a73e; /* Darkened version of #FCBC45 */
}

.register-btn {
  background-color: var(--register-btn-color);
  color: var(--primary-color); /* Ensure contrast */
  border: 1px solid var(--primary-color); /* Add border for visibility against white */
}

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

.main-nav {
  background-color: #333333; /* Slightly lighter dark for nav, contrasting with header-top */
  padding: 10px 0; /* Desktop padding */
  display: flex; /* Desktop: always visible */
  justify-content: center;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row; /* Desktop: horizontal */
  justify-content: center;
  align-items: center;
  padding: 0 20px; /* Desktop padding */
  flex-wrap: wrap; /* Allow wrapping on smaller desktop screens */
}

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

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

/* Hamburger Menu (hidden on desktop) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  font-size: 30px;
  color: var(--secondary-color);
  cursor: pointer;
  padding: 0 10px;
  z-index: 1001; /* Above logo on mobile */
}

/* Mobile Nav 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(--primary-color);
  color: var(--secondary-color);
  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-section {
  flex: 1;
  min-width: 250px;
}

.footer-section h3 {
  color: var(--secondary-color);
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 18px;
}

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

.footer-section ul li a {
  color: var(--secondary-color);
  text-decoration: none;
  display: block;
  padding: 5px 0;
}

.footer-section ul li a:hover {
  text-decoration: underline;
}

.footer-bottom {
  text-align: center;
  margin-top: 40px;
  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);
}


/* Mobile Styles */
@media (max-width: 768px) {
  .header-top {
    padding: 10px 0; /* Mobile padding */
  }

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

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

  .logo {
    order: 2; /* Center */
    flex: 1; /* Take remaining space to push to center */
    text-align: center;
    font-size: 22px;
    padding: 0; /* Reset padding */
  }
  
  /* Placeholder for empty space on the right, to center logo */
  .header-container::after {
    content: '';
    display: block;
    width: 30px; /* Match hamburger width for centering */
    order: 3; /* Rightmost */
  }

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

  .mobile-nav-buttons {
    display: flex; /* Show mobile buttons */
    background-color: var(--primary-color); /* Match header-top background */
    justify-content: center;
    gap: 10px;
    padding: 10px 15px; /* Mobile padding */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 990; /* Below hamburger/menu */
  }

  .main-nav {
    display: none; /* Hide main nav by default on mobile */
    flex-direction: column; /* Vertical links */
    position: fixed;
    top: var(--header-offset); /* Start below the visible header */
    left: 0;
    width: 75%; /* Slide in from left */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background-color: #222; /* Darker background for mobile menu */
    transform: translateX(-100%); /* Off-screen by default */
    transition: transform 0.3s ease-out;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
    overflow-y: auto; /* Enable scrolling for long menus */
    z-index: 999; /* Above content, below overlay */
  }

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

  .nav-container {
    width: 100%;
    max-width: none; /* Mobile: full width */
    flex-direction: column;
    padding: 10px 15px; /* Mobile padding */
    align-items: flex-start; /* Align links to the left */
  }

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

  .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: 998; /* Below menu, above content */
  }

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

  /* Footer Mobile Styles */
  .footer-container {
    flex-direction: column;
    gap: 20px;
  }

  .footer-section {
    min-width: unset; /* Remove min-width on mobile */
    width: 100%;
  }

  /* Mobile Content Overflow Protection */
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: hidden;
  }
}

/* Hamburger menu animation for X */
.hamburger-menu.active {
  color: var(--login-btn-color); /* Highlight when active */
}

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