:root {
  --primary-color: #0A2463;
  --secondary-color: #E1B12C;
  --neon-primary: var(--secondary-color, #E1B12C); /* Bright yellow/gold */
  --neon-secondary: #FF00FF; /* Vibrant pink */
  --neon-accent: #00FFFF; /* Bright cyan */
  --neon-dark-bg-1: #0a0a0a;
  --neon-dark-bg-2: #1a1a2e;
  --neon-dark-bg-3: #16213e;
  --header-height-desktop: 110px; /* header-top + main-nav */
  --header-height-mobile: 115px; /* header-top + mobile-nav-buttons */
}

/* Base styles */
body {
  font-family: 'Arial', sans-serif;
  margin: 0;
  padding-top: var(--header-height-desktop); /* Default padding for desktop */
  background-color: var(--neon-dark-bg-1);
  color: #c0c0c0;
  line-height: 1.6;
}

.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  color: #ffffff;
  animation: theme-colors 4s ease-in-out infinite; /* Apply dynamic color to header border */
}

.header-top,
.main-nav {
  width: 100%;
  box-sizing: border-box;
}

.header-top {
  background: linear-gradient(135deg, var(--neon-dark-bg-1), var(--neon-dark-bg-2));
  padding: 15px 0;
  border-bottom: 2px solid var(--neon-primary);
  box-shadow:
    0 0 10px var(--neon-primary),
    0 0 20px var(--neon-primary),
    0 0 30px var(--neon-primary),
    inset 0 0 15px rgba(255, 255, 255, 0.1);
}

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

.logo {
  font-size: 28px;
  font-weight: bold;
  text-decoration: none;
  color: #ffffff; /* Base color for glowing text */
  white-space: nowrap;
}

.neon-text-dynamic {
  animation: text-glow-flow 3s ease-in-out infinite alternate;
}

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

.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;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.main-nav {
  background: linear-gradient(135deg, var(--neon-dark-bg-2), var(--neon-dark-bg-3));
  padding: 10px 0;
  border-top: 2px solid var(--neon-accent);
  border-bottom: 2px solid var(--neon-accent);
  box-shadow:
    0 0 10px var(--neon-accent),
    0 0 20px var(--neon-accent),
    0 0 30px var(--neon-accent),
    inset 0 0 15px rgba(0, 255, 255, 0.1);
  display: flex; /* Desktop default */
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 25px;
  padding: 0 20px;
}

.nav-link {
  color: #c0c0c0;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  padding: 5px 0;
  transition: color 0.3s ease, text-shadow 0.3s ease;
  white-space: nowrap;
}

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

.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 10px;
  position: relative;
  z-index: 1001;
}

.hamburger-icon {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--neon-primary);
  border-radius: 2px;
  position: relative;
  transition: background-color 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: 100%;
  background-color: var(--neon-primary);
  border-radius: 2px;
  position: absolute;
  transition: transform 0.3s ease, background-color 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;
}

.hamburger-menu.active .hamburger-icon {
  background-color: transparent;
  box-shadow: none;
}

.hamburger-menu.active .hamburger-icon::before {
  transform: translateY(8px) rotate(45deg);
  background-color: var(--neon-accent);
  box-shadow: 0 0 5px var(--neon-accent), 0 0 10px var(--neon-accent);
}

.hamburger-menu.active .hamburger-icon::after {
  transform: translateY(-8px) rotate(-45deg);
  background-color: var(--neon-accent);
  box-shadow: 0 0 5px var(--neon-accent), 0 0 10px var(--neon-accent);
}

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

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

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

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

.footer-main,
.game-providers-section,
.social-media-section,
.footer-bottom {
  width: 100%;
  box-sizing: border-box;
}

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

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

.footer-col h4 {
  color: #ffffff;
  font-size: 18px;
  margin-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 10px;
}

.footer-logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--neon-primary);
  text-decoration: none;
  display: block;
  margin-bottom: 15px;
}

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

.footer-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

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

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

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

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

.payment-methods .payment-icons img,
.game-providers-icons img,
.social-media-icons img {
  max-height: 40px;
  height: auto;
  width: auto;
  object-fit: contain;
  filter: brightness(0.8) contrast(1.2);
  transition: filter 0.3s ease;
}

.payment-methods .payment-icons img:hover,
.game-providers-icons img:hover,
.social-media-icons img:hover {
  filter: brightness(1) contrast(1.5);
}

