/* Reset e configurações base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

/* Container principal */
.container {
    width: 100%;
    max-width: 400px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
    position: relative;
}

/* Header */
.header {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    text-align: center;
    padding: 20px;
    position: relative;
}

.header h1 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
    margin-top: 15px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: white;
    border-radius: 2px;
    transition: width 0.3s ease;
    width: 0%;
}

.step-counter {
    position: absolute;
    top: 10px;
    right: 15px;
    background: rgba(255,255,255,0.2);
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
}

/* Conteúdo */
.content {
    padding: 30px 25px;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Seções de perguntas */
.question-section {
    display: none;
    animation: fadeIn 0.4s ease;
}

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

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

.category-title {
    color: #333;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #4CAF50;
}

.question-item {
    margin-bottom: 25px;
}

.question-text {
    color: #555;
    font-size: 1rem;
    margin-bottom: 15px;
    line-height: 1.4;
}

/* Container de avaliação */
.rating-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 10px;
}

.rating-buttons {
    display: flex;
    gap: 8px;
}

.rating-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #ddd;
    border-radius: 50%;
    background: white;
    color: #666;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.rating-btn:hover {
    transform: scale(1.1);
    border-color: #4CAF50;
}

.rating-btn.selected {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
    transform: scale(1.1);
}

.rating-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: #888;
    margin-top: 5px;
    padding: 0 5px;
}

/* Navegação */
.navigation {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.nav-btn {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-prev {
    background: #f8f9fa;
    color: #666;
}

.btn-next {
    background: #4CAF50;
    color: white;
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

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

/* Seções especiais */
.intro-section, .final-section {
    text-align: center;
}

.intro-section h2 {
    color: #333;
    margin-bottom: 20px;
}

/* Formulários */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: #4CAF50;
}

/* Resumo */
.summary-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 10px;
    text-align: left;
}

.summary-category {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.summary-score {
    color: #4CAF50;
    font-size: 1.1rem;
    font-weight: bold;
}

/* Alertas */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Loading spinner */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4CAF50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

/* Responsividade */
@media (max-width: 480px) {
    .container {
        margin: 5px;
        border-radius: 15px;
    }
    
    .content {
        padding: 20px;
    }
    
    .rating-btn {
        width: 35px;
        height: 35px;
        font-size: 0.8rem;
    }
    
    .rating-buttons {
        gap: 6px;
    }
    
    .header h1 {
        font-size: 1.3rem;
    }
    
    .category-title {
        font-size: 1.1rem;
    }
    
    .question-text {
        font-size: 0.9rem;
    }
}

@media (max-width: 360px) {
    .rating-btn {
        width: 32px;
        height: 32px;
        font-size: 0.7rem;
    }
    
    .rating-buttons {
        gap: 4px;
    }
    
    .content {
        padding: 15px;
    }
}

/* Estados especiais */
.nav-btn:active {
    transform: translateY(0);
}

.rating-btn:active {
    transform: scale(0.95);
}

/* Melhorias de acessibilidade */
.rating-btn:focus {
    outline: 2px solid #4CAF50;
    outline-offset: 2px;
}

.nav-btn:focus {
    outline: 2px solid #4CAF50;
    outline-offset: 2px;
}

/* Animações suaves */
.question-section {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.progress-fill {
    transition: width 0.5s ease;
}

/* Estilo para links que parecem botões */
a.nav-btn {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}