/* Estilos principales para la invitación interactiva - Sarahi 💖 */

/* Importar tipografías desde Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;600;700&family=Outfit:wght@300;400;600;700&display=swap');

:root {
  --primary-color: #ff5e7e;
  --primary-gradient: linear-gradient(135deg, #ff758c 0%, #ff7eb3 100%);
  --secondary-gradient: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
  --bg-gradient: linear-gradient(135deg, #fff5f6 0%, #ffd3da 50%, #e2d9ff 100%);
  --text-dark: #4a3e4d;
  --text-muted: #8b798f;
  --glass-bg: rgba(255, 255, 255, 0.6);
  --glass-border: rgba(255, 255, 255, 0.4);
  --shadow-main: 0 15px 35px rgba(255, 117, 140, 0.15);
  --shadow-button: 0 8px 25px rgba(255, 94, 126, 0.3);
}

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

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg-gradient);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  position: relative;
  color: var(--text-dark);
}

/* Partículas flotantes de fondo */
.bg-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.particle {
  position: absolute;
  bottom: -50px;
  font-size: 24px;
  opacity: 0.6;
  animation: floatUp 8s linear infinite;
}

@keyframes floatUp {
  0% {
    transform: translateY(0) rotate(0deg) scale(0.8);
    opacity: 0;
  }
  10% {
    opacity: 0.6;
  }
  90% {
    opacity: 0.6;
  }
  100% {
    transform: translateY(-110vh) rotate(360deg) scale(1.2);
    opacity: 0;
  }
}

/* Contenedor principal de tarjetas */
.container {
  width: 90%;
  max-width: 550px;
  z-index: 10;
  perspective: 1000px;
}

/* Tarjetas (Invitation y Success) */
.card {
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid var(--glass-border);
  border-radius: 30px;
  padding: 2.5rem;
  text-align: center;
  box-shadow: var(--shadow-main);
  transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  animation: popIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes popIn {
  0% {
    opacity: 0;
    transform: scale(0.8) translateY(30px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.success-card {
  display: none;
  background: rgba(255, 255, 255, 0.8);
}

/* Encabezados y Textos */
h1 {
  font-family: 'Fredoka', sans-serif;
  font-size: 2.2rem;
  color: #ff476f;
  margin-bottom: 1rem;
  line-height: 1.3;
  text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
}

.subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  line-height: 1.5;
}

/* Ilustraciones */
.image-container {
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 2rem;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  border: 4px solid white;
  transition: transform 0.3s ease;
}

.image-container:hover {
  transform: scale(1.02);
}

.main-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
}

/* Botones y Acciones */
.actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  min-height: 80px;
  position: relative;
}

.btn {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  padding: 1rem 2.5rem;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  outline: none;
  user-select: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-yes {
  background: var(--primary-gradient);
  color: white;
  box-shadow: var(--shadow-button);
  animation: pulse 2s infinite;
}

.btn-yes:hover {
  transform: scale(1.08);
  box-shadow: 0 10px 30px rgba(255, 94, 126, 0.5);
}

.btn-yes:active {
  transform: scale(0.98);
}

.btn-no {
  background: white;
  color: var(--text-muted);
  border: 2px solid rgba(139, 121, 143, 0.2);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  z-index: 999;
}

/* Efecto de escurrirse para el botón NO */
.btn-no.escape {
  position: fixed;
  pointer-events: auto;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 8px 25px rgba(255, 94, 126, 0.3);
  }
  50% {
    transform: scale(1.04);
    box-shadow: 0 12px 30px rgba(255, 94, 126, 0.5);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 8px 25px rgba(255, 94, 126, 0.3);
  }
}

/* Pantalla de Éxito */
.success-card h1 {
  color: #2ec4b6;
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.success-message {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--text-dark);
  margin-bottom: 1.5rem;
}

.heart-badge {
  font-size: 3rem;
  animation: beat 0.8s infinite alternate;
  margin: 1rem 0;
  display: inline-block;
}

@keyframes beat {
  0% { transform: scale(1); }
  100% { transform: scale(1.25); }
}

.details-box {
  background: rgba(255, 255, 255, 0.5);
  border: 1px dashed rgba(255, 94, 126, 0.3);
  border-radius: 16px;
  padding: 1rem;
  margin-top: 1rem;
  font-size: 0.95rem;
  color: var(--text-dark);
}

.details-box strong {
  color: var(--primary-color);
}

/* Confeti */
.confetti-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
}

/* Adaptabilidad para Dispositivos Móviles */
@media (max-width: 480px) {
  .card {
    padding: 1.8rem;
  }
  
  h1 {
    font-size: 1.8rem;
  }
  
  .subtitle {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
  }
  
  .main-image {
    height: 180px;
  }
  
  .btn {
    font-size: 1.1rem;
    padding: 0.8rem 2rem;
  }
  
  .actions {
    gap: 1rem;
    flex-direction: column;
    height: 120px;
  }
  
  .btn-no {
    width: 100%;
  }
  
  .btn-yes {
    width: 100%;
  }
}
