:root {
  --primary-color: #003366;
  --secondary-color: #FFCC00;

  --neon-base-1: #00ffff; /* Cyan */
  --neon-base-2: #ff00ff; /* Magenta */
  --neon-base-3: #ffff00; /* Yellow */
  --neon-base-4: #00ff00; /* Green */
  --neon-base-5: #ff6600; /* Orange */
  --neon-base-6: #ff0000; /* Red */

  /* Dynamic theme-based neon colors for animations */
  --neon-primary: var(--secondary-color); /* #FFCC00 */
  --neon-secondary: var(--neon-base-5); /* #ff6600 */
  --neon-accent: var(--neon-base-1); /* #00ffff */

  --neon-primary-transparent: rgba(255, 204, 0, 0.3);
  --neon-secondary-transparent: rgba(255, 102, 0, 0.3);
  --neon-accent-transparent: rgba(0, 255, 255, 0.3);

  /* Dark background colors */
  --dark-bg-1: #0a0a0a;
  --dark-bg-2: #1a1a2e;
  --dark-bg-3: #16213e;
  --dark-bg-4: #0f3460;

  /* Header specific background gradient */
  --header-top-bg-gradient: linear-gradient(135deg, var(--dark-bg-1), var(--dark-bg-2), var(--dark-bg-3));
  /* Distinct background for main-nav */
  --main-nav-bg-gradient: linear-gradient(135deg, var(--dark-bg-2), var(--dark-bg-3), var(--dark-bg-4));
}

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #f0f0f0;
  background-color: var(--dark-bg-1);
  min-height: 100vh; /* Ensure body takes full viewport height */
}

body.no-scroll {
  overflow: hidden;
}

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

ul {
  list-style: none;
}

/* 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; }
}

/* Dynamic text glow animation */
@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: #ffffff;
  }
  33% {
    text-shadow:
      0 0 5px var(--neon-secondary),
      0 0 10px var(--neon-secondary),
      0 0 15px var(--neon-secondary);
    color: #ffffff;
  }
  66% {
    text-shadow:
      0 0 5px var(--neon-accent),
      0 0 10px var(--neon-accent),
      0 0 15px var(--neon-accent);
    color: #ffffff;
  }
  100% {
    text-shadow:
      0 0 5px var(--neon-primary),
      0 0 10px var(--neon-primary),
      0 0 15px var(--neon-primary);
    color: #ffffff;
  }
}

/* Dynamic theme-based border/box-shadow color animation */
@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 var(--neon-primary-transparent);
  }
  33% {
    border-color: var(--neon-secondary);
    box-shadow:
      0 0 10px var(--neon-secondary),
      0 0 20px var(--neon-secondary),
      inset 0 0 10px var(--neon-secondary-transparent);
  }
  66% {
    border-color: var(--neon-accent);
    box-shadow:
      0 0 10px var(--neon-accent),
      0 0 20px var(--neon-accent),
      inset 0 0 10px var(--neon-accent-transparent);
  }
}

@keyframes rainbow-border {
  0% { border-color: var(--neon-base-6); box-shadow: 0 0 10px var(--neon-base-6), 0 0 20px var(--neon-base-6); }
  16.6% { border-color: var(--neon-base-5); box-shadow: 0 0 10px var(--neon-base-5), 0 0 20px var(--neon-base-5); }
  33.3% { border-color: var(--neon-base-3); box-shadow: 0 0 10px var(--neon-base-3), 0 0 20px var(--neon-base-3); }
  50% { border-color: var(--neon-base-4); box-shadow: 0 0 10px var(--neon-base-4), 0 0 20px var(--neon-base-4); }
  66.6% { border-color: var(--neon-base-1); box-shadow: 0 0 10px var(--neon-base-1), 0 0 20px var(--neon-base-1); }
  83.3% { border-color: var(--neon-base-2); box-shadow: 0 0 10px var(--neon-base-2), 0 0 20px var(--neon-base-2); }
  100% { border-color: var(--neon-base-6); box-shadow: 0 0 10px var(--neon-base-6), 0 0 20px var(--neon-base-6); }
}

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

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

.header-top {
  background: var(--header-top-bg-gradient);
  border-bottom: 2px solid;
  padding: 10px 0;
  color: var(--neon-base-3); /* Yellow glow for header-top */
  animation: theme-colors 4s ease-in-out infinite; /* Apply dynamic glow */
}

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

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

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

