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

  --neon-primary: var(--primary-site-color); /* Initial primary glow color */
  --neon-secondary: var(--secondary-site-color); /* Initial secondary glow color */
  --neon-accent: var(--accent-site-color); /* Initial accent glow color */

  /* Dark background variations */
  --bg-dark-1: #0a0a0a;
  --bg-dark-2: #1a1a2e;
  --bg-dark-3: #16213e;
  --bg-dark-4: #0f3460; /* Slightly different dark blue for contrast */

  /* Base neon text color */
  --neon-text-base: #ffffff;
}

/* Base styles and reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #ccc;
  background-color: #000;
  padding-top: 0; /* Will be adjusted by JS */
  transition: padding-top 0.3s ease; /* Smooth padding adjustment */
}

/* Animations for dynamic neon effects */
@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 var(--neon-primary),
      0 0 20px var(--neon-accent);
  }
  50% {
    background-position: 100% 50%;
    box-shadow:
      0 0 10px var(--neon-secondary),
      0 0 20px var(--neon-primary);
  }
  100% {
    background-position: 0% 50%;
    box-shadow:
      0 0 10px var(--neon-primary),
      0 0 20px var(--neon-accent);
  }
}

@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 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: var(--neon-text-base);
  }
  50% {
    text-shadow:
      0 0 5px var(--neon-secondary),
      0 0 10px var(--neon-secondary),
      0 0 15px var(--neon-secondary);
    color: var(--neon-text-base);
  }
  100% {
    text-shadow:
      0 0 5px var(--neon-accent),
      0 0 10px var(--neon-accent),
      0 0 15px var(--neon-accent);
    color: var(--neon-text-base);
  }
}

/* Header Styles (Desktop First) */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  min-height: 60px;
}

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

.header-top {
  background: linear-gradient(135deg, var(--bg-dark-1), var(--bg-dark-2));
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite;
  padding: 10px 0;
}

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

.logo {
  color: var(--neon-primary);
  font-size: 2em;
  font-weight: bold;
  text-decoration: none;
  text-transform: uppercase;
  padding: 5px 0;
  display: inline-block;
  animation: text-glow-flow 3s ease-in-out infinite alternate;
  /* Added LED effect */
  position: relative;
}

.logo::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;
  opacity: 0.1;
  pointer-events: none;
}

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

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

.btn:hover {
  animation-duration: 2s; /* hover时加快颜色变化速度 */
  transform: translateY(-2px);
  box-shadow:
    0 0 15px currentColor,
    0 0 30px currentColor,
    inset 0 0 15px rgba(255, 255, 255, 0.2);
}

.main-nav {
  background: linear-gradient(135deg, var(--bg-dark-2), var(--bg-dark-3));
  border-top: 2px solid;
  border-bottom: 2px solid;
  animation: theme-colors 5s linear infinite reverse; /* Different animation for contrast */
  padding: 10px 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.main-nav .nav-container {
  justify-content: center;
  gap: 25px;
}

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

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

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

/* Footer Styles */
.site-footer {
  background-color: #111;
  color: #ccc;
  padding: 40px 0;
  font-size: 0.95em;
}

.site-footer a {
  color: #eee;
  text-decoration: none;
}

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

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

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

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

.footer-about .footer-logo {
  font-size: 1.8em;
  font-weight: bold;
  margin-bottom: 10px;
  display: block;
  color: #fff;
  text-transform: uppercase;
}

.footer-about .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 a {
  display: block;
  padding: 5px 0;
  line-height: 1.6;
}

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

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

.footer-middle-section {
  background-color: #181818;
  padding: 20px 0;
  margin-bottom: 20px;
}

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

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

.game-providers-section:last-child,
.social-media-section:last-child {
  margin-bottom: 0;
}

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

.copyright {
  font-size: 0.85em;
  color: #aaa;
}

/* Mobile Styles */
@media (max-width: 768px) {
  .site-header {
    flex-direction: column;
  }

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

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

  .hamburger-menu {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    cursor: pointer;
    z-index: 1001;
    order: 1;
    position: relative;
    padding: 2px;
    border: 1px solid transparent;
    border-radius: 3px;
    animation: theme-colors 4s ease-in-out infinite;
  }

  .hamburger-menu span {
    display: block;
    height: 3px;
    width: 100%;
    background: var(--neon-primary);
    border-radius: 5px;
    transition: all 0.3s ease-in-out;
    animation: text-glow-flow 3s ease-in-out infinite alternate;
  }

  .hamburger-menu.active {
    border-color: var(--neon-primary);
  }

  .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);
  }

  .logo {
    order: 2;
    flex: 1;
    text-align: center;
    font-size: 1.8em;
    padding: 5px 0;
  }

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

  .mobile-buttons-area {
    display: block;
    width: 100%;
    background: linear-gradient(135deg, var(--bg-dark-1), var(--bg-dark-2));
    border-bottom: 2px solid;
    animation: theme-colors 4s ease-in-out infinite;
    padding: 10px 0;
    text-align: center;
  }

  .mobile-buttons-area .header-container {
    justify-content: center;
    gap: 10px;
  }

  .main-nav {
    display: none;
    flex-direction: column;
    position: fixed;
    top: 0; /* Will be adjusted by JS to be below header-top + mobile-buttons-area */
    left: 0;
    height: 100%;
    width: 75%;
    max-width: 300px;
    background: var(--bg-dark-1);
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    z-index: 1001;
    border-right: 2px solid;
    animation: theme-colors 5s linear infinite reverse;
    box-shadow:
      5px 0 15px rgba(0,0,0,0.5);
  }

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

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

  .nav-link {
    width: 100%;
    padding: 10px 0;
    font-size: 1.1em;
    color: #eee;
  }

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

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

  body.no-scroll {
    overflow: hidden;
  }

  .footer-top-section {
    grid-template-columns: 1fr;
    text-align: center;
  }

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

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

  .footer-nav li a {
    text-align: center;
  }

  .footer-full-width-content {
    padding: 0 15px;
  }

  .footer-about .footer-logo {
    margin-bottom: 5px;
  }
}
