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

  /* Neon dynamic colors - derived from primary/secondary */
  --neon-primary: #00FFFF; /* Cyan-like, derived from #26A9E0 */
  --neon-secondary: #FF00FF; /* Magenta */
  --neon-accent: #FFFF00; /* Yellow */
  --neon-dark-bg: #0a0a0a; /* Dark background */
  --neon-dark-bg-alt: #1a1a2e; /* Slightly lighter dark background */

  /* Header offset calculation */
  --marquee-height-desktop: 45px;
  --header-top-height-desktop: 60px;
  --main-nav-height-desktop: 50px;
  --header-offset: calc(var(--marquee-height-desktop) + var(--header-top-height-desktop) + var(--main-nav-height-desktop)); /* Desktop: 45 + 60 + 50 = 155px */
}

@media (max-width: 768px) {
  :root {
    --marquee-height-mobile: 30px;
    --header-top-height-mobile: 60px;
    --mobile-buttons-height: 50px;
    --header-offset: calc(var(--marquee-height-mobile) + var(--header-top-height-mobile) + var(--mobile-buttons-height)); /* Mobile: 30 + 60 + 50 = 140px */
  }
}

/* Animations for dynamic neon colors */
@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(0, 255, 255, 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: #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; }
}

/* Base styles */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Arial', sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Fixed header offset */
  background-color: #050505;
  color: #e0e0e0;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-decoration: none;
  color: inherit;
}

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

/* Marquee Section Styles */
.marquee-section {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--marquee-height-desktop); /* Fixed height for desktop */
  background: linear-gradient(135deg, var(--neon-dark-bg), var(--neon-dark-bg-alt), #16213e); /* Dark background */
  color: #ffffff;
  overflow: hidden;
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic color border */
  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(0, 255, 255, 0.1);
  z-index: 1001; /* Above header */
  display: flex;
  align-items: center;
}

.marquee-container {
  width: 100%;
  max-width: 1200px;
  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: 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: #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 Styles */
.site-header {
  position: fixed;
  top: var(--marquee-height-desktop); /* Position below marquee */
  left: 0;
  width: 100%;
  z-index: 1000; /* Below marquee, above content */
  background: transparent; /* Background handled by sub-sections */
}

.header-top {
  background: linear-gradient(135deg, var(--neon-dark-bg), var(--neon-dark-bg-alt));
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic color border */
  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(0, 255, 255, 0.1);
  padding: 10px 0;
  height: var(--header-top-height-desktop);
  display: flex;
  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;
}

.logo {
  color: var(--secondary-color); /* Regular color, no neon */
  font-size: 24px;
  font-weight: bold;
  text-decoration: none;
  padding: 0; /* Ensure no extra padding for logo */
  /* LOGO NO NEON: */
  text-shadow: none;
  box-shadow: none;
  filter: none;
  animation: none;
  display: block; /* Ensure logo is visible */
}

.logo img {
  display: block;
  max-width: 100%;
  height: auto;
  max-height: 40px;
}

.desktop-nav-buttons {
  display: flex; /* Desktop default: flex */
  gap: 10px;
}

.mobile-nav-buttons {
  display: none; /* Desktop default: hidden */
}

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

.btn:hover {
  animation-duration: 2s; /* Faster animation on hover */
  transform: translateY(-2px);
  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(0, 255, 255, 0.4);
}

.main-nav {
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460); /* Different dark background */
  border-top: 2px solid;
  border-bottom: 2px solid;
  animation: alternate-colors 4s ease-in-out infinite; /* Dynamic color border */
  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: 0;
  height: var(--main-nav-height-desktop);
  display: flex; /* Desktop default: flex */
  align-items: center;
  position: static; /* Desktop default: static */
  width: 100%;
}

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

.nav-link {
  color: #ffffff; /* Regular color, no neon */
  font-size: 16px;
  font-weight: 500;
  padding: 10px 15px;
  transition: color 0.3s ease, background-color 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--neon-primary); /* Highlight with neon primary */
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.hamburger-menu {
  display: none; /* Desktop default: hidden */
  width: 30px;
  height: 24px;
  position: relative;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  z-index: 1002; /* Above logo and overlay */
  /* Neon glow for hamburger */
  box-shadow: 
    0 0 5px var(--neon-accent),
    0 0 10px var(--neon-accent);
  animation: random-glow 5s linear infinite; /* Dynamic glow */
}

.hamburger-menu::before,
.hamburger-menu::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 3px;
  background-color: #ffffff;
  left: 0;
  transition: all 0.3s ease;
  /* Neon glow for lines */
  box-shadow: 0 0 5px #ffffff, 0 0 10px var(--neon-accent);
}

.hamburger-menu::before {
  top: 0;
}

.hamburger-menu::after {
  bottom: 0;
}

.hamburger-menu.active::before {
  transform: translateY(10.5px) rotate(45deg);
}

.hamburger-menu.active::after {
  transform: translateY(-10.5px) rotate(-45deg);
}

.hamburger-menu.active {
  box-shadow: 
    0 0 10px var(--neon-accent),
    0 0 20px var(--neon-accent);
}

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

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

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

