:root {
    --bg-main: #020617;
    --bg-secondary: #0f172a;
    --bg-card: #111827;
    --bg-card-soft: #1e293b;
    --text-main: #e2e8f0;
    --text-strong: #f8fafc;
    --text-soft: #94a3b8;
    --line: #1e293b;
    --primary: #38bdf8;
    --primary-strong: #2563eb;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #facc15;
    --premium: #a855f7;
    --admin: #f59e0b;
    --gold: #fbbf24;
    --shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    font-family: 'Inter', Arial, sans-serif;
    background:
        radial-gradient(circle at top right, rgba(56, 189, 248, 0.12), transparent 24%),
        radial-gradient(circle at top left, rgba(168, 85, 247, 0.10), transparent 20%),
        linear-gradient(180deg, var(--bg-main) 0%, var(--bg-secondary) 100%);
    color: var(--text-main);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea,
select {
    font: inherit;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 20px;
    padding: 16px 36px;
    background: rgba(2, 6, 23, 0.92);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(30, 41, 59, 0.95);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand-logo {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #020617;
    border: 1px solid rgba(251, 191, 36, 0.55);
    box-shadow: 0 0 24px rgba(251, 191, 36, 0.16);
}

.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-size: 21px;
    font-weight: 900;
    color: #f8fafc;
    letter-spacing: 0;
    line-height: 1.1;
    font-family: Georgia, 'Times New Roman', serif;
    text-shadow: 0 0 18px rgba(251, 191, 36, 0.18);
}

.brand-title::first-letter {
    color: #facc15;
}

.brand-title.logo .highlight {
    color: #FFD166;
    display: inline-block;
    text-shadow:
        0 0 5px rgba(255, 209, 102, 0.42),
        0 1px 0 rgba(255, 255, 255, 0.22);
    transition:
        color 0.35s ease,
        text-shadow 0.35s ease,
        transform 0.35s ease,
        filter 0.35s ease;
}

.brand:hover .brand-title.logo .highlight,
.brand-title.logo:hover .highlight {
    color: #FFE29A;
    transform: translateY(-1px);
    filter: brightness(1.16);
    text-shadow:
        0 0 8px rgba(255, 209, 102, 0.95),
        0 0 18px rgba(255, 215, 130, 0.75),
        0 0 34px rgba(255, 215, 130, 0.46);
    animation: lexarena-gold-pulse 1.25s ease-in-out infinite alternate;
}

@keyframes lexarena-gold-pulse {
    from {
        text-shadow:
            0 0 8px rgba(255, 209, 102, 0.82),
            0 0 18px rgba(255, 215, 130, 0.56),
            0 0 28px rgba(255, 215, 130, 0.34);
    }
    to {
        text-shadow:
            0 0 12px rgba(255, 209, 102, 1),
            0 0 24px rgba(255, 215, 130, 0.82),
            0 0 42px rgba(255, 215, 130, 0.52);
    }
}

.brand-subtitle {
    font-size: 12px;
    color: var(--text-soft);
    line-height: 1.2;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.nav a {
    color: var(--text-soft);
    padding: 9px 12px;
    border-radius: 12px;
    transition: 0.2s ease;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid transparent;
}

.nav a:hover {
    color: var(--primary);
    background: rgba(56, 189, 248, 0.08);
    border-color: rgba(56, 189, 248, 0.16);
}

.user-area {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(30, 41, 59, 0.82);
    color: var(--text-main);
    border: 1px solid #334155;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.badge-premium {
    background: rgba(168, 85, 247, 0.13);
    border-color: rgba(168, 85, 247, 0.34);
    color: #e9d5ff;
}

.badge-free {
    background: rgba(148, 163, 184, 0.12);
    border-color: rgba(148, 163, 184, 0.22);
    color: #cbd5e1;
}

.badge-admin {
    background: rgba(245, 158, 11, 0.13);
    border-color: rgba(245, 158, 11, 0.34);
    color: #fde68a;
}

.badge-success {
    color: #bbf7d0;
    border-color: rgba(34, 197, 94, 0.25);
    background: rgba(34, 197, 94, 0.10);
}

.badge-danger {
    color: #fecaca;
    border-color: rgba(239, 68, 68, 0.25);
    background: rgba(239, 68, 68, 0.10);
}

.btn-auth {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 15px;
    font-size: 13px;
    font-weight: 800;
    border-radius: 12px;
    transition: 0.2s ease;
}

.btn-login {
    color: var(--primary);
    border: 1px solid rgba(56, 189, 248, 0.45);
    background: transparent;
}

.btn-login:hover {
    background: rgba(56, 189, 248, 0.08);
}

.btn-register {
    color: white;
    background: linear-gradient(135deg, var(--primary-strong), #1d4ed8);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.26);
}

.btn-register:hover,
.btn-auth:hover {
    transform: translateY(-1px);
}

.logout {
    color: #fca5a5;
    font-size: 14px;
    font-weight: 800;
    padding: 8px 10px;
    border-radius: 10px;
}

.logout:hover {
    color: #f87171;
    background: rgba(239, 68, 68, 0.08);
}

.page-shell {
    max-width: 1220px;
    margin: 0 auto;
    padding: 28px 20px 42px;
}

.container {
    width: 100%;
}

.flash-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
}

.flash {
    border-radius: 14px;
    padding: 13px 15px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid;
    box-shadow: var(--shadow);
}

.flash-success {
    background: rgba(34, 197, 94, 0.10);
    border-color: rgba(34, 197, 94, 0.35);
    color: #bbf7d0;
}

.flash-error {
    background: rgba(239, 68, 68, 0.10);
    border-color: rgba(239, 68, 68, 0.35);
    color: #fecaca;
}

.flash-warning {
    background: rgba(250, 204, 21, 0.10);
    border-color: rgba(250, 204, 21, 0.35);
    color: #fef08a;
}

.flash-info {
    background: rgba(56, 189, 248, 0.10);
    border-color: rgba(56, 189, 248, 0.35);
    color: #bae6fd;
}

.card {
    background:
        linear-gradient(145deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.98));
    border: 1px solid rgba(51, 65, 85, 0.85);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
}

.card + .card {
    margin-top: 18px;
}

h1,
h2,
h3,
h4 {
    color: var(--text-strong);
}

p {
    color: var(--text-main);
}

.muted {
    color: var(--text-soft);
}

button {
    width: 100%;
    border: none;
    border-radius: 13px;
    cursor: pointer;
    padding: 13px 16px;
    background: linear-gradient(135deg, var(--primary-strong), #1d4ed8);
    color: white;
    font-weight: 800;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.18);
    transition: 0.2s ease;
}

button:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.24);
}

