:root {
  --primary-color: #001F3F; /* Website main color */
  --secondary-color: #FFD700; /* Website auxiliary color */
  
  /* Neon colors dynamically derived from primary/secondary/accent */
  --neon-primary: #667eea; /* Default to primary-like, will be overridden by animation */
  --neon-secondary: #764ba2; /* Default to secondary-like, will be overridden by animation */
  --neon-accent: #f093fb; /* Default to accent-like, will be overridden by animation */

  --neon-yellow: #FFFF00;
  --neon-red: #FF0000;
  --neon-orange: #FF6600;
  --neon-blue: #00FFFF;
  --neon-pink: #FF00FF;
}

/* Dynamic Neon Color Animations (MUST BE PRESENT) */

/* General glow effect */
.neon-glow {
  box-shadow: 
    0 0 5px currentColor,
    0 0 10px currentColor,
    0 0 15px currentColor,
    0 0 20px currentColor;
}

/* Animation for flickering neon tubes */
@keyframes neon-flicker {
  0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% { opacity: 1; text-shadow: 0 0 5px currentColor, 0 0 10px currentColor, 0 0 15px currentColor; }
  20%, 24%, 55% { opacity: 0.8; text-shadow: 0 0 2px currentColor, 0 0 5px currentColor, 0 0 10px currentColor; }
}

/* Animation for pulsing glow */
@keyframes pulse-glow {
  0% { box-shadow: 0 0 5px currentColor, 0 0 10px currentColor; }
  50% { box-shadow: 0 0 15px currentColor, 0 0 30px currentColor, 0 0 45px currentColor; }
  100% { box-shadow: 0 0 5px currentColor, 0 0 10px currentColor; }
}

/* Animation for LED blink effect */
@keyframes led-blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0.3; }
}

/* Dynamic text glow flow using theme colors */
@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;
  }
}

/* Animation for border color and box-shadow based on theme colors */
@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); /* Using example rgba values, should dynamically change */
  }
  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);
  }
}

/* Animation for rainbow border */
@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; }
}

/* Animation for hue rotation */
@keyframes hue-spin {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

/* Animation for alternate colors */
@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); }
}

/* Animation for gradient flow background */
@keyframes gradient-flow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Animation for random glow colors */
@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; }
}

/* Common styles */
body {
  margin: 0;
  font-family: 'Arial', sans-serif;
  background-color: #0a0a0a; /* Dark background for the body */
  color: #e0e0e0;
  line-height: 1.6;
}

/* Ensure content below fixed header is visible */
body.header-padding {
  padding-top: 150px; /* Placeholder, will be adjusted by JS */
}

/* Header - Desktop First */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  min-height: 80px; /* Minimum height, content will expand */
  display: flex; /* Use flex to arrange header-top and main-nav vertically */
  flex-direction: column;
  box-sizing: border-box;
}

.header-top {
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
  border-bottom: 2px solid var(--neon-yellow); /* Initial border color for desktop header top */
  box-shadow: 
    0 0 10px var(--neon-yellow),
    0 0 20px var(--neon-yellow),
    0 0 30px var(--neon-yellow),
    inset 0 0 20px rgba(255, 255, 0, 0.1);
  padding: 15px 0;
  animation: theme-colors 6s ease-in-out infinite alternate; /* Dynamic glow for header-top */
}

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

.logo {
  font-family: 'Cyberpunk', 'Orbitron', sans-serif; /* Example fonts */
  font-size: 2.2em;
  font-weight: bold;
  color: #ffffff; /* Base color for text glow */
  text-decoration: none;
  animation: text-glow-flow 3s ease-in-out infinite alternate; /* Dynamic text glow */
  white-space: nowrap;
}

.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 30px;
  color: #ffffff;
  text-decoration: none;
  border-radius: 5px;
  border: 2px solid;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic border glow for buttons */
  text-shadow: 
    0 0 5px #ffffff,
    0 0 10px var(--neon-primary);
  transition: all 0.3s ease;
  font-weight: bold;
  white-space: nowrap;
}

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

/* Main Navigation - Desktop First */
.main-nav {
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460); /* Different dark background */
  border-top: 2px solid var(--neon-red); /* Different glow color for main nav */
  border-bottom: 2px solid var(--neon-red);
  box-shadow: 
    0 0 10px var(--neon-red),
    0 0 20px var(--neon-red),
    0 0 30px var(--neon-red),
    inset 0 0 20px rgba(255, 0, 0, 0.1);
  width: 100%;
  display: flex; /* Default desktop display */
  padding: 10px 0;
  animation: theme-colors 5s linear infinite; /* Dynamic glow for main-nav */
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  flex-wrap: wrap; /* Allow menu items to wrap if too many on desktop */
  gap: 20px;
}

.nav-link {
  color: #e0e0e0; /* Regular style, no neon for nav links */
  text-decoration: none;
  font-size: 1.1em;
  padding: 8px 15px;
  transition: color 0.3s ease, text-shadow 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--neon-secondary); /* Highlight on hover */
  text-shadow: 0 0 5px var(--neon-secondary);
}

