:root {
  --cream: #fff6ee;
  --cream2: #fdeee0;
  --pink: #ffd6e6;
  --pink2: #ffb8d6;
  --pink-deep: #ff6fa5;
  --rose: #d6417d;
  --rose-dark: #7a2145;
  --ink: #5a2340;
  --white: #ffffff;
  --shadow: 0 14px 34px rgba(214, 65, 125, 0.18);
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: "Poppins", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, var(--cream) 0%, var(--pink) 100%);
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
.app-shell {
  max-width: 560px;
  margin: 0 auto;
  position: relative;
  background: linear-gradient(
    180deg,
    var(--cream) 0%,
    var(--cream2) 40%,
    var(--pink) 100%
  );
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}
img {
  max-width: 100%;
  display: block;
}

/* ---------- floating hearts background ---------- */
.hearts-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}
.hearts-bg span {
  position: absolute;
  top: -10vh;
  will-change: transform;
  animation-name: fallHeart;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}
@keyframes fallHeart {
  0% {
    transform: translateY(0) rotate(0deg);
  }
  100% {
    transform: translateY(120vh) rotate(360deg);
  }
}

/* ---------- confetti ---------- */
.confetti-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 60;
}
.confetti-piece {
  position: fixed;
  width: 8px;
  height: 12px;
  border-radius: 2px;
  animation: confettiFall 1.3s cubic-bezier(0.2, 0.8, 0.4, 1) forwards;
}
@keyframes confettiFall {
  to {
    transform: translate(var(--dx), var(--dy)) rotate(var(--rot));
    opacity: 0;
  }
}

/* ---------- music button ---------- */
.music-btn {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 70;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: var(--white);
  box-shadow: var(--shadow);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* ---------- progress dots ---------- */
.progress-dots {
  position: fixed;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 70;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.progress-dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(214, 65, 125, 0.35);
  padding: 0;
  cursor: pointer;
  transition: 0.25s;
}
.progress-dots button.active {
  background: var(--rose);
  transform: scale(1.5);
}

/* ---------- generic panel ---------- */
.panel {
  position: relative;
  z-index: 2;
  padding: 70px 22px;
  text-align: center;
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}
.panel.in-view {
  opacity: 1;
  transform: translateY(0);
}
.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--rose);
  margin-bottom: 22px;
  line-height: 1.4;
}
.section-title span {
  color: var(--pink-deep);
  font-family: "Dancing Script", cursive;
  font-size: 1.25em;
}
.section-title.light {
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}
.sub {
  color: var(--ink);
  opacity: 0.8;
  margin-top: -10px;
  margin-bottom: 18px;
}

.btn-main {
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 16px 34px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--pink-deep), var(--rose));
  box-shadow: var(--shadow);
  animation: pulseBtn 2.2s ease-in-out infinite;
}
.btn-soft {
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 26px;
  border-radius: 999px;
  color: var(--rose);
  background: #fff;
  box-shadow: var(--shadow);
  margin-top: 16px;
}
.btn-main:disabled,
.btn-soft:disabled {
  opacity: 0.6;
  cursor: default;
  animation: none;
}
@keyframes pulseBtn {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.045);
  }
}

