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

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

/* Global styles */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
  line-height: 1.6;
  color: #333;
  background-color: var(--secondary-color); /* General background color */
  overflow-x: hidden;
}

body.no-scroll {
  overflow: hidden;
}

/* Header styles */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.header-top {
  background-color: var(--primary-color); /* Distinct from main-nav */
  min-height: 50px; /* Ensure header-top has a base height */
  display: flex;
  align-items: center;
  padding: 0 20px; /* Adjust padding for visual balance */
}

.header-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px; /* Inner padding for logo and buttons */
}

.logo {
  color: var(--secondary-color);
  text-decoration: none;
  font-size: 24px;
  font-weight: bold;
  padding: 5px 0; /* Add some vertical padding for click area */
  display: block;
}

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

.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;
  text-align: center;
  border: none;
  cursor: pointer;
}

.btn-login {
  background-color: var(--login-btn-bg); /* Custom color for Login */
  color: var(--primary-color); /* Dark text for light background */
}

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

.btn-register {
  background-color: var(--primary-color); /* Primary color for Register */
  color: var(--register-btn-text); /* Custom text color for Register */
  border: 1px solid var(--register-btn-text); /* Add border for distinction */
}

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

.main-nav {
  background-color: #1a1a1a; /* Distinct from header-top */
  min-height: 40px; /* Base height for main nav */
  display: flex; /* Desktop default: flex */
  align-items: center;
  padding: 0 20px; /* Adjust padding for visual balance */
}

.nav-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  justify-content: center; /* Center nav items on desktop */
  align-items: center;
  gap: 25px; /* Space between nav items */
  padding: 10px 20px; /* Inner padding for nav links */
}

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

.nav-link:hover,
.nav-link.active {
  color: var(--login-btn-bg); /* Highlight color on hover/active */
}

/* Hamburger menu (mobile only) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  position: relative;
  z-index: 1001; /* Above logo and buttons */
}

.hamburger-icon {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--secondary-color);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: background-color 0.3s ease;
}

.hamburger-icon::before,
.hamburger-icon::after {
  content: '';
  width: 25px;
  height: 3px;
  background-color: var(--secondary-color);
  position: absolute;
  left: 0;
  transition: transform 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 nav buttons (mobile only) */
.mobile-nav-buttons {
  display: none; /* Hidden on desktop */
  background-color: #2a2a2a; /* Darker than main-nav for distinction */
  min-height: 50px; /* Base height for mobile buttons */
  padding: 10px 20px;
  justify-content: center;
  align-items: center;
  gap: 12px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* 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.7);
  z-index: 999; /* Below main-nav but above content */
}

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

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

.footer-col {
  flex: 1;
  min-width: 250px;
  text-align: left;
}

.footer-logo {
  color: var(--secondary-color);
  text-decoration: none;
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 15px;
  display: inline-block;
}

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

.site-footer p {
  font-size: 14px;
  margin-top: 15px;
}

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

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

.footer-nav a {
  color: var(--secondary-color);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;
}

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

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

  .header-top {
    padding: 0 15px; /* Smaller padding for mobile */
  }

  .header-container {
    width: 100%;
    max-width: none; /* Important: remove max-width on mobile */
    padding: 0; /* Remove inner padding as header-top already has it */
    justify-content: space-between; /* Hamburger left, logo center, space right */
  }

  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    order: 0; /* Place hamburger first */
    margin-right: 10px; /* Space between hamburger and logo */
  }

  .logo {
    order: 1; /* Place logo second */
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 10px 0; /* Adjust vertical padding */
  }
  .logo img {
    display: block !important;
    max-width: 100%;
    height: auto;
    max-height: 40px;
  }
  
  /* Placeholder for empty space to push logo to center */
  .header-container::after {
    content: '';
    width: 30px; /* Same width as hamburger for balance */
    margin-left: 10px; /* Space between logo and empty space */
  }

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

  .mobile-nav-buttons {
    display: flex; /* Show mobile buttons */
  }

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

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

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px; /* Space between mobile nav items */
    padding: 0 20px;
    width: 100%;
    max-width: none; /* Remove max-width */
  }

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

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

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

  .footer-col {
    text-align: center;
    min-width: unset;
  }
  .footer-nav ul {
    text-align: center;
  }
  .footer-logo {
    margin-bottom: 10px;
  }
}
/* 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;
  }
}
