:root {
  --header-offset: 120px; /* Desktop: Total height of header + button area */
  --marquee-height-desktop: 45px; /* Estimated marquee height for desktop */
  --marquee-height-mobile: 30px; /* Estimated marquee height for mobile */
  --primary-color: #0A192F;
  --secondary-color: #FFD700;
  --neon-primary: #FFD700; /* Gold for main neon accents */
  --neon-secondary: #FF00FF; /* Magenta for secondary neon accents */
  --neon-accent: #00FFFF; /* Cyan for accent neon */
}

@media (max-width: 768px) {
  :root {
    --header-offset: 200px; /* Mobile: Total height of marquee/header/button area */
  }
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: hidden;
  }
}

/* Base styles */
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--primary-color); /* Main background color */
  color: #ffffff;
  line-height: 1.5;
}
body.no-scroll {
  overflow: hidden;
}

/* Utility classes for neon effects */
@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 pulse-glow {
  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;
  }
}

@keyframes led-blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0.3; }
}

@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);
    border-color: var(--neon-primary, #FFD700);
    box-shadow:
      0 0 10px var(--neon-primary, #FFD700),
      0 0 20px var(--neon-primary, #FFD700);
  }
  100% {
    filter: hue-rotate(360deg);
    border-color: var(--neon-primary, #FFD700);
    box-shadow:
      0 0 10px var(--neon-primary, #FFD700),
      0 0 20px var(--neon-primary, #FFD700);
  }
}

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

@keyframes gradient-flow {
  0% {
    background-position: 0% 50%;
    box-shadow:
      0 0 10px #ff0000,
      0 0 20px #ff8000;
  }
  50% {
    background-position: 100% 50%;
    box-shadow:
      0 0 10px #00ffff,
      0 0 20px #0000ff;
  }
  100% {
    background-position: 0% 50%;
    box-shadow:
      0 0 10px #ff0000,
      0 0 20px #ff8000;
  }
}

@keyframes random-glow {
  0% {
    border-color: #ff00ff;
    box-shadow: 0 0 20px #ff00ff;
  }
  20% {
    border-color: #00ffff;
    box-shadow: 0 0 20px #00ffff;
  }
  40% {
    border-color: #ffff00;
    box-shadow: 0 0 20px #ffff00;
  }
  60% {
    border-color: #00ff00;
    box-shadow: 0 0 20px #00ff00;
  }
  80% {
    border-color: #ff0000;
    box-shadow: 0 0 20px #ff0000;
  }
  100% {
    border-color: #ff00ff;
    box-shadow: 0 0 20px #ff00ff;
  }
}

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

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

/* Marquee Section Styles */
.marquee-section {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* Dark background */
  color: #ffffff;
  overflow: hidden;
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite;
  box-shadow:
    0 0 10px var(--neon-primary, #FFD700),
    0 0 20px var(--neon-primary, #FFD700),
    0 0 30px var(--neon-primary, #FFD700),
    inset 0 0 20px rgba(255, 215, 0, 0.1);
  z-index: 1001;
  padding: 5px 0;
  min-height: var(--marquee-height-desktop);
  display: flex;
  align-items: center;
}

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

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

.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, #FFD700),
    0 0 10px var(--neon-primary, #FFD700),
    0 0 15px var(--neon-primary, #FFD700);
  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;
}

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

.marquee-text {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  text-decoration: none;
  text-shadow:
    0 0 5px var(--neon-primary, #FFD700),
    0 0 10px var(--neon-primary, #FFD700),
    0 0 15px var(--neon-primary, #FFD700);
  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, #FFD700),
    0 0 20px var(--neon-primary, #FFD700),
    0 0 30px var(--neon-primary, #FFD700),
    0 0 40px var(--neon-primary, #FFD700);
  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, #FFD700),
    0 0 6px var(--neon-primary, #FFD700);
}

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

/* Header Section Styles */
.site-header {
  position: fixed;
  top: var(--marquee-height-desktop);
  left: 0;
  width: 100%;
  z-index: 1000;
  background: transparent; /* Transparent to show the distinct top/nav backgrounds */
}

.header-top {
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite;
  box-shadow:
    0 0 10px var(--neon-primary, #FFD700),
    0 0 20px var(--neon-primary, #FFD700),
    0 0 30px var(--neon-primary, #FFD700),
    inset 0 0 20px rgba(255, 215, 0, 0.1);
  padding: 10px 0;
}

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

.logo {
  font-size: 28px;
  font-weight: bold;
  color: #ffffff; /* Regular color, no neon */
  text-decoration: none;
  transition: color 0.3s ease;
  /* LOGO MUST NOT have neon effects */
  text-shadow: none !important;
  box-shadow: none !important;
  filter: none !important;
}

.logo:hover {
  color: var(--neon-primary, #FFD700);
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 24px;
  position: relative;
  z-index: 1002; /* Above logo on mobile */
}

.hamburger-icon {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--neon-primary, #FFD700);
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  transition: background-color 0.3s ease;
  box-shadow:
    0 0 5px var(--neon-primary, #FFD700),
    0 0 10px var(--neon-primary, #FFD700);
  animation: theme-colors 4s ease-in-out infinite;
}

.hamburger-icon::before, .hamburger-icon::after {
  content: '';
  width: 100%;
  height: 3px;
  background-color: var(--neon-primary, #FFD700);
  position: absolute;
  left: 0;
  transition: transform 0.3s ease, background-color 0.3s ease;
  box-shadow:
    0 0 5px var(--neon-primary, #FFD700),
    0 0 10px var(--neon-primary, #FFD700);
  animation: theme-colors 4s ease-in-out infinite;
}

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

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

.hamburger-menu.active .hamburger-icon {
  background-color: transparent; /* Middle bar disappears */
  box-shadow: none;
}

.hamburger-menu.active .hamburger-icon::before {
  transform: translateY(8px) rotate(45deg);
  background-color: var(--neon-accent, #00FFFF);
  box-shadow:
    0 0 5px var(--neon-accent, #00FFFF),
    0 0 10px var(--neon-accent, #00FFFF);
}

.hamburger-menu.active .hamburger-icon::after {
  transform: translateY(-8px) rotate(-45deg);
  background-color: var(--neon-accent, #00FFFF);
  box-shadow:
    0 0 5px var(--neon-accent, #00FFFF),
    0 0 10px var(--neon-accent, #00FFFF);
}

.desktop-nav-buttons {
  display: flex;
  gap: 15px;
  align-items: center;
}

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

.btn {
  position: relative;
  background: linear-gradient(135deg, var(--neon-primary, #FFD700), var(--neon-secondary, #FF00FF));
  padding: 12px 25px;
  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, #FFD700);
  transition: all 0.3s ease;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  cursor: pointer;
}

.btn:hover {
  animation-duration: 2s; /* Faster animation on hover */
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    0 0 15px var(--neon-primary, #FFD700),
    0 0 30px var(--neon-primary, #FFD700),
    0 0 45px var(--neon-primary, #FFD700),
    inset 0 0 15px rgba(255, 215, 0, 0.2);
}

.main-nav {
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460); /* Different dark gradient */
  border-top: 2px solid;
  border-bottom: 2px solid;
  animation: theme-colors 5s linear infinite reverse; /* Different animation for contrast */
  box-shadow:
    0 0 10px var(--neon-accent, #00FFFF),
    0 0 20px var(--neon-accent, #00FFFF),
    0 0 30px var(--neon-accent, #00FFFF),
    inset 0 0 20px rgba(0, 255, 255, 0.1);
  width: 100%;
  display: flex; /* Desktop default */
  position: static; /* Desktop default */
  padding: 10px 0;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  flex-wrap: wrap;
}

.nav-link {
  color: #ffffff; /* Regular color for nav links */
  text-decoration: none;
  font-weight: 500;
  padding: 8px 15px;
  margin: 0 5px;
  transition: all 0.3s ease;
  border-radius: 4px;
  /* NO neon effects for nav links */
  text-shadow: none !important;
  box-shadow: none !important;
  cursor: pointer;
}

.nav-link:hover, .nav-link.active {
  color: var(--neon-primary, #FFD700);
  background-color: rgba(255, 215, 0, 0.1);
}

/* Footer Section Styles */
.site-footer {
  background-color: #1a1a2e; /* Dark background */
  color: #ffffff;
  padding: 40px 0 20px;
  font-size: 14px;
}

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

.footer-grid-container {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr); /* First col wider for logo+desc */
  gap: 30px;
  margin-bottom: 30px;
}

.footer-col h4 {
  color: var(--secondary-color, #FFD700);
  font-size: 16px;
  margin-bottom: 15px;
  position: relative;
}

.footer-col h4::after {
  content: '';
  display: block;
  width: 30px;
  height: 2px;
  background-color: var(--secondary-color, #FFD700);
  margin-top: 5px;
}

.footer-logo {
  font-size: 24px;
  font-weight: bold;
  color: #ffffff;
  text-decoration: none;
  margin-bottom: 15px;
  display: block;
}

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

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

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

.footer-nav a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.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: 40px;
  height: auto;
  width: auto;
  filter: grayscale(100%) brightness(150%); /* Make icons glow slightly on dark background */
  transition: filter 0.3s ease;
}

.payment-methods .payment-icons img:hover,
.game-providers-section .game-providers-icons img:hover,
.social-media-section .social-media-icons img:hover {
  filter: grayscale(0%) brightness(100%);
}

.game-providers-section, .social-media-section {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.game-providers-section h4, .social-media-section h4 {
  color: var(--secondary-color, #FFD700);
  font-size: 16px;
  margin-bottom: 15px;
  position: relative;
}

.game-providers-section h4::after, .social-media-section h4::after {
  content: '';
  display: block;
  width: 30px;
  height: 2px;
  background-color: var(--secondary-color, #FFD700);
  margin-top: 5px;
}

.footer-bottom {
  max-width: 1200px;
  margin: 30px auto 0;
  padding: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.footer-action-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-action-links a {
  color: var(--secondary-color, #FFD700);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.footer-action-links a:hover {
  color: #ffffff;
}

.copyright {
  color: #ccc;
  margin: 0;
}

/* Mobile responsive styles */
@media (max-width: 768px) {
  .marquee-section {
    padding: 2px 0;
    min-height: var(--marquee-height-mobile);
  }

  .marquee-container {
    gap: 10px;
    padding: 0 5px;
  }

  .marquee-icon {
    width: 20px;
    height: 20px;
  }

  .marquee-icon-emoji {
    font-size: 14px;
  }

  .marquee-text {
    font-size: 12px;
    line-height: 1.3;
  }

  .marquee-separator {
    font-size: 12px;
    margin: 0 8px;
  }

  .marquee-content {
    gap: 15px;
    animation: marquee-scroll 20s linear infinite; /* Faster scroll on mobile */
  }

  .site-header {
    top: var(--marquee-height-mobile);
  }

  .header-top {
    padding: 8px 0;
  }

  .header-container {
    padding: 0 15px;
    position: relative; /* For logo absolute positioning */
    min-height: 40px;
    width: 100%; /* Must be 100% on mobile */
    max-width: none; /* Must not limit max-width on mobile */
  }

  .hamburger-menu {
    display: block;
    order: 0;
    margin-right: auto; /* Push logo to center */
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - 60px); /* Account for hamburger width */
  }

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

  .mobile-nav-buttons {
    display: flex !important;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px;
    background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
    border-bottom: 2px solid;
    animation: theme-colors 4s ease-in-out infinite;
    box-shadow:
      0 0 8px var(--neon-primary, #FFD700),
      0 0 15px var(--neon-primary, #FFD700),
      inset 0 0 10px rgba(255, 215, 0, 0.1);
    flex-wrap: nowrap;
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* Account for gap */
    box-sizing: border-box;
    padding: 8px 12px;
    font-size: 13px;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column;
    position: fixed;
    /* top will be set by JS dynamically */
    left: 0;
    width: 70%;
    height: calc(100% - var(--header-offset)); /* Adjust height based on dynamic offset */
    overflow-y: auto;
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.3s ease-out;
    border-right: 2px solid;
    animation: theme-colors 5s linear infinite;
    box-shadow:
      0 0 10px var(--neon-accent, #00FFFF),
      0 0 20px var(--neon-accent, #00FFFF);
  }

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

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 15px;
    width: 100%; /* Must be 100% on mobile */
    max-width: none; /* Must not limit max-width on mobile */
  }

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

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

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

  .footer-grid-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }

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

  .footer-col h4::after {
    margin-left: auto;
    margin-right: auto;
  }

  .footer-logo {
    margin-bottom: 10px;
  }

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

  .footer-bottom {
    padding: 15px;
  }

  .footer-action-links {
    flex-direction: column;
    gap: 10px;
  }
}

/* Ensure contrast for text */
.marquee-text, .marquee-icon-emoji, .nav-link, .btn, .logo, .footer-logo, .footer-description, .footer-col h4, .footer-nav a, .footer-action-links a, .copyright {
  /* Ensure sufficient contrast for all text */
  color: #ffffff;
  /* Fallback for neon text glow */
  text-shadow: 0 0 2px rgba(255,255,255,0.8), 0 0 5px rgba(255,255,255,0.5);
}
.btn {
  color: #ffffff;
}
.footer-col h4, .footer-action-links a {
  color: var(--secondary-color, #FFD700);
}
.footer-nav a, .footer-description, .copyright {
  color: #ccc;
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
