@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&family=Poppins:wght@300;400;600;700&display=swap');

:root {
  --hot: #ff2f91;
  --pink: #ff7abb;
  --dark: #100008;
  --deep: #2b0016;
  --white: #fff1f8;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: Poppins, sans-serif;
  color: var(--white);
  overflow-x: hidden;
  background:
    radial-gradient(circle at top, #4b0028 0%, #1a000d 45%, #050004 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 47, 145, .22), transparent 24%),
    radial-gradient(circle at 80% 70%, rgba(255, 90, 170, .16), transparent 28%);
  pointer-events: none;
}

.screen {
  display: none;
  min-height: 100vh;
  padding: 28px;
  position: relative;
}

.screen.active {
  display: flex;
  animation: fadeIn .7s ease both;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Floating hearts */
.bg-hearts {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.heart {
  position: absolute;
  color: rgba(255, 77, 158, .65);
  text-shadow: 0 0 14px rgba(255, 47, 145, .8);
  animation: floatHeart linear infinite;
}

@keyframes floatHeart {
  from { transform: translateY(110vh) scale(.7) rotate(0deg); opacity: 0; }
  10%, 90% { opacity: 1; }
  to { transform: translateY(-15vh) scale(1.25) rotate(360deg); opacity: 0; }
}

/* Home */
#home {
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.photo-stack {
  width: 330px;
  height: 430px;
  position: relative;
  z-index: 2;
}

.polaroid, .final-photo {
  object-fit: cover;
  border: 5px solid #fff;
  border-radius: 8px;
  box-shadow: 0 0 25px rgba(255,47,145,.7);
  background: #fff;
}

.polaroid {
  position: absolute;
  width: 190px;
  height: 270px;
}

.p1 { left: 0; top: 10px; transform: rotate(-8deg); }
.p2 { right: 0; top: 70px; transform: rotate(7deg); }
.p3 { left: 70px; bottom: 0; transform: rotate(-3deg); }

.hero {
  text-align: center;
  z-index: 2;
  max-width: 590px;
  padding: 34px 24px;
  border: 1px solid rgba(255,122,187,.35);
  border-radius: 28px;
  background: rgba(20, 0, 10, .42);
  backdrop-filter: blur(8px);
  box-shadow: 0 0 50px rgba(255,47,145,.25);
}

.small-title {
  font-family: "Great Vibes", cursive;
  font-size: clamp(38px, 6vw, 62px);
  margin: 0;
}

h1 {
  font-family: "Great Vibes", cursive;
  font-size: clamp(78px, 14vw, 145px);
  margin: 0;
  color: #fff;
  text-shadow: 0 0 18px var(--hot), 0 0 42px var(--hot);
}

.hero h2 {
  color: var(--pink);
  margin: 0 0 18px;
  font-size: clamp(22px, 4vw, 35px);
}

.intro {
  max-width: 420px;
  margin: 0 auto 28px;
  line-height: 1.7;
}

button {
  cursor: pointer;
  border: 2px solid var(--pink);
  background: rgba(255, 47, 145, .12);
  color: #fff;
  border-radius: 16px;
  padding: 16px 32px;
  font-weight: 700;
  font-size: 18px;
  box-shadow: 0 0 20px rgba(255,47,145,.6);
  transition: .25s;
}

button:hover {
  transform: scale(1.05);
  background: rgba(255,47,145,.28);
}

/* Game */
#game {
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.game-title {
  margin: 0;
  text-align: center;
  font-size: clamp(30px, 6vw, 54px);
  text-shadow: 0 0 20px var(--hot);
}

.game-title span, .counter {
  color: var(--hot);
}

.counter {
  font-size: 30px;
  font-weight: 700;
  margin: 6px 0 22px;
}

.balloons {
  width: min(1000px, 100%);
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 28px 22px;
  justify-items: center;
  z-index: 2;
}

.balloon {
  width: 105px;
  height: 95px;
  border: 0;
  padding: 0;
  border-radius: 50% 50% 45% 45%;
  position: relative;
  background:
    radial-gradient(circle at 32% 27%, rgba(255,255,255,.8), transparent 13%),
    radial-gradient(circle at 60% 75%, #b40051, #ff2f91 45%, #ff8ac7 100%);
  box-shadow: inset -10px -16px 25px rgba(60,0,25,.35), 0 0 28px rgba(255,47,145,.85);
  animation: wobble 2.4s ease-in-out infinite;
  color: white;
  font-size: 34px;
  font-weight: 800;
  text-shadow: 0 0 8px #7b0039;
}

.balloon::before, .balloon::after {
  content: "";
  position: absolute;
  bottom: -16px;
  left: 45%;
}

.balloon::before {
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 18px solid #d90065;
}

.balloon::after {
  width: 2px;
  height: 45px;
  background: linear-gradient(var(--pink), transparent);
  transform: translateX(9px);
}

.balloon.popped {
  animation: pop .35s ease forwards;
  pointer-events: none;
}

@keyframes wobble {
  0%,100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-12px) rotate(2deg); }
}

@keyframes pop {
  to { opacity: 0; transform: scale(1.9) rotate(20deg); filter: blur(4px); }
}

.mini-message {
  min-height: 28px;
  margin-top: 24px;
  text-align: center;
  color: #ffd7ea;
  font-weight: 600;
}

/* Final */
#final {
  align-items: center;
  justify-content: center;
  padding: 35px 18px;
}

#confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.final-wrap {
  z-index: 3;
  width: min(1050px, 100%);
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 30px;
  align-items: center;
}

.final-photos {
  min-height: 560px;
  position: relative;
}

.final-photo {
  position: absolute;
  width: 230px;
  height: 330px;
}

.final-photo:nth-child(1) { left: 10px; top: 25px; }
.final-photo:nth-child(2) { right: 25px; top: 100px; }
.final-photo:nth-child(3) { left: 130px; bottom: 20px; }

.tilt-left { transform: rotate(-7deg); }
.tilt-right { transform: rotate(7deg); }

.letter {
  background: rgba(12,0,8,.62);
  border: 1px solid rgba(255,122,187,.45);
  border-radius: 26px;
  padding: 32px;
  box-shadow: 0 0 50px rgba(255,47,145,.28);
}

.letter h2 {
  font-family: "Great Vibes", cursive;
  font-size: clamp(38px, 7vw, 70px);
  margin: 0 0 20px;
  color: #fff;
  text-shadow: 0 0 20px var(--hot);
}

#typedText {
  white-space: pre-line;
  line-height: 1.9;
  font-size: 18px;
}

.forever {
  margin-top: 24px;
  width: 100%;
}

@media (max-width: 800px) {
  .screen { padding: 18px; }
  #home { align-content: center; gap: 15px; }
  .photo-stack { width: 300px; height: 330px; transform: scale(.82); margin-bottom: -35px; }
  .hero { width: 100%; padding: 24px 14px; }
  .balloons { grid-template-columns: repeat(3, 1fr); gap: 23px 12px; }
  .balloon { width: 88px; height: 82px; font-size: 29px; }
  .final-wrap { display: block; }
  .final-photos { min-height: 450px; transform: scale(.82); transform-origin: top center; margin-bottom: -70px; }
  .final-photo { width: 200px; height: 285px; }
  .final-photo:nth-child(1) { left: 0; }
  .final-photo:nth-child(2) { right: 0; }
  .final-photo:nth-child(3) { left: 80px; }
  .letter { padding: 24px 18px; }
  #typedText { font-size: 16px; }
}