.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 button glow */
  text-shadow:
    0 0 5px #ffffff,
    0 0 10px var(--neon-primary);
  transition: all 0.3s ease;
  white-space: nowrap;
}

.btn:hover {
  animation-duration: 2s; /* Faster glow on hover */
  transform: translateY(-2px);
  filter: brightness(1.2);
}

.main-nav {
  background: var(--main-nav-bg-gradient);
  border-top: 2px solid;
  border-bottom: 2px solid;
  padding: 10px 0;
  color: var(--neon-base-6); /* Red glow for main-nav */
  animation: theme-colors 4s ease-in-out infinite; /* Apply dynamic glow */
  display: flex; /* Desktop default: visible */
  flex-direction: row; /* Desktop default: horizontal */
}

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

.nav-link {
  color: #f0f0f0;
  padding: 8px 15px;
  font-size: 1.1em;
  font-weight: 500;
  transition: color 0.3s ease, text-shadow 0.3s ease;
  white-space: nowrap;
}

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

.hamburger-menu {
  display: none; /* Hidden on desktop */
  width: 30px;
  height: 24px;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  z-index: 1001;
  padding: 5px;
  border-radius: 3px;
  color: var(--neon-base-3); /* Yellow glow for hamburger */
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic glow */
}

.hamburger-menu .bar {
  width: 100%;
  height: 3px;
  background-color: currentColor;
  transition: all 0.3s ease;
  border-radius: 1px;
}

.hamburger-menu.active .bar:nth-child(1) {
  transform: translateY(10px) rotate(45deg);
}

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

.hamburger-menu.active .bar:nth-child(3) {
  transform: translateY(-10px) rotate(-45deg);
}

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

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

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

.footer-top-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto 30px;
}

.footer-col h4 {
  color: var(--secondary-color);
  margin-bottom: 15px;
  font-size: 1.1em;
}

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

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

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

.footer-nav-links 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;
  filter: grayscale(100%) brightness(0.8) contrast(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) contrast(1);
}

.footer-middle-section {
  max-width: 1200px;
  margin: 0 auto 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 30px;
}

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

.game-providers-section h4, .social-media-section h4 {
  color: var(--secondary-color);
  margin-bottom: 15px;
  font-size: 1.1em;
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.footer-bottom p {
  margin-bottom: 10px;
}

.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

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

/* Responsive Styles (Mobile First Override) */
@media (max-width: 768px) {
  body {
    padding-top: 130px; /* Adjust based on header-top (60px) + mobile-nav-buttons (70px) */
  }

  .site-header {
    min-height: auto;
  }

  .header-top {
    padding: 10px 0;
    animation: none; /* Disable animation for mobile header-top */
    border-bottom: none;
    box-shadow: none;
  }

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

  .hamburger-menu {
    display: flex; /* Show on mobile */
    order: 1;
    animation: none; /* Disable animation for mobile hamburger */
    border: none;
    box-shadow: none;
  }

  .logo {
    order: 2;
    flex-grow: 1;
    text-align: center;
    font-size: 1.8em;
    animation: none; /* Disable animation for mobile logo */
    text-shadow: none;
  }

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

  .mobile-nav-buttons {
    display: flex; /* Show on mobile */
    justify-content: center;
    gap: 10px;
    padding: 10px 15px;
    background: var(--header-top-bg-gradient);
    border-bottom: 2px solid;
    color: var(--neon-base-3); /* Yellow glow for mobile buttons container */
    animation: theme-colors 4s ease-in-out infinite; /* Apply dynamic glow */
    z-index: 999; /* Below hamburger menu, above content */
  }

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

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column; /* Vertical menu */
    position: fixed;
    top: 0;
    left: 0;
    width: 75%; /* Slide in from left */
    height: 100vh;
    background: var(--main-nav-bg-gradient);
    padding-top: 150px; /* Offset for header and mobile buttons */
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%); /* Start off-screen */
    transition: transform 0.3s ease-out;
    animation: none; /* Disable animation for mobile nav */
    border: none;
    z-index: 999;
    overflow-y: auto;
  }

  .main-nav.active {
    display: flex; /* Show when active */
    transform: translateX(0); /* Slide into view */
  }

  .nav-container {
    flex-direction: column;
    padding: 0;
    width: 100%;
    max-width: none;
  }

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

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

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

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

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

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

  .footer-logo {
    margin: 0 auto 15px;
  }

  .payment-methods, .game-providers-section, .social-media-section {
    text-align: center;
  }

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

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