:root {
  --primary-color: #0A192F;
  --secondary-color: #64FFDA;
  --accent-color: #FFD700; /* Gold for accent/neon */
  --text-color: #ffffff;
  --dark-bg-1: #0a0a0a;
  --dark-bg-2: #1a1a2e;
  --dark-bg-3: #16213e;

  /* Neon dynamic colors - based on theme */
  --neon-primary: var(--secondary-color);
  --neon-secondary: #00ffff; /* Cyan */
  --neon-accent: #ff00ff; /* Magenta */

  --header-offset: 155px; /* Desktop: Marquee 45px + Header Top 60px + Main Nav 50px */
}

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

/* Universal Box Sizing */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Body Base Styles */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
  background-color: var(--primary-color);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden; /* Prevent horizontal scroll for body */
}

/* Global Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ------------------------------------------------------------------------------------ */
/* Dynamic Neon Glow Animations (MUST be included for Header & Marquee) */
/* ------------------------------------------------------------------------------------ */

/* Keyframes for dynamic color changes based on theme */
@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 for text glow flow */
@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 for neon flicker effect */
@keyframes neon-flicker {
  0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
    opacity: 1;
    box-shadow: 
      0 0 10px currentColor,
      0 0 20px currentColor,
      0 0 30px currentColor,
      inset 0 0 15px currentColor;
  }
  20%, 24%, 55% {
    opacity: 0.8;
    box-shadow: 
      0 0 5px currentColor,
      0 0 10px currentColor,
      0 0 15px currentColor,
      inset 0 0 10px currentColor;
  }
}

/* Keyframes for pulse glow effect */
@keyframes neon-pulse {
  from {
    box-shadow: 
      0 0 5px currentColor,
      0 0 10px currentColor;
  }
  to {
    box-shadow: 
      0 0 15px currentColor,
      0 0 30px currentColor,
      0 0 45px currentColor;
  }
}

/* Apply dynamic glow to elements with .theme-flow class */
.theme-flow {
  animation: theme-colors 4s ease-in-out infinite;
}

.neon-text-dynamic {
  animation: text-glow-flow 3s ease-in-out infinite alternate;
}

/* ------------------------------------------------------------------------------------ */
/* Marquee Section Styles (MUST be included) */
/* ------------------------------------------------------------------------------------ */
.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: var(--text-color);
  overflow: hidden;
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic border color */
  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(100, 255, 218, 0.1); /* Use secondary for inner glow */
  z-index: 1001;
  height: 45px; /* Desktop marquee height */
}

.marquee-container {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 5px 20px;
  height: 100%;
}

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

.marquee-icon-emoji {
  font-size: 20px;
  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));
}

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

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

.marquee-content {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  animation: marquee-scroll 30s linear infinite;
  gap: 30px;
  height: 100%;
}

.marquee-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-color);
  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;
  padding: 2px 0;
}

.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 Styles */
/* ------------------------------------------------------------------------------------ */
.site-header {
  position: fixed;
  top: 45px; /* Marquee height */
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--dark-bg-1);
}

.site-header .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 */
  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(100, 255, 218, 0.1);
  height: 60px; /* Desktop header top height */
  display: flex; /* Ensure flex for centering header-container */
  align-items: center;
}

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

/* LOGO Styles (NO NEON EFFECT) */
.site-header .logo {
  color: var(--text-color);
  font-size: 28px;
  font-weight: bold;
  text-decoration: none;
  letter-spacing: 1px;
  transition: color 0.3s ease;
  /* No text-shadow, box-shadow, filter, or neon animations on logo */
}

.site-header .logo:hover {
  color: var(--secondary-color);
}

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

.desktop-nav-buttons .btn {
  font-size: 14px;
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--neon-primary), var(--neon-secondary));
  color: var(--text-color);
  text-decoration: none;
  border: 2px solid;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic border color */
  text-shadow: 
    0 0 5px var(--text-color),
    0 0 10px var(--neon-primary);
  transition: all 0.3s ease;
}

.desktop-nav-buttons .btn:hover {
  animation-duration: 2s;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 
    0 0 15px var(--neon-primary),
    0 0 30px var(--neon-primary),
    0 0 45px var(--neon-primary),
    inset 0 0 15px rgba(100, 255, 218, 0.3);
}

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

/* Main Navigation (Desktop Styles) */
.main-nav {
  background: linear-gradient(135deg, var(--dark-bg-2), var(--dark-bg-3), var(--primary-color));
  border-top: 2px solid;
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite reverse; /* Different dynamic border color */
  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(0, 255, 255, 0.1);
  width: 100%;
  display: flex; /* Default to flex for desktop */
  height: 50px; /* Desktop main nav height */
  align-items: center;
}

.main-nav .nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: row; /* Desktop horizontal */
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
}

.main-nav .nav-link {
  color: var(--text-color);
  text-decoration: none;
  padding: 10px 15px;
  font-size: 16px;
  font-weight: 500;
  transition: color 0.3s ease, background-color 0.3s ease;
  white-space: nowrap;
}

.main-nav .nav-link:hover,
.main-nav .nav-link.active {
  color: var(--secondary-color);
  background-color: rgba(100, 255, 218, 0.1);
  border-radius: 3px;
}

