/* Aurora-inspired palette */
:root {
  --bg: #0a0013;
  --text: #f8edf7;
  --text-soft: rgba(248, 237, 247, 0.82);
  --glass: rgba(255, 255, 255, 0.14);
  --glass-border: rgba(255, 255, 255, 0.28);
  --glow: rgba(255, 121, 208, 0.35);
  --shadow: 0 30px 90px rgba(8, 0, 20, 0.35);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Raleway', sans-serif;
  background: radial-gradient(circle at 20% 10%, rgba(255, 230, 255, 0.18), transparent 18%),
    radial-gradient(circle at 85% 20%, rgba(108, 104, 255, 0.18), transparent 22%),
    linear-gradient(135deg, #ff6cb5 0%, #9641ff 35%, #44ccff 68%, #ffd999 100%);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  letter-spacing: 0.01em;
  line-height: 1.65;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 35%);
  pointer-events: none;
  z-index: -1;
}

#petal-container,
.petal {
  pointer-events: none;
}

.petal {
  position: fixed;
  top: -12%;
  z-index: 1;
  font-size: 1.8rem;
  opacity: 0.55;
  animation: floatPetal linear infinite;
  user-select: none;
}

@keyframes floatPetal {
  0% { transform: translateY(0) rotate(0deg); opacity: 0.7; }
  100% { transform: translateY(110vh) rotate(360deg); opacity: 0; }
}

.scene {
  max-width: 1180px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  position: relative;
  z-index: 2;
}

.glass {
  background: var(--glass);
  backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  border-radius: 2rem;
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.hero {
  padding: 2.4rem;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--text);
  margin-bottom: 1.2rem;
}

.hero-title-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 0 auto 0.8rem;
}

.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(3.2rem, 10vw, 5.8rem);
  font-weight: 800;
  background: linear-gradient(135deg, #fff3af, #ffd2eb, #ffa1f8);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  text-shadow: 0 0 15px rgba(255, 205, 218, 0.55);
  animation: softGlow 2s ease-in-out infinite alternate;
}

@keyframes softGlow {
  0% { text-shadow: 0 0 8px rgba(255, 200, 180, 0.4); }
  100% { text-shadow: 0 0 30px rgba(255, 220, 185, 0.9); }
}

.hero-heart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 210, 244, 0.95), #ff62c4 60%, #ff2c8a 100%);
  color: #fff;
  font-size: 1.4rem;
  box-shadow: 0 0 24px rgba(255, 77, 175, 0.35);
  animation: beat 1.1s ease-in-out infinite;
}

@keyframes beat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.hero-subtitle {
  margin: 1rem 0 1.8rem;
  color: var(--text-soft);
  font-size: 1.05rem;
  line-height: 1.85;
  letter-spacing: 0.02em;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.button {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 0.85rem 1.8rem;
  font-weight: 700;
  display: inline-flex;
  gap: 0.6rem;
  align-items: center;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
  color: #fff;
  font-size: 1rem;
}

.button:hover {
  transform: translateY(-2px);
}

.primary {
  background: linear-gradient(135deg, #ff8cc5, #e661ff);
  box-shadow: 0 14px 32px rgba(255, 98, 180, 0.32);
}

.secondary {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.counter-card {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem;
  justify-content: space-between;
  margin-top: 2rem;
}

.counter-item {
  flex: 1;
  min-width: 220px;
  text-align: center;
  background: rgba(255, 255, 255, 0.12);
  padding: 1.3rem;
  border-radius: 1.7rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.counter-label {
  display: block;
  margin-bottom: 0.65rem;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(255, 226, 242, 0.88);
}

.counter-item strong {
  font-size: 2.4rem;
  font-weight: 800;
  display: block;
  font-family: 'Courier New', Courier, monospace;
  letter-spacing: 0.18em;
}

.section {
  margin-top: 2.6rem;
}

.section-title {
  font-family: 'Playfair Display', serif;
  margin-bottom: 1.3rem;
  font-size: clamp(2rem, 3vw, 2.8rem);
  color: #fff;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.8rem;
  margin: 2rem 0;
}

.photo-card {
  border-radius: 2rem;
  overflow: hidden;
  position: relative;
  aspect-ratio: 1 / 1;
  transition: transform 0.32s ease, box-shadow 0.32s ease;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
}

.photo-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2);
}

.photo-slider {
  position: relative;
  overflow: hidden;
  border-radius: 2rem;
}

.photo-slider img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.photo-slider.fade img {
  opacity: 0.2;
  transform: scale(1.05);
}

.slider-dots {
  position: absolute;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  display: flex;
  gap: 0.55rem;
  justify-content: center;
  align-items: center;
}

.slider-dot {
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.18);
  cursor: pointer;
  transition: transform 0.22s ease, background 0.22s ease;
}

.slider-dot.active {
  background: rgba(255, 255, 255, 0.92);
  transform: scale(1.1);
}

.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.photo-card:hover img {
  transform: scale(1.06);
}

.photo-card::after {
  content: '❤️';
  position: absolute;
  bottom: 1.1rem;
  right: 1.1rem;
  font-size: 1.7rem;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  filter: drop-shadow(0 0 6px rgba(255,255,255,0.8));
}

.photo-card:hover::after {
  opacity: 1;
  transform: scale(1.1);
}

.photo-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1rem;
  background: linear-gradient(180deg, rgba(0,0,0,0.75), transparent);
  color: #fff;
  font-weight: 500;
  text-align: center;
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.photo-card:hover .photo-caption {
  transform: translateY(0);
  opacity: 1;
}

.letter-card {
  padding: 2rem;
}

.letter-panel {
  display: grid;
  gap: 1.5rem;
}

.letter-intro {
  color: rgba(248, 237, 247, 0.82);
  font-size: 1rem;
  letter-spacing: 0.01em;
}

.typewriter-card {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 1.7rem;
  padding: 1.6rem;
  min-height: 130px;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.16);
}

