/* ─── RESET & BASE ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg:       #0A0A0F;
    --surface:  #111118;
    --border:   rgba(255,255,255,0.07);
    --accent:   #7C5CFC;
    --accent2:  #A78BFA;
    --green:    #22C55E;
    --text:     #F1F0F5;
    --muted:    #8B8A9B;
    --font:     'Inter', sans-serif;
    --r:        16px;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ─── WRAPPER ──────────────────────────────────────────────── */
.quiz-wrapper {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 0 80px;
    min-height: 100vh;
    position: relative;
}

/* ─── PROGRESS BAR ─────────────────────────────────────────── */
.progress-bar-wrap {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg);
    padding: 14px 24px 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border);
    transition: opacity 0.4s;
}

.progress-bar {
    flex: 1;
    height: 4px;
    background: var(--accent);
    border-radius: 99px;
    transition: width 0.5s cubic-bezier(.4,0,.2,1);
    position: relative;
}

.progress-bar::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    border-radius: 99px;
}

/* track */
.progress-bar-wrap::before {
    content: '';
    position: absolute;
    left: 24px;
    right: 24px;
    top: 14px;
    height: 4px;
    background: rgba(255,255,255,0.06);
    border-radius: 99px;
}

.progress-label {
    font-size: 0.75rem;
    color: var(--muted);
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: 0.05em;
}

/* ─── SCREENS ──────────────────────────────────────────────── */
.screen {
    display: none;
    padding: 0 24px;
    animation: none;
}

.screen.active {
    display: block;
    animation: slideIn 0.4s cubic-bezier(.4,0,.2,1);
}

.screen.exit {
    animation: slideOut 0.35s cubic-bezier(.4,0,.2,1) forwards;
}

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

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

.screen-inner {
    padding: 40px 0 32px;
}

/* ─── EYEBROW ──────────────────────────────────────────────── */
.eyebrow {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent2);
    margin-bottom: 16px;
}

/* ─── HEADINGS ─────────────────────────────────────────────── */
h2 {
    font-size: clamp(1.35rem, 4vw, 1.7rem);
    font-weight: 800;
    line-height: 1.3;
    color: var(--text);
    margin-bottom: 32px;
    letter-spacing: -0.02em;
}

/* ─── OPTIONS / RADIO ──────────────────────────────────────── */
.options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
}

.option {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--r);
    padding: 16px 18px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    color: #D4D3E0;
    transition: all 0.2s ease;
    user-select: none;
    line-height: 1.4;
}

.option:hover {
    border-color: rgba(124,92,252,0.4);
    background: rgba(124,92,252,0.06);
    color: var(--text);
}

.option input[type="radio"] {
    display: none;
}

.radio-icon {
    width: 20px;
    height: 20px;
    min-width: 20px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    position: relative;
}

.option.selected {
    border-color: var(--accent);
    background: rgba(124,92,252,0.1);
    color: var(--text);
}

.option.selected .radio-icon {
    border-color: var(--accent);
    background: var(--accent);
}

.option.selected .radio-icon::after {
    content: '';
    width: 7px;
    height: 7px;
    background: white;
    border-radius: 50%;
    display: block;
}

/* ─── BUTTON ───────────────────────────────────────────────── */
.btn-next {
    display: block;
    width: 100%;
    padding: 18px 24px;
    background: linear-gradient(135deg, var(--accent), #5B3BEA);
    color: white;
    border: none;
    border-radius: var(--r);
    font-size: 1rem;
    font-weight: 700;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.01em;
    position: relative;
    overflow: hidden;
}

.btn-next:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(124,92,252,0.4);
}

.btn-next:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    transform: none;
}

/* ─── LOADING SCREEN ───────────────────────────────────────── */
.loading-screen {
    text-align: center;
    padding-top: 60px;
}

