/* --- RESET Y CONFIGURACIÓN BASE --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: #09090b;
  color: #fafafa;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  position: relative;
}

/* --- FONDO AURORA Y PARTÍCULAS --- */
.aurora-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at 50% 0%, rgba(139, 92, 246, 0.15), transparent 50%),
              radial-gradient(circle at 100% 100%, rgba(236, 72, 153, 0.1), transparent 50%);
  z-index: -2;
}

#particleCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

/* --- CONTENEDOR PRINCIPAL (ESTILO APP WIDGET) --- */
.app-widget {
  width: 100%;
  max-width: 440px;
  background: rgba(18, 18, 22, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  padding: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  margin: 16px;
}

/* --- CABECERA --- */
.app-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.logo-wrapper {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.02));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.logo {
  width: 70%;
  height: 70%;
  object-fit: contain;
}

.header-titles h1 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.header-titles p {
  font-size: 0.8rem;
  color: #a1a1aa;
}

/* --- MONITOR DE ESTADO --- */
.live-monitor {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 22px;
}

.monitor-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  margin-bottom: 8px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 10px #10b981;
  transition: background-color 0.3s ease;
}

.progress-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #8b5cf6, #ec4899);
  transition: width 0.4s ease;
}

/* --- FORMULARIO Y SECCIONES --- */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.section-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #d4d4d8;
}

.swipe-hint {
  font-size: 0.72rem;
  color: #71717a;
}

/* --- SELECTOR DE REDES SOCIALES (HORIZONTAL SCROLL) --- */
.social-selector {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 20px;
  scrollbar-width: none; /* Ocultar scroll en Firefox */
}
.social-selector::-webkit-scrollbar {
  display: none; /* Ocultar scroll en Chrome/Safari */
}

.social-option {
  cursor: pointer;
  flex-shrink: 0;
}

.social-option input[type="radio"] {
  display: none;
}

/* Tarjetas y SVGs Profesionales */
.social-card {
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  justify-content: center;
  gap: 8px; 
  width: 82px; 
  height: 82px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
  color: #71717a;
  transition: all 0.3s ease;
}

.social-card .name { 
  font-size: 0.7rem; 
  font-weight: 500; 
  color: #71717a; 
  transition: all 0.3s; 
}

/* Hover general */
.social-option:hover .social-card {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
}

/* Estados activos y colores por Red Social */
.social-option.instagram input[type="radio"]:checked + .social-card { 
  border-color: #ec4899; 
  background: rgba(236, 72, 153, 0.12); 
  box-shadow: 0 6px 20px rgba(236, 72, 153, 0.2); 
}
.social-option.instagram input[type="radio"]:checked + .social-card .social-svg { color: #ec4899; }

.social-option.tiktok input[type="radio"]:checked + .social-card { 
  border-color: #06b6d4; 
  background: rgba(6, 182, 212, 0.12); 
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.2); 
}
.social-option.tiktok input[type="radio"]:checked + .social-card .social-svg { color: #06b6d4; }

.social-option.threads input[type="radio"]:checked + .social-card { 
  border-color: #fafafa; 
  background: rgba(250, 250, 250, 0.12); 
  box-shadow: 0 6px 20px rgba(250, 250, 250, 0.15); 
}
.social-option.threads input[type="radio"]:checked + .social-card .social-svg { color: #fafafa; }

.social-option.pinterest input[type="radio"]:checked + .social-card { 
  border-color: #ef4444; 
  background: rgba(239, 68, 68, 0.12); 
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.2); 
}
.social-option.pinterest input[type="radio"]:checked + .social-card .social-svg { color: #ef4444; }

.social-option.spotify input[type="radio"]:checked + .social-card { 
  border-color: #22c55e; 
  background: rgba(34, 197, 94, 0.12); 
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.2); 
}
.social-option.spotify input[type="radio"]:checked + .social-card .social-svg { color: #22c55e; }

/* Efecto de escala al activar */
.social-option input[type="radio"]:checked + .social-card .social-svg { 
  transform: scale(1.12); 
}
.social-option input[type="radio"]:checked + .social-card .name { 
  color: #fafafa; 
  font-weight: 700; 
}

/* --- CAMPOS DE ENTRADA --- */
.input-container {
  position: relative;
  margin-bottom: 14px;
}

.input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #71717a;
  font-size: 0.95rem;
}

.app-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px 16px 14px 44px;
  color: #fafafa;
  font-size: 0.9rem;
  outline: none;
  transition: all 0.3s ease;
}

.app-input::placeholder {
  color: #52525b;
}

.app-input:focus {
  border-color: #8b5cf6;
  background: rgba(0, 0, 0, 0.4);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

/* --- BOTÓN DE ENVÍO --- */
.app-submit-btn {
  width: 100%;
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  color: #fff;
  border: none;
  border-radius: 14px;
  padding: 15px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 20px -5px rgba(139, 92, 246, 0.4);
  transition: all 0.3s ease;
  margin-top: 6px;
}

.app-submit-btn:hover:not(:disabled) {
  opacity: 0.92;
  transform: translateY(-1px);
  box-shadow: 0 12px 25px -5px rgba(139, 92, 246, 0.6);
}

.app-submit-btn:disabled {
  background: #27272a;
  color: #71717a;
  cursor: not-allowed;
  box-shadow: none;
}

/* --- MENSAJE TOAST DE RESPALDO --- */
.success-toast {
  display: none;
  margin-top: 14px;
  padding: 10px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: #34d399;
  font-size: 0.8rem;
  border-radius: 10px;
  text-align: center;
}

/* --- VENTANA FLOTANTE (MODAL DE ÉXITO) --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: #18181b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  width: 90%;
  max-width: 340px;
  border-radius: 24px;
  padding: 28px 24px;
  text-align: center;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}

.modal-overlay.active .modal-card {
  transform: scale(1);
}

.modal-icon-wrapper {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px auto;
}

/* Animación del SVG de Check en el Modal */
.success-svg {
  width: 64px;
  height: 64px;
}

.success-circle {
  stroke: #10b981;
  stroke-width: 3;
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.success-check {
  stroke: #10b981;
  stroke-width: 3;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.5s forwards;
}

@keyframes stroke {
  100% {
    stroke-dashoffset: 0;
  }
}

.modal-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.modal-card p {
  font-size: 0.82rem;
  color: #a1a1aa;
  line-height: 1.4;
  margin-bottom: 20px;
}

.modal-action-btn {
  background: #27272a;
  color: #fafafa;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 12px;
  width: 100%;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.modal-action-btn:hover {
  background: #3f3f46;
}