/* ============================================
   DIAGNÓSTICO - Carlos Mendes Designer
   Glassmorphism Premium Quiz
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-primary: #000000;
    --neon-green: #39FF14;
    --neon-green-dim: #2bcc10;
    --neon-green-glow: rgba(57, 255, 20, 0.4);
    --neon-green-subtle: rgba(57, 255, 20, 0.08);
    --neon-green-border: rgba(57, 255, 20, 0.15);
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-muted: #666666;
    --border-default: rgba(255, 255, 255, 0.06);
    --glass-bg: rgba(10, 10, 10, 0.55);
    --glass-border: rgba(255, 255, 255, 0.08);
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ===== BACKGROUND LAYERS ===== */
.bg-layer {
    position: fixed;
    inset: 0;
    z-index: 0;
}

.bg-photo {
    position: absolute;
    inset: 0;
    background: url('../assets/carlos-portrait.jpg') center center / cover no-repeat;
    opacity: 0.18;
    filter: blur(4px) saturate(0.6);
}

.bg-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(57, 255, 20, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(57, 255, 20, 0.04) 0%, transparent 50%),
        linear-gradient(180deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.5) 50%, rgba(0,0,0,0.8) 100%);
}

.bg-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.bg-particles .particle {
    position: absolute;
    background: var(--neon-green);
    border-radius: 50%;
    animation: particleFloat linear infinite;
}

@keyframes particleFloat {
    0% { transform: translateY(100vh) scale(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-10vh) scale(1); opacity: 0; }
}

/* ===== HEADER ===== */
.diag-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition-fast);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    border: 1px solid transparent;
}

.back-link:hover {
    color: var(--neon-green);
    border-color: var(--neon-green-border);
    background: var(--neon-green-subtle);
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.header-logo span { color: var(--neon-green); }

.logo-icon-sm {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--neon-green);
    color: #000;
    font-weight: 800;
    font-size: 0.85rem;
    border-radius: 8px;
}

/* ===== MAIN CONTAINER ===== */
.diag-main {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 24px 40px;
}

.quiz-container {
    width: 100%;
    max-width: 720px;
    position: relative;
}

/* ===== PROGRESS BAR ===== */
.progress-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
}

.progress-bar {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--neon-green), var(--neon-green-dim));
    border-radius: 4px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 12px var(--neon-green-glow);
}

.progress-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    min-width: 80px;
    text-align: right;
}

/* ===== QUIZ STEPS ===== */
.quiz-step {
    display: none;
    animation: fadeSlideIn 0.5s ease forwards;
}

.quiz-step.active {
    display: block;
}

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

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

.quiz-step.exiting {
    animation: fadeSlideOut 0.3s ease forwards;
}

/* ===== STEP CONTENT (Glass Card) ===== */
.step-content {
    background: var(--glass-bg);
    backdrop-filter: blur(40px) saturate(150%);
    -webkit-backdrop-filter: blur(40px) saturate(150%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    position: relative;
    overflow: hidden;
}

.step-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--neon-green), transparent);
    opacity: 0.6;
}

.step-content::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(57, 255, 20, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

/* ===== WELCOME STEP ===== */
.welcome-step {
    text-align: center;
}

.welcome-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    display: inline-block;
    animation: pulse 2s ease-in-out infinite;
}

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

.welcome-step h1 {
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
}

.highlight {
    color: var(--neon-green);
    text-shadow: 0 0 30px rgba(57, 255, 20, 0.3);
}

.welcome-desc {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 500px;
    margin: 0 auto 28px;
}

.welcome-features {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.wf-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.wf-check {
    color: var(--neon-green);
    font-weight: 700;
}

/* ===== BUTTONS ===== */
.btn-start {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 18px 48px;
    background: linear-gradient(135deg, var(--neon-green), var(--neon-green-dim));
    color: #000;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition-smooth);
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 0 20px rgba(57, 255, 20, 0.2), 0 0 60px rgba(57, 255, 20, 0.08);
    position: relative;
    overflow: hidden;
}

.btn-start::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
    transition: 0.6s;
}

