/* Universal box-sizing and basic reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #c0c0c0; /* Light grey for general text on dark background */
  background-color: #0a0a0a; /* Dark background */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Base site colors for smart adaptation */
:root {
  --primary-site-color: #003366;
  --secondary-site-color: #FFD700;

  /* Neon palette - intelligent choices based on site colors */
  --neon-primary: #00FFFF; /* Cyan */
  --neon-secondary: #FF00FF; /* Magenta */
  --neon-accent: #FFFF00; /* Yellow */
  --neon-dark-bg: #0a0a0a;
  --neon-dark-bg-light: #1a1a2e;
  --neon-dark-bg-lighter: #16213e;
}

/* Animations for dynamic colors and glows */
@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%; 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 8px var(--neon-primary),
      0 0 16px var(--neon-primary),
      inset 0 0 8px rgba(0, 255, 255, 0.3);
  }
  33% {
    border-color: var(--neon-secondary);
    box-shadow:
      0 0 8px var(--neon-secondary),
      0 0 16px var(--neon-secondary),
      inset 0 0 8px rgba(255, 0, 255, 0.3);
  }
  66% {
    border-color: var(--neon-accent);
    box-shadow:
      0 0 8px var(--neon-accent),
      0 0 16px var(--neon-accent),
      inset 0 0 8px rgba(255, 255, 0, 0.3);
  }
}

@keyframes neon-flicker {
  0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% { opacity: 1; text-shadow: 0 0 5px currentColor, 0 0 10px currentColor, 0 0 15px currentColor; }
  20%, 24%, 55% { opacity: 0.8; text-shadow: 0 0 3px currentColor, 0 0 6px currentColor, 0 0 9px 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 (Desktop First) */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  min-height: 80px; /* Adjust as needed */
  display: flex; /* Flex container for header-top and main-nav */
  flex-direction: column; /* Stacks header-top and main-nav vertically */
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5); /* General shadow for fixed header */
}

/* Header Top Area - Neon Style */
.header-top {
  background: linear-gradient(135deg, var(--neon-dark-bg), var(--neon-dark-bg-light));
  padding: 15px 0; /* Vertical padding */
  border-bottom: 2px solid; /* For neon border effect */
  animation: theme-colors 4s ease-in-out infinite alternate; /* Dynamic border color */
  box-shadow:
    0 0 10px var(--neon-primary), /* Strong glow effect */
    0 0 20px var(--neon-primary),
    inset 0 0 10px rgba(255, 255, 255, 0.1); /* Inner glow */
  position: relative;
  z-index: 1001; /* Ensure header-top is above main-nav in z-index */
}

/* Header Container for max-width and centering */
.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px; /* Padding from container edges */
}

/* Logo Styles - Neon Text */
.logo {
  font-family: 'Electrolize', sans-serif; /* A cyberpunk-ish font */
  font-size: 2.5em;
  font-weight: bold;
  text-decoration: none;
  color: #ffffff; /* Base color for glow */
  white-space: nowrap;
  animation: text-glow-flow 3s ease-in-out infinite alternate, neon-flicker 2s infinite alternate; /* Dynamic glow + flicker */
}

/* Desktop Navigation Buttons */
.desktop-nav-buttons {
  display: flex;
  gap: 15px; /* Spacing between buttons */
  align-items: center;
}

/* Button Styles - Neon Gradient & Glow */
.btn {
  position: relative;
  padding: 12px 25px;
  color: #ffffff;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  overflow: hidden;
  transition: all 0.3s ease;
  background: linear-gradient(135deg, var(--neon-primary), var(--neon-secondary)); /* Vibrant gradient background */
  border: 2px solid;
  animation: theme-colors 4s ease-in-out infinite; /* Dynamic border color */
  text-shadow:
    0 0 5px #ffffff,
    0 0 10px var(--neon-primary);
}

.btn:hover {
  animation-duration: 2s; /* Speed up glow on hover */
  transform: translateY(-2px);
  filter: brightness(1.2); /* Slightly brighter on hover */
  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 Area */
.main-nav {
  background: linear-gradient(135deg, var(--neon-dark-bg-light), var(--neon-dark-bg-lighter)); /* Slightly different dark background */
  padding: 10px 0;
  border-top: 2px solid; /* For neon border effect */
  border-bottom: 2px solid; /* For neon border effect */
  animation: alternate-colors 5s ease-in-out infinite; /* Different dynamic border color */
  box-shadow:
    0 0 8px var(--neon-secondary), /* Strong glow effect */
    0 0 16px var(--neon-secondary),
    inset 0 0 8px rgba(255, 0, 255, 0.1);
  display: flex; /* Desktop default: flex to show menu */
  flex-direction: row; /* Desktop default: horizontal */
  justify-content: center; /* Center menu items */
  align-items: center;
  position: static; /* Desktop default: static */
  z-index: 999; /* Below header-top */
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  flex-wrap: wrap; /* Allow wrapping on smaller desktop screens */
}

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

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

/* Hamburger Menu (Hidden on Desktop) */
.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1002; /* Above everything for clickability */
  position: relative;
}

.hamburger-menu .bar {
  display: block;
  width: 30px;
  height: 3px;
  background-color: var(--neon-primary);
  margin: 6px 0;
  transition: all 0.3s ease;
  box-shadow: 0 0 5px var(--neon-primary), 0 0 10px var(--neon-primary); /* Neon glow for bars */
}

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

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

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

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

