/* CSS Variables for Dynamic Colors and Theme */
:root {
  --primary-color: #FFD700; /* Gold */
  --secondary-color: #DC143C; /* Crimson */
  --accent-color: #00FFFF; /* Cyan for contrast */

  --neon-primary: var(--primary-color);
  --neon-secondary: var(--secondary-color);
  --neon-accent: var(--accent-color);
  --neon-cycle-1: #ff00ff, #00ffff, #ffff00, #ff0000, #00ff00, #0000ff;
  --neon-cycle-2: #00ffff, #ffff00, #ff00ff, #00ff00, #ff0000, #0000ff;
  --neon-cycle-3: #ffff00, #ff00ff, #00ffff, #ff0000, #00ff00, #0000ff;

  /* Header specific background colors */
  --header-bg-top: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
  --header-bg-nav: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
}

/* Keyframe Animations */
@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);
  }
  33% {
    border-color: var(--neon-secondary);
    box-shadow: 0 0 10px var(--neon-secondary), 0 0 20px var(--neon-secondary);
  }
  66% {
    border-color: var(--neon-accent);
    box-shadow: 0 0 10px var(--neon-accent), 0 0 20px var(--neon-accent);
  }
}

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

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

body {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #e0e0e0;
  background-color: #0f0f0f; /* Dark base background */
  overflow-x: hidden; /* Prevent horizontal scroll from animations */
  padding-top: 120px; /* Default padding for fixed header (header-top + main-nav) */
}

body.no-scroll {
  overflow: hidden;
}

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

ul {
  list-style: none;
}

/* Container for desktop layout */
.header-container,
.nav-container,
.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

/* Site Header - Fixed Positioning */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

/* Header Top Area (Logo + Buttons) */
.header-top {
  background: var(--header-bg-top);
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite;
  padding: 15px 0;
  min-height: 70px; /* Ensure a minimum height for header-top */
}

.header-top .header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: 'Orbitron', sans-serif; /* Example font for cyberpunk feel */
  font-size: 2.5em;
  font-weight: bold;
  color: #fff; /* Base color before text-shadow */
  animation: text-glow-flow 3s ease-in-out infinite alternate; /* Dynamic text glow */
  flex-shrink: 0;
}

/* Desktop Navigation Buttons */
.desktop-nav-buttons {
  display: flex;
  gap: 15px;
  flex-shrink: 0;
}

/* Buttons */
.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 border and shadow */
  text-shadow: 0 0 5px #ffffff, 0 0 10px var(--neon-primary);
  transition: all 0.3s ease;
  font-weight: bold;
  letter-spacing: 0.5px;
  white-space: nowrap; /* Prevent button text from wrapping */
}

.btn:hover {
  animation-duration: 2s; /* Faster color change on hover */
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 0 15px var(--neon-primary), 0 0 30px var(--neon-primary), inset 0 0 15px rgba(255, 255, 255, 0.2);
}

/* Main Navigation (Desktop) */
.main-nav {
  background: var(--header-bg-nav);
  border-top: 2px solid;
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite reverse; /* Different animation for contrast */
  padding: 10px 0;
  display: flex; /* Desktop default: visible and horizontal */
  flex-direction: row;
  min-height: 50px; /* Ensure a minimum height for main-nav */
}

.main-nav .nav-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 25px;
}

.nav-link {
  color: #e0e0e0;
  font-size: 1.1em;
  font-weight: 500;
  padding: 8px 12px;
  transition: color 0.3s ease, text-shadow 0.3s ease;
  white-space: nowrap; /* Prevent menu items from wrapping */
}

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

/* Hamburger Menu (Desktop - Hidden) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
}

/* Mobile-specific button area (hidden on desktop) */
.mobile-button-area {
  display: none; /* Hidden on desktop */
}

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

/* Footer Styles (Regular, no neon) */
.site-footer {
  background-color: #1a1a1a;
  color: #bbb;
  padding-top: 40px;
  font-size: 0.9em;
  border-top: 1px solid #333;
}

.site-footer h4 {
  color: #eee;
  font-size: 1.2em;
  margin-bottom: 15px;
  border-bottom: 1px solid #333;
  padding-bottom: 8px;
}

.footer-top .footer-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-bottom: 30px;
}

.footer-col {
  display: flex;
  flex-direction: column;
}

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

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

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

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

.footer-nav-links a {
  color: #bbb;
  transition: color 0.3s ease;
}

.footer-nav-links a:hover {
  color: var(--primary-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(150%); /* Make icons fit dark theme, optional */
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

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

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

.footer-middle .footer-container {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.game-providers-section,
.social-media-section {
  width: 100%;
}

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

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

/* Responsive Design */
@media (max-width: 768px) {
  /* Calculate padding-top dynamically or with reasonable estimates */
  /* header-top height approx 60px + mobile-button-area height approx 60px */
  body {
    padding-top: calc(60px + 60px);
  }

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

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

  .hamburger-menu {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    flex-shrink: 0;
    position: relative;
    animation: theme-colors 4s ease-in-out infinite; /* Dynamic glow for hamburger */
    border-radius: 3px;
    box-shadow: 0 0 5px var(--neon-primary), 0 0 10px var(--neon-primary);
  }

  .hamburger-menu span {
    display: block;
    height: 3px;
    width: 100%;
    background: #fff;
    border-radius: 5px;
    transition: all 0.3s ease-in-out;
    position: relative;
    box-shadow: 0 0 3px #fff;
  }

  .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 {
    font-size: 1.8em;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    width: auto;
  }

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

  .main-nav {
    display: none; /* Hidden by default on mobile */
  }

  .mobile-button-area {
    display: block; /* Visible on mobile */
    background: var(--header-bg-top);
    padding: 10px 0;
    border-bottom: 2px solid;
    animation: theme-colors 4s ease-in-out infinite;
  }

  .mobile-button-area .header-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    padding: 0 15px;
    max-width: none;
    width: 100%;
  }

  /* Mobile Menu Overlay */
  .mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }

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

  /* Mobile Menu (Sidebar) */
  .mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 70%;
    max-width: 300px;
    height: 100%;
    background: #222;
    z-index: 999;
    transform: translateX(-100%); /* Hidden by default */
    transition: transform 0.3s ease-out;
    display: flex;
    flex-direction: column;
    padding: 20px;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.5);
  }

  .mobile-menu.active {
    transform: translateX(0); /* Visible when active */
    display: flex; /* Ensure display is set when active */
  }

  .mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding-top: calc(60px + 60px); /* Space for fixed header-top and mobile-button-area */
  }

  .mobile-nav-links .nav-link {
    font-size: 1.2em;
    padding: 10px 0;
    border-bottom: 1px solid #333;
    width: 100%;
  }

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

  /* Footer */
  .footer-top .footer-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }

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

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

  .footer-nav-links {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

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

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