.footer-top {
  padding-bottom: 30px;
  border-bottom: 1px solid #333333;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 columns for desktop */
  gap: 30px;
}

.footer-col h4 {
  color: var(--secondary-color);
  font-size: 16px;
  margin-bottom: 15px;
  font-weight: bold;
}

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

.footer-description {
  line-height: 1.6;
  color: #aaaaaa;
  word-wrap: break-word; /* Ensure full display and wrapping */
  overflow-wrap: break-word;
}

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

.footer-col ul li a {
  color: #cccccc;
  transition: color 0.3s ease;
}

.footer-col ul li 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; /* Consistent gap for icons */
  width: 100%;
}

.payment-icons img, .game-providers-icons img, .social-media-icons img {
  max-height: 40px; /* Adjusted icon size for footer */
  height: auto;
  width: auto;
  filter: grayscale(100%) brightness(150%); /* Make icons fit dark theme better */
  transition: filter 0.3s ease;
}

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

.footer-middle {
  padding: 30px 0;
}

.game-providers-section, .social-media-section {
  margin-bottom: 20px;
}
.game-providers-section:last-child, .social-media-section:last-child {
  margin-bottom: 0;
}


.footer-bottom {
  padding-top: 20px;
  border-top: 1px solid #333333;
}

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

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

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

.footer-legal-nav li a {
  color: #aaaaaa;
  transition: color 0.3s ease;
}

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

/* Mobile Responsive */
@media (max-width: 768px) {
  /* Marquee */
  .marquee-section {
    height: var(--marquee-height-mobile); /* Mobile height */
    padding: 0; /* Remove padding that might affect height */
  }
  .marquee-container {
    padding: 0 10px;
    gap: 10px;
  }
  .marquee-icon {
    width: 20px;
    height: 20px;
  }
  .marquee-icon-emoji {
    font-size: 16px;
  }
  .marquee-text {
    font-size: 14px;
    line-height: 1.2;
  }
  .marquee-separator {
    font-size: 14px;
    margin: 0 8px;
  }
  .marquee-content {
    gap: 20px;
    animation-duration: 25s; /* Faster scroll on mobile */
  }

  /* Header */
  .site-header {
    top: var(--marquee-height-mobile); /* Position below mobile marquee */
  }

  .header-top {
    padding: 10px 0;
    height: var(--header-top-height-mobile);
  }

  .header-container {
    padding: 0 15px; /* Smaller padding */
    width: 100%; /* Must be 100% */
    max-width: none; /* No max-width on mobile */
    justify-content: flex-start; /* Adjust for hamburger */
    position: relative; /* For logo absolute positioning */
  }

  .hamburger-menu {
    display: block; /* Show hamburger */
    order: 1; /* Left side */
    margin-right: 15px;
  }

  .logo {
    order: 2; /* Middle */
    flex: 1 !important; /* Take remaining space */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 20px; /* Smaller logo text */
    max-width: calc(100% - 70px); /* Account for hamburger and potential right padding */
  }
  
  .logo img {
    max-height: 35px; /* Smaller logo image */
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    justify-content: center;
    gap: 10px;
    padding: 8px 15px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    background: linear-gradient(135deg, var(--neon-dark-bg-alt), #16213e); /* Dark background */
    border-bottom: 2px solid;
    animation: theme-colors 4s ease-in-out infinite;
    box-shadow: 
      0 0 5px var(--neon-primary),
      0 0 10px var(--neon-primary),
      inset 0 0 10px rgba(0, 255, 255, 0.1);
    height: var(--mobile-buttons-height);
    align-items: center;
    flex-wrap: nowrap; /* Prevent wrapping */
    overflow: hidden; /* Prevent overflow */
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* Two buttons, evenly spaced */
    padding: 8px 12px; /* Smaller padding for buttons */
    font-size: 13px; /* Smaller font for buttons */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word;
    text-align: center;
    animation-duration: 3s; /* Adjust button animation speed */
    box-shadow: 
      0 0 5px currentColor,
      0 0 10px currentColor !important; /* Reduce glow intensity */
  }

  .main-nav {
    display: none; /* Hidden by default */
    flex-direction: column; /* Vertical menu */
    position: fixed;
    top: var(--header-offset); /* Position below fixed header elements */
    left: 0;
    width: 80%; /* Menu width */
    max-width: 300px; /* Max width for menu */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background: linear-gradient(180deg, var(--neon-dark-bg-alt), #0f3460); /* Dark background for menu */
    border-right: 2px solid;
    animation: alternate-colors 4s ease-in-out infinite;
    box-shadow: 
      0 0 10px var(--neon-secondary),
      0 0 20px var(--neon-secondary);
    transform: translateX(-100%); /* Off-screen initially */
    transition: transform 0.3s ease-out;
    z-index: 1000; /* Above overlay */
    overflow-y: auto; /* Scrollable if content is long */
  }

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

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

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

  /* Footer */
  .footer-container {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 20px;
  }
  
  .footer-bottom .footer-container {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }
  
  .footer-legal-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;
  }
  
  /* Prevent body scroll when menu is open */
  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;
  }
}
