/* Base CSS for all elements, ensuring a consistent foundation */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #f0f0f0; /* Light text on dark background */
  background-color: var(--dark-bg-1); /* Main dark background */
  overflow-x: hidden; /* Prevent horizontal scroll */
  padding-top: 110px; /* Space for fixed header (header-top ~60px + main-nav ~50px) */
}

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

ul {
  list-style: none;
}

/* Color Variables and Dynamic Animations */
:root {
  --primary-site-color: #FFD700; /* Gold */
  --secondary-site-color: #1E90FF; /* Dodger Blue */

  --neon-primary: var(--primary-site-color); /* Yellow/Gold */
  --neon-secondary: var(--secondary-site-color); /* Blue */
  --neon-accent: #FF1493; /* Deep Pink */
  --neon-alt-1: #00FF00; /* Green */
  --neon-alt-2: #FF00FF; /* Magenta */
  --neon-alt-3: #FF8C00; /* Dark Orange */

  --dark-bg-1: #0a0a0a;
  --dark-bg-2: #1a1a2e;
  --dark-bg-3: #16213e;
  --dark-bg-4: #0f3460;

  --header-top-height: 60px;
  --main-nav-height: 50px;
  --mobile-button-height: 50px;
}

/* Animations from prompt */
@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); box-shadow: 0 0 10px var(--neon-primary), 0 0 20px var(--neon-primary); } 100% { filter: hue-rotate(360deg); box-shadow: 0 0 10px var(--neon-primary), 0 0 20px var(--neon-primary); } }
@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%; box-shadow: 0 0 10px #ff0000, 0 0 20px #ff8000; } 50% { background-position: 100% 50%; box-shadow: 0 0 10px #00ffff, 0 0 20px #0000ff; } 100% { background-position: 0% 50%; box-shadow: 0 0 10px #ff0000, 0 0 20px #ff8000; } }
@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); }
  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 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; }
}

/* General neon glow class for reuse */
.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);
}

/* Specific glow styles (as provided) */
.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 { border: 2px solid; filter: hue-rotate(0deg); animation: hue-spin 4s linear infinite; }
.alternate-glow-border { border: 2px solid; animation: alternate-colors 2s ease-in-out infinite alternate; }
.color-stream-border { position: relative; border: 2px solid transparent; background: linear-gradient(45deg, #ff0000, #ff8000, #ffff00, #00ff00, #00ffff, #0000ff, #8000ff, #ff0080); background-size: 400% 400%; animation: gradient-flow 3s ease infinite; }
.random-colors-border { border: 2px solid; animation: random-glow 5s linear infinite; }
.theme-flow-border { border: 2px solid; animation: theme-colors 4s ease-in-out infinite; }
.led-matrix-border { border: 2px solid; box-shadow: 0 0 5px currentColor, 0 0 10px currentColor; position: relative; animation: random-glow 5s linear infinite; }
.led-matrix-border::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; }

/* Header Styling (Desktop First) */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  flex-direction: column; /* Desktop: stack header-top and main-nav */
  min-height: calc(var(--header-top-height) + var(--main-nav-height));
}

/* Header Top Area */
.header-top {
  background: linear-gradient(135deg, var(--dark-bg-1), var(--dark-bg-2), var(--dark-bg-3));
  min-height: var(--header-top-height);
  display: flex;
  align-items: center;
  border-bottom: 2px solid; /* For theme-flow-border animation */
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 30px; /* Padding for logo and buttons */
}

.logo {
  font-size: 2.2em;
  font-weight: bold;
  letter-spacing: 2px;
  color: #fff; /* Base color for text-glow-flow */
  text-transform: uppercase;
  animation: text-glow-flow 3s ease-in-out infinite alternate;
  display: block; /* Ensure visibility */
  text-decoration: none;
}

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

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

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

/* Main Navigation Area */
.main-nav {
  background: linear-gradient(135deg, var(--dark-bg-2), var(--dark-bg-3), var(--dark-bg-4));
  min-height: var(--main-nav-height);
  display: flex; /* Desktop: default visible */
  align-items: center;
  border-top: 2px solid; /* For theme-flow-border animation */
  border-bottom: 2px solid; /* For theme-flow-border animation */
  color: #e0e0e0; /* Regular text color */
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: row; /* Desktop: horizontal */
  justify-content: center; /* Center menu items */
  align-items: center;
  padding: 0 20px;
}

