*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --rose: #e8a0b8;
  --rose-deep: #c76b8a;
  --blush: #fdf2f6;
  --gold: #d4a853;
  --gold-light: #f0d78c;
  --night: #1a1225;
  --night-soft: #2d1f3d;
  --text: #f5eef3;
  --text-muted: rgba(245, 238, 243, 0.75);
  --font-urdu: 'Noto Nastaliq Urdu', 'Jameel Noori Nastaleeq', serif;
  --font-body: 'Outfit', system-ui, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: var(--font-urdu);
  background: linear-gradient(160deg, var(--night) 0%, var(--night-soft) 40%, #3d2a4a 100%);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.8;
}

.stars {
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 20px 30px, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 80px 120px, rgba(255,255,255,0.3), transparent),
    radial-gradient(1.5px 1.5px at 160px 80px, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 240px 200px, rgba(255,255,255,0.35), transparent),
    radial-gradient(1px 1px at 320px 50px, rgba(255,255,255,0.4), transparent);
  background-size: 400px 250px;
  animation: twinkle 8s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}

@keyframes twinkle {
  0% { opacity: 0.6; }
  100% { opacity: 1; }
}

.floating-hearts {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.floating-hearts .heart {
  position: absolute;
  bottom: -20px;
  font-size: 1rem;
  color: var(--rose);
  opacity: 0.5;
  animation: float-up linear infinite;
}

@keyframes float-up {
  0% { transform: translateY(0) rotate(0deg); opacity: 0; }
  10% { opacity: 0.5; }
  90% { opacity: 0.3; }
  100% { transform: translateY(-100vh) rotate(360deg); opacity: 0; }
}

.screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  z-index: 2;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.screen.active {
  opacity: 1;
  visibility: visible;
}

/* ── Date Screen ── */
.date-reveal {
  text-align: center;
  max-width: 420px;
  animation: fade-in 1s ease both;
}

.date-label {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.date-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  padding: 1.5rem 2rem;
  background: rgba(255, 255, 255, 0.07);
  border: 2px solid rgba(212, 168, 83, 0.4);
  border-radius: 20px;
  box-shadow: 0 0 40px rgba(212, 168, 83, 0.15);
}

.date-day {
  font-size: clamp(4rem, 15vw, 6rem);
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(135deg, var(--gold-light), var(--gold), var(--rose));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.date-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
}

.date-month {
  font-size: 2rem;
  font-weight: 600;
  color: var(--rose);
}

.date-year {
  font-size: 1.5rem;
  color: var(--gold-light);
  font-family: var(--font-body);
  direction: ltr;
}

.birthday-badge {
  margin-bottom: 2rem;
}

.badge-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 0.5rem;
  animation: bounce 1.5s ease infinite;
}

