html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #ffffff;
  background-color: #1a1a1a;
  line-height: 1.6;
}

:root {
  --primary-color: #FFD700; /* Gold */
  --secondary-color: #8B0000; /* Dark Red */
  --text-color: #ffffff;
  --dark-bg: #0a0a0a;
  --header-bg-gradient: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
  --nav-bg-gradient: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);

  /* Neon dynamic colors - using theme colors for theme-flow */
  --neon-primary: var(--primary-color);
  --neon-secondary: var(--secondary-color);
  --neon-accent: #FF6600; /* A vibrant orange for accent */

  --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; /* Hamburger + Logo */
    --mobile-nav-buttons-height: 50px; /* Mobile buttons row */
    --header-offset: calc(var(--marquee-height-mobile) + var(--header-top-height-mobile) + var(--mobile-nav-buttons-height)); /* Mobile: 30 + 60 + 50 = 140px */
  }
}

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

@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 */
.marquee-section {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--header-bg-gradient);
  color: var(--text-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(255, 215, 0, 0.1); /* Use primary color for inset */
  z-index: 1001;
  height: var(--marquee-height-desktop); /* 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: 0 20px;
}

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

.marquee-content {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  animation: marquee-scroll 30s linear infinite;
  gap: 30px;
  padding-right: 30px; /* To ensure content doesn't abruptly end */
}

.marquee-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-color);
  text-decoration: none;
  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);
}

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

/* Header Section */
.site-header {
  position: fixed;
  top: var(--marquee-height-desktop); /* Marquee height */
  left: 0;
  width: 100%;
  z-index: 1000;
  min-height: calc(var(--header-top-height-desktop) + var(--main-nav-height-desktop)); /* Desktop: header-top (60px) + main-nav (50px) */
}

.header-top {
  background: var(--header-bg-gradient);
  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),
    inset 0 0 15px rgba(255, 215, 0, 0.1); /* Inset glow */
  height: var(--header-top-height-desktop); /* Fixed height for desktop top bar */
  display: flex;
  align-items: center;
  position: relative;
}

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

.logo {
  font-family: 'Arial Black', sans-serif; /* Example font */
  font-size: 28px;
  font-weight: bold;
  color: var(--text-color); /* Regular color, no neon */
  text-decoration: none;
  padding: 0;
  display: block;
  line-height: 1;
  /* LOGO MUST NOT have neon effects */
  text-shadow: none;
  box-shadow: none;
  filter: none;
  animation: none;
  transition: none;
}

.desktop-nav-buttons {
  display: flex; /* Default desktop display */
  gap: 15px;
  align-items: center;
}

.btn {
  position: relative;
  background: linear-gradient(135deg, var(--neon-primary), var(--neon-secondary));
  padding: 12px 25px;
  color: var(--text-color);
  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-color),
    0 0 10px var(--neon-primary);
  transition: all 0.3s ease;
  font-weight: bold;
  white-space: nowrap; /* Prevent button text from wrapping on desktop */
}

.btn:hover {
  animation-duration: 2s; /* Faster color change on hover */
  transform: translateY(-2px);
  box-shadow:
    0 0 15px var(--neon-primary),
    0 0 30px var(--neon-primary),
    inset 0 0 15px rgba(255, 215, 0, 0.2);
}

.main-nav {
  background: var(--nav-bg-gradient);
  border-top: 2px solid;
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic border color, different from header-top */
  box-shadow:
    0 0 10px var(--neon-secondary), /* Use secondary neon color for nav glow */
    0 0 20px var(--neon-secondary),
    inset 0 0 15px rgba(139, 0, 0, 0.1); /* Use secondary color for inset */
  width: 100%;
  display: flex; /* Default desktop display */
  align-items: center;
  height: var(--main-nav-height-desktop); /* Fixed height for desktop nav bar */
}

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

.nav-link {
  color: var(--text-color); /* Regular color for nav links */
  text-decoration: none;
  padding: 10px 15px;
  font-weight: 500;
  transition: color 0.3s ease, text-shadow 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--primary-color); /* Highlight on hover */
  text-shadow: 0 0 5px var(--primary-color);
}

/* Mobile specific elements (hidden on desktop) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  cursor: pointer;
  width: 30px;
  height: 24px;
  position: relative;
  z-index: 1002; /* Above logo on mobile */
  margin-right: 15px; /* Space from logo */
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic glow for hamburger */
  border-radius: 3px;
}

