:root {
  --site-primary-color: #FFD700; /* Gold */
  --site-secondary-color: #000080; /* Navy */

  --neon-primary: var(--site-primary-color); /* #FFD700 */
  --neon-secondary: #00FFFF; /* Cyan */
  --neon-accent: #FF1493; /* Deep Pink */

  --dark-bg-1: #0a0a0a;
  --dark-bg-2: #1a1a2e;
  --dark-bg-3: #16213e;

  --header-top-height-desktop: 65px; /* Estimated height */
  --main-nav-height-desktop: 50px; /* Estimated height */
  --header-height-desktop: calc(var(--header-top-height-desktop) + var(--main-nav-height-desktop));

  --header-top-height-mobile: 60px;
  --mobile-buttons-height: 60px; /* Estimated height for mobile buttons area */
  --header-height-mobile: calc(var(--header-top-height-mobile) + var(--mobile-buttons-height) + 10px); /* Add some padding for the buttons area */
}

/* 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: #f0f0f0;
  background-color: var(--dark-bg-1);
  padding-top: var(--header-height-desktop); /* Default for desktop, adjusted by JS for exact height if needed */
  transition: padding-top 0.3s ease;
}

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

ul {
  list-style: none;
}

/* Dynamic Neon Color Animations */
@keyframes theme-colors {
  0%, 100% {
    border-color: var(--neon-primary);
    box-shadow:
      0 0 8px var(--neon-primary),
      0 0 15px var(--neon-primary),
      0 0 25px var(--neon-primary),
      inset 0 0 5px rgba(255, 255, 255, 0.1);
  }
  33% {
    border-color: var(--neon-secondary);
    box-shadow:
      0 0 8px var(--neon-secondary),
      0 0 15px var(--neon-secondary),
      0 0 25px var(--neon-secondary),
      inset 0 0 5px rgba(255, 255, 255, 0.1);
  }
  66% {
    border-color: var(--neon-accent);
    box-shadow:
      0 0 8px var(--neon-accent),
      0 0 15px var(--neon-accent),
      0 0 25px var(--neon-accent),
      inset 0 0 5px rgba(255, 255, 255, 0.1);
  }
}

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

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

/* Header Styles (Desktop First) */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  min-height: var(--header-height-desktop);
}

.header-top {
  background: linear-gradient(135deg, var(--dark-bg-1), var(--dark-bg-2));
  padding: 10px 0;
  border-bottom: 2px solid;
  animation: theme-colors 4s ease-in-out infinite;
  position: relative;
  min-height: var(--header-top-height-desktop);
  display: flex; /* Ensure it's a flex container for its content */
  align-items: center;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 25px; /* Padding for logo and buttons from container edges */
}

.logo {
  font-size: 2.2em;
  font-weight: bold;
  color: #fff;
  text-transform: uppercase;
  animation: text-glow-flow 3s ease-in-out infinite alternate;
  flex-shrink: 0; /* Prevent logo from shrinking */
  padding: 5px 0;
}

.desktop-nav-buttons {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

.btn {
  position: relative;
  background: linear-gradient(135deg, var(--neon-primary), var(--neon-secondary));
  padding: 10px 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 */
}

.btn:hover {
  animation-duration: 2s;
  transform: translateY(-2px);
  background: linear-gradient(135deg, var(--neon-secondary), var(--neon-accent));
  text-shadow:
    0 0 5px #ffffff,
    0 0 10px var(--neon-secondary);
}

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

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

.nav-link {
  font-size: 1.1em;
  font-weight: 500;
  color: #f0f0f0;
  padding: 8px 12px;
  transition: color 0.3s ease, text-shadow 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--neon-primary);
  text-shadow: 0 0 8px var(--neon-primary), 0 0 15px var(--neon-primary, rgba(255,255,255,0.7));
}

/* Hamburger menu for mobile */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  cursor: pointer;
  width: 30px;
  height: 25px;
  position: relative;
  z-index: 1002;
  transition: all 0.3s ease;
  animation: hue-spin 4s linear infinite; /* Dynamic color for hamburger */
}

.hamburger-menu .bar {
  width: 100%;
  height: 3px;
  background-color: currentColor; /* Use current color for dynamic effect */
  border-radius: 2px;
  position: absolute;
  transition: all 0.3s ease;
}

.hamburger-menu .bar:nth-child(1) { top: 0; }
.hamburger-menu .bar:nth-child(2) { top: 11px; }
.hamburger-menu .bar:nth-child(3) { top: 22px; }

.hamburger-menu.active .bar:nth-child(1) {
  transform: translateY(11px) rotate(45deg);
}
.hamburger-menu.active .bar:nth-child(2) {
  opacity: 0;
}
.hamburger-menu.active .bar:nth-child(3) {
  transform: translateY(-11px) rotate(-45deg);
}

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

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

