/* ==========================================================================
   VARIABLES Y SISTEMA DE DISEÑO (FESTIVO & MODERNO)
   ========================================================================== */
:root {
  --bg-main: #0c081f;
  --bg-gradient: radial-gradient(circle at 50% 10%, #29104d 0%, #0d0722 55%, #05030e 100%);
  
  --primary-pink: #ff2a85;
  --primary-purple: #8b2fc9;
  --accent-gold: #ffbe0b;
  --accent-cyan: #00f0ff;
  --accent-orange: #fb5607;
  
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-bg-hover: rgba(255, 255, 255, 0.13);
  --glass-border: rgba(255, 255, 255, 0.16);
  --glass-border-glow: rgba(255, 42, 133, 0.45);
  --glass-shadow: 0 16px 40px 0 rgba(0, 0, 0, 0.45), 0 0 30px rgba(139, 47, 201, 0.25);

  --text-main: #ffffff;
  --text-muted: #c9bede;
  --text-highlight: #ffbe0b;

  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Fredoka', 'Outfit', cursive, sans-serif;
  --font-mono: 'Space Grotesk', monospace;

  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-pill: 9999px;
  
  --safe-bottom: env(safe-area-inset-bottom, 16px);
}

/* ==========================================================================
   RESETEO Y BASE
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  min-height: 100%;
  font-family: var(--font-main);
  background: var(--bg-main);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-main);
  overflow-x: hidden;
  position: relative;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px 12px calc(24px + var(--safe-bottom));
}

/* ==========================================================================
   PANTALLA DE CARGA CON PASTEL DE CUMPLEAÑOS
   ========================================================================== */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at center, #260d47 0%, #0d061f 70%, #05020c 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.6s ease;
}

.loading-screen.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px;
  max-width: 380px;
  width: 90%;
}

/* --- Pastel de Cumpleaños Animado --- */
.cake-wrapper {
  position: relative;
  width: 170px;
  height: 150px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  animation: cakeBounce 3s ease-in-out infinite alternate;
}

@keyframes cakeBounce {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(-8px) scale(1.03); }
}

