:root {
  --site-primary: #0047AB; /* Deep Blue */
  --site-secondary: #FFD700; /* Gold */
  --dark-bg-1: #0a0a0a;
  --dark-bg-2: #1a1a2e;
  --dark-bg-3: #16213e;

  /* Dynamic Neon Colors based on site colors, for animation cycling */
  --neon-primary: #00FFFF; /* Cyan */
  --neon-secondary: #FF00FF; /* Magenta */
  --neon-accent: #FFFF00; /* Yellow */
  --neon-header-top-glow: #FFFF00; /* Yellow for header top */
  --neon-main-nav-glow: #FF00FF; /* Magenta for main nav */
  --neon-btn-glow: #00FFFF; /* Cyan for buttons */

  /* Header heights for padding-top on body */
  --header-top-height-desktop: 60px;
  --main-nav-height-desktop: 50px;
  --header-total-height-desktop: calc(var(--header-top-height-desktop) + var(--main-nav-height-desktop));

  --header-top-height-mobile: 60px; /* Hamburger + Logo */
  --mobile-buttons-height: 70px; /* Estimate for buttons */
  --header-total-height-mobile: calc(var(--header-top-height-mobile) + var(--mobile-buttons-height));
}

/* Base styles for the page to prevent content overlap */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: #e0e0e0;
  background-color: #121212;
  padding-top: var(--header-total-height-desktop); /* Default for desktop */
  overflow-x: hidden; /* Prevent horizontal scroll */
}

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

@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); }
  100% { filter: hue-rotate(360deg); }
}

@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%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@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(--site-primary);
    box-shadow:
      0 0 10px var(--site-primary),
      0 0 20px var(--site-primary),
      inset 0 0 10px rgba(0, 71, 171, 0.3);
  }
  33% {
    border-color: var(--site-secondary);
    box-shadow:
      0 0 10px var(--site-secondary),
      0 0 20px var(--site-secondary),
      inset 0 0 10px rgba(255, 215, 0, 0.3);
  }
  66% {
    border-color: var(--neon-primary); /* Using a vibrant neon color */
    box-shadow:
      0 0 10px var(--neon-primary),
      0 0 20px var(--neon-primary),
      inset 0 0 10px rgba(0, 255, 255, 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;
  }
}

/* Header general styles - Desktop first */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.5); /* General header shadow */
}

.header-top {
  background: linear-gradient(135deg, var(--dark-bg-1), var(--dark-bg-2));
  border-bottom: 2px solid var(--neon-header-top-glow);
  box-shadow:
    0 0 10px var(--neon-header-top-glow),
    0 0 20px var(--neon-header-top-glow),
    inset 0 0 15px rgba(255, 255, 0, 0.1);
  padding: 10px 0;
  min-height: var(--header-top-height-desktop);
  display: flex; /* For aligning logo and desktop buttons */
  align-items: center;
}

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

.logo {
  font-family: 'Electrolize', sans-serif; /* Or a similar futuristic font */
  font-size: 2.2em;
  font-weight: bold;
  text-decoration: none;
  color: #ffffff; /* Base color for text */
  animation: text-glow-flow 3s ease-in-out infinite alternate; /* Dynamic text glow */
  display: inline-block;
  padding: 5px 0;
}

.desktop-nav-buttons {
  display: flex;
  gap: 15px;
}