button:disabled {
    cursor: default;
}

input,
textarea,
select {
    width: 100%;
    background: #0b1220;
    color: var(--text-main);
    border: 1px solid #334155;
    border-radius: 11px;
    padding: 12px;
    outline: none;
    transition: 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
    border-color: rgba(56, 189, 248, 0.75);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
}

hr {
    border: none;
    border-top: 1px solid rgba(51, 65, 85, 0.8);
    margin: 20px 0;
}

.footer {
    margin-top: 30px;
    padding: 22px 12px 30px;
    text-align: center;
    color: #64748b;
    font-size: 13px;
    border-top: 1px solid rgba(30, 41, 59, 0.7);
}

.footer span {
    color: var(--primary);
    font-weight: 800;
}

/* DASHBOARD */

.hero-panel {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 26px;
    padding: 28px;
    border-radius: 24px;
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.16), rgba(168, 85, 247, 0.10)),
        rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(56, 189, 248, 0.18);
    box-shadow: var(--shadow);
}

.page-pill {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(56, 189, 248, 0.10);
    border: 1px solid rgba(56, 189, 248, 0.22);
    color: #bae6fd;
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 14px;
}

.page-header h1 {
    margin: 0 0 8px;
    font-size: clamp(30px, 4vw, 48px);
    letter-spacing: -1.2px;
}

