:root {
  --primary-color: #FFD700; /* Gold */
  --secondary-color: #000080; /* Navy Blue */
  --accent-color: #FF1493; /* Deep Pink */

  /* Neon dynamic colors - smart adaptation */
  --neon-primary: var(--primary-color);
  --neon-secondary: var(--secondary-color);
  --neon-accent: var(--accent-color);
  
  --dark-bg-1: #0a0a0a;
  --dark-bg-2: #1a1a2e;
  --dark-bg-3: #16213e;

  /* Header specific glow colors */
  --header-top-glow: #FFFF00; /* Neon Yellow */
  --main-nav-glow: #FF00FF; /* Neon Magenta */
  --button-glow-1: #00FFFF; /* Neon Cyan */
  --button-glow-2: #FF6600; /* Neon Orange */
  --logo-glow: #00FF00; /* Neon Green */
}

/* Base dynamic color animation definitions */
@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(255, 215, 0, 0.3); /* Based on Gold */
  }
  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(0, 0, 128, 0.3); /* Based on Navy Blue */
  }
  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, 20, 147, 0.3); /* Based on Deep Pink */
  }
}

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

/* General Body Styling for fixed header compensation */
body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #121212;
  color: #f0f0f0;
  padding-top: 120px; /* Default compensation for fixed header + mobile buttons (desktop height) */
  transition: padding-top 0.3s ease; /* Smooth transition for padding change */
}

/* Prevent scrolling when mobile menu is open */
body.no-scroll {
  overflow: hidden;
}

/* Site Header - Fixed, Neon, Cyberpunk */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  flex-direction: column; /* Default for mobile, overridden for desktop */
  min-height: auto;
}

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

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

/* Logo Styling */
.logo {
  font-size: 2.2em;
  font-weight: bold;
  color: #fff; /* White base for neon text-shadow */
  text-decoration: none;
  animation: text-glow-flow 3s ease-in-out infinite alternate;
  padding: 5px 0;
  white-space: nowrap;
}

/* Navigation Menu */
.main-nav {
  background: linear-gradient(135deg, var(--dark-bg-2), var(--dark-bg-3), #0f3460);
  border-top: 2px solid var(--main-nav-glow);
  border-bottom: 2px solid var(--main-nav-glow);
  box-shadow:
    0 0 10px var(--main-nav-glow),
    0 0 20px var(--main-nav-glow),
    0 0 30px var(--main-nav-glow),
    inset 0 0 20px rgba(255, 0, 255, 0.1);
  padding: 10px 0;
  animation: theme-colors 10s linear infinite; /* Different dynamic color for main nav glow */
}

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

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

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

/* Desktop Buttons */
.desktop-nav-buttons {
  display: flex;
  gap: 10px;
}

/* Mobile Buttons */
.mobile-nav-buttons {
  display: none; /* Hidden by default, shown on mobile */
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 10px 15px;
  background-color: var(--dark-bg-1); /* Match header top background */
  justify-content: center;
  flex-wrap: nowrap; /* Ensure buttons stay in one line */
  gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.1); /* Subtle separator */
}

/* Button Styling */
.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;
  text-shadow:
    0 0 5px #ffffff,
    0 0 10px var(--neon-primary);
  transition: all 0.3s ease;
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn.neon-pulse {
  animation: pulse-glow 2s ease-in-out infinite alternate, theme-colors 4s ease-in-out infinite;
}
.btn.rainbow-flow {
  animation: rainbow-border 3s linear infinite;
}

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

/* Hamburger Menu */
.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 overlay */
  position: relative;
  margin-right: 15px; /* Space between hamburger and logo on mobile */
  padding: 5px;
  border-radius: 3px;
  transition: all 0.3s ease;
  box-shadow: 0 0 5px var(--neon-primary); /* Initial glow */
  animation: theme-colors 5s ease-in-out infinite alternate;
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--neon-primary);
  border-radius: 2px;
  transition: all 0.3s ease-in-out;
  box-shadow: 0 0 3px var(--neon-primary);
}

.hamburger-menu.active {
  box-shadow: 0 0 10px var(--neon-accent);
}

.hamburger-menu.active span:nth-child(1) {
  transform: translateY(11px) rotate(45deg);
  background-color: var(--neon-accent);
  box-shadow: 0 0 3px var(--neon-accent);
}

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

.hamburger-menu.active span:nth-child(3) {
  transform: translateY(-11px) rotate(-45deg);
  background-color: var(--neon-accent);
  box-shadow: 0 0 3px var(--neon-accent);
}

/* Mobile Menu Overlay */
.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: 999;
  transition: opacity 0.3s ease;
  opacity: 0;
}

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