.loading-gear {
    font-size: 3rem;
    margin-bottom: 24px;
    display: inline-block;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.loading-sub {
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 40px;
}

.loading-steps {
    text-align: left;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 24px;
    margin-bottom: 36px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.loading-step {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 0.9rem;
    color: var(--muted);
    transition: color 0.3s;
}

.loading-step.done {
    color: var(--text);
}

.step-icon {
    font-size: 1.1rem;
    min-width: 22px;
    text-align: center;
    transition: all 0.3s;
}

/* ─── FORM ─────────────────────────────────────────────────── */
.form-badge {
    display: inline-block;
    background: rgba(34,197,94,0.1);
    border: 1px solid rgba(34,197,94,0.3);
    color: var(--green);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 99px;
    margin-bottom: 20px;
    letter-spacing: 0.05em;
}

.form-sub {
    color: var(--muted);
    font-size: 0.88rem;
    margin-bottom: 32px;
    margin-top: -16px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 8px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.form-group input {
    width: 100%;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 12px;
    padding: 15px 18px;
    font-size: 1rem;
    font-family: var(--font);
    color: var(--text);
    transition: border-color 0.2s;
    outline: none;
}

.form-group input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(124,92,252,0.15);
}

.form-group input::placeholder {
    color: #555462;
}

form .btn-next { margin-top: 8px; }

/* ─── RESULT SCREEN ────────────────────────────────────────── */
.result-screen {
    padding-top: 40px;
}

.result-tag {
    display: inline-block;
    background: rgba(124,92,252,0.12);
    border: 1px solid rgba(124,92,252,0.3);
    color: var(--accent2);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 99px;
    margin-bottom: 20px;
    letter-spacing: 0.05em;
}

.result-intro {
    color: #C8C7D8;
    font-size: 0.97rem;
    line-height: 1.7;
    margin-bottom: 32px;
}

.points-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 14px;
}

.result-points {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 20px;
    margin-bottom: 28px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.result-point {
    font-size: 0.95rem;
    color: var(--text);
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.5;
}

.result-mid {
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 16px;
    font-style: italic;
}

.result-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 36px;
}

.result-item {
    background: rgba(124,92,252,0.07);
    border: 1px solid rgba(124,92,252,0.15);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--accent2);
}

.btn-result {
    background: linear-gradient(135deg, #22C55E, #16A34A);
}

.btn-result:not(:disabled):hover {
    box-shadow: 0 12px 32px rgba(34,197,94,0.35);
}

/* ─── FINAL SCREEN ─────────────────────────────────────────── */
.final-screen {
    text-align: center;
    padding-top: 60px;
}

.final-icon {
    font-size: 3.5rem;
    margin-bottom: 24px;
    animation: pop 0.5s cubic-bezier(.17,.67,.35,1.4);
}

@keyframes pop {
    from { transform: scale(0.5); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

.final-screen h2 {
    margin-bottom: 16px;
}

.final-desc {
    color: #C8C7D8;
    font-size: 0.97rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

.final-contact-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 14px;
}

.final-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    text-align: left;
}

.final-box p {
    font-size: 0.95rem;
    color: #D4D3E0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-whatsapp-final {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-top: 20px;
    padding: 18px 24px;
    background: linear-gradient(135deg, #25D366, #1DA851);
    color: white;
    text-decoration: none;
    border-radius: var(--r);
    font-size: 1rem;
    font-weight: 700;
    font-family: var(--font);
    transition: all 0.2s ease;
    letter-spacing: 0.01em;
    animation: pulse-green 2s infinite;
}

.btn-whatsapp-final:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(37,211,102,0.4);
    animation: none;
}

@keyframes pulse-green {
    0%, 100% { box-shadow: 0 0 0 0 rgba(37,211,102,0.4); }
    50%       { box-shadow: 0 0 0 10px rgba(37,211,102,0); }
}

/* ─── RESPONSIVE ───────────────────────────────────────────── */
@media (min-width: 640px) {
    .screen { padding: 0 40px; }
    .progress-bar-wrap { padding: 16px 40px 12px; }
    .progress-bar-wrap::before { left: 40px; right: 40px; }
}
