:root {
  --site-primary-base: #003366;
  --site-secondary-base: #FFCC00;

  /* Derived vibrant neon colors, intelligently picked */
  --neon-blue: #00bfff;
  --neon-purple: #8a2be2;
  --neon-yellow: #ffea00;
  --neon-orange: #ff4500;
  --neon-pink: #ff1493;
  --neon-green: #39ff14;

  /* Dynamic color cycle definitions for animations */
  --neon-cycle-1: var(--neon-blue), var(--neon-purple), var(--neon-yellow), var(--neon-orange), var(--neon-pink), var(--neon-green);
  --neon-cycle-2: var(--neon-yellow), var(--neon-orange), var(--neon-pink), var(--neon-green), var(--neon-blue), var(--neon-purple);
  --neon-cycle-3: var(--neon-pink), var(--neon-green), var(--neon-blue), var(--neon-purple), var(--neon-yellow), var(--neon-orange);

  /* Theme-specific dynamic colors based on site primary/secondary */
  --neon-primary: var(--neon-blue); /* Default for header glow */
  --neon-secondary: var(--neon-yellow); /* Default for button glow */
  --neon-accent: var(--neon-pink); /* Default for other accents */
}

/* Base styles */
body {
  margin: 0;
  font-family: 'Arial', sans-serif;
  background-color: #0a0a0a;
  color: #ffffff;
  line-height: 1.6;
}

/* Global container */
.header-container, .nav-container, .footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* Neon Glow Effects */
.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);
}

/* Styles for different glow types */
.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 transparent; /* Border for pulse glow, actual glow is box-shadow */
  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-blue), var(--neon-purple), var(--neon-yellow), var(--neon-orange),
    var(--neon-pink), var(--neon-green), var(--neon-blue), var(--neon-purple)
  );
  background-size: 400% 400%;
  animation: gradient-flow 3s ease infinite;
}

/* Dynamic color animations */
@keyframes rainbow-border {
  0% { border-color: var(--neon-blue); box-shadow: 0 0 10px var(--neon-blue), 0 0 20px var(--neon-blue); }
  16.6% { border-color: var(--neon-purple); box-shadow: 0 0 10px var(--neon-purple), 0 0 20px var(--neon-purple); }
  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-orange); box-shadow: 0 0 10px var(--neon-orange), 0 0 20px var(--neon-orange); }
  66.6% { border-color: var(--neon-pink); box-shadow: 0 0 10px var(--neon-pink), 0 0 20px var(--neon-pink); }
  83.3% { border-color: var(--neon-green); box-shadow: 0 0 10px var(--neon-green), 0 0 20px var(--neon-green); }
  100% { border-color: var(--neon-blue); box-shadow: 0 0 10px var(--neon-blue), 0 0 20px var(--neon-blue); }
}

@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 var(--neon-blue), 0 0 20px var(--neon-purple); }
  50% { background-position: 100% 50%; box-shadow: 0 0 10px var(--neon-yellow), 0 0 20px var(--neon-orange); }
  100% { background-position: 0% 50%; box-shadow: 0 0 10px var(--neon-blue), 0 0 20px var(--neon-purple); }
}

@keyframes theme-colors {
  0%, 100% {
    border-color: var(--neon-blue);
    box-shadow:
      0 0 10px var(--neon-blue),
      0 0 20px var(--neon-blue),
      inset 0 0 10px rgba(0, 191, 255, 0.3);
  }
  33% {
    border-color: var(--neon-yellow);
    box-shadow:
      0 0 10px var(--neon-yellow),
      0 0 20px var(--neon-yellow),
      inset 0 0 10px rgba(255, 234, 0, 0.3);
  }
  66% {
    border-color: var(--neon-pink);
    box-shadow:
      0 0 10px var(--neon-pink),
      0 0 20px var(--neon-pink),
      inset 0 0 10px rgba(255, 20, 147, 0.3);
  }
}

/* Original animations for compatibility/flicker */
@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 text-glow-flow {
  0% {
    text-shadow:
      0 0 5px var(--neon-blue),
      0 0 10px var(--neon-blue),
      0 0 15px var(--neon-blue);
    color: #ffffff;
  }
  50% {
    text-shadow:
      0 0 5px var(--neon-yellow),
      0 0 10px var(--neon-yellow),
      0 0 15px var(--neon-yellow);
    color: #ffffff;
  }
  100% {
    text-shadow:
      0 0 5px var(--neon-pink),
      0 0 10px var(--neon-pink),
      0 0 15px var(--neon-pink);
    color: #ffffff;
  }
}

/* Header Styles - Desktop First */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
}

