/* ==========================================================================
   FLORES AMARILLAS - 21 DE SEPTIEMBRE
   Estilos Principales, Tipografía, Layout & Glassmorphism
   ========================================================================== */

:root {
  /* Paleta de Colores Mágica (Noche Cálida & Flores Doradas) */
  --bg-primary: #0a0814;
  --bg-secondary: #140f28;
  --bg-accent: #231842;
  
  --yellow-main: #ffcc00;
  --yellow-light: #ffe57f;
  --yellow-glow: #ffd700;
  --yellow-warm: #f59e0b;
  --orange-accent: #d97706;
  --brown-center: #3d220f;
  --green-leaf: #2e7d32;
  --green-stem: #1b5e20;
  
  --text-light: #fffdf7;
  --text-muted: #e2d9c8;
  --text-dark: #2c2523;
  
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 215, 0, 0.25);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  
  --font-body: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-script: 'Great Vibes', cursive;
  --font-handwriting: 'Dancing Script', cursive;
  
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset y Base */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  font-family: var(--font-body);
  background: radial-gradient(ellipse at bottom, #1d1538 0%, #0d081e 50%, #05030a 100%);
  color: var(--text-light);
  user-select: none;
}

/* Canvas de Fondo */
#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* Efectos Ambientales */
.ambient-glow {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80vw;
  height: 80vh;
  max-width: 800px;
  max-height: 800px;
  background: radial-gradient(circle, rgba(255, 204, 0, 0.12) 0%, rgba(217, 119, 6, 0.04) 50%, transparent 70%);
  filter: blur(50px);
  z-index: 0;
  pointer-events: none;
  animation: ambientPulse 8s ease-in-out infinite alternate;
}

@keyframes ambientPulse {
  0% { transform: translate(-50%, -50%) scale(0.9); opacity: 0.7; }
  100% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
}

.stars-container {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.star {
  position: absolute;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 4px #ffe57f;
  animation: twinkle var(--duration, 3s) infinite ease-in-out alternate;
}

@keyframes twinkle {
  0% { opacity: 0.2; transform: scale(0.8); }
  100% { opacity: 0.9; transform: scale(1.2); }
}

/* Glassmorphism Cards */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow), 0 0 20px rgba(255, 204, 0, 0.1);
  border-radius: 24px;
}

/* ==========================================================================
   PANTALLA DE BIENVENIDA (INTRO)
   ========================================================================== */
.intro-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: radial-gradient(circle at center, rgba(30, 20, 55, 0.95) 0%, rgba(10, 8, 20, 0.98) 100%);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.8s ease;
}

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

