/* Starry Night Photobooth — Main Styles */

:root {
  --midnight: #0b1e3d;
  --deep: #13294b;
  --ocean: #1d4e89;
  --gold: #f6c667;
  --cream: #fff3d1;
}

* {
  box-sizing: border-box;
}

body {
  background: linear-gradient(165deg, var(--midnight) 0%, var(--deep) 40%, #0a1628 100%);
  background-attachment: fixed;
}

/* Navbar glassmorphism */
.navbar {
  background: rgba(11, 30, 61, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 243, 209, 0.08);
}

.navbar.scrolled {
  background: rgba(11, 30, 61, 0.85);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.navbar-logo-wrap {
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.navbar-logo-wrap::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(246, 198, 103, 0.25) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.navbar-brand:hover .navbar-logo-wrap::after {
  opacity: 1;
}

.navbar-logo {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(246, 198, 103, 0.35);
  box-shadow: 0 0 16px rgba(29, 78, 137, 0.5);
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

@media (min-width: 768px) {
  .navbar-logo {
    width: 2.75rem;
    height: 2.75rem;
  }
}

.navbar-brand:hover .navbar-logo {
  transform: scale(1.06);
  border-color: rgba(246, 198, 103, 0.6);
  box-shadow: 0 0 24px rgba(246, 198, 103, 0.35);
}

.nav-link {
  color: rgba(255, 243, 209, 0.7);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--gold);
}

.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  border-radius: 2px;
}

.nav-link-mobile {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--cream);
  border-radius: 0.75rem;
  transition: background 0.2s, color 0.2s;
}

.nav-link-mobile:hover {
  background: rgba(246, 198, 103, 0.1);
  color: var(--gold);
}

.glass-panel {
  background: rgba(19, 41, 75, 0.6);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 243, 209, 0.1);
}

.glass-card {
  background: rgba(19, 41, 75, 0.45);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(246, 198, 103, 0.15);
  border-radius: 1.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 243, 209, 0.05);
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.75rem;
  background: linear-gradient(135deg, var(--gold) 0%, #e8a830 100%);
  color: var(--midnight);
  font-weight: 600;
  border-radius: 9999px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 20px rgba(246, 198, 103, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(246, 198, 103, 0.5);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  padding: 0.875rem 1.75rem;
  color: var(--cream);
  border: 1px solid rgba(255, 243, 209, 0.25);
  border-radius: 9999px;
  transition: border-color 0.3s, color 0.3s, background 0.3s;
}

.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(246, 198, 103, 0.08);
}

.text-gradient-gold {
  background: linear-gradient(135deg, var(--gold), #fff3d1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Swirl backgrounds (original, inspired — no copyrighted art) */
.swirl-bg {
  background:
    radial-gradient(ellipse 80% 50% at 20% 80%, rgba(29, 78, 137, 0.4) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 80% 20%, rgba(246, 198, 103, 0.08) 0%, transparent 45%),
    radial-gradient(ellipse 100% 80% at 50% 100%, rgba(19, 41, 75, 0.6) 0%, transparent 60%);
}

.swirl-parallax {
  background:
    radial-gradient(ellipse 120% 80% at 30% 70%, rgba(29, 78, 137, 0.35) 0%, transparent 55%),
    conic-gradient(from 200deg at 70% 30%, rgba(246, 198, 103, 0.06), transparent 40%, rgba(29, 78, 137, 0.2), transparent 70%);
  animation: swirl-drift 25s ease-in-out infinite alternate;
}

.swirl-mini {
  background: conic-gradient(
    from 180deg at 50% 50%,
    rgba(29, 78, 137, 0.5),
    rgba(246, 198, 103, 0.15),
    rgba(19, 41, 75, 0.6),
    rgba(29, 78, 137, 0.4)
  );
  animation: swirl-drift 15s ease-in-out infinite;
}

@keyframes swirl-drift {
  0% { transform: rotate(0deg) scale(1); opacity: 0.35; }
  100% { transform: rotate(8deg) scale(1.05); opacity: 0.5; }
}

/* Moon */
.moon-container {
  filter: drop-shadow(0 0 40px rgba(246, 198, 103, 0.3));
}

.moon {
  position: relative;
  width: 80px;
  height: 80px;
}

@media (min-width: 768px) {
  .moon { width: 120px; height: 120px; }
}

.moon-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff8e7, var(--gold) 45%, #c9a227 100%);
  box-shadow: inset -8px -8px 20px rgba(0, 0, 0, 0.15);
}

.moon-halo {
  position: absolute;
  inset: -20%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(246, 198, 103, 0.25) 0%, transparent 70%);
  animation: moon-pulse 4s ease-in-out infinite;
}

