:root {
  --primary-color: #26A9E0;
  --secondary-color: #FFFFFF;
  --neon-primary: #00FFFF; /* Cyan */
  --neon-secondary: #FF00FF; /* Magenta */
  --neon-accent: #FFFF00; /* Yellow */
  --header-offset: 155px; /* Desktop: Marquee (45px) + Header Top (60px) + Main Nav (50px) */
}

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

/* Base Styles */
body {
  margin: 0;
  font-family: 'Arial', sans-serif;
  color: #ffffff;
  background-color: #0a0a0a;
  padding-top: var(--header-offset);
  overflow-x: hidden; /* Prevent body overflow on mobile */
}

/* Animations for Neon Effects */
@keyframes theme-colors {
  0%, 100% {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color), 0 0 20px var(--primary-color), inset 0 0 10px rgba(38, 169, 224, 0.3);
  }
  33% {
    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);
  }
  66% {
    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);
  }
}

@keyframes text-glow-flow {
  0% {
    text-shadow: 0 0 5px var(--primary-color), 0 0 10px var(--primary-color), 0 0 15px var(--primary-color);
    color: var(--secondary-color);
  }
  33% {
    text-shadow: 0 0 5px var(--neon-primary), 0 0 10px var(--neon-primary), 0 0 15px var(--neon-primary);
    color: var(--secondary-color);
  }
  66% {
    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(--primary-color), 0 0 10px var(--primary-color), 0 0 15px var(--primary-color);
    color: var(--secondary-color);
  }
}

/* Marquee Section Styles */
.marquee-section {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
  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(0, 255, 255, 0.1);
  z-index: 1001;
  height: 45px; /* Desktop height */
  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: 10px 20px;
}

.marquee-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px; /* Adjusted size */
  height: 28px; /* 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: 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;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 300px; /* Limit width to prevent single long phrase from dominating */
}

.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.02);
  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 Styles */
.site-header {
  position: fixed;
  top: 45px; /* Marquee height */
  left: 0;
  width: 100%;
  z-index: 1000;
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
  color: var(--secondary-color);
}

.site-header .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), 0 0 20px var(--neon-primary), 0 0 30px var(--neon-primary),
    inset 0 0 20px rgba(0, 255, 255, 0.1);
  min-height: 60px; /* Desktop height */
  display: flex;
  align-items: center;
}

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

.site-header .logo {
  color: var(--secondary-color);
  font-size: 24px;
  font-weight: bold;
  text-decoration: none;
  text-transform: uppercase;
  display: block; /* Ensure it's not hidden */
  /* NO NEON EFFECTS on LOGO */
  text-shadow: none;
  box-shadow: none;
  filter: none;
}

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

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

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

.site-header .btn {
  position: relative;
  background: linear-gradient(135deg, #EA7C07, #FFD700); /* Orange to Gold for button */
  padding: 10px 20px;
  color: var(--secondary-color);
  text-decoration: none;
  border-radius: 5px;
  border: 2px solid;
  animation: theme-colors 4s ease-in-out infinite;
  text-shadow: 
    0 0 5px var(--secondary-color), 0 0 10px #EA7C07;
  transition: all 0.3s ease;
  font-weight: bold;
  font-size: 14px;
  line-height: 1.2;
  text-align: center;
}

.site-header .btn:hover {
  animation-duration: 2s;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 
    0 0 15px var(--neon-accent), 0 0 30px var(--neon-accent), inset 0 0 15px rgba(255, 215, 0, 0.3);
}

.site-header .main-nav {
  background: linear-gradient(135deg, #16213e, #0f3460, #0a0a0a); /* 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 8px var(--neon-secondary), 0 0 15px var(--neon-secondary), 0 0 25px var(--neon-secondary),
    inset 0 0 15px rgba(255, 0, 255, 0.1);
  width: 100%;
  display: flex;
  align-items: center;
  min-height: 50px; /* Desktop height */
}

.site-header .nav-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  flex-wrap: wrap; /* Allow wrapping on smaller desktop screens */
}

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

.site-header .nav-link::before {
  content: '';
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background-color: var(--neon-primary);
  transition: width 0.3s ease;
}

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

.site-header .nav-link:hover::before {
  width: calc(100% - 20px);
}

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

.hamburger-icon {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--neon-primary);
  border-radius: 2px;
  position: relative;
  transition: background-color 0.3s ease;
  box-shadow: 0 0 5px var(--neon-primary), 0 0 10px var(--neon-primary);
  animation: text-glow-flow 3s ease-in-out infinite alternate;
}

