:root {
  --primary-site-color: #FFD700; /* Gold */
  --secondary-site-color: #8B0000; /* Dark Red */

  --neon-glow-color1: var(--primary-site-color); /* Bright Yellow/Gold */
  --neon-glow-color2: var(--secondary-site-color); /* Dark Red */
  --neon-glow-color3: #00FFFF; /* Cyan for accent */
  --neon-glow-color4: #FF00FF; /* Magenta for accent */

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

  --header-height-desktop: 120px; /* Approximate total header height for desktop */
  --header-top-height-mobile: 60px; /* Approximate header-top height for mobile */
  --mobile-buttons-height: 70px; /* Approximate mobile button area height */
}

/* Base styles */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #e0e0e0;
  background-color: var(--dark-bg-1);
  min-height: 200vh; /* For scroll testing fixed header */
  padding-top: var(--header-height-desktop); /* Default desktop padding for fixed header */
}

/* Animations for dynamic colors and glow styles */
@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-glow-color1), 0 0 20px var(--neon-glow-color1);
  }
  100% {
    filter: hue-rotate(360deg);
    box-shadow: 0 0 10px var(--neon-glow-color1), 0 0 20px var(--neon-glow-color1);
  }
}

@keyframes alternate-colors {
  0% {
    border-color: var(--neon-glow-color1);
    box-shadow: 0 0 10px var(--neon-glow-color1), 0 0 20px var(--neon-glow-color1);
  }
  100% {
    border-color: var(--neon-glow-color2);
    box-shadow: 0 0 10px var(--neon-glow-color2), 0 0 20px var(--neon-glow-color2);
  }
}

@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-glow-color1);
    box-shadow: 
      0 0 10px var(--neon-glow-color1),
      0 0 20px var(--neon-glow-color1),
      inset 0 0 10px rgba(255, 215, 0, 0.3); /* Using primary-site-color for inset */
  }
  33% {
    border-color: var(--neon-glow-color2);
    box-shadow: 
      0 0 10px var(--neon-glow-color2),
      0 0 20px var(--neon-glow-color2),
      inset 0 0 10px rgba(139, 0, 0, 0.3); /* Using secondary-site-color for inset */
  }
  66% {
    border-color: var(--neon-glow-color3);
    box-shadow: 
      0 0 10px var(--neon-glow-color3),
      0 0 20px var(--neon-glow-color3),
      inset 0 0 10px rgba(0, 255, 255, 0.3); /* Using cyan for inset */
  }
}

@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-glow-color1),
      0 0 10px var(--neon-glow-color1),
      0 0 15px var(--neon-glow-color1);
    color: #ffffff;
  }
  50% {
    text-shadow: 
      0 0 5px var(--neon-glow-color3),
      0 0 10px var(--neon-glow-color3),
      0 0 15px var(--neon-glow-color3);
    color: #ffffff;
  }
  100% {
    text-shadow: 
      0 0 5px var(--neon-glow-color2),
      0 0 10px var(--neon-glow-color2),
      0 0 15px var(--neon-glow-color2);
    color: #ffffff;
  }
}

/* Header styles */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: linear-gradient(135deg, var(--dark-bg-1), var(--dark-bg-2));
  animation: theme-colors 4s ease-in-out infinite; /* Apply dynamic border/shadow to header */
}

.site-header .header-top {
  background: linear-gradient(135deg, var(--dark-bg-1), var(--dark-bg-2));
  border-bottom: 2px solid var(--neon-glow-color1);
  box-shadow: 
    0 0 10px var(--neon-glow-color1),
    0 0 20px var(--neon-glow-color1),
    inset 0 0 20px rgba(255, 215, 0, 0.1);
  padding: 10px 0;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic border/shadow for top bar */
}

.site-header .header-container,
.site-header .nav-container,
.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
}

.site-header .header-container {
  justify-content: space-between;
}

.site-header .logo {
  font-size: 2.5em;
  font-weight: bold;
  text-decoration: none;
  color: #fff;
  white-space: nowrap;
  padding: 5px 0;
  animation: text-glow-flow 3s ease-in-out infinite alternate; /* Dynamic text glow for logo */
}

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

.btn {
  position: relative;
  background: linear-gradient(135deg, var(--neon-glow-color1), var(--neon-glow-color2));
  padding: 12px 25px;
  color: #ffffff;
  text-decoration: none;
  border-radius: 5px;
  border: 2px solid;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic border/shadow for buttons */
  text-shadow: 
    0 0 5px #ffffff,
    0 0 10px var(--neon-glow-color1);
  transition: all 0.3s ease;
  font-weight: bold;
  white-space: nowrap;
}

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

