:root {
  --primary-color: #26A9E0;
  --secondary-color: #FFFFFF;
  --login-color: #EA7C07;
  --bg-color: #FFFFFF;
  --black-color: #000000;

  /* Neon colors based on theme */
  --neon-primary: var(--primary-color);
  --neon-secondary: var(--login-color);
  --neon-accent: #FFFF00; /* Bright yellow for strong contrast */

  --marquee-height-desktop: 45px;
  --marquee-height-mobile: 30px;

  --header-offset: 150px; /* Desktop: Marquee(45px) + HeaderTop(60px) + MainNav(45px) = 150px */
}

@media (max-width: 768px) {
  :root {
    --header-offset: 130px; /* Mobile: Marquee(30px) + HeaderTop(50px) + MobileNavButtons(50px) = 130px */
  }
}

/* Common Styles */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: var(--secondary-color);
  background-color: var(--black-color);
  line-height: 1.6;
}

.page-content img {
  max-width: 100% !important;
  height: auto !important;
  display: block;
}
.page-content {
  overflow-x: hidden;
  max-width: 100%;
}
body {
  overflow-x: hidden;
}

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

@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%; 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);
    box-shadow: 0 0 10px var(--neon-primary), 0 0 20px var(--neon-primary), inset 0 0 10px rgba(38, 169, 224, 0.3);
  }
  33% {
    border-color: var(--neon-secondary);
    box-shadow: 0 0 10px var(--neon-secondary), 0 0 20px var(--neon-secondary), inset 0 0 10px rgba(234, 124, 7, 0.3);
  }
  66% {
    border-color: var(--neon-accent);
    box-shadow: 0 0 10px var(--neon-accent), 0 0 20px var(--neon-accent), inset 0 0 10px rgba(255, 255, 0, 0.3);
  }
}

@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 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: var(--secondary-color);
  }
  50% {
    text-shadow: 0 0 5px var(--neon-secondary), 0 0 10px var(--neon-secondary), 0 0 15px var(--neon-secondary);
    color: var(--secondary-color);
  }
  100% {
    text-shadow: 0 0 5px var(--neon-accent), 0 0 10px var(--neon-accent), 0 0 15px var(--neon-accent);
    color: var(--secondary-color);
  }
}

/* Marquee Section */
.marquee-section {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
  color: var(--secondary-color);
  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(38, 169, 224, 0.1);
  z-index: 1001;
  padding: 10px 0;
  height: var(--marquee-height-desktop);
  box-sizing: border-box;
}

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

.marquee-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  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), 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: 16px;
  font-weight: 600;
  color: var(--secondary-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;
}

.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: var(--secondary-color);
}

.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: var(--marquee-height-desktop);
  left: 0;
  width: 100%;
  z-index: 1000;
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.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-accent), 0 0 20px var(--neon-accent), 0 0 30px var(--neon-accent), inset 0 0 20px rgba(255, 255, 0, 0.1);
  width: 100%;
  padding: 15px 0;
  box-sizing: border-box;
  display: flex; /* Ensure flex for hamburger/logo/buttons */
  align-items: center;
}

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

.logo {
  color: var(--secondary-color);
  font-size: 24px;
  font-weight: bold;
  text-decoration: none;
  display: block;
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
}

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

.hamburger-menu::before, .hamburger-menu::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--neon-primary);
  transition: all 0.3s ease;
  animation: text-glow-flow 3s ease-in-out infinite alternate;
}
.hamburger-menu::before { top: 0; }
.hamburger-menu::after { bottom: 0; }

.hamburger-menu.active::before {
  transform: rotate(45deg);
  top: 10px;
}
.hamburger-menu.active::after {
  transform: rotate(-45deg);
  bottom: 11px;
}

.hamburger-menu.active span {
  opacity: 0;
}

.hamburger-menu span {
  position: absolute;
  left: 0;
  top: 10px;
  width: 100%;
  height: 3px;
  background-color: var(--neon-primary);
  transition: all 0.3s ease;
  animation: text-glow-flow 3s ease-in-out infinite alternate;
}

.desktop-nav-buttons {
  display: flex;
  gap: 10px;
  margin-left: auto;
  flex-shrink: 0;
}

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

