/* CSS Variables for intelligent dynamic colors */
:root {
  --primary-color: #0A192F; /* Site's main dark blue */
  --secondary-color: #FFD700; /* Site's accent gold/yellow */

  /* Dynamic Neon Colors - smart selection based on site theme */
  --neon-primary: var(--secondary-color); /* Use accent color for primary neon glow */
  --neon-secondary: #FF6600; /* Orange for secondary glow */
  --neon-accent: #FF00FF; /* Magenta for accent glow */
  --neon-text-color: #FFFFFF; /* White for base text color */
  --dark-bg-1: #0a0a0a;
  --dark-bg-2: #1a1a2e;
  --dark-bg-3: #16213e;
  --dark-bg-4: #0f3460; /* Slightly different dark blue for contrast */
}

/* Animations for dynamic colors and glow 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 #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(102, 126, 234, 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(118, 75, 162, 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(240, 147, 251, 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-color);
  }
  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-color);
  }
  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-color);
  }
}

/* Base styles */
body {
  margin: 0;
  font-family: 'Arial', sans-serif;
  background-color: var(--dark-bg-1);
  color: #c0c0c0;
  line-height: 1.6;
  padding-top: 120px; /* Default padding for fixed header on desktop, approx header-top + main-nav height */
}

.no-scroll {
  overflow: hidden;
}

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

.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  flex-direction: column; /* Stack header elements */
}

/* Header Top Area (Logo + Buttons) */
.header-top {
  padding: 15px 0;
  background: linear-gradient(135deg, var(--dark-bg-1), var(--dark-bg-2));
  border-bottom: 2px solid transparent; /* Placeholder for dynamic border */
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic border glow for header-top */
}

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

.logo {
  font-family: 'Electrolize', sans-serif; /* Example cyberpunk font */
  font-size: 2.2em;
  font-weight: bold;
  color: var(--neon-text-color);
  text-transform: uppercase;
  text-shadow:
    0 0 5px var(--neon-primary),
    0 0 10px var(--neon-primary),
    0 0 15px var(--neon-primary);
  animation: text-glow-flow 3s ease-in-out infinite alternate, pulse-glow 2s ease-in-out infinite alternate; /* Dynamic text glow and pulse */
}

.desktop-nav-buttons {
  display: flex; /* Visible on desktop */
  gap: 12px;
}

.btn {
  position: relative;
  background: linear-gradient(135deg, var(--neon-primary), var(--neon-secondary));
  padding: 12px 25px;
  color: var(--neon-text-color);
  text-decoration: none;
  border-radius: 5px;
  border: 2px solid transparent; /* Placeholder for dynamic border */
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic border glow */
  text-shadow:
    0 0 5px var(--neon-text-color),
    0 0 10px var(--neon-primary);
  transition: all 0.3s ease;
  font-weight: bold;
  letter-spacing: 0.5px;
  box-shadow: 0 0 10px rgba(0,0,0,0.5); /* Base shadow for depth */
}

.btn:hover {
  animation-duration: 2s; /* Faster animation on hover */
  transform: translateY(-2px);
  box-shadow:
    0 0 15px var(--neon-primary),
    0 0 30px var(--neon-primary);
}

/* Main Navigation Area (Desktop) */
.main-nav {
  background: linear-gradient(135deg, var(--dark-bg-2), var(--dark-bg-4)); /* Slightly different dark background */
  border-top: 2px solid transparent; /* Placeholder for dynamic border */
  border-bottom: 2px solid transparent; /* Placeholder for dynamic border */
  animation: alternate-colors 5s linear infinite; /* Dynamic border glow for main-nav */
  padding: 10px 0;
  display: flex; /* Desktop default: flex */
  flex-direction: row; /* Desktop default: row */
  position: static; /* Desktop default: static */
  width: 100%;
  justify-content: center;
  align-items: center;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  gap: 25px; /* Spacing between menu items */
}

.nav-link {
  color: #c0c0c0;
  font-weight: 500;
  font-size: 1.1em;
  padding: 8px 0;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

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

/* Hamburger Menu (Hidden on Desktop) */
.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  cursor: pointer;
  padding: 10px;
  position: relative;
  z-index: 1002; /* Above overlay */
}