.subtitulo {
    margin: 0;
    color: #cbd5e1;
    font-size: 15px;
    line-height: 1.7;
    max-width: 760px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.btn-hero-primary,
.btn-hero-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 16px;
    border-radius: 13px;
    font-size: 14px;
    font-weight: 900;
    transition: 0.2s ease;
    white-space: nowrap;
}

.btn-hero-primary {
    color: #08111f;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    box-shadow: 0 14px 28px rgba(245, 158, 11, 0.18);
}

.btn-hero-secondary {
    color: #e0f2fe;
    background: rgba(56, 189, 248, 0.10);
    border: 1px solid rgba(56, 189, 248, 0.25);
}

.btn-hero-primary:hover,
.btn-hero-secondary:hover {
    transform: translateY(-2px);
}

.dashboard {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 24px;
    align-items: start;
}

.stats {
    position: sticky;
    top: 92px;
}

.stats-topo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.stats-topo h3 {
    margin: 0;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.22);
    color: #bae6fd;
    font-size: 12px;
    font-weight: 800;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 18px;
}

.mini-card {
    border-radius: 16px;
    padding: 16px;
    border: 1px solid #334155;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mini-card.success {
    background: linear-gradient(145deg, rgba(20, 83, 45, 0.55), rgba(6, 78, 59, 0.35));
}

.mini-card.danger {
    background: linear-gradient(145deg, rgba(127, 29, 29, 0.55), rgba(69, 10, 10, 0.35));
}

.mini-label {
    font-size: 13px;
    color: #cbd5e1;
}

.mini-value {
    font-size: 30px;
    font-weight: 900;
    color: #f8fafc;
}

.desempenho-geral {
    margin-top: 6px;
    padding: 16px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid #334155;
}

.linha-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #cbd5e1;
    font-size: 14px;
    margin-bottom: 12px;
}

.progress-track {
    width: 100%;
    height: 12px;
    background: #0b1220;
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid #1e293b;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #22c55e, #38bdf8);
    transition: width 0.3s ease;
}

.acoes-stats {
    margin-top: 18px;
}

.btn-local {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 50px;
    padding: 0 16px;
    border-radius: 13px;
    font-weight: 900;
    transition: 0.2s ease;
    text-align: center;
}

.btn-local:hover {
    transform: translateY(-1px);
}

.btn-reset {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: #ffffff;
}

.visitor-box p {
    color: #cbd5e1;
    line-height: 1.6;
    margin-bottom: 18px;
}

.visitor-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-login-local {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    border: 1px solid #334155;
    color: #e2e8f0;
}

.btn-register-local {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
}

.disciplinas-area {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.disciplinas-topo {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.disciplinas-topo h3 {
    margin: 0 0 6px;
}

.disciplinas-sub {
    margin: 0;
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.6;
}

.contador {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    color: #bae6fd;
    background: rgba(56, 189, 248, 0.10);
    border: 1px solid rgba(56, 189, 248, 0.20);
    white-space: nowrap;
}

.disciplinas-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.disciplina-card {
    display: grid;
    grid-template-columns: 56px 1fr 28px;
    align-items: center;
    gap: 16px;
    min-height: 94px;
    transition: 0.2s ease;
}

.disciplina-card:hover {
    transform: translateY(-4px);
    border-color: rgba(56, 189, 248, 0.34);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.30);
}

.disciplina-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: rgba(56, 189, 248, 0.10);
    border: 1px solid rgba(56, 189, 248, 0.18);
}

.disciplina-conteudo h4 {
    margin: 0 0 6px;
    font-size: 17px;
}

.disciplina-conteudo p {
    margin: 0;
    color: #94a3b8;
    font-size: 14px;
}

.disciplina-seta {
    font-size: 22px;
    font-weight: 900;
    color: #38bdf8;
    text-align: right;
}

/* QUESTÃO PREMIUM */

.question-layout {
    max-width: 1040px;
    margin: 0 auto;
}

.premium-question-layout {
    position: relative;
}

.premium-question-layout::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 15% 10%, rgba(56, 189, 248, 0.10), transparent 28%),
        radial-gradient(circle at 85% 20%, rgba(168, 85, 247, 0.12), transparent 26%),
        radial-gradient(circle at 50% 100%, rgba(245, 158, 11, 0.08), transparent 30%);
    z-index: -1;
}

