
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --pink: #ff4fa3;
  --purple: #a56bff;
  --bg: #090610;
}

body {
  min-height: 100vh;
  color: white;
  font-family: "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left,#351044,transparent 45%),
    radial-gradient(circle at bottom right,#281044,transparent 45%),
    var(--bg);
  overflow-x: hidden;
}

.page {
  display: none;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  z-index: 2;
}

.page.active {
  display: flex;
  animation: enter .8s ease;
}

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

.card {
  width: 100%;
  max-width: 720px;
  padding: 40px 25px;
  text-align: center;
  border-radius: 28px;
  background: rgba(25,16,32,.92);
  border: 1px solid #ffffff22;
  box-shadow: 0 0 35px #a56bff33;
  backdrop-filter: blur(15px);
}

h1 {
  font-size: clamp(28px,6vw,45px);
  margin-bottom: 18px;
  background: linear-gradient(90deg,#fff,#ff82c1,#b68aff);
  color: transparent;
  background-clip: text;
  -webkit-background-clip: text;
}

h2 { margin: 15px 0; }
h3 { margin: 12px 0; }

p {
  color: #e2cfe4;
  line-height: 1.8;
  margin: 14px 0;
}

button {
  padding: 14px 24px;
  margin: 10px 5px;
  border: none;
  border-radius: 50px;
  background: linear-gradient(100deg,#d83b91,#854de6);
  color: white;
  font-weight: bold;
  font-size: 15px;
  cursor: pointer;
  transition: .3s;
  box-shadow: 0 5px 20px #d83b9155;
}

button:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px #ff4fa388;
}

input, textarea {
  display: block;
  width: 100%;
  max-width: 380px;
  margin: 15px auto;
  padding: 14px;
  color: white;
  background: #0b0711;
  border: 1px solid #9c69b8;
  border-radius: 14px;
  outline: none;
  font: inherit;
}

input:focus, textarea:focus {
  border-color: var(--pink);
  box-shadow: 0 0 15px #ff4fa355;
}

input[type="date"],
input[type="time"] {
  color-scheme: dark;
}

textarea {
  min-height: 100px;
  resize: vertical;
}

label {
  display: block;
  color: #ffb3d9;
  margin-top: 15px;
}

.emoji {
  font-size: 60px;
  animation: float 3s infinite ease-in-out;
}

@keyframes float {
  50% { transform: translateY(-12px); }
}

.letter {
  text-align: left;
  white-space: pre-line;
  line-height: 2;
  padding: 24px;
  margin: 20px 0;
  background: #ffffff0c;
  border-radius: 18px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 18px;
  margin: 25px 0;
}

.gallery > div {
  padding: 15px;
  border: 1px dashed #d58acb;
  border-radius: 18px;
}

.gallery img {
  display: none;
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  border-radius: 14px;
}

.moon {
  font-size: 75px;
  margin-bottom: 20px;
  filter: drop-shadow(0 0 25px #b98aff);
  animation: glow 3s infinite alternate;
}

@keyframes glow {
  to { filter: drop-shadow(0 0 35px #ff74bd); }
}

.gift {
  font-size: 100px;
  cursor: pointer;
  animation: float 1.5s infinite;
}

.hidden { display: none !important; }

#hearts {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.heart {
  position: absolute;
  bottom: -50px;
  color: var(--pink);
  text-shadow: 0 0 12px var(--pink);
  animation: rise linear infinite;
}

@keyframes rise {
  to {
    transform: translateY(-115vh) rotate(360deg);
    opacity: 0;
  }
}

#passMsg, #dateResult, #firstElapsed,
#countdown, #quizResult {
  color: #ff9acb;
}

@media(max-width:600px) {
  .card { padding: 30px 18px; }
  .gallery { grid-template-columns: 1fr; }
  button { max-width: 100%; }
}