#typewriter {
  margin: 0;
  line-height: 1.85;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  white-space: pre-wrap;
}

.envelope-button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  align-self: center;
}

.envelope {
  position: relative;
  width: 240px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,255,255,0.24));
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top center;
  transition: transform 0.55s ease;
  z-index: 2;
}

.envelope-body {
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0 16px;
  background: rgba(255,255,255,0.18);
  border-radius: 1.8rem;
  border: 1px solid rgba(255,255,255,0.32);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08), 0 20px 46px rgba(0,0,0,0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
  z-index: 1;
}

.envelope-text {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  color: #fff;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.envelope-button.open .envelope-flap {
  transform: perspective(420px) rotateX(-180deg);
}

.envelope-button.open .envelope-body {
  background: rgba(255,255,255,0.26);
}

.letter-content {
  background: rgba(255,255,255,0.1);
  border-radius: 1.8rem;
  padding: 1.6rem;
  margin-top: 1rem;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05);
}

.hidden {
  display: none;
}

.confetti-wrapper {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
}

.petal-fall {
  position: absolute;
  pointer-events: none;
  color: #ffe5ff;
  text-shadow: 0 0 8px rgba(255, 182, 255, 0.8);
  animation-name: fall;
  animation-timing-function: ease-out;
  animation-fill-mode: forwards;
}

.pulse {
  animation: pulse 0.35s ease-out;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.lightbox {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.78);
  z-index: 1200;
}

.lightbox.hidden {
  display: none;
}

.lightbox-content {
  position: relative;
  width: min(90vw, 780px);
  max-height: 88vh;
  border-radius: 28px;
  overflow: hidden;
  background: rgba(7, 9, 28, 0.96);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.lightbox-content img {
  width: 100%;
  display: block;
  max-height: 70vh;
  object-fit: contain;
}

.lightbox-caption {
  margin: 0;
  padding: 1.2rem 1.4rem 1.8rem;
  color: #f7f0ff;
  font-size: 0.98rem;
  text-align: center;
  background: linear-gradient(180deg, rgba(18, 16, 40, 0.08), rgba(18, 16, 40, 0.5));
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
  z-index: 2;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

@media (max-width: 960px) {
  .scene { padding: 1.8rem 1.2rem 3rem; }
  .hero { padding: 2rem; }
  .hero-title { font-size: clamp(2.8rem, 10vw, 4.7rem); }
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .counter-card { flex-direction: column; }
}

@media (max-width: 640px) {
  .scene { padding: 1.4rem 1rem 2.5rem; }
  .hero { padding: 1.6rem; border-radius: 28px; }
  .hero-actions { flex-direction: column; }
  .button { width: 100%; justify-content: center; }
  .photo-grid { grid-template-columns: 1fr; }
  .section-title { font-size: 2rem; }
  .photo-card { min-height: 240px; aspect-ratio: auto; }
  .letter-card { padding: 1.75rem; }
  .typewriter-card { padding: 1.2rem; }
  .envelope { width: 100%; height: 130px; }
  .envelope-body { margin: 0 12px; }
}
