@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;700;900&display=swap');

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --yellow: #FFD700;
  --yellow-soft: #FFF3B0;
  --pink: #FF6B9D;
  --pink-soft: #FFD6E8;
  --blue: #4FC3F7;
  --purple: #B39DDB;
  --dark: #1a1a2e;
  --darker: #0f0f1a;
  --white: #FFFDE7;
  --glow: 0 0 20px #FFD700aa, 0 0 40px #FFD70055;
}

body {
  font-family: 'Nunito', sans-serif;
  background: var(--darker);
  min-height: 100vh;
  overflow: hidden;   /* el scroll lo maneja cada .screen */
  position: relative;
}

/* ===== PARTICLES ===== */
#particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  font-size: 1.4rem;
  animation: floatUp linear infinite;
  opacity: 0.7;
  bottom: 0;
}

@keyframes floatUp {
  0%   { transform: translateY(0) rotate(0deg);      opacity: 0.8; }
  10%  { opacity: 0.7; }
  90%  { opacity: 0.5; }
  100% { transform: translateY(-110vh) rotate(360deg); opacity: 0; }
}

/* ===== SCREENS ===== */
.screen {
  display: none;
  position: fixed;
  inset: 0;
  align-items: center;
  justify-content: center;
  z-index: 10;
  padding: 1.2rem;
  overflow-y: auto;       /* scroll si el contenido es más alto que la pantalla */
}
.screen.active {
  display: flex;
  flex-direction: column; /* permite que el card crezca verticalmente */
}