.question-hero {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 18px;
    margin-bottom: 18px;
    padding: 24px;
    border-radius: 26px;
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(168, 85, 247, 0.12)),
        rgba(15, 23, 42, 0.88);
    border: 1px solid rgba(56, 189, 248, 0.18);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
    overflow: hidden;
}

.question-hero-left h1 {
    margin: 0 0 8px;
    font-size: clamp(30px, 4vw, 48px);
    letter-spacing: -1.2px;
    line-height: 1.05;
}

.premium-pill {
    background: rgba(251, 191, 36, 0.12);
    border-color: rgba(251, 191, 36, 0.30);
    color: #fde68a;
}

.question-hero-right {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    min-width: 220px;
}

.hero-stat {
    padding: 16px;
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.42);
    border: 1px solid rgba(148, 163, 184, 0.16);
}

.hero-stat span {
    display: block;
    margin-bottom: 6px;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero-stat strong {
    color: #f8fafc;
    font-size: 17px;
    line-height: 1.35;
}

.question-hud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.premium-hud .badge {
    background: rgba(15, 23, 42, 0.88);
    border-color: rgba(56, 189, 248, 0.20);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.question-progress {
    margin-bottom: 20px;
}

.premium-question-progress {
    height: 13px;
    background: rgba(2, 6, 23, 0.82);
    border-color: rgba(56, 189, 248, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.premium-question-progress .progress-fill {
    background: linear-gradient(90deg, #22c55e, #38bdf8, #a855f7);
}

.question-card {
    padding: 28px;
}

.premium-question-card {
    position: relative;
    border-radius: 28px;
    background:
        linear-gradient(145deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.98));
    border: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.38);
}

.question-title {
    margin-bottom: 18px;
}

.question-title h1,
.question-title h2 {
    margin: 8px 0 0;
    font-size: clamp(22px, 3vw, 32px);
    letter-spacing: -0.7px;
}

.question-section-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(56, 189, 248, 0.10);
    border: 1px solid rgba(56, 189, 248, 0.22);
    color: #bae6fd;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.question-statement {
    padding: 24px;
    border-radius: 22px;
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.90), rgba(2, 6, 23, 0.72));
    border: 1px solid rgba(56, 189, 248, 0.20);
    color: #f8fafc;
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 22px;
    white-space: pre-wrap;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025);
}

.answers {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.answer-option {
    position: relative;
    overflow: hidden;
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.20);
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.84));
    color: #e2e8f0;
    cursor: pointer;
    transition: 0.2s ease;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    text-align: left;
    box-shadow: none;
}

.answer-option::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(56, 189, 248, 0.10), transparent 42%);
    opacity: 0;
    transition: 0.2s ease;
}

.answer-option:hover:not(:disabled) {
    transform: translateY(-2px);
    border-color: rgba(56, 189, 248, 0.42);
    background: rgba(30, 41, 59, 0.96);
}

.answer-option:hover:not(:disabled)::after {
    opacity: 1;
}

.answer-option:disabled {
    cursor: default;
    opacity: 0.98;
}

.answer-letter {
    position: relative;
    z-index: 1;
    min-width: 38px;
    height: 38px;
    border-radius: 13px;
    background: rgba(56, 189, 248, 0.10);
    border: 1px solid rgba(56, 189, 248, 0.22);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    color: #bae6fd;
}

.answer-text {
    position: relative;
    z-index: 1;
    flex: 1;
    line-height: 1.7;
    font-weight: 650;
}

.answer-option.correct {
    border-color: rgba(34, 197, 94, 0.65);
    background:
        linear-gradient(135deg, rgba(20, 83, 45, 0.62), rgba(6, 78, 59, 0.38));
}

.answer-option.correct .answer-letter {
    color: #052e16;
    background: #86efac;
    border-color: rgba(134, 239, 172, 0.80);
}

.answer-option.wrong {
    border-color: rgba(239, 68, 68, 0.65);
    background:
        linear-gradient(135deg, rgba(127, 29, 29, 0.54), rgba(69, 10, 10, 0.38));
}

