
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,500;0,600;1,400;1,500&display=swap');

:root {
  --bg: #160b12;
  --bg2: #241019;
  --pink: #ff8eb7;
  --pink-light: #ffd1df;
  --gold: #e9c987;
  --white: #fff7fa;
  --muted: #d8bfc9;
  --card: rgba(255, 255, 255, 0.045);
  --border: rgba(255, 255, 255, 0.09);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background:
    radial-gradient(circle at 50% 0%, #391b2a 0%, transparent 45%),
    linear-gradient(160deg, var(--bg), var(--bg2));
  min-height: 100vh;
  color: var(--white);
  font-family: 'DM Sans', sans-serif;
  overflow-x: hidden;
}

button {
  font-family: inherit;
}

/* Background */

.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.14;
  pointer-events: none;
  z-index: 0;
}

.glow-one {
  width: 300px;
  height: 300px;
  background: #ff3d91;
  top: -100px;
  left: -100px;
}

.glow-two {
  width: 350px;
  height: 350px;
  background: #a64b6e;
  bottom: -150px;
  right: -100px;
}

/* Progress */

.progress-wrapper {
  position: relative;
  z-index: 2;
  max-width: 650px;
  margin: auto;
  padding: 26px 24px 0;
}

.progress-text {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #c8aeb9;
  font-size: 10px;
  letter-spacing: 2px;
  margin-bottom: 10px;
}

.progress-track {
  width: 100%;
  height: 3px;
  background: rgba(255,255,255,0.08);
  border-radius: 10px;
  overflow: hidden;
}

#progress-bar {
  height: 100%;
  width: 16.66%;
  background: linear-gradient(90deg, #f36b9d, #f5cf94);
  transition: width 0.6s ease;
  border-radius: 10px;
}

/* Main */

.experience {
  position: relative;
  z-index: 1;
  max-width: 760px;
  min-height: 85vh;
  margin: 0 auto;
  padding: 30px 24px 70px;
}

.step {
  display: none;
  text-align: center;
  animation: fadeIn 0.7s ease;
}

.step.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(25px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.eyebrow {
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 10px;
  margin: 25px 0;
}

h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(38px, 7vw, 68px);
  line-height: 1.15;
  font-weight: 400;
  margin-bottom: 25px;
}

.pink-text {
  color: var(--pink);
  font-style: italic;
}

.subtitle {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.9;
  margin: 22px auto 30px;
}

.hero-heart {
  font-size: 90px;
  line-height: 1;
  color: var(--pink);
  margin: 30px 0;
  animation: heartbeat 2s infinite;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.13); }
  30% { transform: scale(1); }
  45% { transform: scale(1.08); }
}

/* Buttons */

.primary-btn {
  border: none;
  background: linear-gradient(135deg, #ff8eb7, #e76697);
  color: #32131f;
  font-weight: 700;
  font-size: 14px;
  padding: 16px 28px;
  border-radius: 50px;
  cursor: pointer;
  margin: 15px 0;
  transition: 0.3s ease;
  box-shadow: 0 10px 35px rgba(242, 99, 151, 0.18);
}

.primary-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 40px rgba(242, 99, 151, 0.28);
}

.primary-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}

.primary-btn span {
  margin-left: 8px;
}

.tiny-note {
  font-size: 11px;
  color: #927783;
  margin-top: 30px;
}

/* Message card */

.message-card {
  max-width: 520px;
  margin: 30px auto;
  padding: 30px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 22px;
  backdrop-filter: blur(15px);
}

.message-card p {
  color: var(--pink-light);
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  line-height: 1.8;
}

/* Love cards */

.love-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  max-width: 550px;
  margin: 30px auto;
}

.love-card {
  position: relative;
  height: 175px;
  perspective: 1000px;
  cursor: pointer;
}

.card-front,
.card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 20px;
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  backface-visibility: hidden;
  transition: transform 0.6s;
  border: 1px solid rgba(255, 142, 183, 0.2);
}

