:root {
  --primary-color: #26A9E0;
  --secondary-color: #FFFFFF;
  --text-dark: #333333;
  --text-light: #FFFFFF;
  --bg-dark: #0a0a0a;
  --bg-medium-dark: #1a1a2e;
  --bg-deep-dark: #16213e;
  --login-color: #EA7C07;

  /* Neon colors based on primary and vibrant contrasts */
  --neon-primary: var(--primary-color); /* #26A9E0 */
  --neon-secondary: #ff00ff; /* A vibrant magenta */
  --neon-accent: #ffff00; /* A vibrant yellow */
  --neon-flicker-color: #00ffff; /* Cyan for flicker */
  --neon-red: #ff0000;
  --neon-orange: #ff6600;

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

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

/* Base styles */
body {
  font-family: 'Arial', sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
  background-color: var(--secondary-color); /* Default background, can be overridden by page content */
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden; /* Prevent body overflow on mobile */
}

a {
  text-decoration: none;
  color: var(--primary-color);
}

ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Reusable container for content width */
.header-container, .nav-container, .footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
  box-sizing: border-box;
}

/* Animations for Neon effects */
@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: #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(255, 0, 255, 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(--text-light); }
  50% { text-shadow: 0 0 5px var(--neon-secondary), 0 0 10px var(--neon-secondary), 0 0 15px var(--neon-secondary); color: var(--text-light); }
  100% { text-shadow: 0 0 5px var(--neon-accent), 0 0 10px var(--neon-accent), 0 0 15px var(--neon-accent); color: var(--text-light); }
}

/* Marquee Section */
.marquee-section {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(135deg, var(--bg-dark), var(--bg-medium-dark), var(--bg-deep-dark));
  color: var(--text-light);
  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;
  height: 45px; /* Fixed height for desktop */
}

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

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

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

.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: var(--text-light);
  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(--text-light);
}

.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: 45px; /* Marquee height */
  left: 0;
  width: 100%;
  z-index: 1000;
  background: linear-gradient(135deg, var(--bg-dark), var(--bg-medium-dark), var(--bg-deep-dark));
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  min-height: 110px; /* header-top 60px + main-nav 50px */
}

.site-header .header-top {
  background: linear-gradient(135deg, var(--bg-dark), var(--bg-medium-dark));
  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(38, 169, 224, 0.1);
  padding: 10px 0;
  display: flex;
  align-items: center;
  height: 60px; /* Fixed height for desktop header-top */
  box-sizing: border-box;
}

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

.site-header .logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--text-light); /* Regular color, no neon effects */
  text-decoration: none;
  padding: 0;
  margin: 0;
  display: block; /* Ensure it's not inline for flex alignment */
}
.site-header .logo img {
  display: block;
  max-height: 40px;
  height: auto;
  width: auto;
}

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

.site-header .btn {
  position: relative;
  background: linear-gradient(135deg, var(--login-color), var(--neon-red)); /* Use login color and neon red */
  padding: 12px 25px;
  color: var(--text-light);
  font-size: 16px;
  text-decoration: none;
  border-radius: 5px;
  border: 2px solid;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic border color */
  text-shadow:
    0 0 5px var(--text-light),
    0 0 10px var(--login-color);
  transition: all 0.3s ease;
  white-space: nowrap;
  cursor: pointer;
}

.site-header .btn:hover {
  animation-duration: 2s;
  transform: translateY(-2px) scale(1.02);
  text-shadow:
    0 0 10px var(--text-light),
    0 0 20px var(--login-color),
    0 0 30px var(--login-color);
}

/* Main Navigation */
.main-nav {
  background: linear-gradient(135deg, var(--bg-medium-dark), var(--bg-deep-dark));
  border-top: 2px solid;
  border-bottom: 2px solid;
  animation: alternate-colors 4s ease-in-out infinite; /* 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(255, 0, 255, 0.1);
  padding: 10px 0;
  display: flex; /* Desktop default: visible, horizontal */
  flex-direction: row;
  justify-content: center;
  align-items: center;
  height: 50px; /* Fixed height for desktop main-nav */
  box-sizing: border-box;
}

.main-nav .nav-container {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 25px;
  height: 100%;
}

.main-nav .nav-link {
  color: var(--text-light); /* Regular text, no neon */
  font-size: 16px;
  font-weight: 500;
  padding: 5px 0;
  transition: color 0.3s ease, transform 0.3s ease;
  white-space: nowrap;
}

.main-nav .nav-link:hover {
  color: var(--primary-color);
  transform: translateY(-2px);
}

/* Hamburger menu (mobile only) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  position: relative;
  z-index: 1002; /* Above logo and menu */
}

.hamburger-icon {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--text-light);
  margin: 5px 0;
  transition: all 0.3s ease;
  border-radius: 2px;
  box-shadow:
    0 0 5px var(--neon-flicker-color),
    0 0 10px var(--neon-flicker-color);
}

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

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

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

