:root {
  --primary-color: #0A2239;
  --secondary-color: #FFD700;
  --text-color: #ffffff;
  --dark-bg-1: #0a0a0a;
  --dark-bg-2: #1a1a2e;
  --dark-bg-3: #16213e;

  /* Neon Colors - derived from secondary for vibrancy */
  --neon-primary: #FFD700; /* Gold */
  --neon-secondary: #FF6600; /* Orange */
  --neon-accent: #FF00FF; /* Magenta */
  
  --header-offset: 160px; /* Desktop: Marquee + Header Top + Main Nav */
}

@media (max-width: 768px) {
  :root {
    --header-offset: 140px; /* Mobile: Marquee + Header Top + Mobile Buttons */
  }
}

/* Base Styles */
body {
  margin: 0;
  font-family: 'Arial', sans-serif;
  color: var(--text-color);
  background-color: var(--dark-bg-1);
  padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
  overflow-x: hidden; /* Prevent horizontal scroll on body */
}

/* Universal Container for consistent width */
.footer-container, .header-container, .nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Dynamic Neon Glow Animations --- */
@keyframes rainbow-border {
  0% { border-color: #ff0000; box-shadow: 0 0 10px #ff0000, 0 0 20px #ff0000; }
  16.6% { border-color: #ff8000; box-shadow: 0 0 10px #ff8000, 0 0 20px #ff8000; }
  33.3% { border-color: #ffff00; box-shadow: 0 0 10px #ffff00, 0 0 20px #ffff00; }
  50% { border-color: #00ff00; box-shadow: 0 0 10px #00ff00, 0 0 20px #00ff00; }
  66.6% { border-color: #0000ff; box-shadow: 0 0 10px #0000ff, 0 0 20px #0000ff; }
  83.3% { border-color: #8000ff; box-shadow: 0 0 10px #8000ff, 0 0 20px #8000ff; }
  100% { border-color: #ff0000; box-shadow: 0 0 10px #ff0000, 0 0 20px #ff0000; }
}

@keyframes hue-spin {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

@keyframes alternate-colors {
  0% { border-color: var(--neon-primary); box-shadow: 0 0 10px var(--neon-primary), 0 0 20px var(--neon-primary); }
  100% { border-color: var(--neon-secondary); box-shadow: 0 0 10px var(--neon-secondary), 0 0 20px var(--neon-secondary); }
}

@keyframes gradient-flow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes random-glow {
  0% { border-color: var(--neon-primary); box-shadow: 0 0 20px var(--neon-primary); }
  20% { border-color: var(--neon-secondary); box-shadow: 0 0 20px var(--neon-secondary); }
  40% { border-color: var(--neon-accent); box-shadow: 0 0 20px var(--neon-accent); }
  60% { border-color: #00ff00; box-shadow: 0 0 20px #00ff00; }
  80% { border-color: #0000ff; box-shadow: 0 0 20px #0000ff; }
  100% { border-color: var(--neon-primary); box-shadow: 0 0 20px var(--neon-primary); }
}

@keyframes theme-colors {
  0%, 100% {
    border-color: var(--neon-primary);
    box-shadow: 
      0 0 10px var(--neon-primary),
      0 0 20px var(--neon-primary);
  }
  33% {
    border-color: var(--neon-secondary);
    box-shadow: 
      0 0 10px var(--neon-secondary),
      0 0 20px var(--neon-secondary);
  }
  66% {
    border-color: var(--neon-accent);
    box-shadow: 
      0 0 10px var(--neon-accent),
      0 0 20px var(--neon-accent);
  }
}

@keyframes text-glow-flow {
  0% {
    text-shadow: 
      0 0 5px var(--neon-primary),
      0 0 10px var(--neon-primary),
      0 0 15px var(--neon-primary);
    color: #ffffff;
  }
  50% {
    text-shadow: 
      0 0 5px var(--neon-secondary),
      0 0 10px var(--neon-secondary),
      0 0 15px var(--neon-secondary);
    color: #ffffff;
  }
  100% {
    text-shadow: 
      0 0 5px var(--neon-accent),
      0 0 10px var(--neon-accent),
      0 0 15px var(--neon-accent);
    color: #ffffff;
  }
}

@keyframes marquee-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0.9; }
}

/* --- Marquee Section --- */
.marquee-section {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(135deg, var(--dark-bg-1), var(--dark-bg-2), var(--dark-bg-3));
  color: #ffffff;
  overflow: hidden;
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite;
  box-shadow: 
    0 0 10px var(--neon-primary),
    0 0 20px var(--neon-primary),
    0 0 30px var(--neon-primary),
    inset 0 0 20px rgba(255, 215, 0, 0.1); /* Using secondary color for subtle inner glow */
  z-index: 1001;
  min-height: 50px; /* Ensure a minimum height */
  display: flex; /* For vertical centering of content */
  align-items: center; /* For vertical centering of content */
  padding: 0 20px; /* Add some padding */
}

.marquee-container {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 0; /* Already handled by section padding */
}

.marquee-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  z-index: 2;
  position: relative;
}

.marquee-icon-emoji {
  font-size: 24px;
  display: inline-block;
  animation: marquee-pulse 2s ease-in-out infinite, text-glow-flow 3s ease-in-out infinite alternate;
  text-shadow: 
    0 0 5px var(--neon-primary),
    0 0 10px var(--neon-primary),
    0 0 15px var(--neon-primary);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.marquee-wrapper {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.marquee-content {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  animation: marquee-scroll 30s linear infinite;
  gap: 30px;
  padding-right: 30px; /* Add padding to prevent content from touching the edge when looping */
}

.marquee-text {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  text-decoration: none;
  text-shadow: 
    0 0 5px var(--neon-primary),
    0 0 10px var(--neon-primary),
    0 0 15px var(--neon-primary);
  line-height: 1.5;
  display: inline-block;
  vertical-align: middle;
  animation: text-glow-flow 3s ease-in-out infinite alternate;
  cursor: pointer;
  transition: all 0.3s ease;
}

.marquee-text:hover {
  text-shadow: 
    0 0 10px var(--neon-primary),
    0 0 20px var(--neon-primary),
    0 0 30px var(--neon-primary),
    0 0 40px var(--neon-primary);
  transform: scale(1.05);
  color: #ffffff;
}

.marquee-separator {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 15px;
  text-shadow: 
    0 0 3px var(--neon-primary),
    0 0 6px var(--neon-primary);
}

@keyframes marquee-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* --- Header Section --- */
.site-header {
  position: fixed;
  top: 50px; /* Position below marquee */
  left: 0;
  width: 100%;
  z-index: 1000; /* Below marquee, above content */
  display: flex;
  flex-direction: column; /* Stacks header-top and main-nav vertically */
  min-height: 110px; /* Minimum height for header content */
  background: linear-gradient(135deg, var(--dark-bg-1), var(--dark-bg-2)); /* Default dark background */
}

/* Header Top Area (Logo + Buttons) */
.header-top {
  background: linear-gradient(135deg, var(--dark-bg-1), var(--dark-bg-2), var(--dark-bg-3));
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic border color for header top */
  box-shadow: 
    0 0 10px var(--neon-primary),
    0 0 20px var(--neon-primary),
    0 0 30px var(--neon-primary),
    inset 0 0 20px rgba(255, 215, 0, 0.1); /* Using secondary color for subtle inner glow */
  padding: 10px 0; /* Vertical padding */
  display: flex;
  align-items: center;
  min-height: 40px; /* Adjust for padding */
}

.header-top .header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: #ffffff; /* Regular white color for logo */
  text-decoration: none;
  /* NO NEON EFFECTS for LOGO */
  display: block; /* Ensure it takes up space */
  line-height: 1; /* Adjust line height for better alignment */
}

/* Hamburger Menu (Hidden on Desktop) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  width: 30px;
  height: 24px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  position: relative;
  z-index: 1002; /* Above mobile menu overlay */
  margin-right: 15px; /* Spacing from logo */
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--neon-primary);
  margin-bottom: 5px;
  position: relative;
  border-radius: 2px;
  transition: all 0.3s ease;
  box-shadow: 0 0 5px var(--neon-primary); /* Neon glow for hamburger lines */
}

.hamburger-menu span:last-child {
  margin-bottom: 0;
}

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

/* Mobile Navigation Buttons (Hidden on Desktop) */
.mobile-nav-buttons {
  display: none; /* Hidden on desktop */
}

/* Main Navigation Area */
.main-nav {
  background: linear-gradient(135deg, var(--dark-bg-2), var(--dark-bg-3));
  border-top: 2px solid;
  border-bottom: 2px solid; /* Add a bottom border for visual separation */
  animation: alternate-colors 4s ease-in-out infinite; /* Different dynamic border color for main nav */
  box-shadow: 
    0 0 10px var(--neon-secondary),
    0 0 20px var(--neon-secondary),
    0 0 30px var(--neon-secondary),
    inset 0 0 20px rgba(255, 102, 0, 0.1); /* Using neon secondary for subtle inner glow */
  padding: 10px 0; /* Vertical padding */
  display: flex; /* Always visible on desktop */
  align-items: center;
  min-height: 30px; /* Adjust for padding */
}

.main-nav .nav-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap; /* Allow wrapping for many menu items */
  width: 100%;
  gap: 25px; /* Spacing between menu items */
}

.nav-link {
  color: #ffffff; /* Regular white color for nav links */
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
  padding: 5px 0;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--neon-primary); /* Highlight with neon primary on hover/active */
  text-shadow: 0 0 8px var(--neon-primary); /* Subtle neon glow on hover */
}

/* Buttons */
.btn {
  position: relative;
  background: linear-gradient(135deg, var(--neon-primary), var(--neon-secondary));
  padding: 12px 30px;
  color: #ffffff;
  text-decoration: none;
  border-radius: 5px;
  border: 2px solid;
  animation: theme-colors 4s ease-in-out infinite;
  text-shadow: 
    0 0 5px #ffffff,
    0 0 10px var(--neon-primary);
  transition: all 0.3s ease;
  font-weight: bold;
  white-space: nowrap; /* Prevent text wrapping on desktop */
}

.btn:hover {
  animation-duration: 2s;
  transform: translateY(-2px);
  box-shadow: 
    0 0 15px var(--neon-primary),
    0 0 30px var(--neon-primary),
    inset 0 0 15px rgba(255, 215, 0, 0.5);
}

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

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

/* --- Footer Section --- */
.site-footer {
  background-color: var(--primary-color);
  color: #ffffff;
  padding: 40px 0 20px;
  font-size: 14px;
}

.site-footer h4 {
  color: var(--secondary-color);
  font-size: 18px;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 5px;
}

.site-footer h4::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40px;
  height: 2px;
  background-color: var(--secondary-color);
}

.footer-top-section {
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-top-section .footer-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.footer-col {
  margin-bottom: 20px;
}

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

.footer-description {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

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

.footer-nav a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.payment-methods .payment-icons,
.game-providers-section .game-providers-icons,
.social-media-section .social-media-icons {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px; /* Consistent gap for icons */
  width: 100%;
}

.payment-methods .payment-icons img,
.game-providers-section .game-providers-icons img,
.social-media-section .social-media-icons img {
  max-height: 50px;
  height: auto;
  width: auto;
  object-fit: contain;
}

.footer-middle-section {
  padding: 30px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-middle-section .footer-container > div {
  margin-bottom: 30px; /* Space between Game Providers and Social Media */
}
.footer-middle-section .footer-container > div:last-child {
  margin-bottom: 0;
}

.footer-bottom-section {
  padding-top: 20px;
}

.footer-bottom-section .footer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.footer-legal-nav .footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px 30px; /* Vertical and horizontal gap */
  margin-bottom: 20px;
}

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

.copyright {
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
}

/* --- Responsive Styles --- */
@media (max-width: 768px) {
  /* Marquee */
  .marquee-section {
    min-height: 40px;
    padding: 0 10px;
  }
  .marquee-icon {
    width: 25px;
    height: 25px;
  }
  .marquee-icon-emoji {
    font-size: 16px;
  }
  .marquee-text, .marquee-separator {
    font-size: 13px;
    margin: 0 8px;
  }
  .marquee-content {
    gap: 15px;
    animation: marquee-scroll 20s linear infinite; /* Faster scroll on mobile */
  }

  /* Header */
  .site-header {
    top: 40px; /* Position below mobile marquee */
    min-height: 100px;
  }

  .header-top {
    padding: 8px 0;
    min-height: 34px;
  }
  
  .header-top .header-container {
    padding: 0 15px; /* Smaller padding for mobile */
  }

  /* Mobile Logo Centering (Method 1: Flexbox + !important) */
  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 18px; /* Smaller font size for mobile logo */
    line-height: 1.2;
    text-align: center;
  }
  /* For image logos, ensure max-height */
  .logo img {
    max-height: 40px !important; /* Adjust as needed for mobile */
  }

  /* Hamburger Menu */
  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    order: -1; /* Place it first in flex order */
    margin-right: 0; /* No margin from logo, handled by flex space */
  }
  .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);
  }

  /* Desktop Nav Buttons (Hide on Mobile) */
  .desktop-nav-buttons {
    display: none;
  }

  /* Mobile Nav Buttons (Show on Mobile) */
  .mobile-nav-buttons {
    display: flex !important; /* Show on mobile */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px; /* Padding for the button container */
    overflow: hidden;
    gap: 10px;
    justify-content: center;
    flex-wrap: nowrap; /* Ensure buttons stay on one line */
    background: linear-gradient(135deg, var(--dark-bg-2), var(--dark-bg-3)); /* Match main nav background */
    border-top: 1px solid;
    animation: alternate-colors 4s ease-in-out infinite; /* Dynamic border color */
    box-shadow: 
      0 0 5px var(--neon-secondary),
      0 0 10px var(--neon-secondary);
    min-height: 30px; /* Adjust for padding */
  }
  
  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* Account for gap */
    box-sizing: border-box;
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word;
    overflow-wrap: break-word;
    padding: 8px 12px; /* Smaller padding */
    font-size: 13px; /* Smaller font size */
    text-align: center;
  }

  /* Main Navigation (Mobile Menu) */
  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: 140px; /* Below mobile header + buttons */
    left: 0;
    width: 80%; /* Menu width */
    max-width: 300px; /* Max width for menu */
    height: calc(100% - 140px); /* Full height below header */
    background: linear-gradient(135deg, var(--dark-bg-1), var(--dark-bg-2));
    border-right: 2px solid;
    animation: theme-colors 4s ease-in-out infinite;
    box-shadow: 
      0 0 15px var(--neon-accent),
      0 0 30px var(--neon-accent),
      inset 0 0 20px rgba(255, 0, 255, 0.1);
    transform: translateX(-100%); /* Off-screen by default */
    transition: transform 0.3s ease-out;
    z-index: 1000; /* Above overlay */
    overflow-y: auto; /* Allow scrolling for long menus */
    padding: 20px 0; /* Internal padding */
  }

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

  .main-nav .nav-container {
    flex-direction: column;
    align-items: flex-start; /* Align menu items to the left */
    gap: 15px;
    padding: 0 20px;
    width: 100%; /* Take full width of main-nav */
    max-width: none; /* No max-width restriction for mobile container */
  }

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

  /* Footer */
  .site-footer {
    padding: 30px 0 15px;
  }
  .footer-top-section .footer-container {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 20px;
  }

  .footer-col {
    margin-bottom: 0; /* Reset margin */
  }
  .footer-col:last-child {
    margin-bottom: 0;
  }

  .footer-middle-section .footer-container {
    padding: 0 15px; /* Adjust padding */
  }
  .footer-middle-section .footer-container > div {
    margin-bottom: 20px;
  }

  .footer-legal-nav .footer-nav {
    gap: 10px 20px;
  }
  .footer-legal-nav .footer-nav li {
    width: auto; /* Allow items to take natural width */
  }
}

/* Common Mobile Overflow Protection */
@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;
  }
}
.no-scroll {
  overflow: hidden;
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