@keyframes moon-pulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.1); }
}

.animate-moon-glow {
  animation: moon-float 8s ease-in-out infinite;
}

@keyframes moon-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* Particles */
.particles-container .particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: var(--gold);
  border-radius: 50%;
  opacity: 0.4;
  animation: float-particle linear infinite;
}

@keyframes float-particle {
  0% {
    transform: translateY(100vh) translateX(0);
    opacity: 0;
  }
  10% { opacity: 0.5; }
  90% { opacity: 0.3; }
  100% {
    transform: translateY(-10vh) translateX(20px);
    opacity: 0;
  }
}

/* Animations */
.fade-up {
  animation: fade-up 1s ease-out forwards;
  opacity: 0;
}

.fade-up.delay-200 {
  animation-delay: 0.2s;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-logo-spin {
  animation: logo-glow 6s ease-in-out infinite;
}

@keyframes logo-glow {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(246, 198, 103, 0.4)); }
  50% { filter: drop-shadow(0 0 12px rgba(246, 198, 103, 0.8)); }
}

.animate-bounce-slow {
  animation: bounce-slow 2.5s ease-in-out infinite;
}

@keyframes bounce-slow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

.scroll-indicator {
  animation: fade-up 1.2s ease-out 0.5s forwards;
  opacity: 0;
}

/* Footer */
.footer {
  background: rgba(11, 30, 61, 0.5);
  backdrop-filter: blur(8px);
}

/* Masonry gallery */
.masonry-grid {
  column-count: 1;
  column-gap: 1rem;
}

@media (min-width: 640px) {
  .masonry-grid { column-count: 2; }
}

@media (min-width: 1024px) {
  .masonry-grid { column-count: 3; column-gap: 1.25rem; }
}

@media (min-width: 1280px) {
  .masonry-grid { column-count: 4; }
}

.gallery-card {
  break-inside: avoid;
  margin-bottom: 1rem;
  animation: card-appear 0.5s ease-out forwards;
}

@keyframes card-appear {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.gallery-card-btn {
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  width: 100%;
}

.card-image-wrap {
  position: relative;
  border-radius: 0.75rem;
  overflow: hidden;
  background: var(--deep);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.gallery-card:hover .card-image-wrap {
  transform: scale(1.02);
  box-shadow: 0 12px 40px rgba(246, 198, 103, 0.2),
    0 0 0 1px rgba(246, 198, 103, 0.15);
}

.gallery-img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease;
}

.gallery-card:hover .gallery-img {
  transform: scale(1.05);
}

.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(11, 30, 61, 0.85) 0%, transparent 50%);
  display: flex;
  align-items: flex-end;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-card:hover .card-overlay {
  opacity: 1;
}

/* Skeleton loading */
.skeleton-card {
  break-inside: avoid;
  margin-bottom: 1rem;
  border-radius: 0.75rem;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--deep);
}

.skeleton-shimmer {
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(19, 41, 75, 0.8) 0%,
    rgba(29, 78, 137, 0.4) 50%,
    rgba(19, 41, 75, 0.8) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Empty state */
.empty-state .empty-icon {
  font-size: 3rem;
  color: var(--gold);
  opacity: 0.6;
  animation: twinkle 2s ease-in-out infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.1); }
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 8px #4ade80;
  animation: live-pulse 2s ease-in-out infinite;
}

@keyframes live-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox.hidden {
  display: flex;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 30, 61, 0.92);
  backdrop-filter: blur(8px);
  cursor: pointer;
}

.lightbox-content {
  position: relative;
  z-index: 1;
  max-width: 95vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: lightbox-in 0.4s ease-out;
}

.lightbox.active .lightbox-content {
  animation: lightbox-in 0.4s ease-out;
}

@keyframes lightbox-in {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.lightbox-image {
  max-width: 100%;
  max-height: calc(90vh - 80px);
  object-fit: contain;
  border-radius: 0.5rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: -3rem;
  right: 0;
  color: var(--cream);
  padding: 0.5rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.lightbox-close:hover {
  background: rgba(246, 198, 103, 0.2);
  color: var(--gold);
}

.lightbox-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  max-width: 800px;
  margin-top: 1rem;
  padding: 0 0.5rem;
}

/* Utility */
.hidden {
  display: none !important;
}