/* Mobile button section (desktop hidden) */
.mobile-nav-buttons {
  display: none; /* Hidden on desktop */
}

/* Footer Section */
.site-footer {
  background-color: var(--bg-dark);
  color: var(--text-light);
  padding: 40px 0 20px;
  font-size: 14px;
}

.site-footer h4 {
  color: var(--primary-color);
  font-size: 18px;
  margin-bottom: 20px;
  text-transform: uppercase;
}

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

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

.site-footer .footer-top .footer-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.site-footer .footer-logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 15px;
  display: block;
}

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

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

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

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

.site-footer .game-providers-section,
.site-footer .social-media-section {
  padding: 30px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.site-footer .game-providers-section h4,
.site-footer .social-media-section h4 {
  margin-bottom: 20px;
  text-align: center;
}

.site-footer .game-providers-section .footer-container,
.site-footer .social-media-section .footer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}


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

.site-footer .footer-bottom .footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.site-footer .footer-bottom p {
  margin: 0;
  color: rgba(255, 255, 255, 0.6);
}

.site-footer .footer-legal-list {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.site-footer .footer-legal-list a {
  color: rgba(255, 255, 255, 0.6);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  /* Marquee */
  .marquee-section {
    height: 30px; /* Adjusted height for mobile */
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }
  .marquee-container {
    gap: 10px !important;
    padding: 0 10px;
  }
  .marquee-icon {
    width: 20px !important;
    height: 20px !important;
  }
  .marquee-icon-emoji {
    font-size: 14px !important;
  }
  .marquee-text {
    font-size: 14px !important;
  }
  .marquee-separator {
    font-size: 14px !important;
    margin: 0 8px !important;
  }
  .marquee-content {
    gap: 20px;
    animation: marquee-scroll 25s linear infinite;
  }

  /* Header */
  .site-header {
    top: 30px; /* Marquee height for mobile */
    min-height: auto; /* Allow height to adjust */
    padding-bottom: 0; /* Remove padding */
  }

  .site-header .header-top {
    height: 50px; /* Fixed height for mobile header-top */
    padding: 0 15px;
    border-bottom: none; /* No border for header-top on mobile */
  }
  .site-header .header-top .header-container {
    padding-left: 0;
    padding-right: 0;
    justify-content: space-between;
  }

  .site-header .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 22px;
  }
  .site-header .logo img {
    max-height: 35px !important;
  }

  .site-header .desktop-nav-buttons {
    display: none; /* Hide desktop buttons */
  }

  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    order: -1; /* Place it at the beginning */
    margin-right: auto; /* Push logo to center */
    padding: 5px;
  }

  /* Mobile buttons section - always visible */
  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px; /* Added padding */
    background: linear-gradient(135deg, var(--bg-deep-dark), var(--bg-medium-dark));
    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);
  }
  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* Account for gap */
    padding: 8px 12px; /* Smaller padding */
    font-size: 13px; /* Smaller font */
    white-space: normal; /* Allow text wrap */
    word-wrap: break-word;
    overflow-wrap: break-word;
    text-align: center;
  }

  /* Main Navigation (mobile) */
  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: var(--header-offset); /* Below the full header stack (marquee + header-top + mobile-buttons) */
    left: 0;
    width: 100%;
    height: calc(100vh - var(--header-offset)); /* Full height below header */
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    background: linear-gradient(180deg, var(--bg-deep-dark), var(--bg-dark));
    border: none; /* Remove borders for full screen menu */
    box-shadow: none;
    transform: translateX(-100%); /* Start off-screen */
    transition: transform 0.3s ease-in-out;
    z-index: 1000; /* Above overlay, below hamburger */
    overflow-y: auto; /* Allow scrolling if menu content is long */
  }

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

  .main-nav .nav-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    padding: 20px 25px;
    width: 100%;
    max-width: none; /* No max-width on mobile */
    height: auto;
  }

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

  /* Footer */
  .site-footer .footer-top .footer-container {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 20px;
    padding-bottom: 20px;
  }
  .site-footer .footer-bottom .footer-container {
    flex-direction: column;
    text-align: center;
  }
  .site-footer .footer-legal-list {
    justify-content: center;
  }
  .site-footer .game-providers-section h4,
  .site-footer .social-media-section h4 {
    text-align: left; /* Align section titles to left */
    width: 100%;
  }
  .site-footer .game-providers-section .footer-container,
  .site-footer .social-media-section .footer-container {
    align-items: flex-start;
  }
  .site-footer .game-providers-section,
  .site-footer .social-media-section {
    padding: 20px 0;
  }

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

/* Mobile menu overlay */
.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; /* Below menu */
  transition: opacity 0.3s ease-in-out;
  opacity: 0;
}

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

.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;
  }
}