/* Velita y Llama */
.candle {
  position: absolute;
  top: 10px;
  width: 12px;
  height: 35px;
  background: repeating-linear-gradient(45deg, #ff2a85, #ff2a85 6px, #ffffff 6px, #ffffff 12px);
  border-radius: 4px;
  box-shadow: 0 0 10px rgba(255, 42, 133, 0.6);
  z-index: 5;
}

.flame {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 22px;
  background: radial-gradient(ellipse at bottom, #ffbe0b 0%, #ff5e00 60%, transparent 100%);
  border-radius: 50% 50% 35% 35% / 60% 60% 40% 40%;
  box-shadow: 0 0 15px #ffbe0b, 0 0 25px #ff5e00;
  animation: flicker 0.6s infinite alternate ease-in-out;
  transform-origin: bottom center;
}

@keyframes flicker {
  0% { transform: translateX(-50%) scale(1) rotate(-3deg); }
  100% { transform: translateX(-50%) scale(1.15, 1.25) rotate(4deg); }
}

.flame-glow {
  position: absolute;
  top: -25px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 50px;
  background: radial-gradient(circle, rgba(255, 190, 11, 0.4) 0%, transparent 70%);
  border-radius: 50%;
  animation: glowPulse 1.2s infinite alternate;
}

@keyframes glowPulse {
  0% { opacity: 0.5; transform: translateX(-50%) scale(0.8); }
  100% { opacity: 0.9; transform: translateX(-50%) scale(1.2); }
}

/* Capas del pastel */
.cake-layer {
  position: relative;
  border-radius: 12px;
  box-shadow: inset 0 -4px 6px rgba(0, 0, 0, 0.25), 0 4px 10px rgba(0, 0, 0, 0.3);
}

.layer-top {
  width: 100px;
  height: 38px;
  background: linear-gradient(180deg, #ff70a6 0%, #ff2a85 100%);
  z-index: 4;
}

.strawberries {
  position: absolute;
  top: -14px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-around;
  font-size: 1.1rem;
}

.icing-drips {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-around;
}

.drip {
  width: 12px;
  height: 12px;
  background: #ffffff;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.layer-middle {
  width: 135px;
  height: 40px;
  background: linear-gradient(180deg, #ffd166 0%, #f4a261 100%);
  margin-top: -6px;
  z-index: 3;
}

.frosting-line {
  position: absolute;
  top: 45%;
  left: 0;
  right: 0;
  height: 6px;
  background: #ffffff;
  border-radius: 4px;
  opacity: 0.9;
}

.layer-bottom {
  width: 165px;
  height: 42px;
  background: linear-gradient(180deg, #9b5de5 0%, #7209b7 100%);
  margin-top: -6px;
  z-index: 2;
}

.plate {
  position: absolute;
  bottom: -10px;
  left: -15px;
  right: -15px;
  height: 14px;
  background: linear-gradient(180deg, #e0e0e0 0%, #9e9e9e 100%);
  border-radius: 20px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
  z-index: 1;
}

.loader-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, #ffffff 0%, #ffd166 50%, #ff2a85 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
}

.loader-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.progress-bar-container {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-bottom: 22px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.4);
}

.progress-bar-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #ff2a85, #ffbe0b, #00f0ff);
  border-radius: var(--radius-pill);
  transition: width 0.3s ease;
  box-shadow: 0 0 10px rgba(255, 42, 133, 0.8);
}

.btn-enter {
  width: 100%;
  padding: 15px 22px;
  background: linear-gradient(135deg, #ff2a85 0%, #ffbe0b 50%, #8b2fc9 100%);
  background-size: 200% 200%;
  color: #fff;
  border: none;
  border-radius: var(--radius-pill);
  font-family: var(--font-main);
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(255, 42, 133, 0.5);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.pulse-animation {
  animation: pulseButton 1.8s infinite ease-in-out;
}

@keyframes pulseButton {
  0%, 100% { transform: scale(1); box-shadow: 0 8px 25px rgba(255, 42, 133, 0.5); }
  50% { transform: scale(1.04); box-shadow: 0 12px 35px rgba(255, 190, 11, 0.7); }
}

.audio-note {
  font-size: 0.78rem;
  color: #a49ab9;
  margin-top: 12px;
}

/* ==========================================================================
   CANVAS Y ELEMENTOS DECORATIVOS DE FONDO
   ========================================================================== */
#confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 99;
}

.balloons-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.floating-balloon {
  position: absolute;
  bottom: -100px;
  font-size: 2.2rem;
  opacity: 0.85;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.4));
  animation: floatUp 12s linear infinite;
}

@keyframes floatUp {
  0% { transform: translateY(0) rotate(0deg); opacity: 0; }
  10% { opacity: 0.85; }
  90% { opacity: 0.85; }
  100% { transform: translateY(-120vh) rotate(360deg); opacity: 0; }
}

.glow-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
  animation: pulseOrb 8s ease-in-out infinite alternate;
}

.orb-1 {
  width: 320px;
  height: 320px;
  background: #ff2a85;
  top: -60px;
  left: -60px;
}

.orb-2 {
  width: 350px;
  height: 350px;
  background: #7928ca;
  bottom: 5%;
  right: -80px;
  animation-delay: -3s;
}

.orb-3 {
  width: 250px;
  height: 250px;
  background: #00f0ff;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.2;
}

@keyframes pulseOrb {
  0% { transform: scale(1) translateY(0); }
  100% { transform: scale(1.18) translateY(25px); }
}

/* ==========================================================================
   CONTENEDOR PRINCIPAL
   ========================================================================== */
.app-container {
  width: 100%;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  z-index: 10;
}

.glassmorphism {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

.glassmorphism-subtle {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   TOP BAR: RELOJ EN VIVO Y CONTROL DE MÚSICA
   ========================================================================== */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  background: rgba(20, 12, 38, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.live-clock-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  color: #e2d9f3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-dot {
  width: 8px;
  height: 8px;
  background: #00ff88;
  border-radius: 50%;
  box-shadow: 0 0 10px #00ff88;
  animation: liveBlink 1.4s infinite ease-in-out;
  flex-shrink: 0;
}

@keyframes liveBlink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(0.75); }
}

.live-label {
  color: #00ff88;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.divider {
  opacity: 0.3;
  flex-shrink: 0;
}

.clock-text {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #f7f4ff;
  letter-spacing: -0.2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.icon-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.icon-btn.sound-active {
  background: rgba(255, 42, 133, 0.35);
  border-color: #ff2a85;
  box-shadow: 0 0 12px rgba(255, 42, 133, 0.5);
}

.icon-btn:active {
  transform: scale(0.88);
}

/* ==========================================================================
   HERO CARD PRINCIPAL
   ========================================================================== */
.hero-card {
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #ff2a85, #ffbe0b, #00f0ff, #ff2a85);
  background-size: 300% 100%;
  animation: rainbowBorder 6s linear infinite;
}

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

.floating-emojis-banner {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.float-emoji {
  font-size: 1.6rem;
  display: inline-block;
  animation: floatEmoji 3s ease-in-out infinite alternate;
}

.e1 { animation-delay: 0s; }
.e2 { animation-delay: 0.4s; font-size: 1.2rem; }
.e3 { animation-delay: 0.8s; font-size: 2.1rem; }
.e4 { animation-delay: 1.2s; font-size: 1.3rem; }
.e5 { animation-delay: 1.6s; }

@keyframes floatEmoji {
  0% { transform: translateY(0) rotate(-4deg); }
  100% { transform: translateY(-8px) rotate(6deg); }
}

.greeting-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, rgba(255, 42, 133, 0.3), rgba(139, 47, 201, 0.3));
  border: 1.5px solid rgba(255, 42, 133, 0.5);
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffd166;
  margin-bottom: 16px;
  box-shadow: 0 4px 18px rgba(255, 42, 133, 0.3);
}

.countdown-intro {
  margin-bottom: 22px;
}

.sub-lead {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 4.5vw, 1.85rem);
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(255, 255, 255, 0.3);
}

