:root {
  --site-primary-color: #FFD700; /* Gold */
  --site-secondary-color: #000080; /* Navy Blue */

  /* Neon colors derived or contrasting */
  --neon-yellow: #FFFF00;
  --neon-magenta: #FF00FF;
  --neon-cyan: #00FFFF;
  --neon-red: #FF0000;
  --neon-orange: #FFA500;
  --neon-green: #00FF00;

  /* Header base background colors */
  --header-bg-dark1: #0a0a0a;
  --header-bg-dark2: #1a1a2e;
  --header-bg-dark3: #16213e;

  /* Dynamic neon colors for animations, intelligently chosen */
  --dynamic-color-1: var(--neon-yellow); /* Related to site primary */
  --dynamic-color-2: var(--neon-magenta); /* Contrasting */
  --dynamic-color-3: var(--neon-cyan);    /* Contrasting */
}

/* Base styles */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  background-color: #111; /* Dark background for the whole page */
  color: #eee;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.no-scroll {
  overflow: hidden;
}

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

/* Neon glow animations (from prompt, using dynamic colors) */
@keyframes rainbow-border {
  0% { border-color: var(--neon-red); box-shadow: 0 0 10px var(--neon-red), 0 0 20px var(--neon-red); }
  16.6% { border-color: var(--neon-orange); box-shadow: 0 0 10px var(--neon-orange), 0 0 20px var(--neon-orange); }
  33.3% { border-color: var(--neon-yellow); box-shadow: 0 0 10px var(--neon-yellow), 0 0 20px var(--neon-yellow); }
  50% { border-color: var(--neon-green); box-shadow: 0 0 10px var(--neon-green), 0 0 20px var(--neon-green); }
  66.6% { border-color: var(--neon-cyan); box-shadow: 0 0 10px var(--neon-cyan), 0 0 20px var(--neon-cyan); }
  83.3% { border-color: var(--neon-magenta); box-shadow: 0 0 10px var(--neon-magenta), 0 0 20px var(--neon-magenta); }
  100% { border-color: var(--neon-red); box-shadow: 0 0 10px var(--neon-red), 0 0 20px var(--neon-red); }
}

@keyframes hue-spin {
  0% { filter: hue-rotate(0deg); box-shadow: 0 0 10px var(--dynamic-color-1), 0 0 20px var(--dynamic-color-1); }
  100% { filter: hue-rotate(360deg); box-shadow: 0 0 10px var(--dynamic-color-1), 0 0 20px var(--dynamic-color-1); }
}

@keyframes alternate-colors {
  0% { border-color: var(--dynamic-color-1); box-shadow: 0 0 10px var(--dynamic-color-1), 0 0 20px var(--dynamic-color-1); }
  100% { border-color: var(--dynamic-color-2); box-shadow: 0 0 10px var(--dynamic-color-2), 0 0 20px var(--dynamic-color-2); }
}

@keyframes gradient-flow {
  0% { background-position: 0% 50%; box-shadow: 0 0 10px var(--neon-red), 0 0 20px var(--neon-orange); }
  50% { background-position: 100% 50%; box-shadow: 0 0 10px var(--neon-cyan), 0 0 20px var(--neon-magenta); }
  100% { background-position: 0% 50%; box-shadow: 0 0 10px var(--neon-red), 0 0 20px var(--neon-orange); }
}

@keyframes random-glow {
  0% { border-color: var(--neon-magenta); box-shadow: 0 0 20px var(--neon-magenta); }
  20% { border-color: var(--neon-cyan); box-shadow: 0 0 20px var(--neon-cyan); }
  40% { border-color: var(--neon-yellow); box-shadow: 0 0 20px var(--neon-yellow); }
  60% { border-color: var(--neon-green); box-shadow: 0 0 20px var(--neon-green); }
  80% { border-color: var(--neon-red); box-shadow: 0 0 20px var(--neon-red); }
  100% { border-color: var(--neon-magenta); box-shadow: 0 0 20px var(--neon-magenta); }
}