/* Footer Styling (Regular, no neon) */
.site-footer {
  background-color: #1c1c1c;
  color: #ccc;
  padding: 40px 20px 20px;
  font-size: 0.9em;
  line-height: 1.6;
}

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

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

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

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

.footer-col h4 {
  color: #f0f0f0;
  font-size: 1.2em;
  margin-bottom: 15px;
  position: relative;
  padding-bottom: 5px;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 30px;
  height: 2px;
  background-color: var(--primary-color);
}

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

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

.footer-logo {
  font-size: 1.8em;
  font-weight: bold;
  color: var(--primary-color);
  text-decoration: none;
  display: block;
  margin-bottom: 15px;
}

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

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

.payment-icons img, .game-providers-icons img, .social-media-icons img {
  max-height: 40px; /* Adjusted for better visual balance in footer */
  height: auto;
  width: auto;
  filter: grayscale(80%) brightness(120%); /* Subtle effect for footer icons */
  transition: filter 0.3s ease;
}

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

.footer-middle-sections {
  margin-bottom: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 30px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.social-media-section h4 {
  margin-bottom: 15px;
  color: #f0f0f0;
  font-size: 1.2em;
  position: relative;
  padding-bottom: 5px;
}
.social-media-section h4::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 30px;
  height: 2px;
  background-color: var(--primary-color);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  text-align: center;
  color: #888;
  font-size: 0.85em;
}

/* Desktop Styles (Global, default) */
@media (min-width: 769px) {
  body {
    padding-top: 120px; /* Adjust based on actual header height */
  }
  .site-header {
    padding-top: 0;
  }
  .header-top {
    padding: 15px 0;
  }
  .header-container {
    padding: 0 40px;
  }
  .logo {
    order: 0; /* Reset order for desktop */
    margin-right: auto; /* Push buttons to the right */
  }
  .desktop-nav-buttons {
    display: flex; /* Show desktop buttons */
  }
  .mobile-nav-buttons {
    display: none; /* Hide mobile buttons */
  }
  .hamburger-menu {
    display: none; /* Hide hamburger on desktop */
  }
  .main-nav {
    display: flex; /* Show main nav on desktop */
    flex-direction: row;
    position: static; /* Not fixed on desktop */
    z-index: auto;
    transform: none; /* No transform */
    transition: none;
  }
  .nav-container {
    padding: 0 40px;
    justify-content: center;
  }
  .mobile-menu-overlay {
    display: none;
  }
}

/* Mobile Styles */
@media (max-width: 768px) {
  body {
    padding-top: 150px; /* Compensate for fixed header + mobile buttons */
  }

  .header-top {
    padding: 10px 0;
  }
  .header-container {
    padding: 0 15px;
    justify-content: space-between; /* Hamburger left, Logo center, space right */
    position: relative;
  }

  .hamburger-menu {
    display: flex; /* Show hamburger on mobile */
    order: 0; /* First item */
    margin-right: 0; /* Reset margin */
  }

  .logo {
    order: 1; /* Second item */
    flex-grow: 1; /* Allow logo to take available space */
    text-align: center; /* Center the logo text */
    margin: 0; /* Reset margin */
  }

  .header-container::after { /* Empty element to balance logo centering */
    content: '';
    display: block;
    width: 30px; /* Same width as hamburger for balance */
    padding: 5px; /* Match hamburger padding */
    visibility: hidden;
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Force display on mobile */
    padding: 8px 15px;
    background-color: var(--dark-bg-1);
    border-bottom: 2px solid var(--header-top-glow); /* Match header top border */
    box-shadow: 0 0 5px var(--header-top-glow); /* Subtle glow for mobile buttons container */
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* Two buttons, 10px gap */
    box-sizing: border-box;
    padding: 8px 12px; /* Smaller padding */
    font-size: 13px; /* Smaller font size */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.3;
  }

  .main-nav {
    display: none; /* Hidden by default, shown when active */
    flex-direction: column;
    position: fixed;
    top: 0; /* Will be adjusted by JS to be below header */
    left: 0;
    width: 80%; /* Menu width */
    max-width: 300px; /* Max width for menu */
    height: 100%;
    overflow-y: auto;
    background: linear-gradient(180deg, var(--dark-bg-2), var(--dark-bg-3), #0f3460);
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%); /* Start off-screen */
    transition: transform 0.3s ease-in-out;
    z-index: 1000; /* Above overlay, below hamburger */
    border-right: 2px solid var(--main-nav-glow); /* Border for mobile menu */
    animation: theme-colors 10s linear infinite; /* Dynamic color for mobile nav glow */
  }

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

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

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

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