/* ===== CARD ===== */
.card {
  background: linear-gradient(135deg, #1e1e3a 0%, #16213e 60%, #0f3460 100%);
  border: 2px solid var(--yellow);
  border-radius: 24px;
  padding: 2rem 1.8rem;
  max-width: 480px;
  width: 100%;
  text-align: center;
  box-shadow: var(--glow), 0 8px 32px #0008;
  position: relative;
  /* sin overflow:hidden para que nada se corte */
  animation: cardIn 0.5s cubic-bezier(.34,1.56,.64,1);
  margin: auto;           /* centra verticalmente cuando hay scroll */
}

.card.wide { max-width: 560px; }
.card.celebration { border-color: var(--pink); box-shadow: 0 0 30px #FF6B9Daa, 0 0 60px #FF6B9D44; }

@keyframes cardIn {
  from { transform: scale(0.7) translateY(40px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}

/* ===== TYPOGRAPHY ===== */
.title-glow {
  font-size: 2rem;
  font-weight: 900;
  color: var(--yellow);
  text-shadow: var(--glow);
  margin-bottom: 0.5rem;
}
.title-glow.big { font-size: 2.8rem; }

.subtitle {
  color: var(--yellow-soft);
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.msg-romantic {
  color: #e0d7ff;
  font-size: 1rem;
  line-height: 1.7;
  margin: 1rem 0 1.5rem;
  background: #ffffff0d;
  border-radius: 12px;
  padding: 0.8rem 1rem;
  border-left: 3px solid var(--yellow);
}

/* ===== EMOJIS ===== */
.duck-row {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.emoji-big {
  font-size: 3rem;
  display: inline-block;
}

.duck-big {
  font-size: 5rem;
  display: inline-block;
  animation: duckWobble 1.5s ease-in-out infinite;
}

@keyframes duckWobble {
  0%, 100% { transform: rotate(-8deg) scale(1); }
  50%       { transform: rotate(8deg) scale(1.1); }
}

.mascot-area {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.speech-bubble {
  background: var(--yellow);
  color: var(--dark);
  font-weight: 900;
  font-size: 1.1rem;
  border-radius: 18px 18px 18px 4px;
  padding: 0.7rem 1.2rem;
  max-width: 260px;
  box-shadow: 0 4px 12px #FFD70055;
  animation: bubblePop 0.4s cubic-bezier(.34,1.56,.64,1);
}

@keyframes bubblePop {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* ===== BUTTONS ===== */
.btn-main {
  background: linear-gradient(135deg, var(--yellow), #FFA500);
  color: var(--dark);
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: 1.1rem;
  border: none;
  border-radius: 50px;
  padding: 0.8rem 2.2rem;
  cursor: pointer;
  box-shadow: 0 4px 20px #FFD70066;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn-main:hover {
  transform: scale(1.07);
  box-shadow: 0 6px 28px #FFD700aa;
}

.btn-area {
  display: flex;
  gap: 1.2rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 0.5rem;
  min-height: 60px;
}

.btn-yes {
  background: linear-gradient(135deg, #FFD700, #FF6B9D);
  color: #fff;
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: 1.2rem;
  border: none;
  border-radius: 50px;
  padding: 0.9rem 2.5rem;
  cursor: pointer;
  box-shadow: 0 4px 20px #FF6B9D66;
  transition: transform 0.15s, box-shadow 0.15s;
  animation: pulseYes 1.8s ease-in-out infinite;
}
.btn-yes:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 30px #FF6B9Daa;
}

@keyframes pulseYes {
  0%, 100% { box-shadow: 0 4px 20px #FF6B9D66; }
  50%       { box-shadow: 0 4px 35px #FF6B9Dcc, 0 0 20px #FFD700aa; }
}

.btn-no {
  background: #2a2a4a;
  color: #aaa;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid #444;
  border-radius: 50px;
  padding: 0.7rem 1.8rem;
  cursor: pointer;
  /* position y coords los maneja JS (fixed sobre toda la pantalla) */
  white-space: nowrap;
  user-select: none;
  pointer-events: auto;
}

/* ===== HINT TEXT ===== */
.hint-text {
  min-height: 1.4rem;
  color: var(--pink);
  font-size: 0.95rem;
  font-weight: 700;
  margin-top: 0.8rem;
  animation: fadeInHint 0.4s ease;
}

@keyframes fadeInHint {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== CELEBRATION ===== */
.emoji-explosion {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  font-size: 2.2rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.emoji-explosion span {
  animation: popIn 0.5s cubic-bezier(.34,1.56,.64,1) both;
}
.emoji-explosion span:nth-child(1) { animation-delay: 0.0s; }
.emoji-explosion span:nth-child(2) { animation-delay: 0.1s; }
.emoji-explosion span:nth-child(3) { animation-delay: 0.2s; }
.emoji-explosion span:nth-child(4) { animation-delay: 0.3s; }
.emoji-explosion span:nth-child(5) { animation-delay: 0.4s; }
.emoji-explosion span:nth-child(6) { animation-delay: 0.5s; }

@keyframes popIn {
  from { transform: scale(0) rotate(-30deg); opacity: 0; }
  to   { transform: scale(1) rotate(0deg); opacity: 1; }
}

.duck-dance {
  display: flex;
  justify-content: center;
  gap: 1rem;
  font-size: 2.5rem;
  margin: 1rem 0;
}

/* ===== CONFETTI ===== */
.confetti-piece {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  animation: confettiFall linear forwards;
  pointer-events: none;
}

@keyframes confettiFall {
  0%   { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(400px) rotate(720deg); opacity: 0; }
}

/* ===== ANIMATIONS ===== */
.anim-bounce {
  animation: bounce 1.2s ease-in-out infinite;
}
.anim-spin {
  animation: spin 2s linear infinite;
  display: inline-block;
}
.delay1 { animation-delay: 0.2s; }
.delay2 { animation-delay: 0.4s; }

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-12px); }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ===== VALORANT ACCENT ===== */
.card::before {
  content: '';
  position: absolute;
  top: -2px; left: 20%;
  width: 60%; height: 3px;
  background: linear-gradient(90deg, transparent, var(--yellow), var(--pink), transparent);
  border-radius: 2px;
}

/* ===== GIF ROMÁNTICO ===== */
.gif-wrap {
  position: relative;
  margin: 0.6rem auto 0.4rem;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--yellow);
  box-shadow: 0 0 20px #FFD70066, 0 0 40px #FF6B9D44;
  flex-shrink: 0;
}

.romantic-gif {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gif-fallback {
  display: none;
  font-size: 2.5rem;
  text-align: center;
  line-height: 150px;
}

.romantic-gif[style*="display:none"] + .gif-fallback,
.romantic-gif[style*="display: none"] + .gif-fallback {
  display: block;
}

.yes-msg {
  font-size: 1rem;
  line-height: 1.8;
  border-left-color: var(--pink);
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--darker); }
::-webkit-scrollbar-thumb { background: var(--yellow); border-radius: 3px; }
