/* NIUAXI FUNNEL - TIER 1 ENHANCEMENTS (CSS Improvements) */
/* Aplica estas mejoras al main.css para máximo impacto visual */

/* ============================================================
   ENHANCEMENT 1: INTENSIFICAR GLOW EFFECTS
   ============================================================ */

/* Botones primarios - Glow más intenso */
.btn-primary-glow {
    box-shadow: 0 0 24px var(--accent-blue-glow),
                0 0 48px rgba(30, 98, 236, 0.3),
                inset 0 0 20px rgba(30, 98, 236, 0.1);
    position: relative;
    overflow: hidden;
}

.btn-primary-glow::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transition: left 0.5s;
    z-index: 0;
}

.btn-primary-glow:hover::before {
    left: 100%;
}

.btn-primary-glow:hover {
    box-shadow: 0 0 32px rgba(30, 98, 236, 0.9),
                0 0 64px rgba(30, 98, 236, 0.5),
                inset 0 0 20px rgba(30, 98, 236, 0.2);
    background-color: #3b7bf8;
    transform: translateY(-3px) scale(1.02);
}

.btn-primary-glow:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 0 20px var(--accent-blue-glow);
}

/* ============================================================
   ENHANCEMENT 2: MEJORAR STEPPER CON ANIMACIONES
   ============================================================ */

/* Animación del progress bar - Fill animation más smooth */
@keyframes fillProgress {
    0% {
        box-shadow: 0 0 8px rgba(30, 98, 236, 0.3);
    }
    50% {
        box-shadow: 0 0 16px rgba(30, 98, 236, 0.6);
    }
    100% {
        box-shadow: 0 0 10px rgba(30, 98, 236, 0.5);
    }
}

.stepper-progress-fill {
    animation: fillProgress 0.8s ease-out;
    position: relative;
}

/* Pulsación en el dot activo */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 12px var(--accent-blue-glow);
    }
    50% {
        box-shadow: 0 0 24px rgba(30, 98, 236, 0.7),
                    0 0 36px rgba(30, 98, 236, 0.3);
    }
}

.step-node.active .step-dot {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Labels con transición suave */
.step-label {
    transition: all 0.3s ease;
}

.step-node.active .step-label {
    text-shadow: 0 0 8px rgba(30, 98, 236, 0.4);
}

/* ============================================================
   ENHANCEMENT 3: FORMULARIOS CON MICRO-INTERACCIONES
   ============================================================ */

/* Focus state mejorado */
.form-control, .form-select {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.3);
    transition: color 0.2s;
}

.form-control:focus::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-control:focus, .form-select:focus {
    box-shadow: 0 0 15px rgba(30, 98, 236, 0.25),
                0 0 30px rgba(30, 98, 236, 0.1),
                inset 0 0 10px rgba(30, 98, 236, 0.05);
    border-color: var(--accent-blue);
    background-color: rgba(255, 255, 255, 0.06);
    transform: translateY(-1px);
}

/* Label animation en focus */
.form-label {
    transition: all 0.2s;
}

.form-control:focus + .form-label,
.form-select:focus + .form-label {
    color: #4facfe;
    text-shadow: 0 0 8px rgba(30, 98, 236, 0.3);
}

/* ============================================================
   ENHANCEMENT 4: CARD OPTIONS MEJORADAS
   ============================================================ */

.card-option {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.card-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        circle at center,
        rgba(30, 98, 236, 0.1),
        transparent
    );
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.card-option:hover::before {
    opacity: 1;
}

.card-option.selected {
    background: rgba(30, 98, 236, 0.08);
    border-color: var(--accent-blue);
    box-shadow: 0 0 12px rgba(30, 98, 236, 0.15),
                inset 0 0 10px rgba(30, 98, 236, 0.05);
    transform: scale(1.01);
}

.card-option-circle {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-option.selected .card-option-circle {
    border-color: var(--accent-blue);
    box-shadow: 0 0 8px rgba(30, 98, 236, 0.4);
    transform: scale(1.1);
}

/* ============================================================
   ENHANCEMENT 5: GLASS CARDS MEJORADAS
   ============================================================ */

.glass-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.glass-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 1px;
    background: linear-gradient(
        135deg,
        rgba(30, 98, 236, 0.3),
        rgba(79, 172, 254, 0.1)
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s;
}

.glass-card:hover {
    transform: translateY(-2px) scale(1.01);
    border-color: rgba(30, 98, 236, 0.35);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.6),
                0 0 30px rgba(30, 98, 236, 0.15);
}

.glass-card:hover::before {
    opacity: 1;
}

/* ============================================================
   ENHANCEMENT 6: ANIMACIONES DE ENTRADA (Page Load)
   ============================================================ */

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.navbar {
    animation: slideInDown 0.6s ease-out;
}

.stepper-container {
    animation: fadeIn 0.4s ease-out 0.1s both;
}

.glass-card {
    animation: slideInUp 0.6s ease-out 0.2s both;
}

.form-label {
    animation: fadeIn 0.4s ease-out var(--delay, 0.3s) both;
}

/* ============================================================
   ENHANCEMENT 7: ESTADOS Y TRANSICIONES MEJORADAS
   ============================================================ */

/* Hover state en links */
a {
    transition: all 0.25s ease;
}

a:hover {
    text-shadow: 0 0 10px rgba(30, 98, 236, 0.3);
}

