:root {
  --primary-color: #003366;
  --secondary-color: #FFD700;
  --neon-primary: #00ffff; /* Dynamic starting bright blue */
  --neon-secondary: #ff00ff; /* Dynamic starting bright magenta */
  --neon-accent: #ffff00; /* Dynamic starting bright yellow */
  --dark-bg-1: #0a0a0a;
  --dark-bg-2: #1a1a2e;
  --dark-bg-3: #16213e;
  --header-top-height-desktop: 60px;
  --main-nav-height-desktop: 50px;
  --mobile-buttons-height: 50px;
  --header-height-desktop: calc(var(--header-top-height-desktop) + var(--main-nav-height-desktop));
  --header-height-mobile: calc(var(--header-top-height-desktop) + var(--mobile-buttons-height));
}

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

body {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #ffffff;
  background-color: var(--dark-bg-1);
  padding-top: var(--header-height-desktop); /* Desktop default */
}

/* Reusable container */
.header-container, .nav-container, .footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Neon Glow 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),
      inset 0 0 10px rgba(102, 126, 234, 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(118, 75, 162, 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(240, 147, 251, 0.3);
  }
}

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

/* Header Styles */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: linear-gradient(135deg, var(--dark-bg-1), var(--dark-bg-2));
}

/* Header Top Section (Logo + Buttons) */
.header-top {
  background: linear-gradient(135deg, var(--dark-bg-1), var(--dark-bg-2), var(--dark-bg-3));
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite;
  padding: 10px 0;
  min-height: var(--header-top-height-desktop);
  display: flex;
  align-items: center;
}

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

.logo {
  font-size: 24px;
  font-weight: bold;
  text-decoration: none;
  color: #ffffff;
  white-space: nowrap;
  animation: text-glow-flow 3s ease-in-out infinite alternate;
  /* Added for a subtle LED-like glow effect on the logo itself */
  filter: drop-shadow(0 0 5px var(--neon-primary)) drop-shadow(0 0 10px var(--neon-primary));
}

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

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

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

/* Main Navigation (Menu) */
.main-nav {
  background: linear-gradient(135deg, var(--dark-bg-2), var(--dark-bg-3), #0f3460);
  border-top: 2px solid;
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite reverse; /* Different animation direction */
  padding: 10px 0;
  min-height: var(--main-nav-height-desktop);
  display: flex; /* Desktop default: flex */
  flex-direction: row; /* Desktop default: row */
  align-items: center;
  position: static; /* Desktop default: static */
}

.main-nav .nav-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.nav-link {
  color: #ffffff;
  text-decoration: none;
  padding: 8px 15px;
  margin: 0 5px;
  font-weight: 500;
  transition: color 0.3s ease, text-shadow 0.3s ease;
  white-space: nowrap;
}

.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 (Mobile Only) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  position: relative;
  z-index: 1001; /* Above menu and overlay */
  animation: pulse-glow 2s ease-in-out infinite alternate, theme-colors 4s ease-in-out infinite; /* Dynamic glow */
  border-radius: 5px; /* For glow effect */
}

.hamburger-menu .bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  background-color: #ffffff;
  transition: all 0.3s ease-in-out;
}

.hamburger-menu.active .bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

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

.hamburger-menu.active .bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Mobile Nav Buttons (Hidden on desktop) */
.mobile-nav-buttons {
  display: none; /* Hidden on desktop */
}

/* Mobile Menu Overlay */
.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;
  backdrop-filter: blur(5px);
  transition: opacity 0.3s ease;
  opacity: 0;
}

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

/* Footer Styles */
.site-footer {
  background-color: #1a1a2e;
  color: #cccccc;
  padding: 40px 0 20px;
  font-size: 14px;
}

.footer-top-section .footer-container {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr); /* First column wider */
  gap: 30px;
  align-items: flex-start;
}

.footer-col h4 {
  color: #ffffff;
  font-size: 16px;
  margin-bottom: 15px;
  text-transform: uppercase;
}

.footer-about .footer-logo {
  font-size: 20px;
  font-weight: bold;
  color: #ffffff;
  text-decoration: none;
  display: block;
  margin-bottom: 10px;
}

.footer-description {
  line-height: 1.8;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

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

.payment-methods .payment-icons,
.game-providers-section .game-providers-icons,
.social-media-section .social-media-icons {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
}

.payment-methods .payment-icons img,
.game-providers-section .game-providers-icons img,
.social-media-section .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 */
}

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

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

.game-providers-section h4,
.social-media-section h4 {
  margin-bottom: 15px;
}

.footer-bottom-section {
  padding-top: 20px;
  text-align: center;
}

.footer-bottom-section p {
  color: #aaaaaa;
}

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

  .header-container, .nav-container, .footer-container {
    padding: 0 15px;
    width: 100%;
    max-width: none; /* Ensure full width on mobile */
  }

  /* Header Top Mobile Layout */
  .header-top .header-container {
    justify-content: space-between;
    display: flex;
    align-items: center;
    min-height: var(--header-top-height-desktop);
  }

  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    order: 1;
  }

  .logo {
    order: 2;
    flex-grow: 1;
    text-align: center;
    font-size: 20px;
    white-space: normal; /* Allow logo text to wrap */
    padding: 0 10px; /* Add some padding around the logo */
  }

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

  /* Mobile Nav Buttons */
  .mobile-nav-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 15px;
    background: linear-gradient(135deg, var(--dark-bg-3), #0f3460);
    border-top: 1px solid;
    border-bottom: 2px solid;
    animation: theme-colors 4s ease-in-out infinite;
    min-height: var(--mobile-buttons-height);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .mobile-nav-buttons .btn {
    flex: 1 1 auto; /* Allow buttons to grow/shrink */
    max-width: calc(100% - 20px); /* Max width to prevent overflow with padding/gap */
    min-width: 120px; /* Ensure a minimum size */
    font-size: 14px;
    padding: 10px 15px;
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word;
  }

  /* Main Navigation Mobile (Slide-out menu) */
  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column; /* Vertical menu */
    position: fixed;
    top: var(--header-height-mobile); /* Position below header and buttons */
    left: 0;
    width: 75%; /* Slide-out from left */
    height: calc(100% - var(--header-height-mobile));
    background: linear-gradient(180deg, var(--dark-bg-3), #0f3460);
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    transform: translateX(-100%); /* Initially off-screen */
    transition: transform 0.3s ease-in-out;
    z-index: 1000;
    border-right: 2px solid;
    animation: theme-colors 4s ease-in-out infinite reverse; /* Dynamic border */
  }

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

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

  .nav-link {
    width: 100%;
    padding: 12px 15px;
    margin: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

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

  /* Footer Mobile Layout */
  .footer-top-section .footer-container {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 30px;
  }

  .footer-about .footer-logo,
  .footer-description,
  .footer-col h4 {
    text-align: center;
  }
  
  .footer-col ul {
    padding: 0;
    text-align: center;
  }

  .payment-methods .payment-icons,
  .game-providers-section .game-providers-icons,
  .social-media-section .social-media-icons {
    justify-content: center; /* Center icons on mobile */
  }
}