.card-front {
  background: linear-gradient(145deg, #341b29, #20121b);
}

.card-front span {
  color: var(--pink);
  font-size: 36px;
  margin-bottom: 10px;
}

.card-front p {
  color: #d2aebb;
  font-size: 12px;
}

.card-back {
  background: linear-gradient(145deg, #71344f, #3d1c30);
  transform: rotateY(180deg);
}

.card-back p {
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  line-height: 1.6;
  color: white;
}

.love-card.open .card-front {
  transform: rotateY(180deg);
}

.love-card.open .card-back {
  transform: rotateY(0);
}

.card-hint {
  font-size: 12px;
  color: #ac8598;
  margin: 15px 0;
}

/* Photo stack */

.photo-stack {
  position: relative;
  max-width: 420px;
  height: 500px;
  margin: 35px auto;
}

.photo-background {
  position: absolute;
  top: 0;
  right: 0;
  width: 82%;
  height: 88%;
  overflow: hidden;
  border-radius: 25px;
  opacity: 0.45;
  transform: rotate(4deg);
  box-shadow: 0 0 50px rgba(255, 168, 194, 0.15);
}

.photo-background img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-foreground {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 80%;
  height: 83%;
  overflow: hidden;
  border: 5px solid rgba(255, 255, 255, 0.06);
  border-radius: 25px;
  box-shadow: 0 25px 60px rgba(0,0,0,0.5);
}

.photo-foreground img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.photo-heart {
  position: absolute;
  bottom: 5%;
  right: 5%;
  font-size: 55px;
  color: var(--pink);
  filter: drop-shadow(0 0 20px rgba(255,142,183,0.4));
}

/* Letter */

.letter {
  text-align: left;
  max-width: 560px;
  margin: 30px auto;
  padding: 35px 28px;
  border-radius: 24px;
  border: 1px solid rgba(236, 192, 140, 0.2);
  background: linear-gradient(
    145deg,
    rgba(255,255,255,0.05),
    rgba(255,255,255,0.015)
  );
  box-shadow: 0 25px 70px rgba(0,0,0,0.18);
}

.letter-top {
  font-family: 'Playfair Display', serif;
  color: var(--gold);
  font-size: 22px;
  margin-bottom: 25px;
}

.letter p {
  color: #e9d6df;
  font-size: 14px;
  line-height: 2;
  margin-bottom: 18px;
}

.letter-sign {
  margin-top: 35px;
  color: #c5a6b4;
  font-family: 'Playfair Display', serif;
  line-height: 1.7;
}

.letter-sign span {
  color: var(--pink);
  font-size: 24px;
}

/* Final screen */

.final-title {
  font-size: clamp(42px, 8vw, 76px);
  margin-bottom: 30px;
}

.final-photo {
  max-width: 340px;
  height: 420px;
  margin: 25px auto;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 207, 143, 0.3);
  box-shadow: 0 0 80px rgba(255, 121, 175, 0.14);
}

.final-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.final-message {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  line-height: 1.7;
  color: var(--pink-light);
  margin: 30px 0;
}

.final-love {
  color: var(--gold);
  line-height: 1.9;
  font-size: 15px;
}

.signature {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  color: var(--pink);
  margin: 25px 0;
  font-size: 22px;
}

.final-confetti {
  font-size: 30px;
  margin: 20px 0;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Floating hearts */

.heart {
  position: fixed;
  bottom: -30px;
  pointer-events: none;
  animation: floatHeart linear forwards;
  z-index: 0;
  color: rgba(255, 142, 183, 0.3);
}

@keyframes floatHeart {
  to {
    transform: translateY(-110vh) rotate(360deg);
    opacity: 0;
  }
}

/* Confetti */

.confetti-piece {
  position: fixed;
  width: 8px;
  height: 12px;
  top: -20px;
  z-index: 99;
  animation: confettiFall 3s linear forwards;
}

@keyframes confettiFall {
  to {
    transform: translateY(110vh) rotate(720deg);
    opacity: 0;
  }
}

/* Responsive */

@media (max-width: 600px) {

  .experience {
    padding: 20px 18px 60px;
  }

  h1 {
    font-size: 43px;
  }

  .eyebrow {
    letter-spacing: 2px;
  }

  .message-card {
    padding: 22px;
  }

  .message-card p {
    font-size: 19px;
  }

  .love-grid {
    gap: 10px;
  }

  .love-card {
    height: 165px;
  }

  .card-back p {
    font-size: 14px;
  }

  .photo-stack {
    height: 430px;
  }

  .letter {
    padding: 25px 20px;
  }

  .final-photo {
    height: 390px;
  }
}