.intro-card {
  max-width: 480px;
  width: 100%;
  padding: 2.5rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  animation: introPopIn 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes introPopIn {
  from { opacity: 0; transform: translateY(30px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.intro-icon-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  filter: drop-shadow(0 0 15px rgba(255, 204, 0, 0.6));
}

.intro-sunflower {
  animation: floatFlower 4s ease-in-out infinite alternate;
}

@keyframes floatFlower {
  0% { transform: translateY(0) rotate(-3deg); }
  100% { transform: translateY(-8px) rotate(3deg); }
}

.intro-sparkle {
  position: absolute;
  font-size: 1.5rem;
  animation: sparkleRotate 3s ease-in-out infinite alternate;
}
.intro-sparkle.s1 { top: -5px; left: -15px; }
.intro-sparkle.s2 { bottom: 0; right: -15px; animation-delay: 1.5s; }

@keyframes sparkleRotate {
  0% { transform: scale(0.7) rotate(0deg); opacity: 0.5; }
  100% { transform: scale(1.2) rotate(20deg); opacity: 1; }
}

.intro-date {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--yellow-light);
  font-weight: 600;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.intro-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 5vw, 2.3rem);
  font-weight: 700;
  line-height: 1.25;
  background: linear-gradient(135deg, #fffdf7 30%, #ffd700 80%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.intro-subtitle {
  font-size: 0.98rem;
  color: var(--text-muted);
  line-height: 1.6;
  font-weight: 300;
}

.intro-hint {
  font-size: 0.8rem;
  color: rgba(255, 253, 247, 0.6);
  margin-top: 0.5rem;
}

/* Botones con Brillo Mágico */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1rem 1.8rem;
  border-radius: 50px;
  background: linear-gradient(135deg, #ffd700 0%, #f59e0b 60%, #d97706 100%);
  color: #261500;
  font-weight: 700;
  font-size: 1.05rem;
  font-family: var(--font-body);
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 25px rgba(255, 204, 0, 0.45), 0 0 15px rgba(255, 215, 0, 0.3);
  transition: var(--transition-smooth);
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 10px 30px rgba(255, 204, 0, 0.6), 0 0 20px rgba(255, 215, 0, 0.5);
}

.btn-primary:active {
  transform: translateY(1px) scale(0.98);
}

/* ==========================================================================
   EXPERIENCIA PRINCIPAL (MAIN)
   ========================================================================== */
.main-experience {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 1rem 2rem 1rem;
  z-index: 5;
  opacity: 1;
  transition: opacity 0.8s ease;
}

.main-experience.hidden {
  display: none;
  opacity: 0;
}

/* Encabezado Superior */
.top-header {
  text-align: center;
  max-width: 650px;
  margin-top: 0.5rem;
  animation: fadeInDown 1s ease forwards;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

.date-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 1rem;
  background: rgba(255, 215, 0, 0.12);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 30px;
  font-size: 0.85rem;
  color: var(--yellow-light);
  font-weight: 600;
  margin-bottom: 0.6rem;
  backdrop-filter: blur(8px);
}

.main-heading {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 6vw, 3.2rem);
  font-weight: 700;
  background: linear-gradient(135deg, #ffffff 10%, #ffd700 70%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.15;
  letter-spacing: -0.5px;
}

.main-subheading {
  font-size: clamp(0.95rem, 3vw, 1.15rem);
  color: var(--text-muted);
  font-weight: 300;
  margin-top: 0.4rem;
  line-height: 1.4;
}

/* Escenario del Jardín */
.garden-stage {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 1.5rem;
  cursor: pointer;
}

.tap-hint {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: rgba(255, 235, 127, 0.7);
  background: rgba(0, 0, 0, 0.25);
  padding: 0.3rem 0.9rem;
  border-radius: 20px;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 215, 0, 0.15);
  animation: pulseHint 2.5s infinite ease-in-out;
  pointer-events: none;
}

@keyframes pulseHint {
  0%, 100% { opacity: 0.5; transform: scale(0.98); }
  50% { opacity: 1; transform: scale(1.02); }
}

/* Barra de Botones de Acción */
.action-buttons-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.9rem;
  width: 100%;
  max-width: 600px;
  z-index: 15;
  animation: fadeInUp 1s ease 0.5s both;
}

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

.action-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.4rem;
  border-radius: 40px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: var(--transition-smooth);
}

.primary-action {
  background: linear-gradient(135deg, #ffd700 0%, #f59e0b 100%);
  color: #1a0f00;
  box-shadow: 0 4px 20px rgba(255, 204, 0, 0.4);
}

.primary-action:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 8px 25px rgba(255, 204, 0, 0.6);
}

.badge-pulse {
  background: #e11d48;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 8px #e11d48;
  animation: pulseBadge 1.5s infinite;
}

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

.secondary-action {
  background: rgba(255, 215, 0, 0.15);
  color: var(--yellow-light);
  border: 1px solid rgba(255, 215, 0, 0.35);
  backdrop-filter: blur(10px);
}

.secondary-action:hover {
  background: rgba(255, 215, 0, 0.25);
  transform: translateY(-2px);
}

.glass-action {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-light);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
}

.glass-action:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

/* ==========================================================================
   CONTROLES FLOTANTES (Música & Compartir)
   ========================================================================== */
.floating-controls {
  position: fixed;
  top: 1.2rem;
  right: 1.2rem;
  display: flex;
  gap: 0.6rem;
  z-index: 50;
}