.answer-option.wrong .answer-letter {
    color: #450a0a;
    background: #fca5a5;
    border-color: rgba(252, 165, 165, 0.80);
}

.result-box {
    margin-top: 24px;
    padding: 18px;
    border-radius: 20px;
    font-weight: 900;
    border: 1px solid;
}

.result-box strong {
    display: block;
    margin-bottom: 4px;
    color: #f8fafc;
    font-size: 18px;
}

.result-box span {
    color: #cbd5e1;
    font-weight: 650;
}

.result-box.success {
    background: rgba(34, 197, 94, 0.10);
    border-color: rgba(34, 197, 94, 0.35);
    color: #bbf7d0;
}

.result-box.danger {
    background: rgba(239, 68, 68, 0.10);
    border-color: rgba(239, 68, 68, 0.35);
    color: #fecaca;
}

.correct-answer {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 16px 0 22px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(56, 189, 248, 0.10);
    border: 1px solid rgba(56, 189, 248, 0.22);
}

.correct-answer span {
    color: #94a3b8;
    font-size: 13px;
    font-weight: 800;
}

.correct-answer strong {
    color: #f8fafc;
    font-size: 18px;
}

.analysis-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}

.analysis-card {
    padding: 18px;
    border-radius: 20px;
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(2, 6, 23, 0.54));
    border: 1px solid rgba(148, 163, 184, 0.18);
    margin-top: 14px;
}

.analysis-card h3,
.analysis-card h4 {
    margin: 0 0 10px;
}

.analysis-card p,
.analysis-card pre,
.analysis-card li {
    color: #cbd5e1;
    line-height: 1.75;
}

.analysis-card pre {
    white-space: pre-wrap;
    font-family: inherit;
    margin: 0;
}

.ia-card {
    margin-top: 18px;
    border-radius: 24px;
    background:
        linear-gradient(145deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.98));
    border-color: rgba(168, 85, 247, 0.34);
}

.tutor-card {
    margin-top: 18px;
    border-radius: 18px;
    background:
        linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.98));
    border-color: rgba(251, 191, 36, 0.32);
}

.ia-card-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.ia-card-header h3 {
    margin-top: 10px;
}

.tutor-status-badge {
    border-color: rgba(251, 191, 36, 0.35);
    background: rgba(251, 191, 36, 0.10);
}

.tutor-answer-box,
.tutor-suggestions,
.tutor-safe-note {
    margin-top: 16px;
}

.tutor-answer-box {
    padding: 16px;
    border-radius: 12px;
    background: rgba(251, 191, 36, 0.07);
    border: 1px solid rgba(251, 191, 36, 0.22);
}

.tutor-chip-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.tutor-chip {
    min-height: 42px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.74);
    color: #f8fafc;
    text-align: left;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.tutor-chip:hover {
    border-color: rgba(251, 191, 36, 0.62);
    background: rgba(251, 191, 36, 0.10);
    transform: translateY(-1px);
}

.tutor-input-preview {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    margin-top: 16px;
}

.tutor-input-preview input,
.tutor-input-preview button {
    min-height: 44px;
    border-radius: 10px;
    border: 1px solid #334155;
    background: rgba(2, 6, 23, 0.72);
    color: #f8fafc;
    padding: 0 12px;
}

.tutor-input-preview button {
    padding: 0 18px;
    font-weight: 900;
    color: #111827;
    background: linear-gradient(135deg, #facc15, #d97706);
    cursor: pointer;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.tutor-input-preview button:hover {
    transform: translateY(-1px);
}

.tutor-input-preview button:disabled {
    cursor: wait;
    opacity: 0.68;
    transform: none;
}

.tutor-live-answer {
    margin-top: 16px;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid rgba(34, 197, 94, 0.28);
    background: rgba(34, 197, 94, 0.08);
    color: #dcfce7;
    line-height: 1.7;
    white-space: pre-wrap;
}

.tutor-live-answer.is-error {
    border-color: rgba(251, 191, 36, 0.32);
    background: rgba(251, 191, 36, 0.08);
    color: #fde68a;
}

.tutor-feedback {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
    color: #cbd5e1;
    font-weight: 800;
}

.tutor-feedback button {
    min-height: 34px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.26);
    background: rgba(15, 23, 42, 0.76);
    color: #f8fafc;
    cursor: pointer;
    font-weight: 900;
}

.tutor-feedback button:hover {
    border-color: rgba(251, 191, 36, 0.56);
    color: #fde68a;
}

.tutor-safe-note {
    color: #fde68a;
    font-size: 13px;
}

.ia-label {
    background: rgba(168, 85, 247, 0.12);
    border-color: rgba(168, 85, 247, 0.28);
    color: #e9d5ff;
}

.ia-score-badge {
    min-width: 110px;
    padding: 13px;
    text-align: center;
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.54);
    border: 1px solid rgba(168, 85, 247, 0.24);
}