@keyframes theme-colors {
  0%, 100% {
    border-color: var(--dynamic-color-1);
    box-shadow: 0 0 10px var(--dynamic-color-1), 0 0 20px var(--dynamic-color-1), inset 0 0 10px rgba(255, 255, 0, 0.3);
  }
  33% {
    border-color: var(--dynamic-color-2);
    box-shadow: 0 0 10px var(--dynamic-color-2), 0 0 20px var(--dynamic-color-2), inset 0 0 10px rgba(255, 0, 255, 0.3);
  }
  66% {
    border-color: var(--dynamic-color-3);
    box-shadow: 0 0 10px var(--dynamic-color-3), 0 0 20px var(--dynamic-color-3), inset 0 0 10px rgba(0, 255, 255, 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(--dynamic-color-1), 0 0 10px var(--dynamic-color-1), 0 0 15px var(--dynamic-color-1); color: #ffffff; }
  50% { text-shadow: 0 0 5px var(--dynamic-color-2), 0 0 10px var(--dynamic-color-2), 0 0 15px var(--dynamic-color-2); color: #ffffff; }
  100% { text-shadow: 0 0 5px var(--dynamic-color-3), 0 0 10px var(--dynamic-color-3), 0 0 15px var(--dynamic-color-3); color: #ffffff; }
}

/* General neon glow classes */
.neon-glow {
  box-shadow: 0 0 5px currentColor, 0 0 10px currentColor, 0 0 15px currentColor, 0 0 20px currentColor, inset 0 0 10px rgba(255, 255, 255, 0.1);
}
.neon-tube { border: 2px solid; animation: neon-flicker 2s infinite alternate, theme-colors 4s linear infinite; }
.cyber-grid {
  background: linear-gradient(90deg, transparent 95%, currentColor 100%), linear-gradient(180deg, transparent 95%, currentColor 100%);
  background-size: 20px 20px; border: 1px solid; animation: hue-spin 4s linear infinite;
}
.neon-pulse { border: 2px solid; animation: pulse-glow 2s ease-in-out infinite alternate, theme-colors 4s ease-in-out infinite; }
.rainbow-flow { border: 2px solid; animation: rainbow-border 3s linear infinite; }
.hue-rotate { border: 2px solid; filter: hue-rotate(0deg); animation: hue-spin 4s linear infinite; }
.alternate-glow { border: 2px solid; animation: alternate-colors 2s ease-in-out infinite alternate; }
.color-stream {
  position: relative; border: 2px solid transparent;
  background: linear-gradient(45deg, var(--neon-red), var(--neon-orange), var(--neon-yellow), var(--neon-green), var(--neon-cyan), var(--neon-magenta), #8000ff, #ff0080);
  background-size: 400% 400%; animation: gradient-flow 3s ease infinite;
}
.random-colors { border: 2px solid; animation: random-glow 5s linear infinite; }
.theme-flow { border: 2px solid; animation: theme-colors 4s ease-in-out infinite; }
.led-matrix {
  border: 2px solid; box-shadow: 0 0 5px currentColor, 0 0 10px currentColor; position: relative; animation: random-glow 5s linear infinite;
}
.led-matrix::before {
  content: ''; position: absolute; top: -2px; left: -2px; right: -2px; bottom: -2px;
  background: radial-gradient(circle at 0% 0%, currentColor 2px, transparent 3px), radial-gradient(circle at 100% 0%, currentColor 2px, transparent 3px),
              radial-gradient(circle at 0% 100%, currentColor 2px, transparent 3px), radial-gradient(circle at 100% 100%, currentColor 2px, transparent 3px);
  background-size: 20px 20px; animation: led-blink 1s steps(2) infinite;
}
.neon-text-dynamic { animation: text-glow-flow 3s ease-in-out infinite alternate; }

/* Header Base Styles (Desktop First) */
.site-header {
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  font-size: 1.1em;
  color: #fff; /* Default text color for header elements */
}

/* Header Top Area - Desktop */
.header-top {
  background: linear-gradient(135deg, var(--header-bg-dark1), var(--header-bg-dark2));
  border-bottom: 2px solid var(--neon-yellow); /* Neon yellow border for top area */
  box-shadow: 
    0 0 10px var(--neon-yellow),
    0 0 20px var(--neon-yellow),
    0 0 30px var(--neon-yellow),
    inset 0 0 20px rgba(255, 255, 0, 0.1);
  padding: 10px 0;
  position: relative;
  z-index: 1002; /* Higher than main-nav for desktop */
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px; /* Padding for content inside container */
}

.logo {
  font-family: 'Arial Black', Gadget, sans-serif; /* Strong font for logo */
  font-size: 2.2em;
  font-weight: bold;
  color: var(--dynamic-color-1); /* Use dynamic color variable */
  text-transform: uppercase;
  transition: all 0.3s ease;
  padding: 5px 0; /* Adjust padding if needed */
}

.logo:hover {
  transform: scale(1.05);
  filter: brightness(1.2);
}

.desktop-nav-buttons {
  display: flex;
  gap: 12px;
}

/* Buttons */
.btn {
  position: relative;
  padding: 12px 25px;
  color: #ffffff;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  background: linear-gradient(135deg, var(--dynamic-color-1), var(--dynamic-color-2));
  white-space: nowrap; /* Prevent button text from wrapping */
}

.btn:hover {
  animation-duration: 2s; /* hover时加快颜色变化速度 */
  transform: translateY(-2px);
  filter: brightness(1.1);
}

/* Main Navigation Area - Desktop */
.main-nav {
  background: linear-gradient(135deg, var(--header-bg-dark2), var(--header-bg-dark3));
  border-top: 2px solid var(--neon-magenta); /* Neon magenta border for main nav */
  border-bottom: 2px solid var(--neon-magenta);
  box-shadow: 
    0 0 10px var(--neon-magenta),
    0 0 20px var(--neon-magenta),
    0 0 30px var(--neon-magenta),
    inset 0 0 20px rgba(255, 0, 255, 0.1);
  padding: 10px 0;
  width: 100%;
  display: flex; /* Desktop default: flex */
  position: static; /* Desktop default: static */
  z-index: 1001;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  flex-wrap: wrap; /* Allow menu items to wrap if screen is too narrow */
}

.nav-link {
  color: #fff;
  padding: 8px 15px;
  font-weight: bold;
  text-transform: uppercase;
  transition: color 0.3s ease, background-color 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
  color: var(--neon-yellow);
  background-color: rgba(255, 255, 0, 0.1);
  border-radius: 3px;
}

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

/* Footer Styles (Regular, no neon) */
.site-footer {
  background-color: #1a1a1a;
  color: #ccc;
  padding: 40px 0 20px;
  font-size: 0.9em;
  border-top: 1px solid #333;
}

.footer-top-grid, .footer-middle-sections, .footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

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

.footer-col h4 {
  color: #eee;
  font-size: 1.1em;
  margin-bottom: 15px;
  position: relative;
}

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

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

.footer-description {
  line-height: 1.7;
  word-wrap: break-word;
  overflow-wrap: break-word;
  color: #bbb;
}

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

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

.footer-nav a {
  color: #bbb;
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: var(--site-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: 50px;
  height: auto;
  width: auto;
  object-fit: contain;
  filter: brightness(0.8) grayscale(100%); /* Slightly dim and grayscale for footer */
  transition: filter 0.3s ease;
}

.payment-icons img:hover, .game-providers-icons img:hover, .social-media-icons img:hover {
  filter: brightness(1) grayscale(0%); /* Full color on hover */
}

.footer-middle-sections {
  margin-bottom: 30px;
  border-top: 1px solid #333;
  padding-top: 30px;
}

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

.footer-bottom {
  border-top: 1px solid #333;
  padding-top: 20px;
  text-align: center;
  color: #888;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  /* Ensure main content has padding to avoid header overlap */
  body {
    padding-top: calc(80px + 60px); /* Adjust based on header-top height + mobile-nav-buttons height */
  }

  /* Header adjustments */
  .site-header {
    flex-direction: column;
    align-items: center;
  }

  .header-top {
    padding: 10px 0;
    border-bottom: none; /* Remove border for cleaner mobile look */
    box-shadow: none; /* Remove shadow for cleaner mobile look */
    background: linear-gradient(135deg, var(--header-bg-dark1), var(--header-bg-dark2)); /* Keep dark background */
  }

  .header-container {
    width: 100%;
    max-width: none; /* CRITICAL: No max-width on mobile */
    padding: 0 15px; /* Smaller padding */
    justify-content: space-between; /* Hamburger left, Logo center */
    position: relative;
  }

  .logo {
    font-size: 1.8em;
    position: absolute; /* Position absolute for centering */
    left: 50%;
    transform: translateX(-50%);
    z-index: 1; /* Ensure logo is above other elements if needed */
  }

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

  .hamburger-menu {
    display: flex; /* Show hamburger menu */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0;
    position: relative;
    z-index: 1003; /* Above logo and mobile buttons */
  }

  .hamburger-menu span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--neon-yellow); /* Neon color for hamburger */
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 0 5px var(--neon-yellow), 0 0 10px var(--neon-yellow); /* Neon glow for hamburger */
  }

  .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-nav-buttons {
    display: flex; /* Show mobile buttons */
    justify-content: center;
    gap: 10px;
    padding: 10px 15px;
    width: 100%;
    background: linear-gradient(135deg, var(--header-bg-dark1), var(--header-bg-dark2)); /* Match header-top background */
    border-top: 1px solid rgba(255,255,255,0.1); /* Subtle separator */
    position: relative;
    z-index: 1001; /* Below hamburger, above main content */
    box-shadow: 
      0 5px 10px rgba(0, 0, 0, 0.3),
      0 0 5px var(--neon-yellow); /* Subtle glow for mobile buttons area */
  }

  .mobile-nav-buttons .btn {
    padding: 10px 20px;
    font-size: 0.9em;
  }

  .main-nav {
    display: none; /* Default hidden on mobile */
    flex-direction: column;
    position: fixed; /* Fixed for mobile menu */
    top: 0; /* Full height from top */
    left: 0;
    width: 70%; /* Menu takes 70% width */
    height: 100%;
    background: linear-gradient(180deg, var(--header-bg-dark3), var(--header-bg-dark1)); /* Darker gradient for menu */
    padding-top: 80px; /* Space for fixed header content */
    transform: translateX(-100%); /* Hide off-screen by default */
    transition: transform 0.3s ease-in-out;
    border-right: 3px solid var(--neon-cyan); /* Neon border for mobile menu */
    box-shadow: 
      5px 0 15px rgba(0, 0, 0, 0.5),
      0 0 10px var(--neon-cyan),
      0 0 20px var(--neon-cyan);
    z-index: 1002; /* Above overlay, below hamburger */
    overflow-y: auto; /* Allow scrolling for long menus */
  }

  .main-nav.active {
    display: flex; /* CRITICAL: Must be flex or block to show */
    transform: translateX(0); /* Slide into view */
  }

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

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

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

  .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); /* Dark semi-transparent overlay */
    z-index: 1001; /* Below menu, above content */
    transition: opacity 0.3s ease-in-out;
    opacity: 0;
  }

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

  /* Footer adjustments for mobile */
  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column layout */
    gap: 25px;
  }

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

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

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