.btn {
  position: relative;
  padding: 12px 20px;
  color: var(--secondary-color);
  text-decoration: none;
  border-radius: 5px;
  border: 2px solid;
  font-weight: bold;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  animation: theme-colors 4s ease-in-out infinite; /* Default dynamic color */
  text-shadow: 0 0 5px var(--secondary-color), 0 0 10px var(--neon-primary);
  white-space: nowrap; /* Prevent button text from wrapping on desktop */
}

.btn:hover {
  animation-duration: 2s; /* Faster color change on hover */
  transform: translateY(-2px);
  text-shadow: 0 0 10px var(--secondary-color), 0 0 20px var(--neon-primary);
}

.main-nav {
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
  border-top: 2px solid;
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite reverse;
  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(234, 124, 7, 0.1);
  width: 100%;
  display: flex; /* Desktop default: visible, horizontal */
  padding: 10px 0;
  box-sizing: border-box;
}

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

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

.nav-link:hover {
  color: var(--neon-primary);
  text-shadow: 0 0 5px var(--neon-primary), 0 0 10px var(--neon-primary);
}

/* Footer Section */
.site-footer {
  background-color: #0a0a0a;
  color: #cccccc;
  padding: 40px 20px;
  font-size: 14px;
}

.footer-top-grid {
  max-width: 1200px;
  margin: 0 auto 40px auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.footer-col {
  padding: 0;
}

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

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

.site-footer h4 {
  color: var(--secondary-color);
  font-size: 18px;
  margin-bottom: 20px;
  font-weight: bold;
}

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

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

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

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

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

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

.footer-middle-sections {
  max-width: 1200px;
  margin: 0 auto 40px auto;
}

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

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  border-top: 1px solid #333333;
  padding-top: 20px;
}

.copyright {
  color: #aaaaaa;
  margin-bottom: 15px;
}

.footer-nav-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

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

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

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

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

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

  .marquee-text {
    font-size: 13px;
    line-height: 1.2;
  }

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

  .marquee-content {
    gap: 15px;
    animation-duration: 25s; /* Faster scroll on mobile */
  }

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

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

  .header-container {
    padding: 0 15px;
    justify-content: flex-start; /* Adjust for hamburger */
    position: relative; /* For logo absolute positioning */
    min-height: 30px;
  }

  .hamburger-menu {
    display: block;
    margin-right: 0;
    flex-shrink: 0;
    order: 0;
    position: relative;
    z-index: 2;
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 18px;
    padding: 0 10px; /* Add some padding around logo for touch */
  }

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

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

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

  .main-nav {
    display: none;
    flex-direction: column;
    position: fixed;
    top: calc(var(--marquee-height-mobile) + 50px + 50px); /* Marquee + HeaderTop + MobileButtons */
    left: 0;
    width: 80%;
    max-width: 300px;
    height: calc(100% - (var(--marquee-height-mobile) + 50px + 50px));
    background: linear-gradient(135deg, #16213e, #0f3460);
    border-right: 2px solid;
    animation: theme-colors 4s ease-in-out infinite reverse;
    box-shadow: 0 0 10px var(--neon-secondary), 0 0 20px var(--neon-secondary), inset 0 0 20px rgba(234, 124, 7, 0.1);
    transform: translateX(-100%);
    transition: transform 0.3s ease-out;
    z-index: 1000;
    overflow-y: auto;
  }

  .main-nav.active {
    display: flex; /* Must be flex to display */
    transform: translateX(0);
  }

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 15px;
    width: 100%;
    max-width: none;
  }

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

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

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

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

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

  .footer-nav-legal {
    flex-direction: column;
    gap: 5px;
  }
}

/* Ensure contrast for all text elements */
h1, h2, h3, h4, h5, h6, p, li, a, button, span {
  color: var(--secondary-color);
  /* Add specific contrast if needed, e.g., if background is light */
}

.site-footer h4, .footer-logo {
  color: var(--secondary-color);
}

.footer-nav a, .footer-nav-legal a, .footer-description {
  color: #aaaaaa;
}

.footer-nav a:hover, .footer-nav-legal a:hover {
  color: var(--primary-color);
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