.ia-score-badge span {
    display: block;
    margin-bottom: 5px;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.ia-score-badge strong {
    color: #f8fafc;
    font-size: 24px;
}

.ia-mini-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
}

.ia-mini {
    border-radius: 18px;
    padding: 14px;
    background: rgba(2, 6, 23, 0.36);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.ia-mini span {
    display: block;
    color: #94a3b8;
    font-size: 13px;
    margin-bottom: 6px;
}

.ia-mini strong {
    font-size: 22px;
    color: #f8fafc;
}

.ia-section {
    margin-top: 14px;
    padding: 17px;
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.36);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.legal-text-box pre {
    padding: 14px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.fgv-trap {
    background:
        linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(120, 53, 15, 0.12));
    border-color: rgba(245, 158, 11, 0.42);
    box-shadow: 0 16px 35px rgba(245, 158, 11, 0.08);
}

.alt-review {
    margin-top: 12px;
    padding: 14px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.16);
}

.alt-review strong {
    color: #f8fafc;
    line-height: 1.6;
}

.alt-review p {
    margin-bottom: 0;
}

.alt-ok {
    border-color: rgba(34, 197, 94, 0.45);
    background: rgba(20, 83, 45, 0.20);
}

.alt-bad {
    border-color: rgba(239, 68, 68, 0.35);
    background: rgba(127, 29, 29, 0.18);
}

.ranking-lista {
    display: grid;
    gap: 10px;
    padding-left: 0;
    margin-bottom: 0;
    list-style: none;
}

.ranking-lista li {
    padding: 13px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.70);
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.danger-text {
    color: #fca5a5;
}

.warning-text {
    color: #fde68a;
}

.question-actions {
    margin-top: 24px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.finish-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 16px;
    border-radius: 13px;
    font-weight: 900;
    background: rgba(34, 197, 94, 0.10);
    border: 1px solid rgba(34, 197, 94, 0.30);
    color: #bbf7d0;
}

/* RESPONSIVO */

