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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* Prevent anchor links from hiding under sticky nav */
}

body {
  font-family: 'Orbitron', sans-serif;
  background: radial-gradient(circle at top, #1a001a, #0d0d0d);
  color: #e0d6ff;
  line-height: 1.6;
  overflow-x: hidden;
}

/* === Popup === */
.popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.popup-content {
  background: #1a001a;
  color: #fff;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 0 20px #ff00ff;
  text-align: center;
}

.popup-content button {
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  background: #ff00ff;
  border: none;
  color: black;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 0 10px #ff00ff;
}

.hidden {
  display: none !important;
}

/* === Header === */
header {
  text-align: center;
  color: white;
  text-shadow: 0 0 8px #ff00ff;
  box-shadow: 0 0 12px #8e2de2;
  padding: 0.5rem 0;
  position: relative;
  overflow: hidden;
}

header img.logo {
  max-width: 340px;
  height: auto;
  margin: 0 auto 0.25rem;
  display: block;
  filter: drop-shadow(0 0 6px #ff00ff);
  position: relative;
  z-index: 2;
}

@media (max-width: 480px) {
  header img.logo {
    max-width: 240px;
  }
}

header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 10% 20%, rgba(255,255,255,0.9) 0 1px, transparent 1px),
    radial-gradient(circle at 80% 30%, rgba(255,255,255,0.85) 0 1px, transparent 1px),
    radial-gradient(circle at 40% 70%, rgba(255,255,255,0.8) 0 1px, transparent 1px),
    radial-gradient(circle at 70% 80%, rgba(220,180,255,0.7) 0 1px, transparent 1px),
    radial-gradient(circle at 25% 50%, rgba(200,150,255,0.65) 0 1px, transparent 1px),
    radial-gradient(circle at 55% 40%, rgba(230,200,255,0.6) 0 1px, transparent 1px),
    linear-gradient(180deg, rgba(40,0,40,0.35), rgba(10,0,20,0.15));
  background-repeat: no-repeat;
  mix-blend-mode: screen;
  opacity: 0.95;
  animation: twinkle 3.5s ease-in-out infinite;
}

@keyframes twinkle {
  0% { opacity: 0.85; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.02); }
  100% { opacity: 0.85; transform: scale(1); }
}

.star-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
  transition: transform 0.2s linear;
}

.star-layer .star {
  position: absolute;
  border-radius: 50%;
  will-change: transform, opacity;
  mix-blend-mode: screen;
}

@keyframes star-twinkle {
  0% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.15); }
  100% { opacity: 0.6; transform: scale(1); }
}

.star-layer .star.small { width: 2px; height: 2px; }
.star-layer .star.med { width: 3.5px; height: 3.5px; }
.star-layer .star.large { width: 5px; height: 5px; }

header p {
  font-size: 1rem;
  margin-top: 0.5rem;
}

/* === Navigation === */
nav {
  background: rgba(13, 13, 13, 0.95);
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding: 0.75rem;
  border-top: 2px solid #ff00ff;
  border-bottom: 2px solid #00ffff;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(5px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  transition: box-shadow 0.3s ease;
}

nav a {
  color: #00ffff;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
}

nav a:hover {
  color: #ff00ff;
  text-shadow: 0 0 5px #ff00ff;
}

@media (max-width: 600px) {
  nav {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }
}

/* === Sections === */
section {
  padding: 2rem 1rem;
  border-bottom: 1px solid #333;
}

section h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #ff00ff;
  text-shadow: 0 0 5px #ff00ff;
}

/* === Gallery === */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.gallery-grid img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 0 10px #8e2de2;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-grid img:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px #ff00ff;
}

.gallery-grid figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gallery-grid figcaption {
  font-size: 0.85rem;
  color: #cfc2ff;
  margin-top: 0.4rem;
  text-align: center;
}

.gallery-captions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 0.6rem;
  align-items: start;
}

.gallery-captions .caption {
  text-align: center;
  color: #cfc2ff;
  font-size: 0.9rem;
}

/* === Events === */
#event-list li {
  margin-bottom: 1rem;
  background: #2a0032;
  padding: 0.75rem;
  border-radius: 6px;
  box-shadow: 0 0 5px #6a0dad;
}

/* === Contact Form === */
form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 600px;
  margin: auto;
}

form input, form textarea {
  padding: 0.75rem;
  border-radius: 4px;
  border: none;
  background: #1a001a;
  color: #fff;
  box-shadow: inset 0 0 5px #6a0dad;
}

form button {
  background: #ff00ff;
  color: black;
  padding: 0.75rem;
  border: none;
  cursor: pointer;
  font-weight: bold;
  box-shadow: 0 0 10px #ff00ff;
  transition: background 0.3s ease;
}

form button:hover {
  background: #00ffff;
  box-shadow: 0 0 15px #00ffff;
}

/* === Footer === */
footer {
  text-align: center;
  padding: 2rem 1rem;
  background: #0d0d0d;
  color: #cfc2ff;
  font-size: 0.95rem;
  font-family: 'Orbitron', sans-serif;
  position: relative;
  z-index: 1;
  width: 100vw;
  margin: 0;
  left: 50%;
  right: 0;
  transform: translateX(-50%);
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 30%;
  height: 1px;
  background: linear-gradient(90deg, rgba(0,255,255,0.15), rgba(255,0,255,0.4), rgba(0,255,255,0.15));
  border-radius: 2px;
}

footer p {
  margin: 0 auto;
  padding: 0;
  text-align: center;
  display: block;
  width: 100%;
}