:root {
  --primary-color: #26A9E0; /* 淡蓝色 */
  --secondary-color: #FFFFFF;
  --color-login: #EA7C07;
  --color-background: #FFFFFF;
  --color-black: #000000;

  /* Neon Colors - derived from brand colors, dynamic */
  --neon-primary: #26A9E0; /* Using primary color for neon base */
  --neon-secondary: #EA7C07; /* Using login color for secondary neon */
  --neon-accent: #FFFF00; /* A bright yellow for accent */

  /* Header Offset - calculated values */
  --header-offset: 155px; /* Desktop: marquee(45) + header-top(60) + main-nav(50) */
}

@media (max-width: 768px) {
  :root {
    --header-offset: 130px; /* Mobile: marquee(30) + header-top(50) + mobile-buttons(50) */
  }
}

/* Base Styles */
body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #f0f0f0;
  background-color: #121212;
  line-height: 1.6;
  padding-top: var(--header-offset); /* Apply header offset to body */
  overflow-x: hidden; /* Prevent horizontal scroll on body */
}

/* General Link Styles */
a {
  text-decoration: none;
  color: var(--primary-color);
  transition: color 0.3s ease;
}

a:hover {
  color: var(--neon-secondary);
}

/* Neon Animations */
@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 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 marquee-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0.9; }
}

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

/* Marquee Section (Fixed at top: 0, z-index: 1001) */
.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),
    0 0 20px var(--neon-primary),
    0 0 30px var(--neon-primary),
    inset 0 0 20px rgba(255, 0, 255, 0.1);
  z-index: 1001; /* Ensure on top of header */
  height: 45px; /* Fixed height for 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: 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),
    0 0 10px var(--neon-primary),
    0 0 15px var(--neon-primary);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.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: #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: 15px;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 10px;
  text-shadow: 
    0 0 3px var(--neon-primary),
    0 0 6px var(--neon-primary);
}

/* Site Header (Fixed below marquee, z-index: 1000) */
.site-header {
  position: fixed;
  top: 45px; /* Desktop: Marquee height */
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: transparent; /* Background handled by header-top and main-nav */
}

.header-top {
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* Dark background */
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite;
  box-shadow: 
    0 0 10px var(--neon-accent), /* Using accent for top bar */
    0 0 20px var(--neon-accent),
    0 0 30px var(--neon-accent),
    inset 0 0 20px rgba(255, 255, 0, 0.1);
  padding: 10px 0;
  min-height: 40px;
  display: flex;
  align-items: center;
  box-sizing: border-box;
}

.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 - NO NEON EFFECTS */
.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--secondary-color); /* White for contrast */
  text-decoration: none;
  transition: color 0.3s ease;
}

.logo:hover {
  color: var(--primary-color);
}

/* Desktop Nav Buttons */
.desktop-nav-buttons {
  display: flex;
  gap: 12px;
}

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

/* Main Navigation (Desktop) */
.main-nav {
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460); /* Different dark background */
  border-top: 2px solid;
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite reverse;
  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;
  min-height: 30px;
  display: flex; /* Default desktop display */
  box-sizing: border-box;
}

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

.nav-link {
  color: var(--secondary-color);
  font-size: 16px;
  padding: 8px 15px;
  margin: 0 5px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

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

.nav-link.active {
  color: var(--primary-color);
  font-weight: 600;
}

/* Buttons */
.btn {
  position: relative;
  background: linear-gradient(135deg, var(--neon-primary), var(--neon-secondary));
  padding: 10px 20px;
  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);
  transition: all 0.3s ease;
  font-weight: bold;
  cursor: pointer;
  white-space: nowrap;
}

.btn:hover {
  animation-duration: 2s;
  transform: translateY(-2px);
  box-shadow: 
    0 0 15px var(--neon-primary),
    0 0 30px var(--neon-primary),
    inset 0 0 15px rgba(255, 255, 255, 0.4);
}

/* Hamburger Menu (hidden on desktop) */
.hamburger-menu {
  display: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  position: relative;
  z-index: 1002;
  padding: 5px;
  border-radius: 3px;
  border: 1px solid transparent;
  animation: theme-colors 4s ease-in-out infinite;
  box-shadow: 
    0 0 5px var(--neon-primary),
    0 0 10px var(--neon-primary);
}

