:root {
  --cream: #fdf8f5;
  --pink-light: #ffebf3;
  --pink-main: #ff9fc7;
  --pink-deep: #f06292;
  --lilac: #ebd8f8;
  --mint: #d5f2e8;
  --peach: #ffe7d6;
  --text: #4a3b43;
  --text-muted: #8b7380;
  --card-bg: rgba(255, 255, 255, 0.82);
  font-size: 16px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Quicksand', sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 15% 20%, var(--peach) 0%, transparent 45%),
              radial-gradient(circle at 85% 15%, var(--lilac) 0%, transparent 50%),
              radial-gradient(circle at 50% 90%, var(--mint) 0%, transparent 55%),
              linear-gradient(160deg, var(--cream), var(--pink-light) 120%);
  overflow-x: hidden;
  position: relative;
}

/* Fondo de partículas y tulipanes */
.field {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

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

/* Escenario con perspectiva 3D para efecto de Libro */
.stage {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 440px;
  padding: 20px 16px;
  display: flex;
  justify-content: center;
  perspective: 1400px;
  perspective-origin: 50% 50%;
}

.card {
  background: var(--card-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  border-radius: 32px;
  padding: 36px 24px 28px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 50px -15px rgba(224, 133, 178, 0.35);
  
  /* Soporte de transiciones 3D de páginas de libro */
  transform-style: preserve-3d;
  backface-visibility: hidden;
  will-change: transform, opacity;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
}

/* Animaciones 3D de paso de página */
.card.page-turn-out {
  transform: rotateY(-90deg) scale(0.92) translateX(-40px);
  opacity: 0;
  transform-origin: left center;
  transition: transform 0.35s ease-in, opacity 0.3s ease-in;
}

.card.page-turn-in-start {
  transform: rotateY(90deg) scale(0.92) translateX(40px);
  opacity: 0;
  transform-origin: right center;
}

.card.page-turn-in-active {
  transform: rotateY(0deg) scale(1) translateX(0);
  opacity: 1;
  transition: transform 0.5s cubic-bezier(0.34, 1.4, 0.64, 1), opacity 0.4s ease-out;
}

/* Snoopy e Ilustraciones */
.snoopy-container {
  width: 140px;
  height: 140px;
  margin: 0 auto 16px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.snoopy-container.mini {
  width: 110px;
  height: 110px;
  margin-bottom: 10px;
}

.snoopy-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 24px;
  filter: drop-shadow(0 8px 16px rgba(210, 110, 150, 0.22));
}

.floating-snoopy {
  animation: floatSnoopy 3.5s ease-in-out infinite;
}

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

.pulse-snoopy {
  animation: pulseSnoopy 2.8s ease-in-out infinite;
}

@keyframes pulseSnoopy {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.bounce-snoopy {
  animation: bounceSnoopy 2s ease-in-out infinite;
}

@keyframes bounceSnoopy {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Tipografía */
.eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 4px;
}

h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2.7rem;
  color: #c15b8c;
  margin-bottom: 12px;
}

h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  color: #ba4e83;
  margin-bottom: 10px;
}

.question-title {
  font-size: 1.9rem;
  margin: 10px 0 20px;
}

.description {
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text);
  margin-bottom: 24px;
}

/* Tulipanes decorativos superiores */
.tulip-header-row {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 12px;
  height: 75px;
  margin-bottom: 12px;
}

.tulip-icon {
  width: 42px;
  height: 72px;
}

.tulip-icon.alt {
  width: 54px;
  height: 90px;
}

/* Botones con efectos suaves */
.buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.buttons.vertical {
  flex-direction: column;
}

.btn {
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 14px 24px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  width: 100%;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn.primary, .btn.yes {
  background: linear-gradient(135deg, #ff7ba9, #ff5391);
  color: #fff;
  box-shadow: 0 10px 24px -6px rgba(255, 83, 145, 0.45);
}

.btn.yes-alt {
  background: linear-gradient(135deg, #b873e0, #a04fd1);
  color: #fff;
  box-shadow: 0 10px 24px -6px rgba(160, 79, 209, 0.4);
}

.btn.secondary {
  background: rgba(255, 255, 255, 0.85);
  color: #924b75;
  border: 1.5px solid rgba(220, 150, 185, 0.4);
  font-size: 0.95rem;
  padding: 11px 20px;
  margin-top: 16px;
}

.btn:active {
  transform: scale(0.95);
}

/* Contador de Amor */
.counter-box {
  background: rgba(255, 255, 255, 0.68);
  border-radius: 20px;
  padding: 18px 12px;
  margin: 16px 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.9);
}

.counter-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 12px;
}

.timer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.timer-unit {
  background: #ffffff;
  border-radius: 14px;
  padding: 10px 4px;
  box-shadow: 0 4px 12px rgba(220, 150, 180, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.timer-unit .number {
  font-size: 1.5rem;
  font-weight: 700;
  color: #c15b8c;
  line-height: 1.2;
}

.timer-unit .label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}

.start-date-text {
  font-size: 0.85rem;
  color: #a05a7d;
  font-weight: 600;
}

/* Tulipanes animados del fondo */
.bg-tulip {
  position: fixed;
  z-index: 0;
  opacity: 0.45;
  transform-origin: 50% 100%;
  animation: sway var(--sd, 4s) ease-in-out infinite;
  filter: drop-shadow(0 6px 12px rgba(255, 160, 210, 0.25));
}

@keyframes sway {
  0%, 100% { transform: rotate(var(--r, 0deg)) scale(1); }
  50%     { transform: rotate(calc(var(--r, 0deg) + 14deg)) scale(1.02); }
}

/* Capa de confeti */
.confetti-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  top: -40px;
  border-radius: 3px;
  animation-name: fall;
  animation-timing-function: cubic-bezier(.4, 0, .6, 1);
  animation-fill-mode: forwards;
}

@keyframes fall {
  to { transform: translateY(110vh) rotate(540deg); opacity: 0.9; }
}

@media (max-width: 380px) {
  h1 { font-size: 2.3rem; }
  h2 { font-size: 1.5rem; }
  .card { padding: 28px 18px 22px; }
  .timer-unit .number { font-size: 1.3rem; }
}
