:root {
    --primary: #00d2ff;
    --primary-dark: #004d99;
    --primary-deep: #0f172a;
    --accent: #9d50bb;
    /* Purple accent for a more surgical/premium feel */
    --white: #ffffff;
    --text-dark: #0f172a;
    --text-gray: #475569;
    --bg-light: #f8fafc;
    --glass: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --radius: 32px;
    --transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    --glow-primary: rgba(0, 210, 255, 0.3);
    --gradient-premium: linear-gradient(135deg, #00d2ff 0%, #3a7bd5 100%);
    --gradient-text: linear-gradient(135deg, #0f172a 0%, #334155 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background: #f8fafc;
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    perspective: 1200px;
    /* Extra spacing for mobile */
    padding: 20px;
}

.glass-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('bg-centro.png') no-repeat center center;
    background-size: cover;
    z-index: -2;
}

/* Professional Blue Overlay for contrast with white medical backgrounds */
.glass-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,
            rgba(15, 23, 42, 0.4) 0%,
            rgba(56, 189, 248, 0.2) 100%);
    z-index: -1;
    -webkit-backdrop-filter: contrast(110%);
    backdrop-filter: contrast(110%);
    /* Slight punch to image */
}

.blob-1 {
    width: 450px;
    height: 450px;
    top: -5%;
    left: -5%;
}

.blob-2 {
    width: 400px;
    height: 400px;
    bottom: -5%;
    right: -5%;
    animation-delay: -3s;
    background: linear-gradient(135deg, #3a7bd5 0%, #00d2ff 100%);
}

.blob-3 {
    width: 300px;
    height: 300px;
    top: 30%;
    left: 45%;
    animation-delay: -6s;
    opacity: 0.2;
}

@keyframes morph {
    0% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }

    33% {
        border-radius: 58% 42% 75% 25% / 76% 46% 54% 24%;
    }

    66% {
        border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%;
    }

    100% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }
}

@keyframes floatAround {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    50% {
        transform: translate(100px, 70px) rotate(180deg);
    }

    100% {
        transform: translate(0, 0) rotate(360deg);
    }
}

/* Stars / Particles */
.antigravity-scene::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(var(--primary) 1px, transparent 1px);
    background-size: 80px 80px;
    opacity: 0.08;
    /* Even more subtle */
    animation: moveStars 180s infinite linear;
}

@keyframes moveStars {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-1000px);
    }
}

/* Container - Hyper-Glass Professional */
.quiz-container {
    background: rgba(255, 255, 255, 0.45);
    -webkit-backdrop-filter: blur(40px) saturate(160%);
    backdrop-filter: blur(40px) saturate(160%);
    width: 95%;
    max-width: 680px;
    min-height: 560px;
    border-radius: var(--radius);
    box-shadow:
        0 40px 120px rgba(15, 23, 42, 0.08),
        inset 0 0 0 1px rgba(255, 255, 255, 0.4);
    padding: 50px;
    position: relative;
    border: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: none !important;
}

/* Hyper-Glass Accents */
.quiz-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--gradient-premium);
    opacity: 0.8;
    z-index: 10;
}

.quiz-container::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.4) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* Progress Bar - Minimalist High Tech */
.progress-bar-wrapper {
    width: 100%;
    height: 4px;
    background: rgba(15, 23, 42, 0.05);
    position: absolute;
    top: 5px;
    /* Just below the gradient top bar */
    left: 0;
    overflow: hidden;
    z-index: 10;
}

.progress-bar {
    height: 100%;
    background: var(--gradient-premium);
    width: 0%;
    transition: width 0.8s cubic-bezier(0.65, 0, 0.35, 1);
    box-shadow: 0 0 15px var(--glow-primary);
}

/* Steps Animation */
/* Antigravity Entradas Escalonadas - Elastic */
.quiz-step.active .title,
.quiz-step.active .step-title {
    animation: elasticUp 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) both 0.1s;
}

.quiz-step.active .subtitle,
.quiz-step.active .helper-text {
    animation: elasticUp 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) both 0.2s;
}

.quiz-step.active .hero-image,
.quiz-step.active .options-grid,
.quiz-step.active .options-row,
.quiz-step.active .intensity-slider-wrapper,
.quiz-step.active .form-container {
    animation: elasticUp 1s cubic-bezier(0.34, 1.56, 0.64, 1) both 0.3s;
}

.quiz-step.active .nav-controls,
.quiz-step.active .btn-large {
    animation: elasticUp 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) both 0.4s;
}

@keyframes elasticUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.quiz-step {
    display: none;
    opacity: 0;
}

.quiz-step.active {
    display: flex;
    flex-direction: column;
    height: 100%;
    opacity: 1;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Typography - Tech Medical Style */
.title {
    font-size: 2.6rem;
    font-weight: 700;
    margin-bottom: 24px;
    line-height: 1.1;
    color: var(--primary-deep);
    letter-spacing: -0.04em;
    position: relative;
    z-index: 1;
}

.highlight {
    background: var(--gradient-premium);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline;
    position: relative;
}

.subtitle {
    font-size: 1.15rem;
    color: var(--text-gray);
    margin-bottom: 40px;
    line-height: 1.6;
    letter-spacing: -0.01em;
    font-weight: 400;
    max-width: 90%;
}

.step-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 25px;
}

