:root {
    --bg-color-1: #0f172a;
    --bg-color-2: #1e1b4b;
    --card-bg: rgba(30, 41, 59, 0.65);
    --card-border: rgba(255, 255, 255, 0.1);
    
    --text-light: #f8fafc;
    --text-muted: #94a3b8;
    
    --primary: #10b981; /* Verde conversão */
    --primary-hover: #059669;
    --primary-glow: rgba(16, 185, 129, 0.4);
    
    --accent: #3b82f6; /* Azul confiança */
    --accent-hover: #2563eb;
    
    --danger: #ef4444;
    --warning: #f59e0b;
    
    --font-main: 'Inter', sans-serif;
}

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

body {
    font-family: var(--font-main);
    background: linear-gradient(135deg, var(--bg-color-1), var(--bg-color-2));
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    color: var(--text-light);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    line-height: 1.5;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Glassmorphism Container */
.quiz-container {
    width: 100%;
    max-width: 700px;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 32px 24px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid var(--card-border);
    position: relative;
    overflow: hidden;
}

/* Typography */
h1, h2, h3 { line-height: 1.2; font-weight: 800; }

h2 { 
    font-size: 1.5rem; 
    margin-bottom: 24px; 
}
h2:focus {
    outline: none; /* Focus managed via JS for accessibility, no visual outline needed */
}

.highlight { color: var(--primary); }

p { 
    font-size: 1rem; 
    color: var(--text-muted); 
    margin-bottom: 24px; 
}
.subtitle { font-size: 0.9rem; margin-top: -16px; }

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

/* Transitions & Steps */
.step {
    display: none;
    opacity: 0;
    transform: translateY(20px) scale(0.98);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.step.active {
    display: block;
    opacity: 1;
    transform: translateY(0) scale(1);
    animation: fadeInUp 0.5s ease forwards;
}

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

.hidden { display: none !important; }

/* Buttons */
.btn-primary {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 16px 24px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover, .btn-primary:focus-visible { 
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow);
    outline: none;
}

.btn-primary:active {
    transform: translateY(0);
}

/* Options Grid */
.options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.option-btn {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-light);
    border: 1px solid var(--card-border);
    padding: 18px 20px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: var(--font-main);
}

.option-btn:hover, .option-btn:focus-visible {
    border-color: var(--accent);
    background: rgba(59, 130, 246, 0.15);
    transform: translateX(4px);
    outline: none;
    box-shadow: inset 4px 0 0 var(--accent);
}

/* Progress Section */
#progress-container {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
}

.btn-back {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    color: var(--text-light);
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-back:hover, .btn-back:focus-visible { 
    background: rgba(255, 255, 255, 0.1); 
    outline: none;
}

.progress-wrapper {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    appearance: none;
    -webkit-appearance: none;
    border: none;
    background: transparent;
}

progress::-webkit-progress-bar {
    background-color: transparent;
}

progress::-webkit-progress-value {
    background: var(--primary);
    border-radius: 4px;
    transition: width 0.4s ease;
}
progress::-moz-progress-bar {
    background: var(--primary);
    border-radius: 4px;
    transition: width 0.4s ease;
}

.progress-text { font-size: 0.85rem; color: var(--text-muted); font-weight: 600; min-width: 25px; text-align: right; }

/* Forms */
.form-group { margin-bottom: 20px; text-align: left; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; color: var(--text-light); font-size: 0.95rem; }
.form-group input {
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-light);
    font-size: 1rem;
    font-family: var(--font-main);
    transition: all 0.3s;
}
.form-group input:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}
.form-group input::placeholder { color: rgba(255,255,255,0.3); }

/* Results */
.result-card {
    background: rgba(0, 0, 0, 0.2);
    padding: 32px 20px;
    border-radius: 16px;
    border: 1px solid var(--card-border);
    animation: fadeInUp 0.6s ease forwards;
}

.loss-value {
    font-size: 2.5rem;
    color: var(--danger);
    margin: 24px 0;
    text-shadow: 0 2px 10px rgba(239, 68, 68, 0.3);
}
.loss-value .per-month { font-size: 1.1rem; color: var(--text-muted); text-shadow: none; font-weight: 400; }

.status-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 99px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 24px;
    border: 1px solid transparent;
}
.status-urgent { background: rgba(239, 68, 68, 0.1); color: #fca5a5; border-color: rgba(239, 68, 68, 0.3); }
.status-warning { background: rgba(245, 158, 11, 0.1); color: #fcd34d; border-color: rgba(245, 158, 11, 0.3); }
.status-good { background: rgba(16, 185, 129, 0.1); color: #6ee7b7; border-color: rgba(16, 185, 129, 0.3); }

.badge { 
    display: inline-block; 
    background: rgba(59, 130, 246, 0.2); 
    color: #93c5fd; 
    padding: 6px 14px; 
    border-radius: 20px; 
    font-size: 0.8rem; 
    margin-bottom: 20px; 
    font-weight: 600; 
    border: 1px solid rgba(59, 130, 246, 0.3);
}
.trust-text { font-size: 0.9rem; color: #6ee7b7; font-weight: 600; margin-bottom: 32px; }
.privacy-note { font-size: 0.8rem; text-align: center; margin-top: 16px; color: var(--text-muted); }

/* Desktop Enhancements (Mobile First) */
@media (min-width: 768px) {
    .quiz-container { padding: 48px; }
    h2 { font-size: 1.8rem; }
    .options-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
    #step-5 .options-grid { grid-template-columns: 1fr; }
    .loss-value { font-size: 3.5rem; }
    .option-btn:hover, .option-btn:focus-visible { transform: scale(1.02) translateX(0); box-shadow: inset 0 0 0 1px var(--accent); }
}