/* =============================================
   FEDERAL MOTORS — style.css
   ============================================= */

/* ─── Reset & Tokens ─────────────────────── */
:root {
    --primary:    #0a0f1e;
    --secondary:  #111827;
    --card-bg:    rgba(15, 23, 42, 0.95);
    --border:     rgba(255,255,255,0.08);
    --accent:     #f59e0b;
    --accent2:    #fbbf24;
    --success:    #10b981;
    --danger:     #ef4444;
    --warning:    #f59e0b;
    --text:       #f1f5f9;
    --muted:      #64748b;
    --muted2:     #94a3b8;
    --radius:     16px;
    --radius-sm:  10px;
    --shadow:     0 25px 60px rgba(0,0,0,0.5);
    --glow:       0 0 30px rgba(245,158,11,0.15);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--primary);
    background-image:
        radial-gradient(ellipse at 20% 0%,  rgba(245,158,11,0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(16,185,129,0.05) 0%, transparent 50%),
        linear-gradient(180deg, #0a0f1e 0%, #0d1526 100%);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 20px 16px 60px;
    position: relative;
    overflow-x: hidden;
}

/* ─── Partículas de fundo ─────────────────── */
.bg-particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245,158,11,0.6), transparent);
}

/* ─── Container ──────────────────────────── */
.container {
    width: 100%;
    max-width: 480px;
    position: relative;
    z-index: 1;
    padding-top: 20px;
}

/* ─── Cards base ─────────────────────────── */
.card,
.quiz-card,
.loading-card,
.result-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow), var(--glow);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    overflow: hidden;
}

/* ─── QUIZ CARD ──────────────────────────── */
.quiz-card { padding: 0 0 20px; }

/* Header / Logo */
.card-header {
    padding: 24px 24px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: rgba(255,255,255,0.02);
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.shield-icon {
    width: 46px;
    height: 46px;
    background: linear-gradient(135deg, var(--accent) 0%, #d97706 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(245,158,11,0.4);
    flex-shrink: 0;
}

.shield-icon i {
    font-size: 22px;
    color: #0a0f1e;
}

.shield-icon.pulse {
    animation: pulseShadow 2s infinite;
}

@keyframes pulseShadow {
    0%,100% { box-shadow: 0 4px 15px rgba(245,158,11,0.4); }
    50%      { box-shadow: 0 4px 30px rgba(245,158,11,0.8); }
}

.brand {
    display: flex;
    flex-direction: column;
    line-height: 1;
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
}

.brand-federal {
    font-size: 20px;
    color: var(--accent);
    letter-spacing: 3px;
}

.brand-motors {
    font-size: 20px;
    color: var(--text);
    letter-spacing: 3px;
}

.brand-tag {
    font-size: 9px;
    color: var(--muted2);
    letter-spacing: 2px;
    font-weight: 600;
    margin-top: 2px;
}

.trust-badges {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: flex-end;
}

.badge {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 3px 8px;
    font-size: 9px;
    font-weight: 700;
    color: var(--muted2);
    letter-spacing: 1px;
    white-space: nowrap;
}

.badge i { color: var(--accent); margin-right: 3px; }

/* Progress */
.progress-wrap {
    padding: 16px 24px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.progress-track {
    flex: 1;
    height: 6px;
    background: rgba(255,255,255,0.07);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent) 0%, #fbbf24 100%);
    border-radius: 3px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px rgba(245,158,11,0.5);
}

.progress-label {
    font-size: 11px;
    color: var(--muted2);
    font-weight: 600;
    white-space: nowrap;
}

/* Steps */
.step {
    display: none;
    padding: 24px 24px 0;
    animation: fadeSlideIn 0.4s ease forwards;
}

.step.active { display: block; }

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

.step-icon {
    font-size: 36px;
    color: var(--accent);
    margin-bottom: 14px;
    display: block;
}

.step-icon.pulse-icon {
    animation: iconPulse 1.8s ease-in-out infinite;
}

@keyframes iconPulse {
    0%,100% { transform: scale(1);    color: var(--accent); }
    50%      { transform: scale(1.1); color: var(--accent2); }
}

.step h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 26px;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 8px;
    color: var(--text);
}

.highlight {
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 13px;
    color: var(--muted2);
    line-height: 1.6;
    margin-bottom: 22px;
}

/* Options */
.options-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.opt-btn {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: left;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    position: relative;
    overflow: hidden;
}

.opt-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(245,158,11,0.08) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.25s;
}

