/* Quiz Styles for GamesTela */

/* Quiz Main Container */
.quiz-main {
    padding: 6rem 0;
    min-height: calc(100vh - 160px);
}

.quiz-main .container {
    max-width: 800px;
}

/* Quiz Header */
.quiz-header {
    text-align: center;
    margin-bottom: 2rem;
}

.quiz-header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.quiz-header p {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* Quiz Setup */
.quiz-setup {
    display: flex;
    justify-content: center;
}

.setup-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    width: 100%;
    max-width: 600px;
}

.setup-card h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
    font-size: 1.8rem;
}

.quiz-options {
    margin-bottom: 2rem;
}

.option-group {
    margin-bottom: 1.5rem;
}

.option-group h3 {
    margin-bottom: 1rem;
    color: var(--text-dark);
    font-size: 1.2rem;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.radio-option {
    display: flex;
    align-items: center;
    padding: 0.8rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.radio-option:hover {
    border-color: var(--primary-color);
    background-color: rgba(231, 76, 60, 0.05);
}

.radio-option input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #ccc;
    border-radius: 50%;
    margin-right: 12px;
    position: relative;
    transition: all 0.3s ease;
}

.radio-option input[type="radio"]:checked + .radio-custom {
    border-color: var(--primary-color);
    background-color: var(--primary-color);
}

.radio-option input[type="radio"]:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background-color: white;
    border-radius: 50%;
}

.radio-option-text {
    font-size: 1rem;
    color: var(--text-dark);
}

.topic-select {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    background-color: white;
    transition: border-color 0.3s ease;
}

.topic-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Quiz Game */
.quiz-game {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Quiz Progress */
.quiz-progress {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.question-counter,
.timer-display,
.score-display {
    font-weight: 600;
    color: var(--text-dark);
}

.progress-bar {
    height: 10px;
    background-color: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: var(--primary-color);
    width: 0%;
    transition: width 0.5s ease;
}

/* Question Card */
.question-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background-color: var(--primary-color);
    color: white;
}

.question-icon {
    font-size: 2rem;
}

.question-meta {
    display: flex;
    gap: 1rem;
}

.question-type,
.question-difficulty {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.question-difficulty.easy {
    background-color: #27ae60;
}

.question-difficulty.medium {
    background-color: #f39c12;
}

.question-difficulty.hard {
    background-color: #e74c3c;
}

.question-content {
    padding: 2rem;
}

.question-text {
    font-size: 1.4rem;
    margin-bottom: 2rem;
    color: var(--text-dark);
    line-height: 1.4;
}

/* Answer Options */
.answer-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.answer-option {
    display: flex;
    align-items: center;
    padding: 1.2rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.answer-option:hover {
    border-color: var(--primary-color);
    background-color: rgba(231, 76, 60, 0.05);
}

.answer-option input[type="radio"] {
    display: none;
}

.option-letter {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    font-weight: 600;
    margin-right: 1rem;
    flex-shrink: 0;
}

.option-text {
    font-size: 1.1rem;
    color: var(--text-dark);
    line-height: 1.4;
}

.answer-option input[type="radio"]:checked + .option-letter + .option-text {
    font-weight: 600;
}

.answer-option input[type="radio"]:checked {
    background-color: var(--primary-color);
}

/* Question Actions */
.question-actions {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.question-actions .btn {
    flex: 1;
}

/* Question Feedback */
.question-feedback {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    text-align: center;
}

.feedback-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.feedback-icon {
    font-size: 3rem;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(39, 174, 96, 0.1);
    color: #27ae60;
}

.feedback-title {
    font-size: 1.8rem;
    color: #27ae60;
    margin: 0;
}

.feedback-explanation {
    font-size: 1.1rem;
    color: var(--text-dark);
    max-width: 600px;
    line-height: 1.6;
}

/* Quiz Results */
.quiz-results {
    display: flex;
    justify-content: center;
}

.results-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    width: 100%;
    max-width: 600px;
    text-align: center;
}

.results-header {
    margin-bottom: 2rem;
}

.results-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.results-title {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.final-score {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.score-number {
    font-size: 4rem;
    font-weight: 700;
    color: var(--primary-color);
}

.score-total {
    font-size: 1.5rem;
    color: var(--text-light);
}

.score-percentage {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
}

.results-details {
    margin-bottom: 2rem;
}

.result-stats {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.performance-message {
    font-size: 1.2rem;
    font-weight: 500;
    padding: 1rem;
    border-radius: 8px;
    background-color: rgba(231, 76, 60, 0.1);
}

/* Results Actions */
.results-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.results-actions .btn {
    width: 100%;
}

/* Answer Review */
.answer-review {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 2rem;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.review-header h2 {
    margin: 0;
    color: var(--primary-color);
}

.review-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.review-item {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.review-question {
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.review-question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.review-question-number {
    font-weight: 600;
    color: var(--text-dark);
}

.review-status {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.review-status.correct {
    background-color: rgba(39, 174, 96, 0.1);
    color: #27ae60;
}

.review-status.incorrect {
    background-color: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

.review-status.skipped {
    background-color: rgba(243, 156, 18, 0.1);
    color: #f39c12;
}

.review-question-text {
    margin: 0;
    font-size: 1.2rem;
    color: var(--text-dark);
    line-height: 1.4;
}

.review-answers {
    padding: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.answer-row {
    display: flex;
    margin-bottom: 1rem;
}

.answer-row:last-child {
    margin-bottom: 0;
}

.answer-label {
    font-weight: 600;
    width: 120px;
    flex-shrink: 0;
    color: var(--text-light);
}

.answer-text {
    color: var(--text-dark);
    line-height: 1.4;
}

.answer-row.user-answer.correct .answer-text {
    color: #27ae60;
    font-weight: 600;
}

.answer-row.user-answer.incorrect .answer-text {
    color: #e74c3c;
    font-weight: 600;
}

.review-explanation {
    padding: 1.5rem;
    background-color: #f8f9fa;
}

.review-explanation p {
    margin: 0;
    color: var(--text-dark);
    line-height: 1.6;
}

/* Buttons */
.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-accent {
    background-color: var(--accent-color);
    color: white;
}

.btn-accent:hover {
    background-color: #d35400;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(243, 156, 18, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .quiz-main {
        padding: 1rem 0;
    }
    
    .quiz-header h1 {
        font-size: 2rem;
    }
    
    .quiz-header p {
        font-size: 1rem;
    }
    
    .setup-card,
    .results-card {
        padding: 1.5rem;
    }
    
    .question-content {
        padding: 1.5rem;
    }
    
    .question-text {
        font-size: 1.2rem;
    }
    
    .option-text {
        font-size: 1rem;
    }
    
    .progress-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .question-actions {
        flex-direction: column;
    }
    
    .result-stats {
        gap: 1rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .review-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .review-question-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .quiz-header h1 {
        font-size: 1.8rem;
    }
    
    .setup-card,
    .results-card,
    .question-card,
    .question-feedback,
    .answer-review {
        padding: 1rem;
    }
    
    .question-content {
        padding: 1rem;
    }
    
    .question-text {
        font-size: 1.1rem;
    }
    
    .answer-option {
        padding: 1rem;
    }
    
    .score-number {
        font-size: 3rem;
    }
}