:root {
    --bg: #0A0E17;
    --surface: #141B26;
    --surface-light: #1E2736;
    --text-primary: #F0F4FF;
    --text-secondary: #8E9BAE;
    --accent: #4F6EF7;
    --accent-glow: rgba(79, 110, 247, 0.4);
    --success: #2DD4BF;
    --warning: #F59E0B;
    --danger: #EF4444;
    --border: #2A3441;
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --font: 'Plus Jakarta Sans', sans-serif;
    --transition: all 0.2s ease;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}
.app-container {
    width: 100%;
    max-width: 500px;
    background: var(--surface);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 0 1px var(--border);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 90vh;
    max-height: 95vh;
}
.screen { display: none; flex-direction: column; flex: 1; overflow-y: auto; padding: 24px 20px; }
.screen.active { display: flex; }
.screen-content { position: relative; z-index: 1; }
.badge-premium {
    display: inline-block;
    background: rgba(79, 110, 247, 0.15);
    color: #8FAAFF;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 20px;
}
.headline { font-size: 30px; font-weight: 800; line-height: 1.2; margin-bottom: 12px; }
.headline span {
    background: linear-gradient(135deg, #4F6EF7, #2DD4BF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.subheadline { color: var(--text-secondary); font-size: 15px; line-height: 1.5; margin-bottom: 28px; }
.capture-form { display: flex; flex-direction: column; gap: 12px; }
.input-group { width: 100%; }
.input-group input {
    width: 100%;
    padding: 16px;
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 15px;
    font-family: var(--font);
    transition: var(--transition);
}
.input-group input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
.input-row { display: flex; gap: 8px; }
.input-row .input-group { flex: 1; }
.btn-primary {
    background: linear-gradient(135deg, #4F6EF7, #6C5CE7);
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    font-family: var(--font);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
    box-shadow: 0 8px 24px var(--accent-glow);
    width: 100%;
}
.btn-primary:hover { transform: translateY(-1px); }
.btn-primary:active { transform: scale(0.98); }
.btn-large .arrow { font-size: 20px; transition: transform 0.2s; }
.btn-primary:hover .arrow { transform: translateX(4px); }
.form-footer { text-align: center; font-size: 12px; color: var(--text-secondary); margin-top: 8px; }
.screen-decoration {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(79,110,247,0.15) 0%, transparent 70%);
    pointer-events: none;
}
.quiz-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-shrink: 0;
}
.progress-bar-container { flex: 1; height: 4px; background: var(--surface-light); border-radius: 2px; overflow: hidden; }
.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--success));
    border-radius: 2px;
    transition: width 0.5s ease;
    width: 0%;
}
.question-counter { font-size: 13px; font-weight: 600; color: var(--accent); min-width: 35px; text-align: right; }
.quiz-content { flex: 1; display: flex; flex-direction: column; overflow-y: auto; }
.question-icon { font-size: 56px; text-align: center; margin-bottom: 12px; animation: floatIcon 3s ease-in-out infinite; }
@keyframes floatIcon {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}
.question-category {
    display: inline-block;
    background: rgba(79, 110, 247, 0.12);
    color: #8FAAFF;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 auto 12px;
    width: fit-content;
}
.question-text { font-size: 18px; font-weight: 700; line-height: 1.4; margin-bottom: 18px; text-align: center; }
.options-container { display: flex; flex-direction: column; gap: 10px; padding-bottom: 10px; }
.option-card {
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 15px 18px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    position: relative;
    overflow: hidden;
}
.option-card:hover { border-color: var(--accent); background: #1A2740; transform: translateY(-2px); }
.option-card:active { transform: scale(0.98); }
.option-card.selected {
    border-color: var(--accent);
    background: linear-gradient(135deg, #1A2740 0%, #1E3050 100%);
    box-shadow: 0 0 0 2px var(--accent), 0 8px 32px var(--accent-glow);
    animation: pulseSelect 0.3s ease;
}
@keyframes pulseSelect {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}
.option-card.selected::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: var(--accent);
    border-radius: 2px 0 0 2px;
}
.loading-report {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    flex: 1;
}
.spinner {
    width: 48px; height: 48px;
    border: 4px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin-bottom: 20px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-report h2 { margin-bottom: 8px; }
.loading-report p { color: var(--text-secondary); }
.report-container { display: flex; flex-direction: column; gap: 20px; }
.report-header { text-align: center; }
.perfil-badge {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.perfil-badge.d { background: rgba(239, 68, 68, 0.15); color: #F87171; }
.perfil-badge.i { background: rgba(245, 158, 11, 0.15); color: #FBBF24; }
.perfil-badge.s { background: rgba(45, 212, 191, 0.15); color: #5EEAD4; }
.perfil-badge.c { background: rgba(79, 110, 247, 0.15); color: #8FAAFF; }
.perfil-titulo { font-size: 26px; font-weight: 800; }
.disc-chart-container {
    background: var(--surface-light);
    border-radius: var(--radius-lg);
    padding: 24px 16px 16px;
    border: 1px solid var(--border);
}
.disc-chart-title {
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}
.disc-chart {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 16px;
    height: 180px;
    padding: 0 8px;
}
.chart-bar-wrapper { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 1; max-width: 60px; }
.chart-bar {
    width: 100%;
    border-radius: 12px 12px 0 0;
    transition: height 1.2s cubic-bezier(0.22, 1, 0.36, 1);
    min-height: 8px;
}
.chart-bar[data-factor="D"] { background: linear-gradient(180deg, #FF6B6B, #E74C3C); box-shadow: 0 0 16px rgba(255,107,107,0.3); }
.chart-bar[data-factor="I"] { background: linear-gradient(180deg, #FECA57, #F59E0B); box-shadow: 0 0 16px rgba(254,202,87,0.3); }
.chart-bar[data-factor="S"] { background: linear-gradient(180deg, #5EEAD4, #2DD4BF); box-shadow: 0 0 16px rgba(94,234,212,0.3); }
.chart-bar[data-factor="C"] { background: linear-gradient(180deg, #8FAAFF, #4F6EF7); box-shadow: 0 0 16px rgba(143,170,255,0.3); }
.bar-value { font-weight: 700; font-size: 12px; color: var(--text-primary); }
.bar-label { font-weight: 800; font-size: 14px; color: var(--text-secondary); }
.report-text {
    background: var(--surface-light);
    border-radius: var(--radius-lg);
    padding: 20px;
    line-height: 1.7;
    font-size: 14px;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}
.report-text h3 { color: var(--text-primary); font-size: 17px; margin: 16px 0 8px; }
.report-text h3:first-child { margin-top: 0; }
.report-text ul, .report-text ol { padding-left: 20px; margin: 8px 0; }
.report-text li { margin-bottom: 4px; }
.report-text strong { color: var(--text-primary); }
.btn-container { display: flex; flex-direction: column; gap: 10px; }
.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 14px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
}
.btn-outline:hover { border-color: var(--accent); color: var(--text-primary); }
.btn-print {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
}
.btn-print:hover { border-color: var(--accent); color: var(--text-primary); background: rgba(79,110,247,0.05); }
.app-footer {
    text-align: center;
    padding: 12px;
    font-size: 11px;
    color: var(--text-secondary);
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}
.app-footer a { color: var(--accent); text-decoration: none; }

/* ========== MARCA FIXA NO TOPO ========== */
.app-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background: rgba(20, 27, 38, 0.95);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    z-index: 10;
    position: sticky;
    top: 0;
}
.brand-logo {
    height: 28px;
    width: auto;
    opacity: 0.9;
    transition: opacity 0.2s;
}
.brand-logo:hover { opacity: 1; }
.logo-small { display: none; }

/* ========== DESKTOP ========== */
@media (min-width: 768px) {
    body {
        padding: 32px;
        background: radial-gradient(ellipse at 50% 0%, #1A1A3E 0%, #0A0E17 60%);
    }
    .app-container {
        max-width: 480px;
        min-height: auto;
        max-height: none;
        box-shadow: 0 0 0 1px var(--border), 0 20px 60px rgba(0,0,0,0.5), 0 0 120px rgba(79,110,247,0.08);
    }
    body::before {
        content: '';
        position: fixed;
        top: -100px;
        left: 50%;
        transform: translateX(-50%);
        width: 600px;
        height: 600px;
        background: radial-gradient(circle, rgba(79,110,247,0.06) 0%, transparent 70%);
        pointer-events: none;
        z-index: 0;
    }
    .app-container { position: relative; z-index: 1; }
    .option-card { padding: 18px 20px; font-size: 15px; border-radius: 16px; }
    .option-card:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(0,0,0,0.3); }
    .input-group input { padding: 18px; font-size: 16px; border-radius: 14px; }
    .headline { font-size: 34px; }
    .subheadline { font-size: 16px; }
    .disc-chart { height: 200px; gap: 24px; }
    .chart-bar-wrapper { max-width: 70px; }
    .app-footer { padding: 16px; }
}

/* ========== MOBILE ========== */
@media (max-width: 480px) {
    body { padding: 0; }
    .app-container { border-radius: 0; max-width: 100%; min-height: 100vh; max-height: 100vh; }
    .headline { font-size: 26px; }
    .question-icon { font-size: 42px; }
    .question-text { font-size: 16px; }
    .disc-chart { gap: 10px; height: 140px; }
    .option-card { padding: 14px; font-size: 13px; }
}