:root {
  --primary-site-color: #1A73E8;
  --secondary-site-color: #FFD700;

  /* Neon palette derived from site colors and general vibrant neon */
  --neon-base-1: #667eea; /* Vibrant blue-purple */
  --neon-base-2: #764ba2; /* Vibrant purple */
  --neon-base-3: #f093fb; /* Vibrant pink */
  --neon-base-4: #00ffff; /* Cyan */
  --neon-base-5: #ff00ff; /* Magenta */
  --neon-base-6: #ffff00; /* Yellow */
  --neon-base-7: #ff0000; /* Red */

  /* Dynamic colors for animations, intelligently chosen */
  --neon-primary-dynamic: var(--neon-base-1);
  --neon-secondary-dynamic: var(--neon-base-4);
  --neon-accent-dynamic: var(--neon-base-6);

  /* Header heights for mobile content padding */
  --header-top-height-desktop: 70px; /* Adjust as needed */
  --main-nav-height-desktop: 50px; /* Adjust as needed */
  --header-top-height-mobile: 60px; /* Adjust as needed */
  --mobile-buttons-height: 60px; /* Adjust as needed */
  --header-height-mobile: calc(var(--header-top-height-mobile) + var(--mobile-buttons-height));
}

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #e0e0e0;
  background-color: #0a0a0a; /* Dark background */
  padding-top: calc(var(--header-top-height-desktop) + var(--main-nav-height-desktop)); /* Desktop padding */
}

/* Animations for dynamic neon effects */
@keyframes rainbow-border {
  0% { border-color: var(--neon-base-7); box-shadow: 0 0 10px var(--neon-base-7), 0 0 20px var(--neon-base-7); }
  16.6% { border-color: var(--neon-base-3); box-shadow: 0 0 10px var(--neon-base-3), 0 0 20px var(--neon-base-3); }
  33.3% { border-color: var(--neon-base-6); box-shadow: 0 0 10px var(--neon-base-6), 0 0 20px var(--neon-base-6); }
  50% { border-color: var(--neon-base-4); box-shadow: 0 0 10px var(--neon-base-4), 0 0 20px var(--neon-base-4); }
  66.6% { border-color: var(--neon-base-1); box-shadow: 0 0 10px var(--neon-base-1), 0 0 20px var(--neon-base-1); }
  83.3% { border-color: var(--neon-base-5); box-shadow: 0 0 10px var(--neon-base-5), 0 0 20px var(--neon-base-5); }
  100% { border-color: var(--neon-base-7); box-shadow: 0 0 10px var(--neon-base-7), 0 0 20px var(--neon-base-7); }
}

@keyframes hue-spin {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

@keyframes alternate-colors {
  0% { border-color: var(--neon-primary-dynamic); box-shadow: 0 0 10px var(--neon-primary-dynamic), 0 0 20px var(--neon-primary-dynamic); }
  100% { border-color: var(--neon-secondary-dynamic); box-shadow: 0 0 10px var(--neon-secondary-dynamic), 0 0 20px var(--neon-secondary-dynamic); }
}

@keyframes gradient-flow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes random-glow {
  0% { border-color: var(--neon-base-5); box-shadow: 0 0 20px var(--neon-base-5); }
  20% { border-color: var(--neon-base-4); box-shadow: 0 0 20px var(--neon-base-4); }
  40% { border-color: var(--neon-base-6); box-shadow: 0 0 20px var(--neon-base-6); }
  60% { border-color: var(--neon-base-7); box-shadow: 0 0 20px var(--neon-base-7); }
  80% { border-color: var(--neon-base-1); box-shadow: 0 0 20px var(--neon-base-1); }
  100% { border-color: var(--neon-base-5); box-shadow: 0 0 20px var(--neon-base-5); }
}

@keyframes theme-colors {
  0%, 100% {
    border-color: var(--neon-base-1);
    box-shadow: 0 0 10px var(--neon-base-1), 0 0 20px var(--neon-base-1), inset 0 0 10px rgba(102, 126, 234, 0.3);
  }
  33% {
    border-color: var(--neon-base-2);
    box-shadow: 0 0 10px var(--neon-base-2), 0 0 20px var(--neon-base-2), inset 0 0 10px rgba(118, 75, 162, 0.3);
  }
  66% {
    border-color: var(--neon-base-3);
    box-shadow: 0 0 10px var(--neon-base-3), 0 0 20px var(--neon-base-3), 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-base-1), 0 0 10px var(--neon-base-1), 0 0 15px var(--neon-base-1);
    color: #ffffff;
  }
  50% {
    text-shadow: 0 0 5px var(--neon-base-4), 0 0 10px var(--neon-base-4), 0 0 15px var(--neon-base-4);
    color: #ffffff;
  }
  100% {
    text-shadow: 0 0 5px var(--neon-base-6), 0 0 10px var(--neon-base-6), 0 0 15px var(--neon-base-6);
    color: #ffffff;
  }
}