.hamburger-icon::before, .hamburger-icon::after {
  content: '';
  display: block;
  width: 100%;
  height: 100%;
  background-color: var(--neon-primary);
  border-radius: 2px;
  position: absolute;
  transition: transform 0.3s ease, top 0.3s ease, background-color 0.3s ease;
  box-shadow: 0 0 5px var(--neon-primary), 0 0 10px var(--neon-primary);
  animation: text-glow-flow 3s ease-in-out infinite alternate;
}

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

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

.hamburger-menu.active .hamburger-icon {
  background-color: transparent;
  box-shadow: none;
}

.hamburger-menu.active .hamburger-icon::before {
  top: 0;
  transform: rotate(45deg);
}

.hamburger-menu.active .hamburger-icon::after {
  top: 0;
  transform: rotate(-45deg);
}

.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;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

/* Footer Section Styles */
.site-footer {
  background-color: #1a1a2e;
  color: #c0c0c0;
  padding: 40px 0 20px;
  font-size: 14px;
  line-height: 1.6;
  border-top: 5px solid var(--primary-color);
}

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

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

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

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

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

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

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

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

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

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

.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;
  filter: grayscale(100%) brightness(150%); /* Make icons white/light for dark background */
  transition: filter 0.3s ease;
}

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

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

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

.footer-bottom .copyright {
  margin: 0;
  color: #c0c0c0;
}

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

.footer-action-links li {
  margin-bottom: 0;
}

.footer-action-links a {
  color: var(--primary-color);
  font-weight: bold;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  /* Marquee Mobile */
  .marquee-section {
    height: 25px; /* Mobile height */
    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: 12px;
    line-height: 1.3;
    max-width: 200px;
  }
  .marquee-separator {
    font-size: 12px;
    margin: 0 8px;
  }
  .marquee-content {
    gap: 20px;
    animation: marquee-scroll 25s linear infinite;
  }

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

  .site-header .header-top {
    min-height: 50px; /* Mobile height */
  }

  .site-header .header-container {
    padding: 0 15px;
    justify-content: flex-start; /* Align hamburger left */
    position: relative; /* For logo absolute positioning */
  }

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

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

  .site-header .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    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, #16213e, #0f3460, #0a0a0a);
    border-bottom: 2px solid;
    animation: theme-colors 4s ease-in-out infinite reverse;
    box-shadow: 
      0 0 8px var(--neon-accent), 0 0 15px var(--neon-accent), 0 0 25px var(--neon-accent),
      inset 0 0 15px rgba(255, 255, 0, 0.1);
  }

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

  .hamburger-menu {
    display: block;
  }

  .site-header .main-nav {
    display: none; /* Hidden by default, shown by JS */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Position below fixed header elements */
    left: 0;
    width: 70%; /* Adjust as needed */
    height: calc(100% - var(--header-offset));
    background: linear-gradient(180deg, #1a1a2e, #0a0a0a);
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    z-index: 1000;
    border-right: 2px solid;
    animation: theme-colors 5s ease-in-out infinite;
  }

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

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

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

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

  .site-header .nav-link::before {
    display: none;
  }
  .site-header .nav-link:hover::before {
    width: 0;
  }

  /* Footer Mobile */
  .footer-grid-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .footer-col.footer-about {
    text-align: center;
  }
  .footer-col .footer-logo {
    text-align: center;
  }
  .footer-action-links {
    flex-direction: column;
    gap: 10px;
  }
  .footer-action-links li {
    width: 100%;
  }
  .footer-action-links a {
    display: block;
    padding: 8px 15px;
    border: 1px solid var(--primary-color);
    border-radius: 5px;
    background-color: rgba(38, 169, 224, 0.1);
  }
  
  /* 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;
  }
}

/* Color Contrast Adjustments */
/* Ensure text on dark backgrounds is light */
.marquee-text, .site-header .logo, .site-header .nav-link, .site-header .btn, .site-footer, .site-footer h4, .site-footer a, .footer-description, .copyright {
  color: var(--secondary-color); /* Default to white for better contrast */
}
.site-footer a:hover {
  color: var(--primary-color);
}
.site-header .btn {
  background: linear-gradient(135deg, #EA7C07, #FFD700); /* Specific button gradient */
  color: #FFFFFF; /* Ensure white text on button */
}

/* WCAG AA contrast check for main colors */
/* #26A9E0 (primary) on #0a0a0a (dark background) needs to be checked. */
/* #FFFFFF (secondary) on #0a0a0a (dark background) is good. */
/* Neon colors are typically bright and on dark backgrounds, so they generally pass. */
/* Text-shadow helps perceived contrast for neon text. */
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