.hamburger-menu span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--neon-primary);
  margin: 5px 0;
  transition: all 0.3s ease;
  box-shadow: 0 0 5px var(--neon-primary); /* Neon glow for hamburger lines */
}

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

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

/* Mobile Menu Overlay (Hidden on Desktop) */
.mobile-menu-overlay {
  display: none; /* Hidden by default on desktop */
}

/* Footer Styles (Regular, not neon) */
.site-footer {
  background-color: #111;
  color: #aaa;
  padding: 40px 0 20px 0;
  font-size: 0.9em;
  margin-top: 50px; /* Ensure space below main content */
}

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

.footer-top-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid #333;
}

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

.footer-logo {
  font-size: 1.8em;
  font-weight: bold;
  color: var(--secondary-color); /* Use site accent color for footer logo */
  margin-bottom: 10px;
  display: block;
}

.footer-description {
  word-wrap: break-word;
  overflow-wrap: break-word;
  line-height: 1.6;
  margin-top: 10px;
}

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

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

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

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

.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;
  object-fit: contain;
}

.footer-middle-section {
  padding: 30px 0;
  border-bottom: 1px solid #333;
}

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

.footer-bottom {
  padding-top: 20px;
  text-align: center;
}

.footer-bottom .footer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.footer-legal-nav {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

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

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

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

  .site-header {
    padding-bottom: 0; /* No extra padding on site-header itself */
  }

  .header-container {
    padding: 0 15px; /* Smaller padding for mobile */
    width: 100%; /* Occupy full width */
    max-width: none; /* No max-width on mobile */
    justify-content: space-between; /* Hamburger left, Logo center, empty space right */
    position: relative;
  }

  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    order: 1;
    position: absolute; /* Position absolutely to allow logo to center */
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
  }

  .logo {
    order: 2;
    flex-grow: 1; /* Allows logo to take available space and center */
    text-align: center; /* Center the logo text */
    font-size: 1.8em; /* Smaller logo on mobile */
    margin: 0; /* Remove any default margins that might prevent centering */
    padding-left: 40px; /* Offset for hamburger space */
    padding-right: 40px; /* Balance offset for centering */
  }

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

  .mobile-nav-buttons {
    display: flex; /* Show mobile buttons */
    justify-content: center;
    gap: 10px;
    padding: 10px 15px;
    width: 100%;
    box-sizing: border-box; /* Include padding in width */
    background: linear-gradient(135deg, var(--dark-bg-2), var(--dark-bg-3)); /* Separate background */
    border-top: 1px solid transparent;
    animation: theme-colors 4s ease-in-out infinite; /* Dynamic border glow for mobile buttons */
  }

  .mobile-nav-buttons .btn {
    padding: 10px 20px; /* Smaller buttons on mobile */
    font-size: 0.9em;
  }

  /* Main Navigation (Mobile - Hidden by default, fixed position) */
  .main-nav {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0; /* Will be dynamically adjusted by JS */
    left: 0;
    width: 70%; /* Side menu width */
    height: 100%;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding-top: 20px; /* Internal padding for menu items below top bar */
    background: linear-gradient(90deg, var(--dark-bg-3), var(--dark-bg-1)); /* Side menu background */
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%); /* Initially off-screen */
    transition: transform 0.3s ease-in-out;
    z-index: 1001;
    border-right: 2px solid transparent; /* Placeholder for dynamic border */
    animation: random-glow 5s linear infinite; /* Dynamic border glow for mobile menu */
  }

  .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 20px;
    width: 100%; /* Occupy full width of side menu */
    max-width: none; /* No max-width on mobile */
    gap: 15px;
  }

  .nav-link {
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1.1em;
  }
  .nav-link:last-child {
    border-bottom: none;
  }

  .mobile-menu-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 999;
    transition: opacity 0.3s ease-in-out;
    opacity: 0;
  }

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

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

  .footer-bottom .footer-container {
    flex-direction: column;
    gap: 15px;
  }

  .footer-legal-nav {
    flex-direction: column;
    gap: 10px;
  }
}