.circle-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(20, 15, 40, 0.7);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 215, 0, 0.3);
  color: var(--yellow-light);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: var(--transition-smooth);
}

.circle-btn:hover {
  transform: scale(1.1);
  border-color: var(--yellow-glow);
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

/* Ecualizador Animado */
.music-equalizer {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 16px;
}

.bar {
  width: 3px;
  background: var(--yellow-light);
  border-radius: 3px;
  height: 4px;
  transition: height 0.2s ease;
}

.music-btn.playing .bar-1 { animation: eqBar 0.8s infinite ease-in-out alternate; }
.music-btn.playing .bar-2 { animation: eqBar 1.2s infinite ease-in-out alternate 0.2s; }
.music-btn.playing .bar-3 { animation: eqBar 0.6s infinite ease-in-out alternate 0.4s; }
.music-btn.playing .bar-4 { animation: eqBar 1.0s infinite ease-in-out alternate 0.1s; }

.music-icon-fallback {
  display: none;
}

@keyframes eqBar {
  0% { height: 4px; }
  100% { height: 16px; }
}

/* ==========================================================================
   MODALES (Overlay & Backdrop)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.modal-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 3, 12, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ==========================================================================
   MODAL PERSONALIZADOR
   ========================================================================== */
.customizer-card {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  z-index: 10;
  background: rgba(22, 16, 42, 0.92);
  border: 1px solid rgba(255, 215, 0, 0.35);
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 0 25px rgba(255, 204, 0, 0.15);
}

.customizer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 215, 0, 0.15);
  padding-bottom: 0.8rem;
}

.customizer-header h3 {
  font-family: var(--font-serif);
  color: var(--yellow-light);
  font-size: 1.35rem;
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0.3rem 0.6rem;
  border-radius: 8px;
  transition: var(--transition-smooth);
}

.btn-close-modal:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.customizer-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 500;
}

.input-styled {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 215, 0, 0.25);
  border-radius: 12px;
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition-smooth);
}

.input-styled:focus {
  border-color: var(--yellow-glow);
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.3);
  background: rgba(255, 255, 255, 0.09);
}

.textarea-styled {
  resize: vertical;
  min-height: 100px;
  line-height: 1.5;
}

.customizer-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  margin-top: 0.5rem;
}

@media (max-width: 480px) {
  .customizer-actions {
    grid-template-columns: 1fr;
  }
}

.btn-secondary {
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  font-family: var(--font-body);
  transition: var(--transition-smooth);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.18);
}

.btn-whatsapp {
  padding: 0.75rem 1rem;
  background: #25d366;
  border: none;
  color: #ffffff;
  font-weight: 700;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.35);
  transition: var(--transition-smooth);
}

.btn-whatsapp:hover {
  background: #20ba5a;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

.share-link-box {
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px dashed rgba(255, 215, 0, 0.2);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.share-link-box label {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.copy-input-row {
  display: flex;
  gap: 0.5rem;
}

.input-readonly {
  font-size: 0.85rem;
  color: var(--yellow-light);
  background: rgba(0, 0, 0, 0.3);
}

.btn-copy {
  padding: 0 1.2rem;
  background: linear-gradient(135deg, #ffd700, #f59e0b);
  border: none;
  border-radius: 12px;
  color: #1a0f00;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-smooth);
}

.btn-copy:hover {
  transform: translateY(-2px);
}

.copy-alert {
  font-size: 0.8rem;
  color: #4ade80;
  text-align: center;
  margin-top: 0.2rem;
  transition: opacity 0.3s ease;
}

/* ==========================================================================
   TOAST NOTIFICATION
   ========================================================================== */
.toast-notification {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  background: rgba(20, 15, 40, 0.95);
  border: 1px solid var(--yellow-glow);
  color: var(--yellow-light);
  padding: 0.75rem 1.5rem;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 600;
  z-index: 300;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(255, 215, 0, 0.3);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-notification.hidden {
  opacity: 0;
  transform: translateX(-50%) translateY(20px);
  pointer-events: none;
}
