:root {
  --primary-color: #1A1A2E;
  --secondary-color: #E9B000;
  --text-color-light: #F0F0F0;
  --text-color-dark: #1A1A2E; /* For text on bright secondary color */
  --header-offset: 120px; /* Desktop: header-top (70px) + main-nav (50px) */
}

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

body {
  padding-top: var(--header-offset);
  overflow-x: hidden; /* Prevents horizontal scroll on mobile */
  margin: 0;
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-color-light);
  background-color: #0d0d1a;
}

/* Fixed header */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
}

/* Header Top Section */
.header-top {
  background-color: var(--primary-color); /* Dark midnight blue */
  min-height: 70px; /* Desktop */
  display: flex;
  align-items: center;
  padding: 15px 0; /* Vertical padding for content */
}

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

/* Logo */
.logo {
  font-family: 'Arial Black', sans-serif; /* Example font */
  font-size: 28px;
  font-weight: bold;
  color: var(--secondary-color); /* Golden yellow for prominence */
  text-decoration: none;
  text-transform: uppercase;
  display: block;
}

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

.btn {
  padding: 10px 20px;
  border-radius: 25px;
  font-size: 16px;
  font-weight: bold;
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  line-height: 1;
}

.btn-login {
  background-color: var(--secondary-color);
  color: var(--text-color-dark); /* Dark text on bright button */
}

.btn-login:hover {
  background-color: #FFC107; /* Slightly lighter gold on hover */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-register {
  background-color: var(--primary-color); /* Dark background for register */
  color: var(--secondary-color); /* Golden text */
  border: 2px solid var(--secondary-color);
}

.btn-register:hover {
  background-color: var(--secondary-color);
  color: var(--text-color-dark);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Main Navigation (Desktop) */
.main-nav {
  background-color: #B08500; /* Darker golden yellow for main nav */
  min-height: 50px; /* Desktop */
  display: flex; /* Desktop default: flex */
  align-items: center;
  padding: 10px 0; /* Vertical padding */
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: center; /* Centered menu items */
  align-items: center;
  padding: 0 20px; /* Desktop side padding */
  gap: 30px; /* Space between menu items */
}

.nav-link {
  color: var(--text-color-light);
  text-decoration: none;
  font-size: 17px;
  font-weight: 500;
  padding: 5px 0;
  position: relative;
  white-space: nowrap;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background-color: var(--text-color-light);
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

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

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

/* Mobile Navigation Buttons (Hidden on Desktop) */
.mobile-nav-buttons-wrapper {
  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: var(--primary-color);
  color: var(--text-color-light);
  padding: 40px 20px 20px;
  font-size: 15px;
}

.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: 200px;
  margin-bottom: 20px;
}

.footer-logo {
  font-family: 'Arial Black', sans-serif;
  font-size: 24px;
  font-weight: bold;
  color: var(--secondary-color);
  text-decoration: none;
  text-transform: uppercase;
  display: block;
  margin-bottom: 15px;
}

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

.site-footer p {
  line-height: 1.6;
  margin-bottom: 10px;
}

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

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

.footer-nav a {
  color: var(--text-color-light);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: var(--secondary-color);
}

.footer-bottom {
  text-align: center;
  margin-top: 30px;
  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 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%;
  }
  body {
    overflow-x: hidden;
  }

  .header-container {
    padding: 0 15px; /* Smaller side padding on mobile */
    max-width: none; /* Mobile container takes full width */
    justify-content: space-between; /* Hamburger left, logo center, space right */
  }

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

  .logo {
    flex: 1; /* Allows logo to take remaining space for centering */
    text-align: center; /* Center text logo */
    order: 2; /* Second position */
    font-size: 24px; /* Smaller logo on mobile */
  }

  .desktop-nav-buttons {
    display: none; /* Hide desktop buttons on mobile */
  }
  
  /* Mobile buttons wrapper */
  .mobile-nav-buttons-wrapper {
    display: block; /* Show mobile buttons wrapper */
    background-color: var(--primary-color); /* Same as header-top or distinct */
    padding: 10px 0; /* Vertical padding */
    min-height: 60px; /* Mobile */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 990; /* Below header-top, above main content */
  }

  .mobile-nav-buttons-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    max-width: none; /* Full width */
    padding: 0 15px;
    margin: 0 auto;
    width: 100%;
  }

  .mobile-nav-buttons-container .btn {
    flex: 1;
    max-width: 150px;
    font-size: 15px;
    padding: 8px 15px;
  }

  /* Main Navigation (Mobile) - Hidden by default, slides in */
  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: var(--header-offset); /* Below fixed header and mobile buttons */
    left: 0;
    width: 280px; /* Menu width */
    height: calc(100vh - var(--header-offset)); /* Full height below header */
    background-color: var(--primary-color); /* Dark background for mobile menu */
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 20px;
    transform: translateX(-100%); /* Off-screen by default */
    transition: transform 0.3s ease-out;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    z-index: 999; /* Below overlay, above content */
  }

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

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 0;
    gap: 15px; /* Space between mobile menu items */
  }

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

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

  .nav-link::after {
    background-color: var(--secondary-color); /* Highlight color for active/hover */
  }

  /* Hamburger menu active state (X icon) */
  .hamburger-menu.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .hamburger-menu.active span:nth-child(2) {
    opacity: 0;
  }
  .hamburger-menu.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

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

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

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

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

  .footer-nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 20px;
  }

  .footer-nav li {
    margin-bottom: 0;
  }
}

/* Accessibility for no-scroll body */
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;
  }
}
