:root {
  --bg: #080808;
  --bg-soft: #101010;
  --gold: #d9b36a;
  --gold-strong: #f0ca80;
  --white: #f6f2ea;
  --muted: #c8c2b8;
  --glass: rgba(255, 255, 255, 0.08);
  --glow: 0 0 28px rgba(217, 179, 106, 0.4);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", sans-serif;
  background: radial-gradient(circle at 20% 20%, #1a1510 0%, var(--bg) 40%),
    linear-gradient(135deg, #070707, #0f0f0f);
  color: var(--white);
  overflow-x: hidden;
}

#starsCanvas,
#petalsLayer,
#particlesLayer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

#loader {
  position: fixed;
  inset: 0;
  background: #050505;
  display: grid;
  place-items: center;
  z-index: 9999;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#loader.hide {
  opacity: 0;
  visibility: hidden;
}

.loader-inner {
  text-align: center;
  color: var(--gold);
}

.loader-ring {
  width: 70px;
  height: 70px;
  border: 3px solid rgba(217, 179, 106, 0.25);
  border-top-color: var(--gold);
  border-radius: 50%;
  display: inline-block;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

#progressBar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--gold), #fff2d2);
  box-shadow: var(--glow);
  z-index: 999;
}

.section {
  padding: 110px 8vw;
  position: relative;
}

h1,
h2 {
  font-family: "Playfair Display", serif;
  letter-spacing: 0.4px;
}

h2 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  text-align: center;
  color: var(--gold-strong);
  margin-bottom: 32px;
}

.hero {
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 40px 6vw;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(217, 179, 106, 0.25), transparent 70%);
  filter: blur(12px);
  animation: pulseGlow 4s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.55;
  }
  50% {
    transform: scale(1.15);
    opacity: 0.9;
  }
}

.hero-content {
  max-width: 900px;
  z-index: 2;
}

.hero-kicker {
  color: var(--gold);
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 0.82rem;
}

h1 {
  font-size: clamp(2.2rem, 6vw, 4.8rem);
  line-height: 1.15;
}

.subtitle {
  margin-top: 16px;
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: var(--muted);
}

.typing-text {
  margin-top: 14px;
  min-height: 28px;
  color: #f4e7cd;
  font-size: 1rem;
}

.btn-glow {
  display: inline-block;
  margin-top: 30px;
  padding: 12px 26px;
  border: 1px solid rgba(217, 179, 106, 0.55);
  border-radius: 999px;
  color: var(--white);
  text-decoration: none;
  background: rgba(217, 179, 106, 0.12);
  box-shadow: var(--glow);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.btn-glow:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 36px rgba(217, 179, 106, 0.6);
  background: rgba(217, 179, 106, 0.2);
}

.heart-icon {
  border: none;
  background: transparent;
  font-size: 2rem;
  cursor: pointer;
  margin-bottom: 10px;
  filter: drop-shadow(0 0 8px rgba(255, 120, 140, 0.7));
  animation: heartbeat 1.8s infinite;
}

@keyframes heartbeat {
  0%,
  100% {
    transform: scale(1);
  }
  25% {
    transform: scale(1.12);
  }
  45% {
    transform: scale(0.96);
  }
}

.scroll-indicator {
  position: absolute;
  bottom: 24px;
}

.scroll-indicator span {
  display: block;
  width: 22px;
  height: 35px;
  border: 1px solid rgba(246, 242, 234, 0.45);
  border-radius: 20px;
  position: relative;
}

.scroll-indicator span::after {
  content: "";
  position: absolute;
  width: 4px;
  height: 8px;
  left: 50%;
  top: 6px;
  transform: translateX(-50%);
  border-radius: 4px;
  background: var(--gold);
  animation: scrollDot 1.5s infinite;
}

@keyframes scrollDot {
  from {
    opacity: 1;
    transform: translate(-50%, 0);
  }
  to {
    opacity: 0;
    transform: translate(-50%, 14px);
  }
}

.couple-photo .photo-card {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px;
  background: var(--glass);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 26px;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 45px rgba(0, 0, 0, 0.45), var(--glow);
  transition: transform 0.4s ease;
}

.couple-photo .photo-card:hover {
  transform: translateY(-8px) scale(1.01);
}

.couple-photo img {
  width: 100%;
  display: block;
  border-radius: 18px;
  object-fit: cover;
  max-height: 560px;
}

.caption {
  text-align: center;
  margin-top: 18px;
  color: var(--muted);
}

.timeline {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  padding: 10px 0;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 2px;
  height: 100%;
  background: linear-gradient(var(--gold), rgba(217, 179, 106, 0.15));
  box-shadow: var(--glow);
}

.timeline-item {
  width: 50%;
  padding: 22px 28px;
  position: relative;
}

.timeline-item .dot {
  position: absolute;
  top: 30px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gold-strong);
  box-shadow: 0 0 16px rgba(217, 179, 106, 0.9);
}

.timeline-item .content {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(217, 179, 106, 0.26);
  border-radius: 14px;
  padding: 16px 18px;
  color: #efe8db;
  backdrop-filter: blur(8px);
}

.timeline-item:nth-child(odd) {
  left: 0;
  text-align: right;
}

.timeline-item:nth-child(odd) .dot {
  right: -7px;
}

