:root {
  --header-offset: 120px; /* Desktop: Header + button area total height */
  --primary-color: #FFD700;
  --auxiliary-color: #1A1A1A;
  --text-light: #FFFFFF;
  --text-dark: #1A1A1A;
}

@media (max-width: 768px) {
  :root {
    --header-offset: 200px; /* Mobile: Marquee/Header/button area total height */
  }
}

/* Base styles */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-light); /* Default text color for dark backgrounds */
  padding-top: var(--header-offset); /* Ensure content is not covered by fixed header */
  overflow-x: hidden; /* Prevent horizontal scroll on body */
  background-color: #222;
}

a {
  text-decoration: none;
  color: inherit;
}

/* 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.2);
  min-height: 60px; /* Ensure minimum height */
  background-color: var(--auxiliary-color); /* Default dark background for the whole header */
}

/* Header Top Section (Logo and Desktop Buttons) */
.header-top {
  background-color: var(--auxiliary-color); /* Dark background */
  padding: 10px 0;
  display: flex; /* For desktop, to align logo and buttons */
  align-items: center;
  justify-content: center; /* Center container */
}

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

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-color); /* Gold color for logo */
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block; /* Ensure logo is visible */
  padding: 5px 0;
  text-align: left;
}

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

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 25px;
  font-weight: bold;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none; /* Remove underline */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.btn-primary {
  background-color: var(--primary-color); /* Gold button */
  color: var(--auxiliary-color); /* Dark text on gold */
  border: 2px solid var(--primary-color);
}

.btn-primary:hover {
  background-color: #E6C200; /* Darker gold on hover */
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.btn-secondary {
  background-color: var(--auxiliary-color); /* Dark button */
  color: var(--primary-color); /* Gold text on dark */
  border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
  background-color: #333333; /* Lighter dark on hover */
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

/* Main Navigation (Desktop) */
.main-nav {
  background-color: #2A2A2A; /* Slightly lighter dark than auxiliary for distinction */
  padding: 10px 0;
  display: flex; /* Desktop default: visible and horizontal */
  justify-content: center; /* Center the nav items */
  align-items: center;
  width: 100%;
}

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

.nav-link {
  color: var(--text-light); /* White text */
  font-weight: bold;
  padding: 8px 15px;
  margin: 0 5px;
  transition: color 0.3s ease, background-color 0.3s ease;
  border-radius: 5px;
  white-space: nowrap; /* Prevent menu items from breaking */
}

.nav-link:hover {
  color: var(--primary-color); /* Gold on hover */
  background-color: rgba(255, 215, 0, 0.1); /* Slight gold tint background */
}

/* Hamburger Menu (Hidden on Desktop) */
.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  width: 30px;
  height: 20px;
  position: relative;
  cursor: pointer;
  z-index: 1001; /* Above mobile overlay */
  flex-shrink: 0; /* Prevent shrinking */
}

.hamburger-menu span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: var(--primary-color);
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
}

.hamburger-menu span:nth-child(1) { top: 0; }
.hamburger-menu span:nth-child(2) { top: 8px; }
.hamburger-menu span:nth-child(3) { top: 16px; }

.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 specific buttons (Hidden on Desktop) */
.mobile-nav-buttons {
  display: none; /* Hidden by default on desktop */
  background-color: var(--auxiliary-color); /* Match header top */
  padding: 10px 15px;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  width: 100%;
  box-sizing: border-box;
}

/* 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 hamburger, above main content */
  transition: opacity 0.3s ease;
  opacity: 0;
}

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

/* Site Footer */
.site-footer {
  background-color: var(--auxiliary-color); /* Dark background */
  color: var(--text-light); /* White text */
  padding: 40px 20px;
  font-size: 14px;
}

.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: 200px;
  max-width: 300px;
}

.footer-logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 15px;
  display: block;
}

.site-footer h3 {
  color: var(--primary-color); /* Gold headings */
  font-size: 18px;
  margin-bottom: 15px;
}

.site-footer p {
  margin: 0;
  line-height: 1.8;
}

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

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

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

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

/* Mobile Styles */
@media (max-width: 768px) {
  body {
    padding-top: var(--header-offset); /* Ensure content is not covered by fixed header + mobile buttons */
  }

  /* Mobile Header Top */
  .header-container {
    padding: 0 15px; /* Smaller padding on mobile */
    justify-content: space-between; /* Space between hamburger and logo */
    width: 100%; /* Occupy full width */
    max-width: none; /* No max-width on mobile */
    min-height: 60px; /* Minimum height for header-top */
  }

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

  .logo {
    order: 2; /* Place logo second, will be centered by flex logic */
    flex: 1 !important; /* Allow logo to take available space for centering */
    display: flex !important; /* Use flex for centering */
    justify-content: center !important;
    align-items: center !important;
    padding: 0; /* Remove extra padding from logo itself */
    font-size: 24px; /* Slightly smaller logo on mobile */
    text-align: center; /* For text logo */
  }

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

  /* Mobile Buttons - below header-top */
  .mobile-nav-buttons {
    display: flex; /* Show mobile buttons */
    justify-content: center;
    align-items: center;
    padding: 10px 15px;
    box-sizing: border-box;
    background-color: var(--auxiliary-color); /* Match header-top background */
  }
  
  /* Main Navigation (Mobile) */
  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column;
    position: fixed; /* Fixed position for mobile menu */
    top: 0; /* Align to top */
    left: 0;
    width: 75%; /* Slide out from left */
    height: 100vh; /* Full viewport height */
    background-color: var(--auxiliary-color); /* Dark background */
    transform: translateX(-100%); /* Start off-screen to the left */
    transition: transform 0.3s ease;
    padding-top: 80px; /* Space for fixed header content above menu */
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    overflow-y: auto; /* Enable scrolling for long menus */
    z-index: 1000; /* Same as header, overlay will be below */
  }

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

  .nav-container {
    flex-direction: column; /* Vertical navigation links */
    padding: 20px 0;
    max-width: none; /* No max-width on mobile */
    width: 100%; /* Full width */
  }

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

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

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

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

  .footer-col {
    max-width: 100%;
    text-align: center;
  }

  .footer-logo {
    margin: 0 auto 15px auto;
  }

  .site-footer h3 {
    text-align: center;
  }

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

/* Ensure body scroll is prevented when 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;
  }
}
