:root {
  --primary-color: #FFD700; /* Gold */
  --secondary-color: #000080; /* Navy */
  --neon-yellow: #FFFF00;
  --neon-red: #FF0000;
  --neon-cyan: #00FFFF;
  --neon-magenta: #FF00FF;
  --dark-bg-1: #0a0a0a;
  --dark-bg-2: #1a1a2e;
  --dark-bg-3: #16213e;
  --text-color: #ffffff;
  --text-dim-color: #bbbbbb;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--dark-bg-1);
  overflow-x: hidden;
}

body.no-scroll {
  overflow: hidden;
}

/* Shared Container Styles */
.header-container, .nav-container, .footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%; /* Default for desktop, will be overridden for mobile max-width */
}

/* Site Header - Fixed, Neon Style */
.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 - Logo & Buttons */
.header-top {
  background: linear-gradient(135deg, var(--dark-bg-1), var(--dark-bg-2), var(--dark-bg-3));
  border-bottom: 2px solid var(--neon-yellow);
  box-shadow: 
    0 0 10px var(--neon-yellow),
    0 0 20px var(--neon-yellow),
    0 0 30px var(--neon-yellow),
    inset 0 0 20px rgba(255, 255, 0, 0.1);
  padding: 10px 0;
}

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

.logo {
  color: var(--neon-yellow);
  font-size: 2.2em;
  font-weight: bold;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 
    0 0 5px var(--neon-yellow),
    0 0 10px var(--neon-yellow),
    0 0 15px var(--neon-yellow),
    0 0 20px rgba(255, 255, 0, 0.5);
  animation: neon-glow-logo 2s ease-in-out infinite alternate;
  display: block; /* Ensure visibility */
}

@keyframes neon-glow-logo {
  from {
    text-shadow: 
      0 0 5px var(--neon-yellow),
      0 0 10px var(--neon-yellow),
      0 0 15px var(--neon-yellow);
  }
  to {
    text-shadow: 
      0 0 10px var(--neon-yellow),
      0 0 20px var(--neon-yellow),
      0 0 30px var(--neon-yellow),
      0 0 40px var(--neon-yellow);
  }
}

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