/* Mobile Menu Overlay (Hidden on Desktop) */
.mobile-menu-overlay {
  display: none; /* Hidden by default on desktop */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 998; /* Below menu, above content */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

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


/* Footer Styles */
.site-footer {
  background-color: #1a1a2e; /* Dark background, no neon */
  color: #c0c0c0;
  padding: 40px 0 20px;
  font-size: 0.9em;
  border-top: 1px solid #333;
}

.site-footer h4 {
  color: #FFD700; /* Gold color for headings */
  margin-bottom: 15px;
  font-size: 1.2em;
}

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

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

.footer-top .footer-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 columns for desktop */
  gap: 30px;
}

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

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  color: #c0c0c0;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-col ul li a:hover {
  color: #FFD700; /* Gold hover color */
}

.footer-logo {
  font-size: 1.8em;
  font-weight: bold;
  color: #FFD700; /* Gold for footer logo */
  text-decoration: none;
  display: block;
  margin-bottom: 15px;
}

.footer-description {
  line-height: 1.6;
  word-wrap: break-word; /* Ensure full text display */
  overflow-wrap: break-word;
}

.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 icons */
  width: 100%;
}

.payment-icons img, .game-providers-icons img, .social-media-icons img {
  max-height: 50px; /* Consistent icon size */
  height: auto;
  width: auto;
  filter: grayscale(100%) brightness(150%); /* Make icons fit dark theme */
  transition: filter 0.3s ease;
}
.payment-icons img:hover, .game-providers-icons img:hover, .social-media-icons img:hover {
  filter: grayscale(0%) brightness(100%); /* Color on hover */
}

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

.footer-middle .footer-container > div {
  margin-bottom: 25px; /* Spacing between game providers and social media */
}

.footer-middle .footer-container > div:last-child {
  margin-bottom: 0;
}

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

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

/* Responsive Styles for Mobile */
@media (max-width: 768px) {
  /* Header Mobile */
  .site-header {
    min-height: auto; /* Allow height to adjust */
  }

  /* Header Top Area - Adjust for mobile */
  .header-top {
    padding: 10px 0;
    flex-direction: column; /* Stack logo and buttons vertically */
    border-bottom: none; /* Remove bottom border for better flow */
    animation: none; /* Disable dynamic border animation on mobile for simplicity */
    box-shadow: none; /* Disable strong glow on mobile for simplicity */
  }

  .header-container {
    padding: 0 15px; /* Smaller padding */
    justify-content: space-between;
    flex-wrap: nowrap; /* Prevent logo from wrapping */
    width: 100%; /* Ensure container fills width */
    max-width: none; /* Crucial: no max-width on mobile */
  }

  .logo {
    order: 2; /* Center logo */
    flex-grow: 1; /* Allow logo to take available space for centering */
    text-align: center;
    font-size: 2em; /* Smaller font size for mobile */
    animation: text-glow-flow 3s ease-in-out infinite alternate; /* Keep dynamic text glow */
  }

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

  .hamburger-menu {
    display: block; /* Show hamburger menu on mobile */
    order: 1; /* Place hamburger on the left */
    margin-right: auto; /* Push logo to center */
    color: var(--neon-primary); /* Use neon color */
    animation: pulse-glow 2s ease-in-out infinite alternate; /* Pulse glow for hamburger */
  }

  /* Mobile Navigation Buttons - Show on mobile, below logo */
  .mobile-nav-buttons {
    display: flex; /* Show on mobile */
    justify-content: center;
    gap: 10px;
    padding: 10px 15px;
    width: 100%; /* Occupy full width */
    background-color: var(--neon-dark-bg-light); /* Dark background */
    border-top: 1px solid var(--neon-primary); /* Subtle border */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3); /* Shadow for separation */
    z-index: 1000; /* Ensure it's above content */
  }

  .mobile-nav-buttons .btn {
    padding: 10px 20px; /* Smaller buttons */
    font-size: 0.9em;
  }

  /* Main Navigation (Mobile Menu) - Hidden by default, slides in */
  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column; /* Vertical stacking */
    position: fixed; /* Fixed position for mobile menu */
    top: 0; /* Will be adjusted by JS to be below header-top and mobile-nav-buttons */
    left: 0;
    width: 70%; /* Occupy part of the screen */
    height: 100%; /* Full height */
    background: var(--neon-dark-bg-lighter); /* Darker background for menu */
    padding-top: 0; /* Will be set dynamically by JS */
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%); /* Start off-screen to the left */
    transition: transform 0.3s ease-out; /* Smooth slide animation */
    border-top: none; /* Remove border for mobile menu */
    border-bottom: none;
    animation: none; /* Disable dynamic border animation on mobile menu */
    z-index: 999; /* Below overlay */
    overflow-y: auto; /* Enable scrolling for long menus */
  }

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

  .nav-container {
    flex-direction: column; /* Stack links vertically */
    padding: 20px 15px;
    width: 100%; /* Occupy full width */
    max-width: none; /* Crucial: no max-width on mobile */
    align-items: flex-start; /* Align links to the left */
  }

  .nav-link {
    width: 100%; /* Full width links */
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Separator */
    font-size: 1em;
  }

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

  /* Content area protection for fixed header and buttons */
  body {
    padding-top: 0; /* Will be set dynamically by JS */
  }
  body.no-scroll {
    overflow: hidden;
  }

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

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

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

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

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

/* Acrylic material effect (optional, can apply to specific elements) */
.acrylic-effect {
  background-color: rgba(255, 255, 255, 0.1); /* Semi-transparent white */
  backdrop-filter: blur(10px); /* Blur background */
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
}