/* Buttons */
.btn {
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* Buttons - Professional Shimmer Effect */
.btn-primary {
    background: var(--gradient-premium);
    color: white;
    padding: 16px 36px;
    border-radius: 16px;
    font-weight: 700;
    letter-spacing: -0.01em;
    box-shadow:
        0 10px 30px var(--glow-primary),
        inset 0 0 0 1px rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.3),
            transparent);
    transition: 0.5s;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 40px var(--glow-primary);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-secondary {
    background: rgba(15, 23, 42, 0.05);
    color: var(--text-dark);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(15, 23, 42, 0.05);
}

.btn-large {
    padding: 20px 48px;
    font-size: 1.25rem;
    border-radius: 20px;
}

.btn-full {
    width: 100%;
}

.btn-whatsapp {
    background: #25D366;
    color: white;
}

/* Option Cards */
.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 30px;
}

.option-card {
    cursor: pointer;
}

.option-card input {
    display: none;
}

.card-ui {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 24px;
    padding: 30px;
    text-align: center;
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.02);
    position: relative;
    overflow: hidden;
}

/* Micro-Glow Internal Feedback */
.card-ui::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, var(--primary) 0%, transparent 70%);
    opacity: 0;
    transition: 0.4s;
}

.option-card:hover .card-ui {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.06);
    background: white;
}

.option-card:hover .card-ui::before {
    opacity: 0.05;
}

.option-card.selected .card-ui,
.option-card input:checked+.card-ui {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 20px 50px var(--glow-primary);
}

.option-card.selected .card-ui::before,
.option-card input:checked+.card-ui::before {
    opacity: 0.1;
}

.card-icon {
    font-size: 2rem;
    background: #f0f7ff;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-bottom: 5px;
}

.options-row {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.option-pill {
    flex: 1;
    min-width: 140px;
    cursor: pointer;
}

.option-pill input {
    display: none;
}

.option-pill span {
    display: block;
    padding: 15px 20px;
    background: white;
    border: 2px solid #edf2f7;
    border-radius: 30px;
    text-align: center;
    font-weight: 600;
    transition: var(--transition);
    animation: floatCard 5s infinite ease-in-out;
}

.option-pill:nth-child(even) span {
    animation-delay: -2.5s;
}

.option-pill:hover span {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 20px rgba(0, 102, 204, 0.1);
}

.option-pill input:checked+span,
.option-pill.selected span {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 102, 204, 0.3);
}

.intensity-slider-wrapper {
    margin: 40px 0;
    text-align: center;
}

.intensity-slider-wrapper {
    margin: 30px 0;
    text-align: center;
    position: relative;
    padding: 20px 0;
}

.eva-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 25px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-gray);
    padding: 0 10px;
}

.eva-labels span {
    flex: 1;
    text-align: center;
}

.slider-container {
    position: relative;
    height: 60px;
    display: flex;
    align-items: center;
}

.slider-track-background {
    position: absolute;
    width: 100%;
    height: 12px;
    background: linear-gradient(90deg, #2ecc71 0%, #f1c40f 50%, #e74c3c 100%);
    border-radius: 10px;
    z-index: 1;
    pointer-events: none;
    opacity: 0.8;
}

.eva-slider {
    position: relative;
    z-index: 2;
    background: transparent !important;
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
}

.eva-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 32px;
    height: 32px;
    background: var(--white);
    border: 4px solid var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.eva-slider:active::-webkit-slider-thumb {
    transform: scale(1.2);
}

.intensity-value-card {
    background: white;
    width: 120px;
    margin: 30px auto 0;
    padding: 15px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: pulseValue 2s infinite ease-in-out;
}

@keyframes pulseValue {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.intensity-value-card #intensity-display {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 5px;
    transition: color 0.3s ease;
}

.intensity-value-card small {
    font-weight: 600;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Success Elements */
.success-icon {
    width: 80px;
    height: 80px;
    background: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin: 0 auto 20px;
}

.result-highlights {
    background: rgba(255, 255, 255, 0.5);
    border-radius: var(--radius);
    padding: 20px;
    margin: 20px 0;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    color: var(--primary-dark);
}

.loader-circle {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Layout Utilities */
.hero-image img {
    width: 100%;
    height: auto;
    max-height: 220px;
    object-fit: cover;
    display: block;
    mix-blend-mode: multiply;
    /* Helps blend with the subtle light background */
}

@keyframes float3D {

    0%,
    100% {
        transform: translateY(0) rotateX(0);
    }

    50% {
        transform: translateY(-15px) rotateX(2deg);
    }
}

.input-row {
    display: flex;
    gap: 15px;
    margin-bottom: 2px;
}

.input-row .input-group {
    flex: 1;
}

@media (max-width: 480px) {
    .input-row {
        flex-direction: column;
        gap: 0;
    }
}

select {
    width: 100%;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 15px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
}

select:focus {
    outline: none;
    background-color: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 210, 255, 0.1);
}

.nav-controls {
    margin-top: auto;
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.form-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.input-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #cbd5e0;
    border-radius: 10px;
    font-size: 1rem;
}

@media (max-width: 480px) {
    .quiz-container {
        padding: 20px;
        min-height: 100vh;
        border-radius: 0;
    }

    .options-grid {
        grid-template-columns: 1fr;
    }

    .title {
        font-size: 1.8rem;
    }
}