/* ---------- hero ---------- */
.hero {
  min-height: 100vh;
  padding: 0;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  opacity: 1;
  transform: none;
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.15) 0%,
      rgba(255, 246, 238, 0) 45%,
      var(--cream) 92%
    ),
    linear-gradient(
      0deg,
      rgba(255, 111, 165, 0.12),
      rgba(255, 111, 165, 0) 40%
    );
}
.hero-arch {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  width: 120%;
  max-width: none;
  opacity: 0.92;
  z-index: 1;
}
.hero-float {
  position: absolute;
  width: 34%;
  opacity: 0.95;
  animation: bob 4.5s ease-in-out infinite;
}
.hero-float-left {
  left: -6%;
  bottom: 16%;
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 26px 24px 54px;
  width: 100%;
}
.hero-photo {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 30%;
  border: 5px solid #fff;
  box-shadow: var(--shadow);
  margin: 0 auto 16px;
  display: block;
  animation: heroPhotoIn 0.8s ease, bob 4.5s ease-in-out 0.8s infinite;
}
@keyframes heroPhotoIn {
  from {
    transform: scale(0.6);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
.eyebrow {
  font-weight: 600;
  color: var(--rose);
  letter-spacing: 0.3px;
  margin: 0 0 6px;
}
.hero-title {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--rose-dark);
  margin: 0 0 14px;
  line-height: 1.25;
  text-shadow: 0 2px 14px rgba(255, 255, 255, 0.6);
}
.hero-title span {
  color: var(--pink-deep);
  font-family: "Dancing Script", cursive;
  font-size: 1.15em;
}
.countdown {
  display: inline-block;
  background: rgba(255, 255, 255, 0.9);
  color: var(--rose);
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  margin-bottom: 22px;
  font-size: 0.9rem;
}
@keyframes bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-14px);
  }
}

/* ---------- facts ---------- */
.facts-card {
  background: #fff;
  border-radius: 24px;
  padding: 28px 22px;
  box-shadow: var(--shadow);
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.facts-card p {
  font-size: 1.05rem;
  font-weight: 500;
  margin: 0;
  transition: opacity 0.25s ease;
}
.facts-emoji {
  position: absolute;
  top: -34px;
  right: 6px;
  width: 60px;
  transform: rotate(8deg);
}

/* ---------- bhindi ---------- */
.btn-bhindi {
  background: linear-gradient(135deg, #7bc36a, #4c9a3b);
}
.bhindi-reveal {
  margin-top: 26px;
  display: none;
}
.bhindi-reveal.show {
  display: block;
}
.bhindi-reveal img {
  width: 60%;
  margin: 0 auto 14px;
  border-radius: 20px;
  box-shadow: var(--shadow);
  background: #fff;
  padding: 10px;
}
.bhindi-reveal img.zoom-anim {
  animation: zoomWobble 0.6s ease;
}
@keyframes zoomWobble {
  0% {
    transform: scale(0.2) rotate(-8deg);
    opacity: 0;
  }
  60% {
    transform: scale(1.1) rotate(4deg);
    opacity: 1;
  }
  100% {
    transform: scale(1) rotate(0deg);
  }
}
.bhindi-caption {
  font-weight: 700;
  color: var(--rose);
  margin: 0 0 6px;
}
.bhindi-joke {
  font-size: 0.92rem;
  color: var(--ink);
  opacity: 0.85;
  margin: 0;
}

/* ---------- game ---------- */
.game-box {
  background: #fff;
  border-radius: 24px;
  padding: 20px;
  box-shadow: var(--shadow);
}
.game-hud {
  font-weight: 700;
  color: var(--rose);
  margin-bottom: 12px;
}
.game-field {
  position: relative;
  height: 230px;
  border-radius: 16px;
  overflow: hidden;
  background: repeating-linear-gradient(
    135deg,
    #fff0f5,
    #fff0f5 12px,
    #ffe4ef 12px,
    #ffe4ef 24px
  );
  border: 2px dashed var(--pink2);
}
.game-heart {
  position: absolute;
  font-size: 28px;
  cursor: pointer;
  user-select: none;
  animation: popIn 0.25s ease;
}
@keyframes popIn {
  from {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}
.game-result {
  margin-top: 14px;
  font-weight: 600;
  color: var(--rose-dark);
  min-height: 20px;
}

/* ---------- coupons ---------- */
.coupon-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 6px;
}
.coupon-card {
  width: 30%;
  aspect-ratio: 3/4;
  perspective: 900px;
  cursor: pointer;
}
.coupon-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}
.coupon-card.flipped .coupon-inner {
  transform: rotateY(180deg);
}
.coupon-front,
.coupon-back {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  padding: 8px;
  text-align: center;
}
.coupon-front {
  background: linear-gradient(135deg, var(--pink2), var(--pink-deep));
  font-size: 2rem;
  color: #fff;
}
.coupon-back {
  background: #fff;
  transform: rotateY(180deg);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--rose-dark);
}