.mobile-buttons-area {
  display: none; /* Hidden on desktop */
  background: linear-gradient(135deg, var(--dark-bg-1), var(--dark-bg-2));
  padding: 10px 15px;
  width: 100%;
  justify-content: center;
  align-items: center;
  gap: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 5px 15px rgba(0,0,0,0.5);
  position: relative;
  min-height: var(--mobile-buttons-height);
}

/* Footer Styles */
.site-footer {
  background-color: var(--dark-bg-2);
  color: #c0c0c0;
  padding: 40px 0 20px;
  font-size: 0.9em;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-main {
  padding-bottom: 30px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 25px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.footer-col h4 {
  color: #fff;
  font-size: 1.2em;
  margin-bottom: 20px;
  position: relative;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 40px;
  height: 2px;
  background-color: var(--neon-primary);
}

.footer-logo {
  font-size: 1.8em;
  font-weight: bold;
  color: var(--neon-primary);
  margin-bottom: 15px;
  display: block;
  text-transform: uppercase;
}

.footer-description {
  line-height: 1.6;
  word-wrap: break-word;
  overflow-wrap: break-word;
  margin-top: 15px;
}

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

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

.footer-nav a:hover {
  color: var(--neon-primary);
}

.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;
  filter: grayscale(100%) brightness(150%); /* Make icons fit dark theme */
  transition: filter 0.3s ease;
}

.payment-methods .payment-icons img:hover,
.game-providers-section .game-providers-icons img:hover,
.social-media-section .social-media-icons img:hover {
  filter: grayscale(0%) brightness(100%); /* Colorize on hover */
}

.footer-mid-sections {
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 25px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.game-providers-section h4,
.social-media-section h4 {
  color: #fff;
  font-size: 1.2em;
  margin-bottom: 15px;
  position: relative;
}

.game-providers-section h4::after,
.social-media-section h4::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 40px;
  height: 2px;
  background-color: var(--neon-primary);
}

.footer-bottom {
  background-color: var(--dark-bg-3);
  padding: 15px 0;
  text-align: center;
  color: #999;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .nav-container {
    gap: 15px;
    padding: 0 15px;
  }
  .nav-link {
    font-size: 1em;
    padding: 6px 10px;
  }
}

@media (max-width: 768px) {
  body {
    padding-top: var(--header-height-mobile); /* Adjusted for mobile header + buttons */
  }

  .site-header {
    min-height: var(--header-height-mobile);
  }

  .header-top {
    min-height: var(--header-top-height-mobile);
    padding: 5px 0;
  }

  .header-container {
    padding: 0 15px;
    justify-content: space-between;
  }

  .logo {
    font-size: 1.8em;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    padding: 0;
  }

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

  .hamburger-menu {
    display: block; /* Show hamburger menu */
    order: -1; /* Place hamburger to the left */
    margin-right: auto; /* Push logo to center */
    filter: brightness(1.5); /* Make it pop */
  }

  .main-nav {
    display: none; /* Mobile default: hidden */
    flex-direction: column; /* Mobile: vertical menu */
    position: fixed;
    top: var(--header-top-height-mobile); /* Position below header-top */
    left: 0;
    width: 70%;
    height: calc(100% - var(--header-top-height-mobile)); /* Full height below header-top */
    background: linear-gradient(180deg, var(--dark-bg-3), var(--dark-bg-1));
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%); /* Off-screen by default */
    transition: transform 0.3s ease-in-out;
    z-index: 999;
    border: none;
  }

  .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;
    width: 100%;
    max-width: none; /* Ensure full width on mobile */
  }

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

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

  .mobile-buttons-area {
    display: flex; /* Show mobile buttons */
    position: sticky;
    top: var(--header-top-height-mobile);
    z-index: 990; /* Below main-nav */
    padding: 10px 15px;
  }

  .footer-container {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .footer-col.footer-about {
    order: -1; /* Place about section first on mobile */
  }

  .footer-col h4,
  .game-providers-section h4,
  .social-media-section h4 {
    text-align: center;
  }
  
  .footer-col h4::after,
  .game-providers-section h4::after,
  .social-media-section h4::after {
    left: 50%;
    transform: translateX(-50%);
  }
  
  .payment-methods .payment-icons,
  .game-providers-section .game-providers-icons,
  .social-media-section .social-media-icons {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .logo {
    font-size: 1.5em;
  }
  .btn {
    padding: 8px 18px;
    font-size: 0.9em;
  }
  .mobile-buttons-area {
    flex-wrap: wrap;
  }
}
