:root {
  --header-offset: 110px; /* Desktop: header-top (approx 60px) + main-nav (approx 50px) */
}

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

body {
  margin: 0;
  font-family: 'Arial', sans-serif;
  color: #FFFFFF; /* Default text color for dark backgrounds in header/footer */
  background-color: #FFFFFF; /* Default page background */
  line-height: 1.6;
}

/* Site Header - Fixed Navigation */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Header Top Section (Desktop) */
.header-top {
  background-color: #000000; /* Primary color */
  min-height: 60px;
  display: flex;
  align-items: center;
}

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

.logo {
  color: #FFFFFF;
  text-decoration: none;
  font-size: 24px;
  font-weight: bold;
  text-transform: uppercase;
  display: block;
}

/* Desktop Navigation Buttons */
.desktop-nav-buttons {
  display: flex;
  gap: 12px;
}

.btn {
  padding: 8px 16px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

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

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

.btn:hover {
  opacity: 0.9;
}

/* Main Navigation (Desktop) */
.main-nav {
  background-color: #1a1a1a; /* Dark grey, different from header-top */
  min-height: 50px;
  display: flex; /* Default to flex for desktop */
  align-items: center;
  width: 100%;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: center; /* Center nav links horizontally */
  align-items: center;
  padding: 10px 20px;
  box-sizing: border-box;
}

.nav-link {
  color: #FFFFFF;
  text-decoration: none;
  padding: 8px 15px;
  transition: color 0.3s ease, background-color 0.3s ease;
  white-space: nowrap;
}

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

/* Hamburger menu (Hidden on Desktop) */
.hamburger-menu {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  position: relative;
  z-index: 1001;
}

.hamburger-icon {
  display: block;
  width: 25px;
  height: 3px;
  background-color: #FFFFFF;
  position: relative;
  transition: background-color 0.3s ease;
}

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

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

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

/* Mobile Navigation Buttons (Hidden on Desktop) */
.mobile-nav-buttons {
  display: none; /* Hidden by default for desktop */
  background-color: #000000;
  padding: 10px 20px;
  box-sizing: border-box;
  width: 100%;
}

.mobile-nav-buttons-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 12px;
  box-sizing: border-box;
}

.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Footer */
.site-footer {
  background-color: #000000; /* Primary color */
  color: #FFFFFF;
  padding: 40px 20px;
  text-align: center;
}

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

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

.footer-brand .footer-logo {
  color: #FFFFFF;
  text-decoration: none;
  font-size: 20px;
  font-weight: bold;
  text-transform: uppercase;
  display: block;
  margin-bottom: 10px;
}

.footer-brand p {
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

.footer-links h3 {
  color: #FCBC45; /* Accent color for headings */
  font-size: 18px;
  margin-top: 0;
  margin-bottom: 15px;
}

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

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

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

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

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

  /* Header adjustments */
  .header-container {
    padding: 10px 15px;
    max-width: none;
    width: 100%;
    justify-content: space-between;
  }

  .hamburger-menu {
    display: block;
  }

  .desktop-nav-buttons {
    display: none;
  }

  .logo {
    flex: 1;
    text-align: center;
    font-size: 20px;
  }

  .main-nav {
    display: none; /* Hidden by default */
    position: fixed;
    top: var(--header-offset); /* Start below the fixed header (header-top + mobile-nav-buttons) */
    left: 0;
    width: 70%; /* Adjust width for mobile menu */
    height: calc(100% - var(--header-offset));
    background-color: #000000; /* Dark background for mobile menu */
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 20px 15px;
    box-sizing: border-box;
    transform: translateX(-100%); /* Off-screen by default */
    transition: transform 0.3s ease;
    z-index: 1000; /* Ensure menu is above overlay but below hamburger button */
  }

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

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 0;
    width: 100%;
    max-width: none;
  }

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

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

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

  /* Hamburger active state */
  .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);
  }

  /* Footer adjustments */
  .footer-container {
    flex-direction: column;
    text-align: center;
  }

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

  .footer-links h3 {
    margin-top: 20px;
  }

  .footer-nav {
    text-align: center;
  }

  .footer-nav li {
    display: inline-block;
    margin: 0 8px 8px 0;
  }
}

/* Body no-scroll class for mobile menu */
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;
  }
}