/* ---------- gift ---------- */
.gift-stage {
  margin-top: 10px;
}
.gift-stage.hidden {
  display: none;
}
.gift-img {
  width: 52%;
  margin: 0 auto;
  cursor: pointer;
}
.gift-img.small {
  width: 38%;
}
.gift-img.wobble {
  animation: wobble 2.4s ease-in-out infinite;
}
@keyframes wobble {
  0%,
  100% {
    transform: rotate(-3deg);
  }
  50% {
    transform: rotate(3deg);
  }
}
.gift-stage.opening .gift-img {
  animation: openShake 0.5s ease;
}
@keyframes openShake {
  0% {
    transform: scale(1) rotate(0);
  }
  30% {
    transform: scale(1.1) rotate(-6deg);
  }
  60% {
    transform: scale(0.92) rotate(6deg);
  }
  100% {
    transform: scale(1) rotate(0);
  }
}
.gift-stage.burst .gift-img {
  animation: burstIn 0.6s ease;
}
@keyframes burstIn {
  0% {
    transform: scale(0.7);
    opacity: 0.4;
  }
  60% {
    transform: scale(1.12);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
.hint {
  margin-top: 12px;
  font-weight: 600;
  color: var(--rose);
}

/* ---------- memory / polaroid ---------- */
.polaroid {
  background: #fff;
  padding: 14px 14px 42px;
  border-radius: 6px;
  box-shadow: var(--shadow);
  display: inline-block;
  transform: rotate(-4deg);
  max-width: 78%;
  position: relative;
  z-index: 2;
  transition: transform 0.4s ease;
}
.polaroid:active,
.polaroid.straighten {
  transform: rotate(0deg) scale(1.03);
}
.polaroid img {
  border-radius: 2px;
  width: 100%;
}
.polaroid p {
  font-family: "Dancing Script", cursive;
  font-size: 1.3rem;
  color: var(--rose);
  margin: 10px 0 0;
}
.bouquet-float {
  width: 38%;
  margin: -30px auto 0;
  position: relative;
  z-index: 1;
  animation: bob 5s ease-in-out infinite;
}

/* ---------- letter ---------- */
.dark-panel {
  background-image: url(images/heart1.png);
  background-size: cover;
  background-position: center;
}
.dark-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(50, 10, 25, 0.55);
  z-index: 0;
}
.dark-panel > * {
  position: relative;
  z-index: 1;
}
.envelope {
  background: linear-gradient(135deg, #fff, #fff6ee);
  border-radius: 18px;
  padding: 34px 20px;
  box-shadow: var(--shadow);
  cursor: pointer;
  max-width: 280px;
  margin: 0 auto;
  font-weight: 700;
  color: var(--rose);
}
.seal {
  font-size: 2.4rem;
  display: block;
  margin-bottom: 10px;
  animation: bob 3s ease-in-out infinite;
}
.envelope.opened {
  animation: envelopeGone 0.5s ease forwards;
}
@keyframes envelopeGone {
  to {
    transform: scale(0.7);
    opacity: 0;
  }
}
.letter-paper {
  display: none;
  background: #fffaf3;
  border-radius: 18px;
  padding: 30px 24px;
  box-shadow: var(--shadow);
  max-width: 420px;
  margin: 20px auto 0;
  text-align: left;
}
.letter-paper.show {
  display: block;
  animation: unfold 0.6s ease;
}
@keyframes unfold {
  from {
    opacity: 0;
    transform: translateY(24px) scaleY(0.85);
  }
  to {
    opacity: 1;
    transform: translateY(0) scaleY(1);
  }
}
.letter-paper p {
  font-family: "Caveat", cursive;
  font-size: 1.35rem;
  line-height: 1.55;
  color: var(--ink);
  margin: 0 0 14px;
  white-space: pre-line;
}
.letter-paper .signoff {
  text-align: right;
  font-size: 1.5rem;
  color: var(--rose);
}

/* ---------- finale ---------- */
.finale {
  position: relative;
  padding-top: 40px;
  padding-bottom: 70px;
}
.finale-arch {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 110%;
  opacity: 0.9;
}
.finale-title {
  position: relative;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--rose-dark);
  margin: 60px 0 20px;
}
.cake-wrap {
  position: relative;
  cursor: pointer;
  display: inline-block;
}
.cake-wrap img {
  width: 220px;
  transition: filter 0.3s;
}
.cake-wrap img.blown {
  filter: brightness(1.15) saturate(1.1);
  animation: cakeWish 0.5s ease;
}
@keyframes cakeWish {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
  }
}
.finale-float-left,
.finale-float-right {
  position: absolute;
  width: 32%;
  opacity: 0.9;
  animation: bob 5s ease-in-out infinite;
}
.finale-float-left {
  left: -4%;
  bottom: 60px;
}
.finale-float-right {
  right: -4%;
  bottom: 100px;
  animation-delay: 1s;
}
.footer-credit {
  margin-top: 34px;
  font-size: 0.85rem;
  opacity: 0.65;
}
.finale-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- lock screen ---------- */
.lock-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(160deg, var(--cream) 0%, var(--pink) 70%, var(--pink2) 100%);
}
html.locked .lock-screen {
  display: flex;
}
html.locked .app-shell,
html.locked .progress-dots,
html.locked .music-btn {
  display: none;
}
.lock-screen.unlock-fade {
  animation: lockFadeOut 0.8s ease forwards;
}
@keyframes lockFadeOut {
  to {
    opacity: 0;
    transform: scale(1.05);
  }
}
.lock-bg {
  position: absolute;
  inset: 0;
  background-image: url(images/card.jpeg);
  background-size: cover;
  background-position: top center;
  opacity: 0.14;
  filter: blur(1px);
}
.lock-balloon {
  position: absolute;
  width: 34%;
  opacity: 0.85;
  animation: bob 4.5s ease-in-out infinite;
  z-index: 1;
}
.lock-balloon-left {
  left: -8%;
  bottom: -4%;
}
.lock-balloon-right {
  right: -10%;
  top: -6%;
  animation-delay: 1.2s;
}
.lock-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 32px 24px;
  max-width: 420px;
}
.lock-emoji {
  font-size: 2.6rem;
  display: block;
  margin-bottom: 14px;
  animation: bob 3s ease-in-out infinite;
}
.lock-title {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--rose-dark);
  margin: 0 0 14px;
}
.lock-title span {
  font-family: "Dancing Script", cursive;
  color: var(--pink-deep);
  font-size: 1.2em;
}
.lock-sub {
  color: var(--ink);
  opacity: 0.85;
  margin: 0 0 28px;
  line-height: 1.6;
}
.lock-countdown {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 22px;
}
.lock-box {
  background: #fff;
  border-radius: 16px;
  padding: 14px 10px;
  min-width: 64px;
  box-shadow: var(--shadow);
}
.lock-box span {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--rose);
  font-variant-numeric: tabular-nums;
}
.lock-box.tick span {
  animation: tickPulse 0.35s ease;
}
@keyframes tickPulse {
  0% {
    transform: scale(1.25);
  }
  100% {
    transform: scale(1);
  }
}
.lock-box small {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--ink);
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.lock-footer {
  font-size: 0.85rem;
  color: var(--rose);
  font-weight: 600;
}

@media (max-width: 360px) {
  .hero-title {
    font-size: 1.75rem;
  }
  .section-title {
    font-size: 1.3rem;
  }
  .lock-box {
    min-width: 54px;
    padding: 10px 6px;
  }
  .lock-box span {
    font-size: 1.3rem;
  }
}