.birthday-badge h1 {
  font-size: clamp(2rem, 7vw, 3rem);
  font-weight: 700;
  background: linear-gradient(135deg, var(--gold-light), var(--rose));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.badge-name {
  font-size: 1.4rem;
  color: var(--rose);
  margin-top: 0.5rem;
}

.countdown {
  margin-bottom: 2rem;
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  border: 1px solid rgba(232, 160, 184, 0.2);
}

.countdown-label {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.countdown-timer {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
}

.time-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 56px;
  padding: 0.5rem;
  background: rgba(212, 168, 83, 0.12);
  border-radius: 10px;
}

.time-unit span {
  font-size: 1.75rem;
  font-weight: 700;
  font-family: var(--font-body);
  color: var(--gold-light);
  direction: ltr;
}

.time-unit small {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.countdown.celebrating .countdown-label {
  color: var(--gold-light);
  font-size: 1.1rem;
}

.countdown.celebrating .countdown-timer {
  display: none;
}

.primary-btn {
  background: linear-gradient(135deg, var(--rose-deep), var(--rose));
  color: white;
  border: none;
  padding: 0.9rem 2rem;
  border-radius: 50px;
  font-family: var(--font-urdu);
  font-size: 1.1rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 28px rgba(199, 107, 138, 0.5);
}

/* ── Envelope ── */
.envelope-wrapper {
  text-align: center;
}

.hint {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  animation: fade-in 1s ease 0.3s both;
}

.tap-hint {
  margin-top: 2rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.envelope {
  position: relative;
  width: 220px;
  height: 160px;
  background: none;
  border: none;
  cursor: pointer;
  perspective: 600px;
  animation: fade-in 1s ease 0.5s both, gentle-bob 3s ease-in-out infinite;
}

@keyframes gentle-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.envelope-body {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 120px;
  background: linear-gradient(145deg, var(--rose) 0%, var(--rose-deep) 100%);
  border-radius: 0 0 8px 8px;
  box-shadow: 0 12px 40px rgba(199, 107, 138, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.heart-icon {
  font-size: 2.5rem;
  color: white;
}

.envelope-flap {
  position: absolute;
  top: 20px;
  left: 0;
  width: 100%;
  height: 80px;
  background: linear-gradient(180deg, #f0b8cc 0%, var(--rose) 100%);
  clip-path: polygon(0 0, 50% 100%, 100% 0);
  transform-origin: top center;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2;
}

.envelope.open .envelope-flap {
  transform: rotateX(180deg);
}

.letter-preview {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: 180px;
  padding: 1rem;
  background: var(--blush);
  color: var(--rose-deep);
  font-size: 1rem;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.4s ease 0.3s, transform 0.5s ease 0.3s;
  z-index: 1;
}

.envelope.open .letter-preview {
  opacity: 1;
  transform: translateX(-50%) translateY(-60px);
}

/* ── Main Screen ── */
#screen-main {
  flex-direction: column;
  overflow-y: auto;
  align-items: stretch;
  justify-content: flex-start;
  padding-top: 2.5rem;
  padding-bottom: 4rem;
}

.hero {
  text-align: center;
  margin-bottom: 2rem;
  animation: fade-in 1s ease both;
}

.hero-date {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1.25rem;
  background: rgba(212, 168, 83, 0.15);
  border: 1px solid rgba(212, 168, 83, 0.35);
  border-radius: 50px;
  margin-bottom: 1rem;
}

.hero-date span:first-child {
  font-size: 1.75rem;
  font-weight: 700;
  font-family: var(--font-body);
  color: var(--gold-light);
  direction: ltr;
}

.hero-date span:last-child {
  font-size: 1.1rem;
  color: var(--rose);
}

.hero h1 {
  font-size: clamp(1.75rem, 6vw, 2.5rem);
  font-weight: 700;
  color: var(--gold-light);
}

.name-display {
  font-size: clamp(1.4rem, 4vw, 2rem);
  color: var(--rose);
  margin-top: 0.5rem;
}

.from-line {
  margin-top: 0.5rem;
  font-size: 1rem;
  color: var(--text-muted);
}

.from-line span {
  color: var(--gold-light);
  font-weight: 600;
}

/* ── Poetry Cards ── */
.wish-cards {
  max-width: 540px;
  margin: 0 auto;
  width: 100%;
}

.wish-card {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(232, 160, 184, 0.25);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 1.5rem;
  transition: transform 0.4s ease, box-shadow 0.4s ease, opacity 0.6s ease;
  animation: slide-up 0.8s ease both;
}

.wish-card.hidden-card {
  opacity: 0;
  transform: translateY(30px);
  pointer-events: none;
  max-height: 0;
  padding: 0;
  margin: 0;
  overflow: hidden;
  border: none;
}

.wish-card.revealed {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  max-height: 700px;
  padding: 2rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(232, 160, 184, 0.25);
}

.wish-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 48px rgba(199, 107, 138, 0.2);
}

.card-number {
  font-size: 0.8rem;
  color: var(--gold);
  font-family: var(--font-body);
}

.wish-card h2 {
  font-size: 1.6rem;
  margin: 0.4rem 0 1rem;
  color: var(--text);
}

.poem {
  font-size: 1.2rem;
  line-height: 2.2;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.urdu-poem {
  font-family: var(--font-urdu);
}

.reveal-btn {
  background: linear-gradient(135deg, var(--rose-deep), var(--rose));
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-family: var(--font-urdu);
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.reveal-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 24px rgba(199, 107, 138, 0.45);
}

/* ── Love Hearts Section ── */
.love-section {
  max-width: 540px;
  margin: 2rem auto;
  width: 100%;
  text-align: center;
  padding: 0 0.5rem;
}

.section-title {
  font-size: 1.5rem;
  color: var(--rose);
  margin-bottom: 0.5rem;
}

.section-sub {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.love-hearts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.love-heart-btn {
  aspect-ratio: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(232, 160, 184, 0.3);
  border-radius: 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem;
  transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
  font-family: var(--font-urdu);
}

.love-heart-btn .heart-emoji {
  font-size: 2rem;
  transition: transform 0.3s ease;
}

.love-heart-btn:hover {
  transform: scale(1.08);
  background: rgba(232, 160, 184, 0.15);
  border-color: var(--rose);
}

.love-heart-btn.opened {
  background: rgba(212, 168, 83, 0.12);
  border-color: var(--gold);
  pointer-events: none;
}

.love-heart-btn.opened .heart-emoji {
  transform: scale(1.2);
}

.love-heart-btn .heart-msg {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.4s ease, max-height 0.4s ease;
}

.love-heart-btn.opened .heart-msg {
  opacity: 1;
  max-height: 120px;
}

.love-heart-btn .heart-num {
  font-size: 0.7rem;
  color: var(--gold);
  font-family: var(--font-body);
}

/* ── Photo Section ── */
.photo-section {
  max-width: 540px;
  margin: 2rem auto;
  width: 100%;
  padding: 0 0.5rem;
}

.photo-frame {
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 2px dashed rgba(212, 168, 83, 0.4);
  border-radius: 16px;
}

.photo-placeholder {
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
  overflow: hidden;
  position: relative;
}

.photo-placeholder.has-image {
  min-height: 280px;
  padding: 0;
}

.photo-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  min-height: 280px;
}

.photo-icon {
  font-size: 3rem;
  opacity: 0.6;
}

.photo-placeholder p {
  font-size: 1.1rem;
  color: var(--rose);
}

.photo-placeholder small {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.go-final-btn {
  display: block;
  margin: 2rem auto 1rem;
}

/* ── Final Screen ── */
#screen-final {
  text-align: center;
  overflow-y: auto;
  align-items: flex-start;
  padding-top: 2rem;
  padding-bottom: 3rem;
}

.final-content {
  max-width: 520px;
  animation: fade-in 1s ease both;
}

.final-date {
  font-size: 1.15rem;
  color: var(--gold-light);
  margin-bottom: 1.5rem;
  padding: 0.5rem 1rem;
  background: rgba(212, 168, 83, 0.12);
  border-radius: 50px;
  display: inline-block;
}

.cake-area {
  margin-bottom: 1.5rem;
}

/* ── Birthday Scene (Talha + Sara + Cake) ── */
.birthday-scene {
  width: 100%;
  max-width: 420px;
  margin: 0 auto 1.5rem;
}

.scene-hint {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  min-height: 2.8em;
  line-height: 1.7;
}

.scene-stage {
  position: relative;
  height: 280px;
  margin-bottom: 1rem;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(45, 31, 61, 0.6) 0%, rgba(26, 18, 37, 0.8) 100%);
  border: 1px solid rgba(232, 160, 184, 0.25);
  overflow: hidden;
}

.scene-table {
  position: absolute;
  bottom: 0;
  left: 5%;
  right: 5%;
  height: 55px;
  background: linear-gradient(180deg, #5c3d2e 0%, #3d2819 100%);
  border-radius: 8px 8px 0 0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

.scene-table::before {
  content: '';
  position: absolute;
  inset: 8px 10px auto;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
}

/* Cake */
.scene-cake-wrap {
  position: absolute;
  bottom: 48px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  z-index: 5;
}

.scene-candles {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 4px;
  position: relative;
  z-index: 10;
}

.sc-candle {
  width: 8px;
  height: 22px;
  background: linear-gradient(180deg, #fff8e7, #f5e6c8);
  border-radius: 2px;
  position: relative;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.sc-candle::after {
  content: '';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 14px;
  background: radial-gradient(ellipse, #ffd700 0%, #ff6b00 50%, transparent 70%);
  border-radius: 50%;
  animation: candle-flame 0.5s ease infinite alternate;
}

.sc-candle.blown {
  opacity: 0.3;
}

.sc-candle.blown::after {
  opacity: 0;
  animation: none;
}

@keyframes candle-flame {
  0% { transform: translateX(-50%) scale(1); opacity: 1; }
  100% { transform: translateX(-50%) scale(0.85); opacity: 0.7; }
}

.scene-cake-body {
  position: relative;
}

.cake-layer {
  margin: 0 auto;
  border-radius: 4px;
}

.cake-top {
  width: 70px;
  height: 18px;
  background: linear-gradient(180deg, #ffb6c8, #e88aa0);
  border-radius: 8px 8px 2px 2px;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.1);
}

.cake-mid {
  width: 82px;
  height: 22px;
  background: linear-gradient(180deg, #fff5f7, #fce4ec);
  margin-top: -2px;
}

.cake-base {
  width: 92px;
  height: 26px;
  background: linear-gradient(180deg, #d4899a, #c76b8a);
  border-radius: 0 0 6px 6px;
  margin-top: -2px;
}

.cake-slice-piece {
  position: absolute;
  right: -8px;
  bottom: 8px;
  width: 28px;
  height: 40px;
  background: linear-gradient(135deg, #fce4ec 40%, #e88aa0 100%);
  border-radius: 0 8px 8px 0;
  opacity: 0;
  transform: translateX(0) rotate(0deg);
  transition: opacity 0.4s ease 1.2s, transform 0.6s ease 1.2s;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
}

.scene-knife {
  position: absolute;
  top: 10px;
  right: -30px;
  width: 50px;
  height: 8px;
  background: linear-gradient(90deg, #c0c0c0, #e8e8e8 30%, #a0a0a0);
  border-radius: 2px;
  opacity: 0;
  transform: rotate(-30deg);
  transform-origin: right center;
  z-index: 15;
}

.scene-knife::before {
  content: '';
  position: absolute;
  right: -8px;
  top: -4px;
  width: 16px;
  height: 16px;
  background: #8b4513;
  border-radius: 2px;
}

.birthday-scene[data-step="1"] .sc-candle::after {
  opacity: 0;
  animation: none;
}

.birthday-scene[data-step="1"] .sc-candle {
  opacity: 0.35;
}

.birthday-scene[data-step="2"] .scene-knife,
.birthday-scene[data-step="3"] .scene-knife,
.birthday-scene[data-step="4"] .scene-knife,
.birthday-scene[data-step="5"] .scene-knife {
  opacity: 1;
  animation: knife-cut 1.8s ease forwards;
}

@keyframes knife-cut {
  0% { transform: rotate(-30deg) translateX(0); opacity: 0; }
  15% { opacity: 1; }
  50% { transform: rotate(5deg) translateX(-15px); }
  100% { transform: rotate(-20deg) translateX(5px); opacity: 0.6; }
}

.birthday-scene[data-step="3"] .cake-slice-piece,
.birthday-scene[data-step="4"] .cake-slice-piece,
.birthday-scene[data-step="5"] .cake-slice-piece {
  opacity: 1;
  transform: translateX(12px) rotate(8deg);
}

.birthday-scene[data-step="3"] .cake-top,
.birthday-scene[data-step="4"] .cake-top,
.birthday-scene[data-step="5"] .cake-top {
  clip-path: polygon(0 0, 72% 0, 72% 100%, 0 100%);
}

/* Characters */
.scene-person {
  position: absolute;
  bottom: 52px;
  z-index: 8;
  text-align: center;
}

.scene-person.talha {
  left: 8%;
}

.scene-person.sara {
  right: 8%;
}

.person-tag {
  display: block;
  font-size: 0.65rem;
  font-family: var(--font-body);
  color: var(--gold-light);
  margin-bottom: 4px;
  white-space: nowrap;
  direction: ltr;
}

.person-figure {
  position: relative;
  width: 70px;
  height: 130px;
}

.person-head {
  position: relative;
  width: 44px;
  height: 44px;
  margin: 0 auto;
  z-index: 3;
}

.person-hair {
  position: absolute;
  inset: 0;
  border-radius: 50% 50% 40% 40%;
}

.boy-hair {
  background: #2c1810;
  transform: scale(1.05, 1);
  top: -2px;
}

.girl-hair {
  background: #1a0a00;
  border-radius: 50% 50% 30% 30%;
  height: 52px;
  width: 48px;
  left: -2px;
  top: -4px;
}

.girl-hair::after {
  content: '';
  position: absolute;
  left: -8px;
  top: 20px;
  width: 14px;
  height: 50px;
  background: #1a0a00;
  border-radius: 8px;
}

.girl-hair::before {
  content: '';
  position: absolute;
  right: -8px;
  top: 20px;
  width: 14px;
  height: 50px;
  background: #1a0a00;
  border-radius: 8px;
}

.person-face {
  position: absolute;
  inset: 8px 4px 4px;
  background: linear-gradient(180deg, #ffdbac, #e8b88a);
  border-radius: 50%;
  z-index: 1;
}

.person-eye {
  position: absolute;
  top: 14px;
  width: 5px;
  height: 6px;
  background: #2c1810;
  border-radius: 50%;
}

.person-eye:first-of-type { left: 10px; }
.person-eye:last-of-type { right: 10px; }

.person-smile {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 7px;
  border: 2px solid #c76b8a;
  border-top: none;
  border-radius: 0 0 14px 14px;
}

.person-mouth {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 4px;
  background: #c76b8a;
  border-radius: 0 0 10px 10px;
  transition: height 0.5s ease, width 0.5s ease, background 0.5s ease;
}

.person-torso {
  width: 40px;
  height: 42px;
  margin: -4px auto 0;
  border-radius: 8px 8px 4px 4px;
  position: relative;
  z-index: 2;
}

.boy-shirt {
  background: linear-gradient(180deg, #4a6fa5, #3d5a80);
}

.girl-dress {
  background: linear-gradient(180deg, #e88aa0, #c76b8a);
  width: 44px;
  border-radius: 10px 10px 20px 20px;
}

.person-legs {
  width: 36px;
  height: 28px;
  margin: 0 auto;
  border-radius: 0 0 6px 6px;
}

.boy-pants {
  background: #2c3e50;
}

.girl-skirt {
  background: #c76b8a;
  width: 46px;
  height: 22px;
  border-radius: 0 0 20px 20px;
  margin-top: -4px;
}

.person-arm {
  position: absolute;
  background: linear-gradient(180deg, #ffdbac, #e8b88a);
  border-radius: 8px;
  z-index: 4;
}

.arm-cut {
  width: 10px;
  height: 36px;
  top: 52px;
  right: -4px;
  transform-origin: top center;
  transform: rotate(-20deg);
  opacity: 0;
}

.arm-feed {
  width: 10px;
  height: 42px;
  top: 48px;
  right: -2px;
  transform-origin: top center;
  transform: rotate(-35deg);
  opacity: 0;
  transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

.hand-fork {
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 20px;
}

.fork-cake {
  width: 18px;
  height: 14px;
  background: linear-gradient(135deg, #fce4ec, #e88aa0);
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.4s ease 0.3s;
  box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.2);
}

.birthday-scene[data-step="3"] .arm-feed,
.birthday-scene[data-step="4"] .arm-feed,
.birthday-scene[data-step="5"] .arm-feed {
  opacity: 1;
}

.birthday-scene[data-step="3"] .fork-cake,
.birthday-scene[data-step="4"] .fork-cake {
  opacity: 1;
}

.birthday-scene[data-step="4"] .arm-feed,
.birthday-scene[data-step="5"] .arm-feed {
  transform: rotate(-95deg) translateX(8px);
  transition-duration: 1.8s;
}

.birthday-scene[data-step="5"] .fork-cake {
  opacity: 0;
  transform: scale(0);
}

.birthday-scene[data-step="4"] .person-mouth,
.birthday-scene[data-step="5"] .person-mouth {
  height: 14px;
  width: 16px;
  background: #8b4557;
  border-radius: 50%;
}

.birthday-scene[data-step="5"] .person-mouth {
  height: 8px;
  width: 14px;
  background: #c76b8a;
  border-radius: 0 0 12px 12px;
}

.birthday-scene[data-step="5"] .sara .person-face {
  box-shadow: 0 0 12px rgba(232, 160, 184, 0.5);
}

.birthday-scene[data-step="4"] .talha .person-smile,
.birthday-scene[data-step="5"] .talha .person-smile {
  width: 16px;
  height: 8px;
}

.scene-btn {
  width: 100%;
  max-width: 300px;
}

.scene-btn:disabled {
  opacity: 0.55;
  cursor: default;
  transform: none;
}

.cake {
  font-size: 4rem;
  cursor: pointer;
  transition: transform 0.3s ease;
  display: inline-block;
}

.cake:hover {
  transform: scale(1.1);
}

.candles {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

.candle {
  font-size: 1.75rem;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.candle.lit {
  animation: flicker 0.8s ease infinite alternate;
}

.candle.blown {
  opacity: 0.2;
  transform: scale(0.7);
  animation: none;
}

@keyframes flicker {
  0% { opacity: 1; transform: scale(1); }
  100% { opacity: 0.7; transform: scale(0.95); }
}

.blow-hint {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

.blow-hint.done {
  color: var(--gold-light);
}

.final-content h2 {
  font-size: 2rem;
  margin-bottom: 1.25rem;
  color: var(--gold-light);
}

.final-message {
  font-size: 1.15rem;
  line-height: 2.2;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.final-message em {
  color: var(--rose);
  font-style: normal;
}

.wish-btn {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--night);
  border: none;
  padding: 1rem 2.5rem;
  border-radius: 50px;
  font-family: var(--font-urdu);
  font-size: 1.05rem;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.wish-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 12px 40px rgba(212, 168, 83, 0.5);
}

.wish-btn.sent {
  background: linear-gradient(135deg, var(--rose-deep), var(--rose));
  color: white;
  pointer-events: none;
}

.btn-hearts {
  display: block;
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

.wish-sent {
  margin-top: 1.5rem;
  color: var(--gold-light);
  animation: fade-in 0.6s ease both;
}

.wish-sent.hidden {
  display: none;
}

#confetti-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slide-up {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@media (max-width: 480px) {
  .date-box {
    flex-direction: column;
    gap: 0.5rem;
  }

  .date-meta {
    align-items: center;
  }

  .countdown-timer {
    gap: 0.4rem;
  }

  .time-unit {
    min-width: 48px;
    padding: 0.4rem;
  }

  .time-unit span {
    font-size: 1.4rem;
  }

  .love-hearts-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .wish-card {
    padding: 1.5rem;
  }

  .poem {
    font-size: 1.05rem;
  }
}

/* ── Couple Names ── */
.couple-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 1.25rem;
  margin: 0.75rem 0;
  background: rgba(232, 160, 184, 0.15);
  border: 1px solid rgba(232, 160, 184, 0.35);
  border-radius: 50px;
  flex-wrap: wrap;
  justify-content: center;
}

.couple-badge-lg {
  padding: 0.65rem 1.5rem;
  margin: 1rem 0 0.5rem;
}

.couple-badge-final {
  margin-bottom: 1rem;
}

.name-him {
  font-size: 1.15rem;
  color: var(--gold-light);
  font-weight: 600;
}

.name-her {
  font-size: 1.15rem;
  color: var(--rose);
  font-weight: 600;
  font-family: var(--font-body);
  direction: ltr;
}

.name-heart {
  font-size: 1.25rem;
  color: var(--rose-deep);
  animation: heartbeat 1.2s ease infinite;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.25); }
}

.love-promise {
  font-size: 1.15rem;
  color: var(--gold-light);
  margin: 0.5rem 0 1.25rem;
  padding: 0.5rem 1rem;
  text-align: center;
}

.love-promise-hero {
  margin-top: 0.75rem;
}

/* ── Hug Section ── */
.hug-section {
  max-width: 540px;
  margin: 2rem auto;
  width: 100%;
  text-align: center;
  padding: 0 0.5rem;
}

.hug-scene {
  width: 100%;
  max-width: 320px;
  margin: 0 auto 1rem;
  padding: 1.5rem 1rem;
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid rgba(232, 160, 184, 0.35);
  border-radius: 20px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  font-family: var(--font-urdu);
  color: var(--text);
}

.hug-scene:hover {
  transform: scale(1.03);
  box-shadow: 0 12px 40px rgba(199, 107, 138, 0.25);
  border-color: var(--rose);
}

.hug-couple {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  min-height: 90px;
  position: relative;
  margin-bottom: 0.75rem;
}

.hug-person {
  font-size: 3rem;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: inline-block;
}

.hug-person.boy {
  transform: translateX(20px);
}

.hug-person.girl {
  transform: translateX(-20px);
}

.hug-heart-float {
  position: absolute;
  font-size: 1.5rem;
  color: var(--rose);
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.hug-couple.hugging .hug-person.boy {
  transform: translateX(28px) scale(1.1);
}

.hug-couple.hugging .hug-person.girl {
  transform: translateX(-28px) scale(1.1);
}

.hug-couple.hugging .hug-heart-float {
  opacity: 1;
  transform: scale(1.5);
  animation: heartbeat 0.8s ease infinite;
}

.hug-label {
  display: block;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.hug-promise {
  font-size: 1.1rem;
  color: var(--rose);
  margin-top: 0.5rem;
}

.final-hug {
  font-size: 3.5rem;
  margin-bottom: 0.75rem;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.final-hug.show {
  opacity: 1;
  transform: scale(1);
  animation: bounce 1.2s ease infinite;
}

@media (max-width: 768px) {
  #screen-main {
    padding-top: 2rem;
    padding-bottom: 3rem;
  }

  .screen {
    padding: 1.25rem 1rem;
  }

  .couple-badge {
    gap: 0.4rem;
    padding: 0.45rem 1rem;
  }

  .name-him,
  .name-her {
    font-size: 1rem;
  }

  .hug-person {
    font-size: 2.5rem;
  }

  .date-day {
    font-size: clamp(3rem, 14vw, 5rem);
  }

  .hero h1 {
    font-size: clamp(1.5rem, 5.5vw, 2rem);
  }

  .final-content h2,
  #final-title {
    font-size: 1.6rem;
  }

  .scene-stage {
    height: 240px;
  }

  .person-figure {
    width: 58px;
    height: 110px;
  }

  .person-head {
    width: 36px;
    height: 36px;
  }

  .person-tag {
    font-size: 0.58rem;
  }

  .scene-person.talha { left: 4%; }
  .scene-person.sara { right: 4%; }
}

@media (max-width: 360px) {
  .countdown-timer {
    flex-wrap: wrap;
  }

  .time-unit {
    min-width: 42px;
  }

  .love-hearts-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
  }

  .primary-btn,
  .reveal-btn,
  .wish-btn {
    width: 100%;
    max-width: 280px;
  }
}
