:root {
  --bg1: #1a0533;
  --bg2: #4a1d6a;
  --pink: #ff4d8d;
  --gold: #ffd166;
  --white: #fff8fb;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Segoe UI", system-ui, sans-serif;
  background: radial-gradient(circle at top, var(--bg2), var(--bg1) 60%);
  color: var(--white);
  overflow: hidden;
  user-select: none;
}

.stage {
  position: relative;
  width: 100vw;
  height: 100vh;
}

.question {
  position: absolute;
  top: 18%;
  left: 50%;
  transform: translateX(-50%);
  width: min(90vw, 700px);
  text-align: center;
  font-size: clamp(1.4rem, 4.5vw, 2.6rem);
  font-weight: 800;
  text-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, opacity 0.2s ease;
  z-index: 2;
  pointer-events: none;
}

.question.shake {
  animation: shake 0.35s ease;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(-50%);
  }
  25% {
    transform: translateX(calc(-50% - 8px));
  }
  75% {
    transform: translateX(calc(-50% + 8px));
  }
}

.yes-btn {
  position: absolute;
  left: 50%;
  top: 55%;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 999px;
  padding: 1rem 1.6rem;
  font-size: clamp(1rem, 3vw, 1.35rem);
  font-weight: 800;
  color: #3b0a2a;
  background: linear-gradient(135deg, #fff, var(--gold));
  box-shadow: 0 12px 30px rgba(255, 77, 141, 0.35);
  cursor: pointer;
  z-index: 5;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  touch-action: manipulation;
}

.yes-btn:hover {
  transform: translate(-50%, -50%) scale(1.05);
  box-shadow: 0 16px 36px rgba(255, 77, 141, 0.45);
}

.yes-btn:active {
  transform: translate(-50%, -50%) scale(0.97);
}

.yes-btn.moving {
  transition: left 0.28s cubic-bezier(0.2, 0.9, 0.2, 1),
    top 0.28s cubic-bezier(0.2, 0.9, 0.2, 1), transform 0.12s ease;
}

.finale {
  position: fixed;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  z-index: 20;
  background: radial-gradient(circle at center, #6b2d8b, #1a0533 70%);
}

.finale.hidden {
  display: none;
}

#confetti {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.birthday {
  position: relative;
  z-index: 2;
  margin: 0;
  font-size: clamp(2.4rem, 10vw, 5.5rem);
  line-height: 1.05;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #fff, var(--gold), var(--pink), #fff);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shine 2.5s linear infinite, pop 0.7s ease;
  text-shadow: none;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.35));
}

.sub {
  position: relative;
  z-index: 2;
  font-size: clamp(1rem, 3vw, 1.4rem);
  opacity: 0.92;
}

.replay {
  position: relative;
  z-index: 2;
  margin-top: 1rem;
  border: 0;
  border-radius: 999px;
  padding: 0.8rem 1.3rem;
  font-weight: 800;
  cursor: pointer;
  background: #fff;
  color: #3b0a2a;
}

@keyframes shine {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 300% 50%;
  }
}

@keyframes pop {
  0% {
    transform: scale(0.4);
    opacity: 0;
  }
  70% {
    transform: scale(1.08);
    opacity: 1;
  }
  100% {
    transform: scale(1);
  }
}
