/* ===== AI-Generated Quiz Styles ===== */
/* Created by: 콩미니 (Kong-mini) */
/* Last Updated: 2026-02-24 */

/* Quiz Container */
#quiz-container {
    max-width: 900px;
    margin: 0 auto;
}

/* Quiz Screens */
.quiz-screen {
    animation: fadeIn 0.3s ease-in;
}

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

/* Start Screen */
#quiz-start {
    text-align: center;
    padding: 40px 20px;
}

#quiz-start h3 {
    font-size: 2em;
    color: #f74c00;
    margin-bottom: 20px;
}

.quiz-info {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    background: rgba(247, 76, 0, 0.1);
    border-radius: 8px;
}

.info-item .icon {
    font-size: 1.5em;
}

#previous-progress {
    margin: 30px 0;
    padding: 20px;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 8px;
}

.progress-display {
    font-size: 1.1em;
}

/* Question Screen */
.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 30px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-right: 20px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #f74c00, #ff9800);
    transition: width 0.3s ease;
}

.question-counter {
    font-weight: bold;
    color: #f74c00;
}

.score-display {
    font-weight: bold;
    color: #4caf50;
}

/* Question Content */
.question-content {
    margin-bottom: 30px;
}

.question-category {
    display: inline-block;
    padding: 5px 15px;
    background: rgba(247, 76, 0, 0.2);
    border-radius: 20px;
    color: #f74c00;
    font-size: 0.9em;
    font-weight: bold;
    margin-bottom: 15px;
}

.question-content h3 {
    font-size: 1.5em;
    margin-bottom: 20px;
    color: #a5d6ff;
}

.code-display {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(247, 76, 0, 0.3);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.code-display pre {
    margin: 0;
    overflow-x: auto;
}

.code-display code {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.95em;
    line-height: 1.6;
    color: #a5d6ff;
}

/* Options */
.options-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.option-btn {
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1em;
    color: #a5d6ff;
}

.option-btn:hover {
    background: rgba(247, 76, 0, 0.1);
    border-color: rgba(247, 76, 0, 0.3);
}

.option-btn.selected {
    background: rgba(247, 76, 0, 0.2);
    border-color: #f74c00;
}

.option-btn.correct {
    background: rgba(76, 175, 80, 0.2);
    border-color: #4caf50;
}

.option-btn.incorrect {
    background: rgba(244, 67, 54, 0.2);
    border-color: #f44336;
}

/* Quiz Controls */
.quiz-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

/* Feedback Modal */
.quiz-feedback {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease-in;
}

.feedback-content {
    background: #1a1a1a;
    padding: 40px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    border: 2px solid rgba(247, 76, 0, 0.3);
}

.feedback-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.feedback-content h3 {
    font-size: 1.8em;
    margin-bottom: 15px;
}

.feedback-content.correct h3 {
    color: #4caf50;
}

.feedback-content.incorrect h3 {
    color: #f44336;
}

.feedback-content p {
    color: #a5d6ff;
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 20px;
}

.feedback-metaphor {
    background: rgba(247, 76, 0, 0.1);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.feedback-metaphor h4 {
    color: #f74c00;
    margin-bottom: 10px;
}

.feedback-metaphor p {
    color: #ffcc80;
    font-style: italic;
}

/* Results Screen */
#quiz-results {
    text-align: center;
    padding: 40px 20px;
}

#quiz-results h3 {
    font-size: 2.5em;
    color: #f74c00;
    margin-bottom: 30px;
}

.results-summary {
    margin-bottom: 40px;
}

.score-circle {
    width: 200px;
    height: 200px;
    margin: 0 auto 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(247, 76, 0, 0.2), rgba(247, 76, 0, 0.1));
    border: 4px solid #f74c00;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.score-value {
    font-size: 2.5em;
    font-weight: bold;
    color: #a5d6ff;
}

.score-percentage {
    font-size: 1.5em;
    color: #f74c00;
    font-weight: bold;
    margin-top: 10px;
}

.results-message {
    font-size: 1.3em;
    color: #a5d6ff;
    line-height: 1.6;
}

.results-details {
    background: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
    text-align: left;
}

.results-details h4 {
    color: #f74c00;
    margin-bottom: 20px;
}

.answer-review-item {
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 15px;
}

.answer-review-item.correct {
    border-left: 4px solid #4caf50;
}

.answer-review-item.incorrect {
    border-left: 4px solid #f44336;
}

.review-icon {
    font-size: 1.5em;
}

.review-text {
    flex: 1;
}

.quiz-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* Utility */
.hidden {
    display: none !important;
}

.btn-lg {
    font-size: 1.2em;
    padding: 15px 40px;
}

/* Responsive */
@media (max-width: 768px) {
    .quiz-header {
        flex-direction: column;
        gap: 10px;
    }

    .progress-bar {
        width: 100%;
        margin-right: 0;
    }

    .quiz-info {
        flex-direction: column;
        gap: 15px;
    }

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

    .score-value {
        font-size: 2em;
    }

    .quiz-actions {
        flex-direction: column;
    }

    .option-btn {
        padding: 15px;
        font-size: 0.95em;
    }
}
