:root {
  --primary-color: #007bff;
  --secondary-color: #28a745;
  --neon-primary: #00ffff; /* Cyan from blue */
  --neon-secondary: #ff00ff; /* Magenta from green */
  --neon-accent: #ffff00; /* Yellow */
  --dark-bg-1: #0a0a0a;
  --dark-bg-2: #1a1a2e;
  --dark-bg-3: #16213e;
  --text-color: #ffffff;
  --nav-link-color: #cccccc;
  --nav-link-hover: #ffffff;
  --footer-bg: #1c1c1c;
  --footer-text: #b0b0b0;
  --footer-heading: #ffffff;
}

/* Base styles */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  background-color: #121212;
  color: var(--text-color);
  line-height: 1.6;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  min-height: 70px; /* Base min-height for responsiveness */
  display: flex;
  flex-direction: column;
  /* Header background and glow - dynamic color via animation */
  background: linear-gradient(135deg, var(--dark-bg-1), var(--dark-bg-2), var(--dark-bg-3));
  animation: header-theme-colors 4s ease-in-out infinite;
}

.header-top {
  width: 100%;
  padding: 10px 0;
  display: flex;
  align-items: center;
  justify-content: center; /* Center container */
  position: relative;
  z-index: 1001;
}

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

.logo {
  font-size: 2em;
  font-weight: bold;
  text-decoration: none;
  color: var(--text-color);
  /* Dynamic neon text glow */
  animation: text-glow-flow 3s ease-in-out infinite alternate;
  transition: all 0.3s ease;
  padding: 5px 0;
  display: inline-block; /* Ensure it's not display:none */
}

.logo:hover {
  opacity: 0.9;
}

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

.btn {
  position: relative;
  padding: 12px 25px;
  color: var(--text-color);
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: all 0.3s ease;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  border: 2px solid;
  background: linear-gradient(135deg, var(--neon-primary), var(--neon-secondary));
  animation: theme-colors 4s ease-in-out infinite;
  text-shadow: 
    0 0 5px var(--text-color),
    0 0 10px var(--neon-primary);
}

.btn:hover {
  animation-duration: 2s;
  transform: translateY(-2px);
  opacity: 0.9;
}

.main-nav {
  width: 100%;
  padding: 10px 0;
  background: linear-gradient(135deg, var(--dark-bg-2), var(--dark-bg-3), #0f3460);
  animation: nav-theme-colors 4s ease-in-out infinite;
  display: flex; /* Desktop default: flex */
  flex-direction: row; /* Desktop default: row */
  position: static; /* Desktop default: static */
  z-index: 1000;
}

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

.nav-link {
  color: var(--nav-link-color);
  text-decoration: none;
  font-weight: bold;
  padding: 8px 0;
  transition: color 0.3s ease, text-shadow 0.3s ease;
  position: relative;
  white-space: nowrap;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 2px;
  background-color: var(--neon-accent);
  transition: width 0.3s ease-out, left 0.3s ease-out;
}

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

.nav-link:hover::after {
  width: 100%;
  left: 0;
}

/* Hamburger menu for mobile */
.hamburger-menu {
  display: none;
  width: 30px;
  height: 25px;
  position: relative;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  z-index: 1002; /* Above mobile-buttons-area */
  margin-right: 15px; /* Adjust spacing */
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--neon-accent);
  position: absolute;
  left: 0;
  transition: all 0.3s ease-in-out;
  box-shadow: 0 0 5px var(--neon-accent), 0 0 10px var(--neon-accent);
}

.hamburger-menu span:nth-child(1) { top: 0; }
.hamburger-menu span:nth-child(2) { top: 11px; }
.hamburger-menu span:nth-child(3) { top: 22px; }

.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-buttons-area {
  display: none; /* Hidden by default, shown on mobile */
  width: 100%;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--dark-bg-1), var(--dark-bg-2));
  justify-content: center;
  align-items: center;
  gap: 10px;
  z-index: 999;
  position: relative;
  animation: header-theme-colors 4s ease-in-out infinite;
}

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

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

/* Footer styles */
.site-footer {
  background-color: var(--footer-bg);
  color: var(--footer-text);
  padding: 40px 0 20px;
  font-size: 0.9em;
}