.header-top {
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
  padding: 15px 0;
  display: flex;
  align-items: center;
  border-bottom: 2px solid;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo {
  font-size: 2.5em;
  font-weight: bold;
  text-decoration: none;
  color: #ffffff;
  margin-right: auto;
  padding: 5px 0;
  animation: text-glow-flow 3s ease-in-out infinite alternate;
  text-shadow:
    0 0 5px var(--neon-blue),
    0 0 10px var(--neon-blue),
    0 0 15px var(--neon-blue);
}

.desktop-nav-buttons {
  display: flex;
  gap: 15px;
  margin-left: auto;
}

.btn {
  position: relative;
  background: linear-gradient(135deg, var(--neon-primary), var(--neon-secondary));
  padding: 12px 25px;
  color: #ffffff;
  text-decoration: none;
  border-radius: 5px;
  border: 2px solid;
  font-weight: bold;
  transition: all 0.3s ease;
  text-shadow:
    0 0 5px #ffffff,
    0 0 10px var(--neon-primary);
}

.btn:hover {
  animation-duration: 2s; /* hover时加快颜色变化速度 */
  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.2);
}

.main-nav {
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
  padding: 10px 0;
  border-top: 2px solid;
  border-bottom: 2px solid;
  display: flex;
  justify-content: center;
  align-items: center;
}

.nav-container {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.nav-link {
  color: #c0c0c0;
  text-decoration: none;
  padding: 10px 15px;
  font-weight: bold;
  transition: color 0.3s ease, text-shadow 0.3s ease;
  white-space: nowrap; /* Prevent menu items from wrapping */
}

.nav-link:hover, .nav-link.active {
  color: #ffffff;
  text-shadow: 0 0 8px var(--neon-yellow), 0 0 15px var(--neon-yellow);
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1001;
  position: relative;
  width: 40px;
  height: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
}

.hamburger-menu span {
  display: block;
  width: 30px;
  height: 3px;
  background-color: #ffffff;
  transition: all 0.3s ease;
  box-shadow: 0 0 5px var(--neon-blue), 0 0 10px var(--neon-blue);
}

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

.mobile-buttons-area {
  display: none; /* 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: 998;
  backdrop-filter: blur(5px);
}

/* Footer Styles */
.site-footer {
  background-color: #1a1a2e;
  color: #c0c0c0;
  padding: 40px 0 20px;
  font-size: 0.9em;
}

.footer-top-section, .footer-middle-section, .footer-bottom-section {
  padding-bottom: 20px;
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
}

.footer-top-section .footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.footer-col {
  flex: 1;
  min-width: 200px;
}

.footer-col h4 {
  color: #ffffff;
  font-size: 1.1em;
  margin-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 8px;
}

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

.footer-description {
  line-height: 1.6;
  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: #c0c0c0;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: var(--site-secondary-base);
}

.payment-methods .payment-icons,
.game-providers-section .game-providers-icons,
.social-media-section .social-media-icons {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
}

.payment-methods img,
.game-providers-section img,
.social-media-section img {
  max-height: 50px;
  height: auto;
  width: auto;
  filter: grayscale(100%) brightness(150%) contrast(150%); /* For a glowing effect on icons */
  transition: filter 0.3s ease;
}

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

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

.copyright {
  margin: 0;
  color: #999999;
}

/* Responsive Styles */
@media (max-width: 768px) {
  body {
    padding-top: 180px; /* Adjust based on header + mobile button area height */
  }

  .site-header {
    flex-direction: column;
    align-items: center;
  }

  .header-top {
    padding: 10px 0;
    width: 100%;
  }

  .header-container {
    padding-left: 15px;
    padding-right: 15px;
    max-width: none;
    width: 100%;
    justify-content: space-between;
  }

  .hamburger-menu {
    display: flex;
    order: 1;
    margin-right: 15px; /* Space between hamburger and logo */
  }

  .logo {
    order: 2;
    margin: 0 auto; /* Center logo */
    font-size: 2em;
  }

  .desktop-nav-buttons {
    display: none;
  }

  .mobile-buttons-area {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 10px 15px;
    background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
    border-bottom: 2px solid;
    width: 100%;
    box-sizing: border-box;
    border-color: var(--neon-blue);
    box-shadow:
      0 0 5px var(--neon-blue),
      0 0 10px var(--neon-blue),
      inset 0 0 5px rgba(0, 191, 255, 0.1);
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    width: 75%; /* Slide out from left */
    height: 100%;
    background: linear-gradient(135deg, #0f3460, #16213e);
    padding-top: 100px; /* Space for fixed header content */
    transform: translateX(-100%);
    transition: transform 0.3s ease-out;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.5);
    border-right: 2px solid;
    border-color: var(--neon-yellow);
    box-shadow:
      0 0 5px var(--neon-yellow),
      0 0 10px var(--neon-yellow),
      inset 0 0 5px rgba(255, 234, 0, 0.1);
  }

  .main-nav.active {
    display: flex; /* Must be flex to show */
    transform: translateX(0);
  }

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

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

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

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

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

  .footer-col {
    min-width: unset;
    width: 100%;
    text-align: center;
  }
  
  .footer-col h4 {
    text-align: center;
  }

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

  .footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

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

  .footer-nav a {
    padding: 5px 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px;
  }

  .payment-methods .payment-icons, .game-providers-section .game-providers-icons, .social-media-section .social-media-icons {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .logo {
    font-size: 1.8em;
  }
  .btn {
    padding: 10px 20px;
    font-size: 0.9em;
  }
  .mobile-buttons-area {
    gap: 8px;
  }
  .main-nav {
    width: 85%;
  }
}