/* Hamburger menu for mobile */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  cursor: pointer;
  z-index: 1001; /* Above mobile menu */
  padding: 5px;
  border-radius: 3px;
  box-sizing: content-box;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic glow for hamburger */
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: #ffffff;
  border-radius: 5px;
  transition: all 0.3s ease-in-out;
  box-shadow: 0 0 5px #ffffff, 0 0 10px var(--neon-primary); /* Glow for hamburger lines */
}

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

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

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

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

/* Footer styles */
.site-footer {
  background-color: #1a1a2e; /* Dark background, no neon */
  color: #cccccc;
  padding: 40px 20px 20px;
  font-size: 0.9em;
}

.footer-top-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-col h4 {
  color: #ffffff;
  font-size: 1.1em;
  margin-bottom: 15px;
  text-transform: uppercase;
}

.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(--secondary-color); /* Highlight with website secondary color */
}

.footer-logo {
  font-family: 'Arial', sans-serif; /* Regular font for footer logo */
  font-size: 1.5em;
  font-weight: bold;
  color: #ffffff;
  text-decoration: none;
  display: block;
  margin-bottom: 15px;
}

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

.payment-methods .payment-icons,
.game-providers-section .game-providers-icons,
.social-media-section .social-media-icons {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px; /* Consistent gap for all icon sections */
  width: 100%;
}

.payment-methods .payment-icons img,
.game-providers-section .game-providers-icons img,
.social-media-section .social-media-icons img {
  max-height: 50px;
  height: auto;
  width: auto;
  object-fit: contain;
  filter: brightness(0.8) grayscale(0.2); /* Slightly muted for footer */
  transition: filter 0.3s ease;
}

.payment-methods .payment-icons img:hover,
.game-providers-section .game-providers-icons img:hover,
.social-media-section .social-media-icons img:hover {
  filter: brightness(1) grayscale(0); /* Full color on hover */
}

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

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

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1); /* Separator for bottom section */
}

.footer-bottom p {
  margin: 0 0 10px;
  color: #aaaaaa;
}

.footer-legal-nav a {
  color: #aaaaaa;
  text-decoration: none;
  margin: 0 10px;
  transition: color 0.3s ease;
}

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

/* Mobile styles */
@media (max-width: 768px) {
  /* Header adjustments */
  .site-header {
    min-height: auto;
  }

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

  .header-container {
    padding: 0 15px; /* Smaller padding for mobile */
    justify-content: space-between; /* Hamburger left, Logo center, space right */
  }

  .logo {
    order: 2; /* Move logo to center */
    flex-grow: 1; /* Allow logo to take available space */
    text-align: center;
    font-size: 1.8em;
  }

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

  .hamburger-menu {
    display: flex; /* Show hamburger menu */
    order: 1; /* Place hamburger first */
    margin-right: auto; /* Push logo to center */
  }

  .main-nav {
    display: none; /* Hidden by default */
    flex-direction: column;
    position: fixed;
    top: 0; /* Will be adjusted by JS to be below header-top + mobile-nav-buttons */
    left: 0;
    width: 70%; /* Slide-in menu width */
    height: 100vh;
    overflow-y: auto;
    transform: translateX(-100%); /* Start off-screen */
    transition: transform 0.3s ease;
    padding-top: 20px;
    z-index: 1000; /* Above overlay */
    background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* Use header-top background for consistency */
    border-right: 2px solid var(--neon-red); /* Border on the right edge */
    box-shadow: 
      0 0 10px var(--neon-red),
      0 0 20px var(--neon-red),
      0 0 30px var(--neon-red),
      inset 0 0 20px rgba(255, 0, 0, 0.1);
    animation: theme-colors 5s linear infinite; /* Dynamic glow for mobile menu */
  }

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

  .nav-container {
    flex-direction: column;
    align-items: flex-start; /* Align menu items to the left */
    padding: 0 15px;
    gap: 15px;
    width: 100%; /* Ensure container fills parent */
    max-width: none; /* No max-width on mobile */
  }

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

  .mobile-nav-buttons {
    display: flex; /* Show mobile buttons */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px; /* Padding for the button row */
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap; /* Allow buttons to wrap */
    background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* Match header-top background */
    border-bottom: 2px solid var(--neon-yellow); /* Match header-top glow color */
    box-shadow: 
      0 0 5px var(--neon-yellow),
      0 0 10px var(--neon-yellow),
      inset 0 0 10px rgba(255, 255, 0, 0.1);
    animation: theme-colors 6s ease-in-out infinite alternate; /* Dynamic glow for mobile buttons container */
    z-index: 998; /* Below hamburger and main nav */
  }

  .mobile-nav-buttons .btn {
    flex: 1 1 auto; /* Allow buttons to grow/shrink */
    min-width: 120px; /* Minimum width for buttons */
    max-width: calc(50% - 10px); /* Max 2 buttons per row, with gap */
    padding: 10px 15px;
    font-size: 0.9em;
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word;
    overflow-wrap: break-word;
    text-align: center;
  }
  
  /* Footer adjustments */
  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column layout */
    gap: 20px;
  }

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

  .footer-middle-section {
    padding: 15px;
  }

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

  .footer-bottom {
    padding-top: 15px;
  }

  .footer-legal-nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 10px;
  }
  .footer-legal-nav a {
    margin: 0;
  }
}