:root {
  --primary-color: #0A1931; /* Website main color */
  --secondary-color: #FFD700; /* Website accent color */
  --dark-bg-1: #0a0a0a;
  --dark-bg-2: #1a1a2e;
  --dark-bg-3: #16213e;
  --neon-primary: var(--secondary-color); /* Intelligent choice for neon primary */
  --neon-secondary: #00ffff; /* A vibrant blue for contrast */
  --neon-accent: #ff00ff; /* A vibrant magenta */
}

/* Base styles and resets */
body {
  margin: 0;
  font-family: 'Arial', sans-serif;
  color: #e0e0e0;
  background-color: #050505;
  line-height: 1.6;
  padding-top: 120px; /* Adjusted dynamically by JS later if needed, but a good default for fixed header */
}

/* Ensure images are responsive */
img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

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

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

/* Animations for 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 {
  0% {
    box-shadow: 
      0 0 5px currentColor,
      0 0 10px currentColor;
  }
  100% {
    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 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 secondary color */
  }
  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, 255, 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, 0, 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 styles (Desktop First) */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  display: flex; /* Use flex to stack header-top and main-nav */
  flex-direction: column;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5); /* General header shadow */
}

.header-top {
  background: linear-gradient(135deg, var(--dark-bg-1), var(--dark-bg-2), var(--dark-bg-3));
  border-bottom: 2px solid; /* For dynamic color border */
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic border glow */
  padding: 10px 0;
}

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

.logo {
  font-size: 2.2em;
  font-weight: bold;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 2px;
  animation: text-glow-flow 3s ease-in-out infinite alternate; /* Dynamic text glow */
  position: relative;
  text-shadow: 0 0 5px #fff, 0 0 10px var(--neon-primary), 0 0 15px var(--neon-primary);
}

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

.btn {
  position: relative;
  background: linear-gradient(135deg, var(--neon-primary), var(--neon-secondary));
  padding: 10px 25px;
  color: #ffffff;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s ease;
  border: 2px solid; /* For dynamic color border */
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic border glow */
  text-shadow: 
    0 0 5px #ffffff,
    0 0 10px var(--neon-primary);
  white-space: nowrap; /* Prevent button text from wrapping */
}

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

/* Main Navigation */
.main-nav {
  background: linear-gradient(135deg, var(--dark-bg-2), var(--dark-bg-3), var(--primary-color));
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 2px solid; /* For dynamic color border */
  animation: rainbow-border 3s linear infinite; /* Different dynamic border glow for nav */
  padding: 10px 0;
  display: flex; /* Default for desktop */
  flex-direction: row; /* Default for desktop */
  width: 100%;
}

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

.nav-link {
  color: #e0e0e0;
  font-size: 1em;
  font-weight: 600;
  padding: 5px 0;
  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);
}

/* Hamburger menu (hidden on desktop) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 24px;
  position: relative;
  z-index: 1001; /* Above other header elements */
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic glow for hamburger */
}

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

.hamburger-icon::before,
.hamburger-icon::after {
  content: '';
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--neon-primary);
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
  box-shadow: 0 0 5px var(--neon-primary), 0 0 10px var(--neon-primary);
}

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

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

/* Mobile buttons container (hidden on desktop) */
.mobile-buttons-container {
  display: none; /* Hidden on desktop */
}

/* Mobile menu overlay (hidden on desktop) */
.mobile-menu-overlay {
  display: none; /* Hidden on desktop */
}

/* Footer styles */
.site-footer {
  background-color: var(--primary-color);
  color: #cccccc;
  padding: 40px 0 20px 0;
  font-size: 0.9em;
  border-top: 3px solid var(--secondary-color);
}

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

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

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

.footer-logo {
  font-size: 1.8em;
  font-weight: bold;
  color: #ffffff;
  margin-bottom: 15px;
  display: block;
  text-transform: uppercase;
  letter-spacing: 1px;
}

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

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

.footer-nav-list a {
  color: #cccccc;
  transition: color 0.3s ease;
}

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

.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) contrast(1.2); /* Subtle effect for icons */
}

.footer-middle {
  padding: 30px 0;
  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 {
  padding-top: 20px;
  text-align: center;
  color: #999999;
}

.copyright {
  font-size: 0.85em;
}

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

  /* Header */
  .header-top {
    padding: 10px 0;
    justify-content: space-between;
    border-bottom: none; /* Remove desktop border */
  }

  .header-container {
    padding: 0 15px; /* Smaller padding for mobile */
    max-width: none; /* Crucial: no max-width on mobile */
    width: 100%;
    justify-content: space-between;
  }

  .logo {
    flex-grow: 1; /* Allow logo to take available space */
    text-align: center; /* Center logo */
    font-size: 1.8em;
  }
  
  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    order: -1; /* Place it at the beginning */
    margin-right: auto; /* Push logo to center */
  }

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

  .mobile-buttons-container {
    display: flex; /* Show mobile buttons */
    justify-content: center;
    gap: 10px;
    padding: 10px 15px;
    background: linear-gradient(135deg, var(--dark-bg-3), var(--primary-color));
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 2px solid; /* Dynamic glow for mobile buttons container */
    animation: theme-colors 4s ease-in-out infinite;
  }

  .mobile-buttons-container .btn {
    flex: 1;
    max-width: 180px;
    padding: 8px 15px;
    font-size: 0.9em;
  }

  /* Mobile Navigation Menu */
  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column; /* Vertical menu */
    position: fixed; /* Fixed position for mobile menu */
    top: 0; /* Align to top */
    left: 0;
    width: 80%; /* Menu width */
    max-width: 300px; /* Max width for larger mobiles */
    height: 100%;
    background-color: var(--dark-bg-1); /* Dark background for menu */
    overflow-y: auto;
    transform: translateX(-100%); /* Start off-screen */
    transition: transform 0.3s ease-in-out;
    border-right: 3px solid; /* Dynamic border glow for mobile menu */
    animation: rainbow-border 3s linear infinite;
    z-index: 1000; /* Below overlay */
    padding-top: 70px; /* Space for fixed header content */
  }

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

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

  .nav-link {
    font-size: 1.1em;
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

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

  /* Hamburger active state */
  .hamburger-menu.active .hamburger-icon {
    background: transparent;
    box-shadow: none;
  }

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

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

  /* Mobile menu overlay */
  .mobile-menu-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 999; /* Below menu, above content */
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
  }

  .mobile-menu-overlay.active {
    display: block; /* Show overlay when active */
    opacity: 1;
  }

  /* Footer */
  .footer-top {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 20px;
  }

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

  .footer-col h4 {
    margin-top: 20px;
    font-size: 1em;
  }

  .footer-logo {
    font-size: 1.5em;
    margin-bottom: 10px;
  }

  .footer-description {
    font-size: 0.8em;
  }

  .footer-nav-list {
    text-align: center;
  }

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

  .footer-middle {
    padding: 20px 0;
  }
  
  .game-providers-icons,
  .social-media-icons {
    justify-content: center; /* Center icons on mobile */
    gap: 5px;
  }

  .payment-icons {
    justify-content: center;
    gap: 5px;
  }

  .payment-icons img,
  .game-providers-icons img,
  .social-media-icons img {
    max-height: 40px; /* Smaller icons on mobile */
  }
}