.game-providers-section,
.social-media-section {
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 20px;
}

.game-providers-section h4,
.social-media-section h4 {
  color: #ffffff;
  font-size: 18px;
  margin-bottom: 15px;
  text-align: center;
}

.game-providers-section .game-providers-icons,
.social-media-section .social-media-icons {
  justify-content: center;
}

.footer-bottom {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.footer-bottom .copyright {
  color: #888;
  font-size: 13px;
}

/* Dynamic Neon Color Animations */
@keyframes text-glow-flow {
  0% {
    text-shadow:
      0 0 5px var(--neon-primary, #E1B12C),
      0 0 10px var(--neon-primary, #E1B12C),
      0 0 15px var(--neon-primary, #E1B12C);
    color: #ffffff;
  }
  33% {
    text-shadow:
      0 0 5px var(--neon-secondary, #FF00FF),
      0 0 10px var(--neon-secondary, #FF00FF),
      0 0 15px var(--neon-secondary, #FF00FF);
    color: #ffffff;
  }
  66% {
    text-shadow:
      0 0 5px var(--neon-accent, #00FFFF),
      0 0 10px var(--neon-accent, #00FFFF),
      0 0 15px var(--neon-accent, #00FFFF);
    color: #ffffff;
  }
  100% {
    text-shadow:
      0 0 5px var(--neon-primary, #E1B12C),
      0 0 10px var(--neon-primary, #E1B12C),
      0 0 15px var(--neon-primary, #E1B12C);
    color: #ffffff;
  }
}

@keyframes theme-colors {
  0%, 100% {
    border-color: var(--neon-primary, #E1B12C);
    box-shadow:
      0 0 10px var(--neon-primary, #E1B12C),
      0 0 20px var(--neon-primary, #E1B12C),
      inset 0 0 10px rgba(225, 177, 44, 0.3);
  }
  33% {
    border-color: var(--neon-secondary, #FF00FF);
    box-shadow:
      0 0 10px var(--neon-secondary, #FF00FF),
      0 0 20px var(--neon-secondary, #FF00FF),
      inset 0 0 10px rgba(255, 0, 255, 0.3);
  }
  66% {
    border-color: var(--neon-accent, #00FFFF);
    box-shadow:
      0 0 10px var(--neon-accent, #00FFFF),
      0 0 20px var(--neon-accent, #00FFFF),
      inset 0 0 10px rgba(0, 255, 255, 0.3);
  }
}

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

  .site-header {
    flex-direction: column;
  }

  .header-top {
    padding: 10px 0;
  }

  .header-container {
    padding: 0 15px;
    justify-content: space-between;
    position: relative; /* For logo centering */
  }

  .hamburger-menu {
    display: block;
    order: 1;
    flex-shrink: 0;
  }

  .logo {
    order: 2;
    flex-grow: 1;
    text-align: center;
    font-size: 24px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 100px); /* Adjust width to not overlap hamburger */
    white-space: normal; /* Allow logo text to wrap */
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .desktop-nav-buttons {
    display: none;
  }

  .mobile-nav-buttons {
    display: flex !important; /* Always visible on mobile */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px;
    gap: 10px;
    justify-content: center;
    background: linear-gradient(135deg, var(--neon-dark-bg-2), var(--neon-dark-bg-3));
    border-bottom: 2px solid var(--neon-accent);
    box-shadow:
      0 0 5px var(--neon-accent),
      0 0 10px var(--neon-accent);
    flex-wrap: nowrap; /* Ensure buttons stay in one line */
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* Max width for two buttons with gap */
    padding: 8px 12px;
    font-size: 13px;
    text-align: center;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column;
    position: fixed;
    top: var(--header-height-mobile); /* Position below header and mobile buttons */
    left: 0;
    width: 280px;
    height: calc(100% - var(--header-height-mobile));
    background: var(--neon-dark-bg-3);
    transform: translateX(-100%); /* Start off-screen */
    transition: transform 0.3s ease-out;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    z-index: 1000; /* Ensure it's above overlay */
    border-right: 2px solid var(--neon-accent);
  }

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

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

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

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

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

  .footer-col h4,
  .game-providers-section h4,
  .social-media-section h4 {
    text-align: left;
  }

  .game-providers-section .game-providers-icons,
  .social-media-section .social-media-icons {
    justify-content: flex-start;
  }

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

/* Global no-scroll for body when menu is open */
body.no-scroll {
  overflow: hidden;
}