.hamburger-menu .bar {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--neon-primary);
  border-radius: 2px;
  margin: 5px 0;
  transition: all 0.3s ease-in-out;
  box-shadow: 0 0 5px var(--neon-primary); /* Glow for bars */
}

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

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

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

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

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

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

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

.footer-top-section {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 30px;
  margin-bottom: 30px;
}

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

.footer-col {
  word-wrap: break-word; /* Ensure text wraps */
  overflow-wrap: break-word; /* Ensure text wraps */
}

.footer-logo {
  font-family: 'Arial Black', sans-serif;
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
  text-decoration: none;
  margin-bottom: 15px;
  display: block;
}

.footer-description {
  color: #aaaaaa;
  margin-top: 15px;
}

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

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

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

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

.site-footer .footer-nav 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; /* Standardized gap */
  width: 100%;
}
.payment-icons img, .game-providers-icons img, .social-media-icons img {
  max-height: 50px;
  height: auto;
  width: auto;
}

.footer-middle-section {
  padding: 20px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 20px;
}

.footer-middle-section .footer-container {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.game-providers-section, .social-media-section {
  width: 100%;
}

.footer-bottom-section {
  text-align: center;
}

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

/* Mobile styles */
@media (max-width: 768px) {
  .marquee-section {
    height: var(--marquee-height-mobile); /* Mobile height */
    padding: 0 5px;
  }
  .marquee-container {
    padding: 0 5px;
    gap: 10px;
  }
  .marquee-icon {
    width: 25px;
    height: 25px;
  }
  .marquee-icon-emoji {
    font-size: 16px;
  }
  .marquee-text {
    font-size: 13px;
    line-height: 1.4;
  }
  .marquee-separator {
    font-size: 13px;
    margin: 0 8px;
  }
  .marquee-content {
    gap: 20px;
    animation-duration: 20s; /* Adjust speed for mobile */
  }

  .site-header {
    top: var(--marquee-height-mobile); /* Mobile marquee height */
    min-height: calc(var(--header-top-height-mobile) + var(--mobile-nav-buttons-height)); /* Mobile header height */
  }

  .header-top {
    height: var(--header-top-height-mobile); /* Mobile top bar height */
  }

  .header-container {
    padding: 0 15px;
    width: 100%;
    max-width: none; /* Important for mobile */
    justify-content: space-between; /* Hamburger left, Logo centered */
  }

  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    order: 0; /* Leftmost */
  }

  .logo {
    order: 1; /* Center */
    flex: 1 !important; /* Take remaining space */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px;
    max-width: calc(100% - 60px); /* Adjust based on hamburger width (30px + 15px margin + some buffer) */
  }
  .logo img {
    max-height: 40px; /* Smaller logo on mobile */
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px; /* Adjust padding */
    gap: 10px;
    justify-content: center;
    flex-wrap: nowrap; /* Prevent buttons from wrapping */
    background: var(--header-bg-gradient); /* Consistent background */
    border-bottom: 2px solid;
    animation: theme-colors 4s ease-in-out infinite;
    box-shadow:
      0 0 8px var(--neon-primary),
      0 0 15px var(--neon-primary),
      inset 0 0 10px rgba(255, 215, 0, 0.1);
    height: var(--mobile-nav-buttons-height); /* Fixed height for mobile buttons */
  }

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

  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: var(--header-offset); /* Below header-top and mobile buttons */
    left: 0;
    width: 250px; /* Sidebar width */
    height: calc(100vh - var(--header-offset)); /* Full height below header */
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 0;
    transform: translateX(-100%); /* Off-screen by default */
    transition: transform 0.3s ease-in-out;
    background: var(--nav-bg-gradient);
    border-right: 2px solid;
    animation: theme-colors 4s ease-in-out infinite; /* Dynamic border color */
    box-shadow:
      5px 0 15px rgba(0, 0, 0, 0.5),
      0 0 10px var(--neon-secondary); /* Glow on the right edge */
    z-index: 1000; /* Above overlay */
  }

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

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

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

  .site-footer .footer-container {
    grid-template-columns: 1fr; /* Single column layout */
    gap: 20px;
  }
  .site-footer .footer-col {
    text-align: center;
  }
  .footer-logo {
    text-align: center;
  }
  .footer-nav {
    text-align: center;
  }
  .payment-methods, .game-providers-section, .social-media-section {
    text-align: center;
  }
  .payment-icons, .game-providers-icons, .social-media-icons {
    justify-content: center;
  }

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

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