.site-header .main-nav {
  background: linear-gradient(135deg, var(--dark-bg-2), var(--dark-bg-4));
  border-top: 2px solid var(--neon-glow-color2);
  border-bottom: 2px solid var(--neon-glow-color2);
  box-shadow: 
    0 0 10px var(--neon-glow-color2),
    0 0 20px var(--neon-glow-color2),
    inset 0 0 20px rgba(139, 0, 0, 0.1);
  padding: 10px 0;
  display: flex;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic border/shadow for main nav */
}

.site-header .nav-container {
  justify-content: center;
  flex-wrap: wrap;
  gap: 25px;
}

.site-header .nav-link {
  color: #e0e0e0;
  text-decoration: none;
  font-size: 1.1em;
  padding: 5px 0;
  transition: color 0.3s ease, text-shadow 0.3s ease;
  white-space: nowrap;
}

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

.hamburger-menu,
.mobile-nav-buttons,
.mobile-menu-overlay {
  display: none;
}

/* Footer styles */
.site-footer {
  background-color: var(--dark-bg-2);
  color: #ccc;
  padding: 40px 0 20px;
  font-size: 0.9em;
  border-top: 2px solid rgba(255, 255, 255, 0.1);
}

.site-footer h4 {
  color: #fff;
  font-size: 1.2em;
  margin-bottom: 15px;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 8px;
}

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

.site-footer a:hover {
  color: var(--primary-site-color);
}

.footer-top {
  margin-bottom: 30px;
}

.footer-top .footer-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  align-items: flex-start;
}

.footer-col {
  display: flex;
  flex-direction: column;
}

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

.footer-description {
  word-wrap: break-word;
  overflow-wrap: break-word;
  line-height: 1.6;
}

.footer-nav {
  list-style: none;
}

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

.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(1.5);
  transition: filter 0.3s ease;
}

.payment-icons img:hover,
.game-providers-icons img:hover,
.social-media-icons img:hover {
  filter: grayscale(0%) brightness(1.2);
}

.game-providers-section,
.social-media-section {
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 20px;
}

.game-providers-section h4,
.social-media-section h4 {
  border-bottom: none;
  margin-bottom: 15px;
}

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

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

  .site-header {
    flex-direction: column;
  }

  .site-header .header-top {
    padding: 10px 0;
  }

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

  .site-header .header-container {
    justify-content: space-between;
    height: var(--header-top-height-mobile);
  }

  .site-header .logo {
    flex: 1;
    text-align: center;
    font-size: 2em;
  }

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

  .hamburger-menu {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    cursor: pointer;
    z-index: 1001;
    padding: 5px;
    border: 2px solid var(--neon-glow-color1); /* Neon border for hamburger */
    border-radius: 3px;
    animation: theme-colors 4s ease-in-out infinite; /* Dynamic glow for hamburger */
  }

  .hamburger-menu span {
    display: block;
    height: 3px;
    width: 100%;
    background: var(--neon-glow-color1);
    border-radius: 5px;
    transition: all 0.3s ease-in-out;
    animation: neon-flicker 2s infinite alternate; /* Flicker effect for hamburger lines */
  }

  .hamburger-menu.active span:nth-child(1) {
    transform: translateY(11px) rotate(45deg);
    background: var(--neon-glow-color3);
  }

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

  .hamburger-menu.active span:nth-child(3) {
    transform: translateY(-11px) rotate(-45deg);
    background: var(--neon-glow-color3);
  }

  .mobile-nav-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 10px 15px;
    background: linear-gradient(135deg, var(--dark-bg-1), var(--dark-bg-2));
    border-bottom: 2px solid var(--neon-glow-color1);
    box-shadow: 
      0 0 5px var(--neon-glow-color1),
      0 0 10px var(--neon-glow-color1),
      inset 0 0 10px rgba(255, 215, 0, 0.1);
    animation: theme-colors 4s ease-in-out infinite; /* Dynamic border/shadow for mobile buttons */
    z-index: 1000; /* Lower than hamburger menu */
    position: relative; /* Ensure it stays below fixed header-top */
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    text-align: center;
    padding: 10px 15px;
    font-size: 0.9em;
  }

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

  .site-header .main-nav.active {
    display: flex; /* Crucial for visibility */
    transform: translateX(0);
  }

  .site-header .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 15px;
    gap: 15px;
  }

  .site-header .nav-link {
    width: 100%;
    padding: 10px 0;
    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;
    transition: opacity 0.3s ease-in-out;
  }

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

  .footer-top .footer-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .game-providers-section,
  .social-media-section {
    padding: 15px 0;
  }
}