/* Hamburger Menu (Hidden on Desktop) */
.hamburger-menu {
  display: none; /* Hidden by default on desktop */
}

/* Mobile Menu Overlay (Hidden on Desktop) */
.mobile-menu-overlay {
  display: none; /* Hidden by default on desktop */
}

/* ------------------------------------------------------------------------------------ */
/* Footer Section Styles */
/* ------------------------------------------------------------------------------------ */
.site-footer {
  background-color: var(--dark-bg-1);
  color: rgba(255, 255, 255, 0.7);
  padding: 40px 0 20px;
  font-size: 14px;
}

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

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

.footer-main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

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

.footer-col h4 {
  color: var(--text-color);
  font-size: 18px;
  margin-bottom: 15px;
  font-weight: 600;
}

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

.footer-description {
  line-height: 1.6;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

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

.footer-nav-list a {
  font-size: 15px;
}

.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;
  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;
  display: block;
}

.game-providers-section,
.social-media-section {
  margin-top: 30px;
  margin-bottom: 30px;
}

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

.footer-bottom-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.copyright {
  margin: 0;
}

.footer-policy-nav {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-policy-nav li a {
  font-size: 14px;
}

/* ------------------------------------------------------------------------------------ */
/* Responsive Styles */
/* ------------------------------------------------------------------------------------ */
@media (max-width: 1024px) {
  .footer-grid-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  /* Marquee Mobile */
  .marquee-section {
    height: 30px; /* Mobile marquee height */
    padding: 0 5px;
  }
  .marquee-container {
    gap: 10px;
    padding: 0 5px;
  }
  .marquee-icon {
    width: 25px;
    height: 25px;
  }
  .marquee-icon-emoji {
    font-size: 16px;
  }
  .marquee-text {
    font-size: 13px;
    padding: 0;
  }
  .marquee-separator {
    font-size: 13px;
    margin: 0 8px;
  }
  .marquee-content {
    gap: 20px;
    animation: marquee-scroll 25s linear infinite;
  }

  /* Header Mobile */
  .site-header {
    top: 30px; /* Mobile marquee height */
  }
  .site-header .header-top {
    height: 50px; /* Mobile header top height */
  }
  .site-header .header-container {
    padding: 0 15px;
    width: 100%;
    max-width: none;
    position: relative; /* For logo absolute positioning */
  }

  /* Mobile Logo Centering (Method 1: Flexbox with !important) */
  .site-header .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px;
    position: absolute; /* To allow hamburger on left */
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - 100px); /* Account for hamburger width */
  }
  /* If logo is an image, ensure it scales */
  .site-header .logo img {
    max-height: 40px !important;
    width: auto !important;
    height: auto !important;
    display: block !important;
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px;
    gap: 10px;
    justify-content: center;
    flex-wrap: nowrap; /* Ensure buttons stay in one row */
    background: linear-gradient(135deg, var(--dark-bg-1), var(--dark-bg-2));
    border-bottom: 2px solid;
    animation: theme-colors 4s ease-in-out infinite;
    box-shadow: 
      0 0 8px var(--neon-accent),
      0 0 15px var(--neon-accent),
      inset 0 0 10px rgba(255, 0, 255, 0.1);
    height: 45px; /* Mobile buttons section height */
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* 50% width minus half of gap */
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    padding: 8px 12px;
    font-size: 13px;
    text-align: center;
    height: auto; /* Allow height to adjust based on content */
  }

  /* Hamburger Menu (Visible on Mobile) */
  .hamburger-menu {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1002; /* Above logo and overlay */
    position: relative;
  }

  .hamburger-menu .hamburger-icon {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--neon-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
    box-shadow: 
      0 0 5px var(--neon-primary),
      0 0 10px var(--neon-primary);
    animation: text-glow-flow 3s ease-in-out infinite alternate; /* Dynamic glow */
  }

  .hamburger-menu.active .hamburger-icon:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
  }

  .hamburger-menu.active .hamburger-icon:nth-child(2) {
    opacity: 0;
  }

  .hamburger-menu.active .hamburger-icon:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
  }

  /* Main Navigation (Mobile Styles - Hidden by default) */
  .main-nav {
    display: none; /* Hidden by default */
    flex-direction: column; /* Vertical for mobile */
    position: fixed;
    top: var(--header-offset); /* Start below the fixed header + mobile buttons */
    left: 0;
    width: 75%; /* Slide-out width */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background: linear-gradient(135deg, var(--dark-bg-3), var(--primary-color));
    padding: 20px 0;
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%); /* Off-screen by default */
    transition: transform 0.3s ease;
    z-index: 1000; /* Above overlay */
    overflow-y: auto;
    border-right: 2px solid;
    animation: theme-colors 4s ease-in-out infinite;
  }

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

  .main-nav .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 20px;
    height: auto;
  }

  .main-nav .nav-link {
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 16px;
  }
  .main-nav .nav-link:last-child {
    border-bottom: none;
  }

  /* Mobile Menu Overlay */
  .mobile-menu-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999; /* Below menu, above content */
    opacity: 0;
    transition: opacity 0.3s ease;
  }

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

  /* Footer Mobile */
  .footer-grid-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .footer-bottom-container {
    flex-direction: column;
    gap: 15px;
  }
  .footer-policy-nav {
    justify-content: center;
  }

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