/* Header styles */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
  display: flex;
  flex-direction: column;
  color: #ffffff;
}

.header-top {
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite;
  padding: 10px 0;
  min-height: var(--header-top-height-desktop);
}

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

.logo {
  font-size: 2.2em;
  font-weight: bold;
  text-decoration: none;
  color: #ffffff;
  letter-spacing: 2px;
  animation: text-glow-flow 3s ease-in-out infinite alternate;
  transition: all 0.3s ease;
  display: block; /* Ensure logo is displayed */
}

.logo:hover {
  filter: brightness(1.2);
}

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

.btn {
  position: relative;
  background: linear-gradient(135deg, var(--neon-base-1), var(--neon-base-2));
  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-base-1);
  transition: all 0.3s ease;
  font-weight: bold;
  cursor: pointer;
  white-space: nowrap; /* Prevent text wrapping on desktop */
}

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

.main-nav {
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
  border-top: 2px solid;
  border-bottom: 2px solid;
  animation: rainbow-border 6s linear infinite;
  padding: 10px 0;
  min-height: var(--main-nav-height-desktop);
  display: flex; /* Desktop default: flex */
  flex-direction: row; /* Desktop default: row */
  justify-content: center;
  align-items: center;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  flex-wrap: wrap; /* Allow menu items to wrap if screen is too narrow */
}

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

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

.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1001;
  position: relative;
  animation: theme-colors 4s ease-in-out infinite;
  border-radius: 5px;
}

.hamburger-line {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--neon-base-6);
  margin: 5px 0;
  transition: all 0.3s ease-in-out;
  box-shadow: 0 0 5px var(--neon-base-6), 0 0 10px var(--neon-base-6);
}

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

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

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

.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;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

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

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

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

.footer-top-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-bottom: 30px;
}

.footer-col h4 {
  color: #ffffff;
  margin-bottom: 15px;
  font-size: 1.1em;
}

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

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

.footer-nav {
  list-style: none;
}

.footer-nav li a {
  color: #cccccc;
  text-decoration: none;
  display: block;
  padding: 5px 0;
  transition: color 0.3s ease;
}

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

.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;
  filter: brightness(0.8) grayscale(0.2); /* Subtle effect for footer icons */
  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;
  padding-top: 20px;
  border-top: 1px solid #33334d;
}

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

.footer-bottom {
  text-align: center;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #33334d;
  color: #999999;
}

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

  .header-container, .nav-container, .footer-container {
    width: 100%;
    max-width: none;
    padding: 0 15px;
  }

  .header-top {
    min-height: var(--header-top-height-mobile);
    display: flex;
    align-items: center;
    justify-content: space-between; /* Adjusted for hamburger */
  }

  .header-container {
    justify-content: space-between; /* Logo and hamburger */
    flex-grow: 1; /* Allow container to grow to fill space */
  }

  .logo {
    order: 2; /* Move logo to center */
    flex-grow: 1;
    text-align: center;
    font-size: 1.8em;
  }

  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    order: 1; /* Place hamburger first */
    margin-left: -10px; /* Adjust to align with edge */
  }

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

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column; /* Vertical menu */
    position: fixed;
    top: var(--header-height-mobile);
    left: 0;
    width: 70%; /* Adjust menu width */
    height: calc(100% - var(--header-height-mobile));
    background: linear-gradient(180deg, #1a1a2e, #0a0a0a);
    border-right: 2px solid;
    animation: theme-colors 4s ease-in-out infinite;
    padding-top: 20px;
    transform: translateX(-100%); /* Start off-screen */
    transition: transform 0.3s ease-in-out;
    z-index: 1000; /* Ensure menu is above overlay */
    overflow-y: auto; /* Enable scrolling for long menus */
  }

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

  .nav-container {
    flex-direction: column;
    padding: 0;
  }

  .nav-link {
    width: 100%;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
    font-size: 1em;
  }

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

  .mobile-nav-buttons {
    display: flex; /* Show mobile buttons */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px;
    background-color: #111;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    border-bottom: 2px solid;
    animation: alternate-colors 3s ease-in-out infinite;
  }

  .mobile-nav-buttons .btn {
    flex: 1 1 auto; /* Allow buttons to grow/shrink */
    max-width: calc(100% - 20px); /* Account for gap and padding */
    min-width: 120px; /* Minimum width for buttons */
    font-size: 0.9em;
    padding: 10px 15px;
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .footer-top-grid {
    grid-template-columns: 1fr;
  }

  .footer-col {
    margin-bottom: 20px;
  }

  .footer-col:last-child {
    margin-bottom: 0;
  }

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

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

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

  .footer-nav li a {
    padding: 8px 0;
  }
}