.btn-start:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 0 30px rgba(57, 255, 20, 0.4), 0 0 80px rgba(57, 255, 20, 0.15);
}

.btn-start:hover::before {
    left: 100%;
}

.btn-next, .btn-send {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--neon-green), var(--neon-green-dim));
    color: #000;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition-smooth);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 0 16px rgba(57, 255, 20, 0.2);
}

.btn-next:hover, .btn-send:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(57, 255, 20, 0.4);
}

.btn-next:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 20px;
    background: none;
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-back:hover {
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

.btn-skip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 20px;
    background: none;
    color: var(--neon-green);
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid var(--neon-green-border);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition-fast);
    opacity: 0.7;
}

.btn-skip:hover {
    opacity: 1;
    background: var(--neon-green-subtle);
    border-color: rgba(57, 255, 20, 0.3);
}

.btn-send {
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: #fff;
    padding: 16px 40px;
    font-size: 1rem;
    box-shadow: 0 0 20px rgba(37, 211, 102, 0.3);
}

.btn-send:hover {
    box-shadow: 0 0 40px rgba(37, 211, 102, 0.5);
}

/* ===== STEP LABELS & TITLES ===== */
.step-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--neon-green);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 12px;
    opacity: 0.8;
}

.step-content h2 {
    font-size: clamp(1.5rem, 3.5vw, 2rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 8px;
}

.step-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.6;
}

/* ===== INPUT FIELDS ===== */
.input-group {
    margin-bottom: 28px;
}

.input-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 500;
}

.glass-input {
    width: 100%;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: var(--transition-fast);
    outline: none;
}

.glass-input::placeholder {
    color: var(--text-muted);
}

.glass-input:focus {
    border-color: var(--neon-green);
    box-shadow: 0 0 0 3px rgba(57, 255, 20, 0.1), 0 0 20px rgba(57, 255, 20, 0.08);
    background: rgba(255, 255, 255, 0.06);
}

.glass-textarea {
    resize: vertical;
    min-height: 80px;
}

/* ===== OPTION CARDS ===== */
.options-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 28px;
}

.option-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.option-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(57, 255, 20, 0.05), transparent);
    opacity: 0;
    transition: var(--transition-fast);
}

.option-card:hover {
    border-color: rgba(57, 255, 20, 0.3);
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-3px);
}

.option-card:hover::before {
    opacity: 1;
}

.option-card.selected {
    border-color: var(--neon-green);
    background: rgba(57, 255, 20, 0.08);
    box-shadow: 0 0 20px rgba(57, 255, 20, 0.15), inset 0 0 30px rgba(57, 255, 20, 0.05);
}

.option-card.selected::after {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 10px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #000;
    background: var(--neon-green);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.opt-icon {
    font-size: 1.6rem;
    display: block;
}

.opt-label {
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.3;
    color: var(--text-secondary);
}

.option-card.selected .opt-label {
    color: var(--text-primary);
}

/* ===== STEP NAVIGATION ===== */
.step-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.step-nav .btn-skip {
    margin-left: auto;
}

.final-nav {
    justify-content: space-between;
}

.final-nav .btn-send {
    margin-left: auto;
}

/* ===== SUMMARY CARD ===== */
.summary-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    gap: 12px;
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    min-width: 100px;
}

.summary-value {
    font-size: 0.9rem;
    color: var(--neon-green);
    font-weight: 500;
    text-align: right;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .diag-header {
        padding: 12px 16px;
    }

    .diag-main {
        padding: 90px 16px 30px;
    }

    .step-content {
        padding: 32px 20px;
    }

    .options-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .option-card {
        padding: 16px 10px;
    }

    .welcome-features {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .step-nav {
        flex-direction: column;
        align-items: stretch;
    }

    .step-nav .btn-skip {
        margin-left: 0;
    }

    .step-nav button {
        justify-content: center;
    }

    .final-nav .btn-send {
        margin-left: 0;
        width: 100%;
    }

    .summary-row {
        flex-direction: column;
        gap: 4px;
    }

    .summary-value {
        text-align: left;
    }
}

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

    .step-content h2 {
        font-size: 1.4rem;
    }

    .back-link span {
        display: none;
    }
}