.timeline-item:nth-child(even) {
  left: 50%;
}

.timeline-item:nth-child(even) .dot {
  left: -7px;
}

.message-section blockquote {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  color: #f2ede4;
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  line-height: 1.9;
  padding: 30px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(217, 179, 106, 0.2);
  box-shadow: inset 0 0 30px rgba(217, 179, 106, 0.08);
}

.anniversary-badge {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  padding: 38px 26px;
  border-radius: 24px;
  background: linear-gradient(
    150deg,
    rgba(255, 255, 255, 0.09),
    rgba(255, 255, 255, 0.03)
  );
  border: 1px solid rgba(217, 179, 106, 0.36);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.35), inset 0 0 24px rgba(217, 179, 106, 0.1);
  backdrop-filter: blur(10px);
}

.badge-top {
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--muted);
  font-size: 0.8rem;
  margin-bottom: 8px;
}

.badge-years {
  font-family: "Playfair Display", serif;
  font-size: clamp(4rem, 10vw, 7.5rem);
  line-height: 1;
  color: #f8ddb0;
  text-shadow: 0 0 26px rgba(217, 179, 106, 0.62);
}

.badge-bottom {
  font-family: "Playfair Display", serif;
  font-size: clamp(1.2rem, 2.8vw, 1.8rem);
  color: var(--gold-strong);
  margin-top: 10px;
}

.counter-note {
  text-align: center;
  margin-top: 16px;
  color: var(--muted);
  letter-spacing: 0.3px;
}

.gallery-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.gallery-grid figure {
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(217, 179, 106, 0.24);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
}

.gallery-grid img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  transition: transform 0.5s ease, filter 0.5s ease;
}

.gallery-grid figure:hover img {
  transform: scale(1.08);
  filter: brightness(1.08);
}

.final-thanks {
  min-height: 45vh;
  display: grid;
  place-items: center;
  text-align: center;
}

.final-thanks h2 {
  font-size: clamp(2rem, 5vw, 4rem);
  text-shadow: 0 0 25px rgba(217, 179, 106, 0.45);
}

footer {
  text-align: center;
  padding: 24px 12px 34px;
  color: #d7cfbf;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.music-toggle {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid rgba(217, 179, 106, 0.5);
  background: rgba(12, 12, 12, 0.8);
  color: var(--gold-strong);
  font-size: 1.35rem;
  cursor: pointer;
  box-shadow: var(--glow);
  z-index: 80;
}

.music-toggle.off {
  opacity: 0.55;
}

.easter-egg {
  position: fixed;
  left: 50%;
  bottom: 88px;
  transform: translateX(-50%) translateY(12px);
  opacity: 0;
  background: rgba(0, 0, 0, 0.75);
  color: #ffe8ba;
  border: 1px solid rgba(217, 179, 106, 0.4);
  border-radius: 30px;
  padding: 10px 18px;
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
  z-index: 100;
}

.easter-egg.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.reveal,
.reveal-up,
.reveal-left,
.reveal-right {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-left {
  transform: translateX(-32px);
}

.reveal-right {
  transform: translateX(32px);
}

.in-view {
  opacity: 1;
  transform: translate(0, 0);
}

.particle,
.petal,
.floating-heart {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.particle {
  width: 4px;
  height: 4px;
  background: rgba(255, 235, 198, 0.6);
  animation: floatUp linear infinite;
}

.petal {
  width: 10px;
  height: 14px;
  background: linear-gradient(135deg, #cc5f78, #8d2f4e);
  border-radius: 60% 0 60% 0;
  opacity: 0.75;
  animation: fall linear infinite;
}

.floating-heart {
  font-size: 16px;
  color: rgba(255, 105, 135, 0.55);
  animation: drift linear infinite;
}

@keyframes floatUp {
  from {
    transform: translateY(100vh) translateX(0);
  }
  to {
    transform: translateY(-10vh) translateX(20px);
  }
}

@keyframes fall {
  from {
    transform: translateY(-10vh) rotate(0deg);
  }
  to {
    transform: translateY(110vh) rotate(220deg);
  }
}

@keyframes drift {
  from {
    transform: translateY(90vh) translateX(0) scale(1);
    opacity: 0.2;
  }
  to {
    transform: translateY(-12vh) translateX(28px) scale(1.2);
    opacity: 0.7;
  }
}

@media (max-width: 900px) {
  .section {
    padding: 88px 6vw;
  }

  .timeline::before {
    left: 12px;
  }

  .timeline-item,
  .timeline-item:nth-child(even),
  .timeline-item:nth-child(odd) {
    width: 100%;
    left: 0;
    text-align: left;
    padding-left: 34px;
    padding-right: 8px;
  }

  .timeline-item .dot,
  .timeline-item:nth-child(odd) .dot,
  .timeline-item:nth-child(even) .dot {
    left: 5px;
    right: auto;
  }

}

@media (max-width: 640px) {
  .section {
    padding: 72px 5vw;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .music-toggle {
    width: 46px;
    height: 46px;
    right: 12px;
    bottom: 12px;
  }

  .hero-kicker {
    letter-spacing: 2px;
  }

  /* Lighter effects for better mobile performance */
  .hero-glow {
    width: 340px;
    height: 340px;
  }
}