/* ============================================================
   ENHANCEMENT 8: BADGES Y ETIQUETAS
   ============================================================ */

.ia-badge {
    transition: all 0.3s;
    cursor: pointer;
}

.ia-badge:hover {
    background: rgba(30, 98, 236, 0.12);
    border-color: rgba(30, 98, 236, 0.5);
    box-shadow: 0 0 15px rgba(30, 98, 236, 0.25);
    transform: scale(1.05);
}

/* Badges de clasificación mejorados */
.classification-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.3s;
}

.classification-badge.alto {
    background: rgba(79, 172, 254, 0.15);
    color: #4facfe;
    border: 1px solid rgba(79, 172, 254, 0.3);
    box-shadow: 0 0 12px rgba(79, 172, 254, 0.2);
}

.classification-badge.medio {
    background: rgba(255, 165, 0, 0.15);
    color: #ffa500;
    border: 1px solid rgba(255, 165, 0, 0.3);
    box-shadow: 0 0 12px rgba(255, 165, 0, 0.2);
}

.classification-badge.bajo {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.1);
}

/* ============================================================
   ENHANCEMENT 9: SCORE BADGE ANIMADO
   ============================================================ */

@keyframes scoreGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(79, 172, 254, 0.4);
    }
    50% {
        box-shadow: 0 0 40px rgba(79, 172, 254, 0.6),
                    0 0 60px rgba(79, 172, 254, 0.2);
    }
}

.score-badge-custom {
    background: rgba(30, 98, 236, 0.1);
    border: 1px solid rgba(30, 98, 236, 0.35);
    border-radius: 12px;
    padding: 16px 24px;
    color: var(--text-primary);
    font-weight: 600;
    animation: scoreGlow 2s ease-in-out infinite;
    display: inline-block;
}

.score-val {
    color: #4facfe;
    font-size: 1.3em;
    font-weight: 800;
}

/* ============================================================
   ENHANCEMENT 10: PULSACIÓN DIAGNÓSTICA
   ============================================================ */

@keyframes diagnosisPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(79, 172, 254, 0.3);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 40px rgba(79, 172, 254, 0.6);
    }
}

.diagnosis-pulse {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(30, 98, 236, 0.1);
    border: 2px solid rgba(30, 98, 236, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: #4facfe;
    animation: diagnosisPulse 2s ease-in-out infinite;
    margin: 0 auto;
}

/* ============================================================
   ENHANCEMENT 9.5: METRIC CARDS GRID (Results Page)
   ============================================================ */

.results-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin: 30px 0;
}

.metric-card {
    padding: 20px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    gap: 12px;
}

.metric-card:hover {
    transform: translateY(-6px) scale(1.03);
    border-color: rgba(30, 98, 236, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.metric-card-primary {
    background: rgba(30, 98, 236, 0.08);
    border-color: rgba(30, 98, 236, 0.25);
}

.metric-card-primary:hover {
    box-shadow: 0 0 24px rgba(30, 98, 236, 0.3),
                0 10px 30px rgba(0, 0, 0, 0.3);
    background: rgba(30, 98, 236, 0.12);
}

.metric-card-secondary {
    background: rgba(79, 172, 254, 0.06);
    border-color: rgba(79, 172, 254, 0.2);
}

.metric-card-secondary:hover {
    box-shadow: 0 0 20px rgba(79, 172, 254, 0.3),
                0 10px 30px rgba(0, 0, 0, 0.3);
    background: rgba(79, 172, 254, 0.1);
}

.metric-card-tertiary {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
}

.metric-card-tertiary:hover {
    box-shadow: 0 0 16px rgba(255, 255, 255, 0.2),
                0 10px 30px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.06);
}

.metric-icon {
    font-size: 28px;
    color: #4facfe;
    width: 50px;
    height: 50px;
    background: rgba(30, 98, 236, 0.15);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    border: 1px solid rgba(30, 98, 236, 0.2);
}

.metric-card:hover .metric-icon {
    background: rgba(30, 98, 236, 0.25);
    box-shadow: 0 0 16px rgba(30, 98, 236, 0.4);
    transform: scale(1.2);
}

.metric-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.metric-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.metric-value {
    font-size: 22px;
    font-weight: 800;
    color: #4facfe;
    text-shadow: 0 0 10px rgba(79, 172, 254, 0.2);
}

/* ============================================================
   ENHANCEMENT 11: TEXTO GRADIENT MEJORADO
   ============================================================ */

.gradient-text {
    background: linear-gradient(90deg, #1e62ec 0%, #4facfe 50%, #1e62ec 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 4s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% center;
    }
    50% {
        background-position: 100% center;
    }
}

/* ============================================================
   ENHANCEMENT 12: RESPONSIVO MEJORADO
   ============================================================ */

@media (max-width: 768px) {
    .btn-primary-glow {
        font-size: 14px;
        padding: 12px 24px;
    }
    
    .glass-card {
        border-radius: 12px;
    }
    
    .hero-title {
        font-size: 28px;
    }
}

/* ============================================================
   ENHANCEMENT 13: ACCESIBILIDAD Y PERFORMANCE
   ============================================================ */

/* Reduce motion para usuarios que lo prefieren */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Prefers color scheme */
@media (prefers-color-scheme: light) {
    /* Si alguien fuerza light mode, mantener el dark mode de NIUAXI */
    body {
        background-color: var(--bg-primary);
        color: var(--text-primary);
    }
}