.opt-btn:hover::before,
.opt-btn.opt-selected::before { opacity: 1; }

.opt-btn:hover,
.opt-btn.opt-selected {
    border-color: rgba(245,158,11,0.5);
    transform: translateX(4px);
    box-shadow: 0 4px 20px rgba(245,158,11,0.1);
}

.opt-btn.opt-selected {
    border-color: var(--accent);
    background: rgba(245,158,11,0.08);
}

.opt-icon {
    width: 36px;
    height: 36px;
    background: rgba(245,158,11,0.1);
    border: 1px solid rgba(245,158,11,0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--accent);
    font-size: 15px;
    transition: all 0.25s;
}

.opt-btn:hover .opt-icon,
.opt-btn.opt-selected .opt-icon {
    background: rgba(245,158,11,0.2);
    border-color: var(--accent);
}

.opt-text { flex: 1; }

.opt-arrow {
    color: var(--accent);
    font-size: 12px;
    opacity: 0;
    transform: translateX(-6px);
    transition: all 0.25s;
    flex-shrink: 0;
}

.opt-btn:hover .opt-arrow { opacity: 1; transform: translateX(0); }

/* Micro-copy social proof */
.micro-copy {
    font-size: 12px;
    color: var(--muted);
    text-align: center;
    padding-bottom: 4px;
}

.micro-copy strong { color: var(--accent); }

/* CPF Input */
.cpf-input-wrap { margin-bottom: 18px; }

.cpf-input-wrap label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--muted2);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.input-row {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    color: var(--accent);
    font-size: 16px;
    pointer-events: none;
}

.input-row input {
    width: 100%;
    padding: 16px 16px 16px 44px;
    background: rgba(255,255,255,0.05);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 2px;
    font-family: 'Inter', sans-serif;
    transition: all 0.25s;
    -webkit-appearance: none;
    appearance: none;
}

.input-row input:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(245,158,11,0.05);
    box-shadow: 0 0 0 3px rgba(245,158,11,0.15);
}

.input-row input::placeholder { color: var(--muted); font-size: 16px; letter-spacing: 1px; }

.input-hint {
    display: block;
    font-size: 12px;
    margin-top: 6px;
    min-height: 16px;
    transition: all 0.2s;
}

.input-hint.ok    { color: var(--success); }
.input-hint.warn  { color: var(--warning); }
.input-hint.error { color: var(--danger); }

/* Botão Analisar */
.btn-analyze {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, var(--accent) 0%, #d97706 100%);
    border: none;
    border-radius: var(--radius-sm);
    color: #0a0f1e;
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 15px;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 8px 25px rgba(245,158,11,0.35);
    position: relative;
    overflow: hidden;
    margin-bottom: 14px;
}

.btn-analyze::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 40%;
    height: 200%;
    background: rgba(255,255,255,0.2);
    transform: skewX(-20deg);
    animation: shimmer 2.5s 1s infinite;
}

@keyframes shimmer {
    0%   { left: -60%; }
    100% { left: 130%; }
}

.btn-analyze:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(245,158,11,0.45);
}

.btn-analyze:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.secure-line {
    font-size: 11px;
    color: var(--muted);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    line-height: 1.5;
    padding-bottom: 6px;
}

.secure-line i { color: var(--success); }