@media (max-width: 1080px) {
    .topbar {
        grid-template-columns: 1fr;
        padding: 16px 18px;
    }

    .brand,
    .nav,
    .user-area {
        justify-content: center;
    }

    .dashboard {
        grid-template-columns: 1fr;
    }

    .stats {
        position: static;
    }

    .hero-panel,
    .question-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-actions {
        justify-content: flex-start;
    }

    .question-hero-right {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 760px) {
    .analysis-grid,
    .ia-mini-grid {
        grid-template-columns: 1fr;
    }

    .question-card {
        padding: 20px;
    }

    .question-actions,
    .btn-hero-primary,
    .btn-hero-secondary,
    .finish-pill {
        width: 100%;
    }

    .answer-option {
        padding: 14px;
    }

    .answer-letter {
        min-width: 32px;
        height: 32px;
    }

    .ia-card-header {
        flex-direction: column;
    }

    .tutor-chip-grid,
    .tutor-input-preview {
        grid-template-columns: 1fr;
    }

    .ia-score-badge {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .page-shell {
        padding: 20px 14px 36px;
    }

    .brand {
        justify-content: center;
    }

    .brand-text {
        align-items: center;
    }

    .brand-subtitle {
        text-align: center;
    }

    .nav {
        gap: 8px;
    }

    .nav a,
    .btn-auth {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .user-area {
        flex-direction: column;
        align-items: stretch;
    }

    .badge,
    .logout {
        justify-content: center;
        text-align: center;
    }

    .hero-panel {
        padding: 22px;
    }

    .hero-actions,
    .btn-hero-primary,
    .btn-hero-secondary {
        width: 100%;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .disciplinas-topo {
        flex-direction: column;
        align-items: flex-start;
    }

    .disciplina-card {
        grid-template-columns: 48px 1fr 22px;
        gap: 12px;
        min-height: auto;
        padding: 18px;
    }

    .disciplina-icon {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }

    .disciplina-conteudo h4 {
        font-size: 16px;
    }

    .disciplina-conteudo p {
        font-size: 13px;
    }

    .question-hero,
    .question-card {
        border-radius: 22px;
    }

    .question-statement {
        padding: 16px;
        font-size: 15px;
    }
}

.conversion-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
    padding: 18px;
    border: 1px solid rgba(251, 191, 36, 0.28);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.10), rgba(56, 189, 248, 0.08));
}

.conversion-card-compact {
    margin: 0 0 18px 0;
}

.conversion-card strong {
    display: block;
    color: var(--text-strong);
    font-size: 1rem;
    margin-top: 4px;
}

.conversion-card p {
    margin: 6px 0 0 0;
    color: var(--text-soft);
    line-height: 1.55;
}

.conversion-kicker {
    color: #fde68a;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.questao-tag-beta {
    background: rgba(168, 85, 247, 0.14);
    border-color: rgba(168, 85, 247, 0.34);
    color: #e9d5ff;
}

.question-status-row {
    margin-top: 14px;
}

.lexarena-tutor-pulse {
    position: fixed;
    right: 92px;
    bottom: 33px;
    z-index: 2147482999;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: auto;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid rgba(255, 210, 77, 0.75);
    border-radius: 999px;
    color: #0f172a;
    background: linear-gradient(135deg, #ffd24d 0%, #ffad0d 48%, #38bdf8 100%);
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.34), 0 0 0 0 rgba(255, 210, 77, 0.5);
    font: inherit;
    font-size: 13px;
    font-weight: 950;
    pointer-events: none;
    isolation: isolate;
    transition: opacity 0.18s ease, transform 0.18s ease;
    animation: tutorPulseGlow 1.8s ease-out infinite;
}

.lexarena-tutor-pulse::before {
    content: "";
    position: absolute;
    inset: -8px;
    z-index: -1;
    border-radius: inherit;
    border: 1px solid rgba(255, 210, 77, 0.42);
    opacity: 0.75;
    animation: tutorPulseRing 1.8s ease-out infinite;
}

.lexarena-tutor-pulse.is-open {
    opacity: 0.46;
    transform: translateX(8px);
    animation-play-state: paused;
}

.lexarena-tutor-pulse__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.14);
    font-size: 12px;
    line-height: 1;
}

.lexarena-tutor-pulse__label {
    line-height: 1;
    letter-spacing: 0;
}

@keyframes tutorPulseGlow {
    0% {
        box-shadow: 0 18px 48px rgba(15, 23, 42, 0.42), 0 0 0 0 rgba(255, 210, 77, 0.52);
    }
    70% {
        box-shadow: 0 18px 48px rgba(15, 23, 42, 0.42), 0 0 0 14px rgba(255, 210, 77, 0);
    }
    100% {
        box-shadow: 0 18px 48px rgba(15, 23, 42, 0.42), 0 0 0 0 rgba(255, 210, 77, 0);
    }
}

@keyframes tutorPulseRing {
    0% {
        transform: scale(0.92);
        opacity: 0.82;
    }
    70% {
        transform: scale(1.18);
        opacity: 0;
    }
    100% {
        transform: scale(1.18);
        opacity: 0;
    }
}

@media (max-width: 768px) {
    .conversion-card {
        align-items: stretch;
        flex-direction: column;
    }

    .lexarena-tutor-pulse {
        right: 82px;
        bottom: 28px;
        min-height: 34px;
        padding: 0 10px;
        font-size: 12px;
    }
}
