:root {
  --primary-color: #FFD700; /* Gold */
  --secondary-color: #8B0000; /* Dark Red */
  --neon-primary: var(--primary-color);
  --neon-secondary: var(--secondary-color);
  --neon-accent: #FF6600; /* Orange for accent */
  --neon-bg-dark: #0a0a0a;
  --neon-bg-medium: #1a1a2e;
  --neon-bg-light: #16213e;
  --text-color-light: #ffffff;
  --text-color-dark: #cccccc;
  --header-top-height-desktop: 70px;
  --main-nav-height-desktop: 50px;
  --header-mobile-height: 60px;
  --mobile-buttons-height: 60px;
}

/* Base styles and animations for neon effects */
@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 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),
      inset 0 0 10px rgba(255, 215, 0, 0.3);
  }
  33% {
    border-color: var(--neon-secondary);
    box-shadow:
      0 0 10px var(--neon-secondary),
      0 0 20px var(--neon-secondary),
      inset 0 0 10px rgba(139, 0, 0, 0.3);
  }
  66% {
    border-color: var(--neon-accent);
    box-shadow:
      0 0 10px var(--neon-accent),
      0 0 20px var(--neon-accent),
      inset 0 0 10px rgba(255, 102, 0, 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: var(--text-color-light);
  }
  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-light);
  }
  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-light);
  }
}

/* General Body & Container */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  background-color: #121212;
  color: #f0f0f0;
  line-height: 1.6;
}

/* Ensure main content is not hidden by fixed header */
main {
  padding-top: calc(var(--header-top-height-desktop) + var(--main-nav-height-desktop)); /* Default for desktop */
}

/* Header Styles */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background: linear-gradient(135deg, var(--neon-bg-dark), var(--neon-bg-medium));
}

.header-top {
  display: flex;
  align-items: center;
  height: var(--header-top-height-desktop);
  background: linear-gradient(135deg, var(--neon-bg-dark), var(--neon-bg-medium));
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic border color for header-top */
}

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

.logo {
  font-family: 'Cyberpunk', 'Orbitron', sans-serif; /* Example fonts */
  font-size: 2.2em;
  font-weight: bold;
  text-decoration: none;
  color: var(--text-color-light);
  animation: text-glow-flow 3s ease-in-out infinite alternate;
  text-transform: uppercase;
}

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

.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;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic border color for buttons */
  text-shadow:
    0 0 5px #ffffff,
    0 0 10px var(--neon-primary);
  transition: all 0.3s ease;
  font-weight: bold;
  letter-spacing: 0.5px;
}

.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 {
  display: flex;
  align-items: center;
  height: var(--main-nav-height-desktop);
  background: linear-gradient(135deg, var(--neon-bg-medium), var(--neon-bg-light));
  border-top: 2px solid;
  border-bottom: 2px solid;
  animation: rainbow-border 6s linear infinite; /* Different dynamic border for main-nav */
  position: static; /* Desktop default */
  flex-direction: row; /* Desktop default */
}

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

.nav-link {
  color: var(--text-color-light);
  text-decoration: none;
  padding: 10px 15px;
  margin: 0 5px;
  font-weight: bold;
  transition: color 0.3s ease, background-color 0.3s ease;
  border-radius: 3px;
}

.nav-link:hover, .nav-link.active {
  color: var(--neon-primary);
  background-color: rgba(255, 215, 0, 0.1);
  text-shadow: 0 0 5px var(--neon-primary);
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  width: 30px;
  height: 20px;
  position: relative;
  cursor: pointer;
  z-index: 1001;
  padding: 10px;
  box-sizing: content-box;
}

.hamburger-menu span {
  display: block;
  position: absolute;
  height: 3px;
  width: 100%;
  background: var(--neon-primary);
  border-radius: 5px;
  opacity: 1;
  left: 0;
  transform: rotate(0deg);
  transition: .25s ease-in-out;
  box-shadow: 0 0 5px var(--neon-primary), 0 0 10px var(--neon-primary);
}

.hamburger-menu span:nth-child(1) { top: 0px; }
.hamburger-menu span:nth-child(2) { top: 8px; }
.hamburger-menu span:nth-child(3) { top: 16px; }

.hamburger-menu.active span:nth-child(1) {
  top: 8px;
  transform: rotate(135deg);
}
.hamburger-menu.active span:nth-child(2) {
  opacity: 0;
  left: -60px;
}
.hamburger-menu.active span:nth-child(3) {
  top: 8px;
  transform: rotate(-135deg);
}

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

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

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

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

.footer-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;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 8px;
}

.footer-about .footer-logo {
  font-size: 1.8em;
  font-weight: bold;
  color: var(--neon-primary);
  text-decoration: none;
  display: block;
  margin-bottom: 15px;
  text-transform: uppercase;
}

.footer-description {
  font-size: 0.9em;
  line-height: 1.6;
  word-wrap: break-word;
  overflow-wrap: break-word;
  margin: 0;
}

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

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

.footer-col ul li a {
  color: #cccccc;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-col ul li a:hover {
  color: var(--neon-primary);
}

.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(80%) brightness(120%);
  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;
  margin-bottom: 30px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

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

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

/* Mobile Styles */
@media (max-width: 768px) {
  :root {
    --header-mobile-height: 60px;
    --mobile-buttons-height: 60px;
  }
  main {
    padding-top: calc(var(--header-mobile-height) + var(--mobile-buttons-height));
  }

  .header-container, .nav-container, .footer-container {
    width: 100%;
    max-width: none;
    padding: 0 15px;
  }

  .header-top {
    height: var(--header-mobile-height);
    justify-content: space-between;
    padding: 0 15px;
    box-sizing: border-box;
  }

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

  .hamburger-menu {
    display: block;
    order: 1; /* Hamburger on left */
    margin-right: auto; /* Push logo to center */
    padding: 15px 0;
  }

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

  .mobile-nav-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: 100%;
    height: var(--mobile-buttons-height);
    background: linear-gradient(135deg, var(--neon-bg-medium), var(--neon-bg-light));
    border-bottom: 2px solid;
    animation: alternate-colors 3s ease-in-out infinite alternate; /* Different dynamic border for mobile buttons */
    box-sizing: border-box;
    padding: 10px 15px;
  }

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

  .main-nav {
    display: none;
    flex-direction: column;
    position: fixed;
    top: calc(var(--header-mobile-height) + var(--mobile-buttons-height)); /* Position below header and mobile buttons */
    left: 0;
    width: 80%;
    height: calc(100vh - var(--header-mobile-height) - var(--mobile-buttons-height));
    background: linear-gradient(135deg, var(--neon-bg-dark), var(--neon-bg-medium));
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s ease-out;
    border-right: 2px solid;
    animation: theme-colors 4s ease-in-out infinite; /* Dynamic border for mobile nav */
  }

  .main-nav.active {
    display: flex;
    transform: translateX(0);
  }

  .nav-container {
    flex-direction: column;
    padding: 20px 0;
  }

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

  .mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
  }

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

  body.no-scroll {
    overflow: hidden;
  }

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

  .footer-col {
    margin-bottom: 20px;
  }
  .footer-col:last-child {
    margin-bottom: 0;
  }
}