/* ─── LGPD Consent ───────────────────────── */
.lgpd-wrap {
    margin-bottom: 16px;
    padding: 12px 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.lgpd-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.lgpd-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    accent-color: var(--accent);
    cursor: pointer;
    margin-top: 2px;
}

.lgpd-text {
    font-size: 11px;
    color: var(--muted2);
    line-height: 1.5;
}

.lgpd-text a {
    color: var(--accent);
    text-decoration: underline;
}

/* Footer quiz */
.quiz-footer {
    padding: 16px 24px 0;
    border-top: 1px solid var(--border);
    font-size: 11px;
    color: var(--muted);
    text-align: center;
    line-height: 1.7;
}

.quiz-footer a { color: var(--muted); text-decoration: underline; }

/* ─── LOADING CARD ───────────────────────── */
.loading-card {
    padding: 50px 30px;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.loading-card.visible { opacity: 1; transform: translateY(0); }

.loading-logo {
    margin-bottom: 28px;
    display: flex;
    justify-content: center;
}

.loading-logo .shield-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    font-size: 28px;
}

.loading-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 28px;
    color: var(--text);
}

.loading-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 30px;
    text-align: left;
}

.ls-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    padding: 12px 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.ls-item i { font-size: 14px; width: 18px; text-align: center; flex-shrink: 0; }
.ls-item .fa-spin { color: var(--accent); }
.ls-item .fa-clock { color: var(--muted); }

.ls-item.inactive {
    opacity: 0.4;
}

.ls-item.done {
    background: rgba(16,185,129,0.08);
    border-color: rgba(16,185,129,0.3);
    opacity: 1;
    color: var(--success);
}

.ls-item.done i { color: var(--success); }

.loading-bar-wrap {
    height: 6px;
    background: rgba(255,255,255,0.07);
    border-radius: 3px;
    overflow: hidden;
}

.loading-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--success));
    border-radius: 3px;
    transition: width 0.6s ease;
    width: 0%;
    box-shadow: 0 0 10px rgba(245,158,11,0.4);
}

/* ─── RESULT CARD ────────────────────────── */
.result-card {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
    overflow: visible;
}

.result-card.visible { opacity: 1; transform: translateY(0); }