.nav-link {
  padding: 10px 15px;
  font-weight: bold;
  transition: color 0.3s ease, text-shadow 0.3s ease;
  white-space: nowrap;
}

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

/* Hamburger Menu (Hidden on Desktop) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1002;
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  transition: transform 0.3s ease;
  color: var(--neon-primary); /* Base color for glow */
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic glow for hamburger */
  border-radius: 5px; /* For glow effect */
}

.hamburger-menu span {
  display: block;
  width: 80%;
  height: 3px;
  background-color: #fff;
  border-radius: 2px;
  transition: all 0.3s ease;
  box-shadow: 0 0 5px #fff; /* Simple glow for lines */
}

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

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

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

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

/* Mobile Menu Overlay (Hidden on Desktop) */
.mobile-menu-overlay {
  display: none; /* Hidden on desktop */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 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 Styling */
.site-footer {
  background: linear-gradient(135deg, #1c1c1c, #0d0d0d); /* Dark gradient, no neon */
  color: #cccccc;
  padding: 40px 0 20px;
  font-size: 0.9em;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

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

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

.footer-col h4 {
  color: #ffffff;
  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(--primary-site-color); /* Use site primary color for subtle highlight */
}

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

.footer-description {
  line-height: 1.6;
  word-wrap: break-word; /* Ensure full text display */
  overflow-wrap: break-word; /* Ensure full text display */
}

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

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

.footer-nav a:hover {
  color: var(--primary-site-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 all icon sections */
  width: 100%;
}

.payment-icons img,
.game-providers-icons img,
.social-media-icons img {
  max-height: 50px;
  height: auto;
  width: auto;
  object-fit: contain;
}

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

.game-providers-section h4,
.social-media-section h4 {
  color: #ffffff;
  font-size: 1.1em;
  margin-bottom: 15px;
  position: relative;
}

.game-providers-section h4::after,
.social-media-section h4::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 30px;
  height: 2px;
  background-color: var(--primary-site-color);
}

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

.copyright {
  color: #888888;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  body {
    padding-top: calc(var(--header-top-height) + var(--mobile-button-height) + 10px); /* Adjust for mobile fixed header + buttons */
  }

  .site-header {
    flex-direction: column;
    min-height: auto;
  }

  .header-container {
    padding: 0 15px;
    justify-content: space-between; /* Hamburger left, Logo center */
  }

  .hamburger-menu {
    display: flex; /* Show hamburger on mobile */
    order: 1; /* Left */
    margin-right: 10px; /* Space between hamburger and logo */
  }

  .logo {
    order: 2; /* Center logo */
    flex-grow: 1;
    text-align: center;
    font-size: 1.8em;
  }

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

  /* Mobile Nav Buttons */
  .mobile-nav-buttons {
    display: flex; /* Show mobile buttons */
    justify-content: center;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--dark-bg-3), var(--dark-bg-4));
    padding: 10px 15px;
    width: 100%;
    min-height: var(--mobile-button-height);
    border-bottom: 2px solid; /* For theme-flow-border animation */
    animation: theme-colors 4s ease-in-out infinite; /* Dynamic glow for button bar */
  }

  /* Main Navigation (Mobile) */
  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: calc(var(--header-top-height) + var(--mobile-button-height)); /* Position below header and buttons */
    left: 0;
    width: 75%; /* Slide-out menu width */
    height: calc(100% - var(--header-top-height) - var(--mobile-button-height)); /* Full height below header */
    background: linear-gradient(180deg, var(--dark-bg-3), var(--dark-bg-4)); /* Dark background for mobile menu */
    flex-direction: column; /* Vertical menu items */    justify-content: flex-start;
    align-items: flex-start;
    padding: 20px;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%); /* Slide out from left */
    transition: transform 0.3s ease;
    border-right: 2px solid; /* For theme-flow-border animation */
    animation: theme-colors 4s ease-in-out infinite; /* Dynamic glow for mobile menu */
    overflow-y: auto; /* Enable scrolling for long menus */
    z-index: 1001; /* Above overlay */
  }

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

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 0;
    width: 100%;
    max-width: none; /* Mobile container fills width */
  }

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

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

  .footer-top-grid {
    grid-template-columns: 1fr; /* Stack columns on mobile */
    gap: 25px;
  }

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

  .footer-col:not(:first-child) {
    margin-top: 20px;
  }
}

/* Ensure no-scroll class works */
body.no-scroll {
  overflow: hidden;
}