.target-date-tag {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.target-date-tag strong {
  color: var(--accent-gold);
  font-weight: 700;
}

/* ==========================================================================
   GRID DEL CONTADOR DE TIEMPO
   ========================================================================== */
.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

.time-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.time-card {
  width: 100%;
  aspect-ratio: 1 / 1.05;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(20, 10, 40, 0.65) 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.3);
  position: relative;
  overflow: hidden;
}

.time-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
}

.time-value {
  font-family: var(--font-mono);
  font-size: clamp(1.6rem, 7vw, 2.7rem);
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(180deg, #ffffff 30%, #ffd6e6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 8px rgba(255, 42, 133, 0.5));
}

.days-box .time-card {
  border-color: rgba(255, 190, 11, 0.45);
  box-shadow: 0 8px 20px rgba(255, 190, 11, 0.18);
}
.days-box .time-value {
  background: linear-gradient(180deg, #fff 20%, #ffe066 100%);
  -webkit-background-clip: text;
}

.hours-box .time-card {
  border-color: rgba(255, 42, 133, 0.45);
  box-shadow: 0 8px 20px rgba(255, 42, 133, 0.18);
}

.minutes-box .time-card {
  border-color: rgba(139, 47, 201, 0.5);
  box-shadow: 0 8px 20px rgba(139, 47, 201, 0.18);
}

.seconds-box .time-card {
  border-color: rgba(0, 240, 255, 0.5);
  box-shadow: 0 8px 20px rgba(0, 240, 255, 0.22);
}
.seconds-box .time-value {
  background: linear-gradient(180deg, #ffffff 20%, #80f7ff 100%);
  -webkit-background-clip: text;
}

.pulse-active {
  animation: pulseCard 1s infinite ease-in-out;
}

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

.time-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-top: 8px;
  text-transform: uppercase;
}

.card-emoji {
  font-size: 0.75rem;
  margin-top: 2px;
  opacity: 0.8;
}

/* Textos Requeridos: PARA TU CUMPLEAÑOS SHERY */
.countdown-outro {
  margin-bottom: 22px;
}

.main-lead {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 5.5vw, 2.25rem);
  font-weight: 700;
  letter-spacing: 1px;
  background: linear-gradient(135deg, #ffffff 0%, #ff85b8 45%, #ffbe0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 25px rgba(255, 42, 133, 0.4);
  line-height: 1.2;
}

.sub-phrase {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Banner Especial de Cumpleaños */
.birthday-celebration-banner {
  background: linear-gradient(135deg, rgba(255, 42, 133, 0.95), rgba(139, 47, 201, 0.95));
  padding: 18px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  border: 2px solid #ffd166;
  box-shadow: 0 0 30px rgba(255, 209, 102, 0.6);
  animation: celebrationPulse 2s infinite alternate;
}

@keyframes celebrationPulse {
  0% { transform: scale(0.98); box-shadow: 0 0 20px rgba(255, 42, 133, 0.6); }
  100% { transform: scale(1.02); box-shadow: 0 0 35px rgba(255, 209, 102, 0.8); }
}

.bday-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: #ffffff;
  margin-bottom: 4px;
}

.bday-subtitle {
  font-size: 0.95rem;
  color: #fff9e6;
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   BOTONES DE ACCIÓN (STACK: JUEGO + CONFETI)
   ========================================================================== */
.action-buttons-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.btn-game {
  width: 100%;
  max-width: 400px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 22px;
  background: linear-gradient(135deg, #7928ca 0%, #ff2a85 50%, #ffbe0b 100%);
  background-size: 200% 200%;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-pill);
  font-family: var(--font-main);
  font-size: 1.02rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 25px rgba(121, 40, 202, 0.5);
  position: relative;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.btn-badge {
  background: #ffbe0b;
  color: #0c081f;
  font-size: 0.68rem;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.5px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.btn-primary {
  width: 100%;
  max-width: 400px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  border-radius: var(--radius-pill);
  font-family: var(--font-main);
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-primary:active {
  background: rgba(255, 42, 133, 0.3);
  transform: scale(0.95);
}

.btn-icon {
  font-size: 1.25rem;
}

/* ==========================================================================
   MODAL: MINI-JUEGO DEL PASTEL
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(8, 4, 20, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 500;
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.game-card {
  width: 100%;
  max-width: 420px;
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  animation: popIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

@keyframes popIn {
  from { transform: scale(0.88); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.game-title-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.game-title-box h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: #fff;
}

.game-icon {
  font-size: 1.4rem;
}

.game-close-btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 700;
}

.game-scoreboard {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.score-pill {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #e2d9f3;
}

.score-pill strong {
  font-size: 1.1rem;
  color: var(--accent-gold);
  font-family: var(--font-mono);
}

.time-pill strong {
  color: var(--accent-cyan);
}

.game-instructions {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 12px;
}

/* Área de Juego */
.game-arena {
  width: 100%;
  height: 290px;
  background: radial-gradient(circle at center, rgba(121, 40, 202, 0.25) 0%, rgba(13, 7, 34, 0.8) 100%);
  border: 1.5px dashed rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  touch-action: none;
  user-select: none;
}

/* Pastel objetivo en la base de la arena */
.game-target-cake {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 10;
  pointer-events: none;
}

.game-cake-top {
  width: 90px;
  height: 24px;
  background: linear-gradient(180deg, #ff70a6, #ff2a85);
  border-radius: 8px 8px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.cake-decorations {
  font-size: 0.95rem;
  letter-spacing: 2px;
}

.game-cake-body {
  width: 130px;
  height: 38px;
  background: linear-gradient(180deg, #ffd166, #f4a261);
  border-radius: 0 0 10px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.cake-name {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: #5c2000;
  letter-spacing: 1px;
}

/* Elementos que caen en el juego */
.falling-item {
  position: absolute;
  font-size: 2.2rem;
  cursor: pointer;
  z-index: 20;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
  transition: transform 0.1s ease;
  user-select: none;
}

.falling-item:active {
  transform: scale(1.4);
}

/* Overlay de Estados del Juego (Inicio / Victoria) */
.game-state-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(13, 7, 34, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
  z-index: 30;
  animation: fadeIn 0.2s ease;
}

.overlay-cake-icon {
  font-size: 3rem;
  margin-bottom: 8px;
  animation: floatEmoji 2s infinite alternate ease-in-out;
}

.game-state-overlay h4 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: #fff;
  margin-bottom: 6px;
}

.game-state-overlay p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.btn-primary-small {
  padding: 12px 24px;
  background: linear-gradient(135deg, #ff2a85 0%, #ffbe0b 100%);
  border: none;
  color: #fff;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(255, 42, 133, 0.4);
}

.btn-ghost {
  padding: 10px 18px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-muted);
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}

.victory-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 220px;
}

/* ==========================================================================
   FOOTER WIDGET DE DESEOS Y REACCIONES
   ========================================================================== */
.interactive-wishes {
  border-radius: var(--radius-md);
  padding: 16px 14px;
  text-align: center;
}

.wishes-title {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 6px;
}

.dynamic-quote {
  font-size: 0.92rem;
  font-style: italic;
  color: #ddd5ec;
  margin-bottom: 14px;
  min-height: 2.4em;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease;
}

.preset-emojis {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.emoji-tap {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.emoji-tap:active {
  transform: scale(1.35) rotate(-8deg);
  background: rgba(255, 42, 133, 0.4);
}

/* ==========================================================================
   TOAST NOTIFICATION
   ========================================================================== */
.toast {
  position: fixed;
  bottom: calc(20px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 8, 30, 0.96);
  border: 1.5px solid var(--accent-gold);
  color: #fff;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  font-size: 0.92rem;
  font-weight: 600;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
  z-index: 600;
  animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

@keyframes slideUp {
  from { transform: translate(-50%, 20px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

/* ==========================================================================
   MEDIA QUERIES (Ajustes responsivos para móviles Android y Desktop)
   ========================================================================== */
@media (max-width: 380px) {
  body {
    padding: 10px 8px calc(18px + var(--safe-bottom));
  }
  
  .hero-card {
    padding: 20px 12px;
  }

  .time-value {
    font-size: 1.45rem;
  }

  .time-label {
    font-size: 0.65rem;
    letter-spacing: 0.5px;
  }

  .game-arena {
    height: 250px;
  }
}

@media (min-width: 768px) {
  .app-container {
    max-width: 620px;
  }

  .countdown-grid {
    gap: 16px;
  }

  .hero-card {
    padding: 36px 30px;
  }
}