/* Header resultado */
.result-header {
    background: linear-gradient(135deg, #064e3b 0%, #065f46 40%, #059669 100%);
    padding: 30px 24px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.result-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.prot-badge {
    display: inline-block;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 14px;
    color: rgba(255,255,255,0.9);
}

.award-icon {
    font-size: 52px;
    color: var(--accent2);
    margin-bottom: 10px;
    text-shadow: 0 4px 20px rgba(16,185,129,0.5);
    animation: awardPop 0.6s cubic-bezier(0.34,1.56,0.64,1) both;
}

@keyframes awardPop {
    from { transform: scale(0) rotate(-15deg); opacity: 0; }
    to   { transform: scale(1) rotate(0deg);   opacity: 1; }
}

.result-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 24px;
    font-weight: 900;
    color: #fff;
    margin-bottom: 4px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.result-sub {
    font-size: 11px;
    color: rgba(255,255,255,0.7);
    letter-spacing: 2px;
    font-weight: 600;
}

/* Timer strip */
.timer-strip {
    background: rgba(239,68,68,0.1);
    border-bottom: 1px solid rgba(239,68,68,0.2);
    padding: 12px 24px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--muted2);
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.timer-strip i { color: var(--danger); }

.timer-strip strong {
    color: var(--danger);
    font-size: 15px;
    font-variant-numeric: tabular-nums;
}

/* Client info */
.client-info {
    padding: 20px 20px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ci-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.ci-item {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
}

.ci-item label {
    display: block;
    font-size: 9px;
    color: var(--muted);
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.ci-item span {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.tag-aprovado {
    color: var(--success) !important;
    font-size: 11px !important;
}

.score-val { color: var(--accent) !important; }

/* Score meter */
.score-section {
    padding: 20px 20px 0;
    text-align: center;
}

.score-meter { display: flex; justify-content: center; }

.score-svg {
    width: 180px;
    height: 100px;
    overflow: visible;
}

.score-note {
    font-size: 12px;
    color: var(--muted2);
    line-height: 1.6;
    margin-top: 10px;
}

.score-note strong { color: var(--text); }

/* Crédito box */
.credit-box {
    margin: 20px;
    background: linear-gradient(135deg, rgba(16,185,129,0.1) 0%, rgba(16,185,129,0.05) 100%);
    border: 1px solid rgba(16,185,129,0.3);
    border-radius: var(--radius-sm);
    padding: 22px;
    text-align: center;
}

.credit-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--success);
    margin-bottom: 8px;
}

.credit-value {
    font-family: 'Montserrat', sans-serif;
    font-size: 34px;
    font-weight: 900;
    color: var(--text);
    margin-bottom: 6px;
    animation: countUp 1s ease;
}

@keyframes countUp {
    from { transform: scale(0.8); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

.credit-sub {
    font-size: 11px;
    color: var(--success);
    opacity: 0.8;
}

/* Carros sugeridos */
.cars-section { padding: 0 20px; }

.section-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--muted2);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title i { color: var(--accent); }

.cars-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.car-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: all 0.25s;
}

.car-card:hover {
    border-color: rgba(245,158,11,0.4);
    transform: translateY(-2px);
}

.car-thumb {
    height: 90px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.car-cat {
    position: absolute;
    top: 6px;
    left: 6px;
    background: rgba(0,0,0,0.65);
    color: var(--accent);
    font-size: 9px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    letter-spacing: 1px;
}

.car-body { padding: 10px; }

.car-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 3px;
}

.car-preco {
    font-size: 11px;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 3px;
}

.car-tag {
    font-size: 9px;
    color: var(--success);
    font-weight: 600;
}

/* Botões de ação */
.action-buttons {
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.btn-wpp {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: #fff;
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 14px;
    letter-spacing: 1px;
    transition: all 0.3s;
    box-shadow: 0 8px 25px rgba(37,211,102,0.3);
    position: relative;
    overflow: hidden;
}

.btn-wpp::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 40%;
    height: 200%;
    background: rgba(255,255,255,0.15);
    transform: skewX(-20deg);
    animation: shimmer 2s 0.5s infinite;
}

.btn-wpp:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(37,211,102,0.45);
}

.btn-wpp i { font-size: 20px; }

.btn-restart {
    width: 100%;
    padding: 13px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--muted2);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.btn-restart:hover {
    background: rgba(255,255,255,0.08);
    color: var(--text);
    border-color: rgba(255,255,255,0.15);
}

/* Footer resultado */
.result-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    font-size: 10px;
    color: var(--muted);
    text-align: center;
    line-height: 1.7;
}

/* ─── Scrollbar ──────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(245,158,11,0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ─── Responsive ─────────────────────────── */
@media (max-width: 400px) {
    body { padding: 10px 10px 50px; }

    .card-header { padding: 18px 16px 16px; }
    .trust-badges { display: none; }

    .step { padding: 18px 16px 0; }
    .step h1 { font-size: 22px; }

    .brand-federal,
    .brand-motors { font-size: 17px; }

    .result-title { font-size: 20px; }
    .credit-value { font-size: 28px; }

    .ci-row { grid-template-columns: 1fr; }
    .cars-grid { grid-template-columns: 1fr; }

    .btn-analyze { font-size: 13px; padding: 16px; }
    .btn-wpp { font-size: 13px; }

    .quiz-footer,
    .result-footer,
    .client-info,
    .credit-box,
    .cars-section,
    .action-buttons { padding-left: 14px; padding-right: 14px; }

    .action-buttons { margin-bottom: 14px; }
}
