/* Simulador de Aposentadoria - Estilo Premium */

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --bg-light: #f9fafb;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Container Principal */
.simulador-aposentadoria {
    max-width: 700px;
    margin: 40px auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Card do Quiz */
.quiz-card {
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    animation: fadeInUp 0.5s ease-out;
}

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

/* Header */
.quiz-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 40px 30px;
    text-align: center;
    color: white;
}

.quiz-header h2 {
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.quiz-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 16px;
}

/* Barra de Progresso */
.progress-wrapper {
    padding: 30px 30px 0;
}

.progress-bar {
    height: 6px;
    background: var(--bg-light);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--success-color) 100%);
    width: 0%;
    transition: width 0.4s ease;
    border-radius: 10px;
}

.progress-text {
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Body do Quiz */
.quiz-body {
    padding: 30px;
}

/* Perguntas */
.quiz-question {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.quiz-question.active {
    display: block;
}

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

.question-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 25px 0;
    line-height: 1.4;
}

/* Grupos de Input */
.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    transition: all 0.3s ease;
    background: white;
    color: var(--text-primary);
    box-sizing: border-box;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Botões de Opção */
.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.option-btn {
    padding: 20px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
}

.option-btn:hover {
    border-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.05);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.option-btn.selected {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Navegação */
.quiz-navigation {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 30px;
}

.btn {
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--border-color);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    flex: 1;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Loading */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Card de Resultado */
.resultado-card {
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    max-width: 800px;
    margin: 40px auto;
    animation: fadeInUp 0.6s ease-out;
}

.resultado-header {
    background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
    padding: 40px 30px;
    text-align: center;
    color: white;
}

.resultado-header h2 {
    margin: 0 0 10px 0;
    font-size: 32px;
    font-weight: 700;
}

.resultado-header p {
    margin: 0;
    opacity: 0.95;
    font-size: 18px;
}

.resultado-body {
    padding: 40px 30px;
}

/* Cards de Informação */
.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.info-card {
    background: var(--bg-light);
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    border: 2px solid var(--border-color);
}

.info-card-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.info-card-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 500;
}

.info-card-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
}

.info-card-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 5px;
}

/* Detalhes */
.resultado-detalhes {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
}

.resultado-detalhes h3 {
    margin: 0 0 20px 0;
    font-size: 20px;
    color: var(--text-primary);
}

.detalhe-item {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.detalhe-item:last-child {
    border-bottom: none;
}

.detalhe-label {
    font-weight: 500;
    color: var(--text-secondary);
}

.detalhe-value {
    font-weight: 600;
    color: var(--text-primary);
}

/* Alerta */
.alert {
    padding: 16px 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.alert-info {
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.2);
    color: var(--primary-dark);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: #d97706;
}

.alert-icon {
    font-size: 20px;
    flex-shrink: 0;
}

/* Responsivo */
@media (max-width: 768px) {
    .simulador-aposentadoria {
        padding: 15px;
        margin: 20px auto;
    }
    
    .quiz-header {
        padding: 30px 20px;
    }
    
    .quiz-header h2 {
        font-size: 24px;
    }
    
    .quiz-body,
    .resultado-body {
        padding: 25px 20px;
    }
    
    .options-grid {
        grid-template-columns: 1fr;
    }
    
    .quiz-navigation {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .info-cards {
        grid-template-columns: 1fr;
    }
    
    .detalhe-item {
        flex-direction: column;
        gap: 5px;
    }
}

/* Impressão */
@media print {
    .quiz-card {
        box-shadow: none;
        border: 1px solid var(--border-color);
    }
    
    .btn {
        display: none;
    }
}