.hamburger-menu span {
  display: block;
  height: 3px;
  width: 100%;
  background: #ffffff;
  border-radius: 3px;
  transition: all 0.3s ease-in-out;
  box-shadow: 0 0 5px #ffffff;
}

.hamburger-menu.active span:nth-child(1) {
  transform: translateY(11px) rotate(45deg);
}
.hamburger-menu.active span:nth-child(2) {
  opacity: 0;
}
.hamburger-menu.active span:nth-child(3) {
  transform: translateY(-11px) rotate(-45deg);
}

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

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

/* Footer (Regular styles, no neon) */
.site-footer {
  background-color: #1a1a2e;
  color: #f0f0f0;
  padding: 40px 0 20px;
  font-size: 14px;
}

.site-footer a {
  color: #b0e0e6;
}

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

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.footer-top-section {
  padding-bottom: 30px;
}

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

.footer-col h4 {
  font-size: 18px;
  color: var(--secondary-color);
  margin-bottom: 15px;
  position: relative;
  padding-bottom: 5px;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 30px;
  height: 2px;
  background-color: var(--primary-color);
}

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

.footer-description {
  line-height: 1.8;
  color: #cccccc;
  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: #cccccc;
  font-weight: 400;
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

.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: 40px;
  height: auto;
  width: auto;
  filter: grayscale(10%);
  opacity: 0.8;
  transition: opacity 0.3s ease, filter 0.3s ease;
}

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

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

.game-providers-section h4, .social-media-section h4 {
  font-size: 16px;
  color: var(--secondary-color);
  margin-bottom: 15px;
  text-align: center;
}

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

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

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

.footer-legal a {
  color: #cccccc;
  font-weight: 400;
}

.copyright {
  font-size: 13px;
  color: #999999;
}

/* No-scroll for body when mobile menu is open */
body.no-scroll {
  overflow: hidden;
}

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

  /* Header Mobile */
  .site-header {
    top: 30px; /* Mobile: Marquee height */
  }

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

  .header-container {
    padding: 0 15px;
    justify-content: flex-start;
    position: relative;
    min-height: 40px;
    width: 100%; /* Ensure container takes full width */
    max-width: none; /* Remove max-width for mobile */
  }

  .hamburger-menu {
    display: flex;
    order: 0;
    margin-right: 15px;
  }

  .logo {
    order: 1;
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px;
    max-width: calc(100% - 60px);
  }

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

  /* Mobile Nav Buttons (always visible on mobile) */
  .mobile-nav-buttons {
    display: flex !important;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px;
    overflow: hidden;
    gap: 10px;
    justify-content: center;
    flex-wrap: nowrap;
    background: linear-gradient(135deg, #1a1a2e, #0a0a0a);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    box-shadow: inset 0 -5px 10px rgba(0,0,0,0.2);
    min-height: 40px;
  }

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

  /* Main Navigation (Mobile - hidden by default, slides in) */
  .main-nav {
    display: none; /* Hidden by default */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Position below header + mobile buttons */
    left: 0;
    width: 250px;
    height: calc(100% - var(--header-offset));
    background: linear-gradient(180deg, #1a1a2e, #0f3460);
    border-right: 2px solid;
    animation: theme-colors 4s ease-in-out infinite;
    box-shadow: 
      0 0 10px var(--neon-primary),
      0 0 20px var(--neon-primary),
      inset -5px 0 15px rgba(38, 169, 224, 0.2);
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    overflow-y: auto;
    z-index: 1000;
  }

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

  .nav-container {
    flex-direction: column;
    padding: 20px 15px;
    align-items: flex-start;
    width: 100%; /* Ensure container takes full width */
    max-width: none; /* Remove max-width for mobile */
  }

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

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

  /* Footer Mobile */
  .site-footer {
    padding: 30px 0 15px;
  }

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

  .footer-col {
    text-align: center;
  }
  .footer-col h4::after {
    left: 50%;
    transform: translateX(-50%);
  }

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

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

  .footer-legal li {
    width: 100%;
  }

  .footer-legal a {
    display: block;
    padding: 5px 0;
  }

  .game-providers-section h4, .social-media-section h4 {
    text-align: center;
  }

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

/* WCAG AA contrast check */
.site-header, .marquee-section, .main-nav {
  color: #ffffff;
}
.marquee-text, .marquee-icon-emoji, .nav-link, .btn {
  color: #ffffff;
}
.site-footer {
  color: #f0f0f0;
}
.footer-description, .footer-nav a, .copyright {
  color: #cccccc;
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