.footer-main-content {
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-middle-sections {
  padding: 30px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

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

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

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

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

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

.footer-nav a {
  color: var(--footer-text);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.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%); /* For a sleek, unified look */
  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-bottom {
  padding-top: 20px;
}

.footer-bottom .footer-container {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  grid-template-columns: none; /* Override grid for flex */
  gap: 15px; /* Reset gap */
}

.copyright {
  margin: 0;
}

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

.footer-legal-nav a {
  color: var(--footer-text);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

/* Animations */
@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(--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(--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(--text-color);
  }
}

@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(0, 255, 255, 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(255, 0, 255, 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(255, 255, 0, 0.3);
  }
}

@keyframes header-theme-colors {
  0%, 100% {
    border-bottom: 2px solid var(--neon-primary);
    box-shadow:
      0 0 10px var(--neon-primary),
      0 0 20px var(--neon-primary),
      0 0 30px var(--neon-primary),
      inset 0 0 20px rgba(0, 255, 255, 0.1);
  }
  33% {
    border-bottom: 2px solid var(--neon-secondary);
    box-shadow:
      0 0 10px var(--neon-secondary),
      0 0 20px var(--neon-secondary),
      0 0 30px var(--neon-secondary),
      inset 0 0 20px rgba(255, 0, 255, 0.1);
  }
  66% {
    border-bottom: 2px solid var(--neon-accent);
    box-shadow:
      0 0 10px var(--neon-accent),
      0 0 20px var(--neon-accent),
      0 0 30px var(--neon-accent),
      inset 0 0 20px rgba(255, 255, 0, 0.1);
  }
}

@keyframes nav-theme-colors {
  0%, 100% {
    border-top: 2px solid var(--neon-secondary);
    border-bottom: 2px solid var(--neon-secondary);
    box-shadow:
      0 0 10px var(--neon-secondary),
      0 0 20px var(--neon-secondary),
      0 0 30px var(--neon-secondary),
      inset 0 0 20px rgba(255, 0, 255, 0.1);
  }
  33% {
    border-top: 2px solid var(--neon-accent);
    border-bottom: 2px solid var(--neon-accent);
    box-shadow:
      0 0 10px var(--neon-accent),
      0 0 20px var(--neon-accent),
      0 0 30px var(--neon-accent),
      inset 0 0 20px rgba(255, 255, 0, 0.1);
  }
  66% {
    border-top: 2px solid var(--neon-primary);
    border-bottom: 2px solid var(--neon-primary);
    box-shadow:
      0 0 10px var(--neon-primary),
      0 0 20px var(--neon-primary),
      0 0 30px var(--neon-primary),
      inset 0 0 20px rgba(0, 255, 255, 0.1);
  }
}

/* Responsive styles */
@media (max-width: 768px) {
  .site-header {
    flex-direction: column;
    min-height: auto;
  }

  .header-container {
    padding: 0 15px;
    width: 100%;
    max-width: none; /* Crucial for mobile full width */
    justify-content: center; /* Center logo by default */
  }

  .hamburger-menu {
    display: block;
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
  }

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

  .mobile-buttons-area {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 15px;
    width: 100%;
  }

  .logo {
    text-align: center;
    flex-grow: 1; /* Allow logo to take available space and center */
  }

  .main-nav {
    display: none; /* Hidden by default, shown by JS */
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    width: 70%; /* Adjust as needed */
    height: 100%;
    background: var(--dark-bg-1);
    padding-top: 100px; /* Space for header */
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    overflow-y: auto;
    z-index: 1000;
    animation: none; /* Disable header specific animation for mobile menu */
    border: none; /* Remove border for mobile menu */
  }

  .main-nav.active {
    display: flex; /* Crucial for showing the menu */
    transform: translateX(0);
  }

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 15px;
    gap: 15px;
    width: 100%;
    max-width: none; /* Crucial for mobile full width */
  }

  .nav-link {
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
  }
  
  .nav-link::after {
    left: 0;
    transform: none;
  }

  .nav-link:hover::after {
    width: 100%;
    left: 0;
  }

  .footer-container {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .footer-bottom .footer-container {
    flex-direction: column;
    text-align: center;
  }

  .footer-legal-nav {
    justify-content: center;
    margin-top: 15px;
  }

  /* Padding for main content to avoid fixed header overlap */
  body {
    padding-top: 130px; /* Adjust based on actual header + mobile-buttons-area height */
  }
}

@media (min-width: 769px) {
  .hamburger-menu {
    display: none;
  }
  .mobile-buttons-area {
    display: none;
  }
  /* Ensure padding-top is reset for desktop if set for mobile */
  body {
    padding-top: 120px; /* Adjust based on actual desktop header height */
  }
}

/* Ensure body no-scroll works */
body.no-scroll {
  overflow: hidden;
}