.btn {
  position: relative;
  background: linear-gradient(135deg, var(--site-primary), var(--site-secondary));
  padding: 12px 25px;
  color: #ffffff;
  text-decoration: none;
  border-radius: 5px;
  border: 2px solid;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic color based on theme */
  text-shadow:
    0 0 5px #ffffff,
    0 0 10px var(--neon-btn-glow);
  transition: all 0.3s ease;
  font-weight: bold;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

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

.main-nav {
  background: linear-gradient(135deg, var(--dark-bg-2), var(--dark-bg-3));
  border-top: 2px solid var(--neon-main-nav-glow);
  border-bottom: 2px solid var(--neon-main-nav-glow);
  box-shadow:
    0 0 10px var(--neon-main-nav-glow),
    0 0 20px var(--neon-main-nav-glow),
    inset 0 0 15px rgba(255, 0, 255, 0.1);
  padding: 10px 0;
  min-height: var(--main-nav-height-desktop);
  display: flex; /* Desktop default: visible, horizontal */
  flex-direction: row;
  justify-content: center;
  align-items: center;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  flex-wrap: wrap; /* Allow wrapping on smaller desktop screens */
  gap: 25px; /* Spacing between nav links */
}

.nav-link {
  color: #e0e0e0;
  text-decoration: none;
  font-size: 1.1em;
  padding: 8px 15px;
  transition: color 0.3s ease, text-shadow 0.3s ease;
  white-space: nowrap; /* Prevent breaking menu items */
}

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

/* Mobile specific elements (hidden on desktop) */
.hamburger-menu,
.mobile-buttons-area,
.mobile-menu-overlay {
  display: none;
}

/* Footer styles */
.site-footer {
  background: #1e1e1e;
  color: #cccccc;
  padding: 40px 0 20px;
  font-size: 0.9em;
  line-height: 1.6;
}

.footer-main-content,
.footer-middle-sections,
.footer-bottom {
  padding: 15px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-bottom {
  border-bottom: none;
  padding-top: 20px;
}

.site-footer .footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

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

.footer-col h4,
.game-providers-section h4,
.social-media-section h4,
.payment-methods-title {
  color: #ffffff;
  font-size: 1.2em;
  margin-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 8px;
}

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

.footer-logo {
  font-size: 1.8em;
  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;
}

/* Icon sections */
.payment-icons,
.game-providers-icons,
.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-icons img,
.game-providers-icons img,
.social-media-icons img {
  max-height: 50px;
  height: auto;
  width: auto;
  object-fit: contain;
  filter: brightness(0.8) grayscale(0.2); /* Slightly dim icons for footer */
  transition: filter 0.3s ease;
}

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

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

.copyright {
  text-align: center;
  color: #888888;
  margin: 0;
  padding-top: 10px;
}

/* Responsive styles for mobile */
@media (max-width: 768px) {
  body {
    padding-top: var(--header-total-height-mobile); /* Adjust for mobile header height */
  }

  .header-top {
    padding: 10px 0;
    min-height: var(--header-top-height-mobile);
    justify-content: center; /* Center logo by default */
  }

  .header-container {
    padding: 0 15px;
    justify-content: space-between; /* To place hamburger left and logo center */
    position: relative;
    width: 100%; /* Ensure container fills nav */
    max-width: none; /* Remove max-width on mobile */
  }

  .hamburger-menu {
    display: block;
    position: absolute; /* Position relative to header-container */
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001; /* Above logo */
    padding: 10px;
    animation: pulse-glow 2s ease-in-out infinite alternate; /* Neon glow for hamburger */
    color: var(--neon-primary); /* Use neon color */
  }

  .hamburger-icon {
    display: block;
    width: 25px;
    height: 3px;
    background-color: currentColor; /* Use neon color */
    position: relative;
    transition: background-color 0.3s ease-in-out;
  }

  .hamburger-icon::before,
  .hamburger-icon::after {
    content: '';
    display: block;
    width: 25px;
    height: 3px;
    background-color: currentColor; /* Use neon color */
    position: absolute;
    transition: transform 0.3s ease-in-out, top 0.3s ease-in-out;
  }

  .hamburger-icon::before {
    top: -8px;
  }

  .hamburger-icon::after {
    top: 8px;
  }

  .hamburger-menu.active .hamburger-icon {
    background-color: transparent;
  }

  .hamburger-menu.active .hamburger-icon::before {
    transform: rotate(45deg);
    top: 0;
  }

  .hamburger-menu.active .hamburger-icon::after {
    transform: rotate(-45deg);
    top: 0;
  }

  .logo {
    font-size: 1.8em;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    animation: text-glow-flow 3s ease-in-out infinite alternate; /* Ensure dynamic glow */
    color: #ffffff; /* Base color for text */
  }

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

  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: 0; /* Will be adjusted by JS to be below header-top */
    left: 0;
    width: 80%; /* Menu width */
    max-width: 300px;
    height: 100vh;
    flex-direction: column;
    background: linear-gradient(180deg, var(--dark-bg-1), var(--dark-bg-3));
    padding-top: calc(var(--header-top-height-mobile) + 20px); /* Space for fixed header-top */
    transform: translateX(-100%); /* Slide out from left */
    transition: transform 0.3s ease-in-out;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.5);
    border-right: 2px solid var(--neon-main-nav-glow);
    z-index: 1000;
  }

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

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 15px;
    gap: 15px;
    width: 100%; /* Ensure container fills nav */
    max-width: none; /* Remove max-width on mobile */
  }

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

  .mobile-buttons-area {
    display: flex; /* Show on mobile */
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 15px 15px;
    background: linear-gradient(135deg, var(--dark-bg-2), var(--dark-bg-1));
    border-top: 1px solid var(--neon-btn-glow);
    box-shadow:
      0 0 8px var(--neon-btn-glow),
      inset 0 0 5px rgba(0, 255, 255, 0.1);
    min-height: var(--mobile-buttons-height);
    width: 100%;
  }

  .mobile-buttons-area .btn {
    flex: 1; /* Make buttons take equal width */
    padding: 10px 15px;
    font-size: 0.9em;
    text-align: center;
  }

  .mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
  }

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

  /* Footer responsive */
  .footer-main-content .footer-container {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 20px;
  }
  .footer-col {
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }
  .footer-col:last-child {
    border-bottom: none;
  }

  .site-footer .footer-container {
    padding: 0 15px;
  }

  .footer-logo {
    font-size: 1.5em;
  }

  .footer-col h4,
  .game-providers-section h4,
  .social-media-section h4,
  .payment-methods-title {
    font-size: 1.1em;
  }

  .copyright {
    font-size: 0.8em;
  }

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