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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Main content */
.main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Screens */
.screen {
    display: none;
    width: 100%;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 40px;
    animation: fadeIn 0.5s ease-in-out;
}

.screen.active {
    display: block;
}

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

/* Start screen */
.start-content {
    text-align: center;
}

.start-content h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 2rem;
}

.start-content p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: #666;
}

.instructions {
    text-align: left;
    max-width: 400px;
    margin: 0 auto 40px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.instructions li {
    margin-bottom: 10px;
    color: #555;
}

/* Buttons */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

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

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-success {
    background: #28a745;
    color: white;
}

/* Quiz screen */
.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.progress-container {
    flex: 1;
    min-width: 200px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.3s ease;
    width: 0%;
}

.question-counter {
    font-weight: 600;
    color: #667eea;
}

.score-container {
    background: #f8f9fa;
    padding: 10px 20px;
    border-radius: 20px;
    border: 2px solid #667eea;
}

.score-display {
    font-weight: 600;
    color: #667eea;
}

/* Question */
.question-container {
    margin-bottom: 40px;
}

.question-text {
    font-size: 1.3rem;
    margin-bottom: 30px;
    color: #333;
    line-height: 1.5;
}

.options-container {
    display: grid;
    gap: 15px;
}

.option {
    padding: 15px 20px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    text-align: left;
}

.option:hover {
    border-color: #667eea;
    background: #e3f2fd;
    transform: translateX(5px);
}

.option.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.option.correct {
    border-color: #28a745;
    background: #d4edda;
    color: #155724;
}

.option.wrong {
    border-color: #dc3545;
    background: #f8d7da;
    color: #721c24;
}

.option.disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

/* Navigation */
.navigation-container {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

/* Result screen */
.result-content {
    text-align: center;
}

.result-content h2 {
    color: #667eea;
    margin-bottom: 30px;
    font-size: 2rem;
}

.result-summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.final-score {
    font-size: 2.5rem;
    font-weight: bold;
    color: white;
}

.result-details {
    text-align: left;
}

.result-message {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: #333;
    font-weight: 600;
}

.result-stats {
    display: grid;
    gap: 10px;
}

.stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    min-width: 200px;
}

.stat-label {
    font-weight: 600;
    color: #666;
}

.stat-value {
    font-weight: bold;
    color: #667eea;
}

/* Review section */
.review-section {
    margin: 40px 0;
    text-align: left;
}

.review-section h3 {
    color: #667eea;
    margin-bottom: 20px;
    text-align: center;
}

.review-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
}

.review-item {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
}

.review-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.review-question {
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.review-answer {
    margin-bottom: 5px;
}

.review-answer.correct {
    color: #28a745;
    font-weight: 600;
}

.review-answer.wrong {
    color: #dc3545;
    font-weight: 600;
}

.review-explanation {
    font-style: italic;
    color: #666;
    background: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
}

.result-actions {
    margin-top: 30px;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 30px;
    color: white;
    opacity: 0.8;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .header h1 {
        font-size: 2rem;
    }

    .screen {
        padding: 25px;
    }

    .quiz-header {
        flex-direction: column;
        align-items: stretch;
    }

    .progress-container {
        min-width: auto;
    }

    .result-summary {
        flex-direction: column;
        gap: 20px;
    }

    .score-circle {
        width: 120px;
        height: 120px;
    }

    .final-score {
        font-size: 2rem;
    }

    .navigation-container {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.8rem;
    }

    .screen {
        padding: 20px;
    }

    .question-text {
        font-size: 1.1rem;
    }

    .option {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
}

/* Animações adicionais */
.option {
    position: relative;
    overflow: hidden;
}

.option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.option:hover::before {
    left: 100%;
}

/* Scrollbar personalizada */
.review-container::-webkit-scrollbar {
    width: 8px;
}

.review-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.review-container::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

.review-container::-webkit-scrollbar-thumb:hover {
    background: #5a6fd8;
}