/* Buttons - Neon Style with Edge Running Effect */
.btn {
  position: relative;
  background: linear-gradient(135deg, var(--neon-red), var(--neon-magenta));
  border: 2px solid var(--neon-red);
  padding: 12px 25px;
  color: var(--text-color);
  text-decoration: none;
  border-radius: 5px;
  box-shadow: 
    0 0 10px var(--neon-red),
    0 0 20px var(--neon-magenta),
    inset 0 0 10px rgba(255, 0, 0, 0.3);
  text-shadow: 
    0 0 5px var(--text-color),
    0 0 10px var(--neon-red);
  overflow: hidden;
  z-index: 1;
  isolation: isolate; /* Creates new stacking context */
  transition: all 0.3s ease;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn > * {
  position: relative;
  z-index: 2;
}

/* Neon edge running effect - First light */
.btn::before {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  background: conic-gradient(
    from 0deg at 50% 50%,
    transparent 0deg,
    var(--neon-cyan) 60deg,
    transparent 120deg,
    var(--neon-cyan) 180deg,
    transparent 240deg,
    var(--neon-cyan) 300deg,
    transparent 360deg
  );
  border-radius: 8px;
  animation: rotate-border 2s linear infinite;
  z-index: -1;
  pointer-events: none;
  filter: blur(1px);
  box-shadow: 
    0 0 10px var(--neon-cyan),
    0 0 20px var(--neon-cyan);
}

/* Neon edge running effect - Second light */
.btn::after {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  background: conic-gradient(
    from 180deg at 50% 50%,
    transparent 0deg,
    var(--neon-magenta) 60deg,
    transparent 120deg,
    var(--neon-magenta) 180deg,
    transparent 240deg,
    var(--neon-magenta) 300deg,
    transparent 360deg
  );
  border-radius: 8px;
  animation: rotate-border 2s linear infinite;
  animation-delay: -1s;
  z-index: -1;
  pointer-events: none;
  filter: blur(1px);
  box-shadow: 
    0 0 10px var(--neon-magenta),
    0 0 20px var(--neon-magenta);
}

@keyframes rotate-border {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.btn:hover {
  box-shadow: 
    0 0 20px var(--neon-red),
    0 0 30px var(--neon-magenta),
    inset 0 0 15px rgba(255, 0, 0, 0.5);
  transform: translateY(-2px);
}

.btn:hover::before,
.btn:hover::after {
  filter: blur(1.5px);
  animation-duration: 1s; /* Faster animation on hover */
}

/* Main Navigation - Desktop */
.main-nav {
  background: linear-gradient(135deg, var(--dark-bg-2), var(--dark-bg-3), #0f3460);
  border-top: 2px solid var(--neon-magenta);
  border-bottom: 2px solid var(--neon-magenta);
  box-shadow: 
    0 0 10px var(--neon-magenta),
    0 0 20px var(--neon-magenta),
    0 0 30px var(--neon-magenta),
    inset 0 0 20px rgba(255, 0, 255, 0.1);
  display: flex; /* Desktop default */
  justify-content: center;
  align-items: center;
  padding: 10px 0;
  width: 100%;
  position: static; /* Desktop default */
  transform: translateX(0); /* Desktop default */
  transition: none; /* Disable transition on desktop */
}

.nav-container {
  display: flex;
  flex-direction: row; /* Desktop default */
  justify-content: center;
  align-items: center;
  flex-wrap: wrap; /* Allow wrapping on smaller desktop screens */
  gap: 25px;
}

.nav-link {
  color: var(--text-color);
  text-decoration: none;
  font-size: 1.1em;
  font-weight: 500;
  padding: 5px 0;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: var(--neon-yellow);
  text-shadow: 0 0 5px var(--neon-yellow);
}

/* Hamburger Menu - Hidden on Desktop */
.hamburger-menu {
  display: none;
  cursor: pointer;
  width: 30px;
  height: 20px;
  position: relative;
  z-index: 1002;
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--neon-yellow);
  margin-bottom: 5px;
  border-radius: 2px;
  transition: all 0.3s ease;
  box-shadow: 0 0 5px var(--neon-yellow), 0 0 10px var(--neon-yellow);
}

.hamburger-menu span:last-child {
  margin-bottom: 0;
}

/* Mobile Nav Buttons Wrapper - Hidden on Desktop */
.mobile-nav-buttons-wrapper {
  display: none; /* Hidden on desktop */
}

/* Mobile Menu Overlay - Hidden on Desktop */
.mobile-menu-overlay {
  display: none; /* Hidden on desktop */
}

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

.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
}

.footer-column {
  flex: 1;
  min-width: 250px;
}

.footer-column h3 {
  color: var(--text-color);
  font-size: 1.2em;
  margin-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 10px;
}

.footer-column p {
  margin-bottom: 10px;
}

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

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

.footer-column ul li a {
  color: var(--text-dim-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-column ul li a:hover {
  color: var(--neon-yellow);
}

/* Responsive Styles */
@media (max-width: 768px) {
  .header-container, .nav-container, .footer-container {
    padding: 0 15px;
    max-width: none; /* Allow full width on mobile */
  }

  /* Header Top - Mobile Layout */
  .header-top .header-container {
    justify-content: space-between;
    padding-left: 15px; /* Adjust padding for hamburger */
    padding-right: 15px;
  }

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

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

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

  /* Mobile Nav Buttons Wrapper - Visible on Mobile */
  .mobile-nav-buttons-wrapper {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 10px 15px;
    background: linear-gradient(135deg, var(--dark-bg-1), var(--dark-bg-2));
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 2px solid var(--neon-yellow);
    box-shadow: 
      0 0 5px var(--neon-yellow),
      0 0 10px var(--neon-yellow);
  }

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

  /* Main Navigation - Mobile (Slide-out) */
  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column; /* Vertical layout */
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100%;
    background: linear-gradient(180deg, var(--dark-bg-3), #0f3460);
    border-right: 2px solid var(--neon-magenta);
    box-shadow: 5px 0 20px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%); /* Slide out from left */
    transition: transform 0.3s ease-in-out;
    padding-top: 80px; /* Space for fixed header content */
    overflow-y: auto;
    z-index: 9999;
  }

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

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

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

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

  /* Hamburger Menu Active State */
  .hamburger-menu.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
    background-color: var(--neon-red);
    box-shadow: 0 0 5px var(--neon-red), 0 0 10px var(--neon-red);
  }

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

  .hamburger-menu.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
    background-color: var(--neon-red);
    box-shadow: 0 0 5px var(--neon-red), 0 0 10px var(--neon-red);
  }

  /* Mobile Menu Overlay */
  .mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9998;
    transition: opacity 0.3s ease-in-out;
    opacity: 0;
  }

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

  /* Footer Mobile Layout */
  .footer-container {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }

  .footer-column {
    min-width: unset;
    width: 100%;
  }

  .footer-column ul {
    padding: 0;
  }

  .footer-column ul li a {
    display: block;
    padding: 5px 0;
  }
}
