/* ===== QUIZ PAGE STYLES ===== */

.quiz-container {
    max-width: 900px;
    margin: 30px auto;
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    animation: slideInDown 0.8s ease;
}

/* ===== LOADING STATE ===== */
.loading {
    text-align: center;
    padding: 50px 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f0f0f0;
    border-top: 5px solid #FF6B9D;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading p {
    font-size: 18px;
    color: #FF6B9D;
    font-weight: 600;
}

/* ===== QUIZ QUESTION SECTION ===== */
.quiz-question-section {
    animation: fadeIn 0.5s ease;
}

.question-counter {
    display: inline-block;
    background: linear-gradient(135deg, #FF6B9D, #FF1493);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 15px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.quiz-progress {
    height: 8px;
    background: #f0f0f0;
    border-radius: 5px;
    margin-bottom: 25px;
    overflow: hidden;
}

.quiz-progress .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #FF6B9D, #FFA500);
    border-radius: 5px;
}

.quiz-question {
    font-size: 22px;
    color: #333;
    margin-bottom: 30px;
    line-height: 1.6;
    font-weight: 700;
}

/* ===== QUIZ OPTIONS ===== */
.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.option-label {
    cursor: pointer;
    user-select: none;
}

.option-input {
    display: none;
}

.option-box {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: white;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.option-input:not(:checked) + .option-box {
    background: #f9f9f9;
}

.option-input:checked + .option-box {
    background: linear-gradient(135deg, #FFE5E5, #FFF5F5);
    border-color: #FF6B9D;
    border-left-color: #FF6B9D;
    box-shadow: 0 4px 12px rgba(255, 107, 157, 0.2);
}

.option-label:hover .option-box {
    border-color: #FF6B9D;
    background: #fafafa;
    transform: translateX(5px);
}

.option-letter {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #FF6B9D, #FF1493);
    color: white;
    border-radius: 8px;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.option-text {
    font-size: 15px;
    color: #333;
    flex-grow: 1;
}

/* ===== QUIZ NAVIGATION ===== */
.quiz-navigation {
    display: flex;
    gap: 15px;
    justify-content: space-between;
    flex-wrap: wrap;
}

.nav-btn {
    flex: 1;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
}

.prev-btn {
    background: linear-gradient(135deg, #FFA500, #FF8C00);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 165, 0, 0.2);
}

.prev-btn:hover {
    transform: translateX(-5px);
    box-shadow: 0 6px 16px rgba(255, 165, 0, 0.3);
}

.next-btn {
    background: linear-gradient(135deg, #00D4FF, #0099CC);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.2);
}

.next-btn:hover {
    transform: translateX(5px);
    box-shadow: 0 6px 16px rgba(0, 212, 255, 0.3);
}

.submit-btn {
    background: linear-gradient(135deg, #00C853, #00AA44);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 200, 83, 0.2);
    flex: 1;
}

.submit-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 16px rgba(0, 200, 83, 0.3);
}

/* ===== QUIZ RESULTS ===== */
.quiz-results {
    animation: slideInDown 0.8s ease;
}

.result-header {
    text-align: center;
    padding: 40px 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    color: white;
}

.result-header.result-pass {
    background: linear-gradient(135deg, #00C853, #00AA44);
    box-shadow: 0 8px 25px rgba(0, 200, 83, 0.2);
}

.result-header.result-fail {
    background: linear-gradient(135deg, #FFA500, #FF8C00);
    box-shadow: 0 8px 25px rgba(255, 165, 0, 0.2);
}

.result-emoji {
    font-size: 72px;
    margin-bottom: 15px;
    animation: bounce 1s infinite;
}

.result-header h2 {
    font-size: 32px;
    margin-bottom: 15px;
    margin-top: 0;
}

.result-header p {
    font-size: 16px;
    margin-bottom: 8px;
}

.score-number {
    display: inline-block;
    background: rgba(255, 255, 255, 0.3);
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 18px;
}

.score-percentage {
    font-size: 28px;
    font-weight: 700;
    margin-top: 10px;
}

/* ===== RESULTS DETAILS ===== */
.results-details {
    margin-bottom: 30px;
}

.results-details h3 {
    font-size: 22px;
    color: #FF6B9D;
    margin-bottom: 20px;
}

.result-item {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 15px;
    border-left: 5px solid;
    border-left-color: #ddd;
}

.result-item.correct {
    background: linear-gradient(135deg, #E5FFE5, #F5FFF5);
    border-left-color: #00C853;
}

.result-item.incorrect {
    background: linear-gradient(135deg, #FFE5E5, #FFF5F5);
    border-left-color: #FF6B9D;
}

.result-question {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-weight: 600;
    font-size: 15px;
}

.result-number {
    color: #FF6B9D;
    font-weight: 700;
}

.result-icon {
    margin-left: auto;
    font-size: 20px;
}

.result-answer {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 14px;
    color: #333;
}

.result-answer p {
    margin: 8px 0;
    line-height: 1.6;
}

/* ===== RESULTS ACTIONS ===== */
.results-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.results-actions .btn {
    padding: 15px 30px;
    font-size: 15px;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .quiz-container {
        padding: 25px;
        margin: 20px 15px;
    }

    .quiz-question {
        font-size: 18px;
    }

    .option-box {
        padding: 14px;
    }

    .option-letter {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .option-text {
        font-size: 14px;
    }

    .nav-btn {
        min-width: 120px;
        padding: 12px 15px;
        font-size: 14px;
    }

    .quiz-navigation {
        gap: 10px;
    }

    .result-header {
        padding: 30px 20px;
    }

    .result-emoji {
        font-size: 48px;
    }

    .result-header h2 {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .quiz-container {
        padding: 15px;
        margin: 10px;
        border-radius: 12px;
    }

    .question-counter {
        font-size: 12px;
        padding: 6px 12px;
    }

    .quiz-question {
        font-size: 16px;
        margin-bottom: 20px;
    }

    .quiz-options {
        gap: 12px;
        margin-bottom: 20px;
    }

    .option-box {
        padding: 12px;
        gap: 10px;
    }

    .option-letter {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }

    .option-text {
        font-size: 13px;
    }

    .nav-btn {
        min-width: 100%;
        padding: 12px;
        font-size: 13px;
    }

    .quiz-navigation {
        flex-direction: column;
        gap: 10px;
    }

    .result-header {
        padding: 20px 15px;
    }

    .result-emoji {
        font-size: 40px;
    }

    .result-header h2 {
        font-size: 20px;
        margin-bottom: 10px;
    }

    .results-details {
        margin-bottom: 20px;
    }

    .result-item {
        padding: 15px;
        margin-bottom: 12px;
    }

    .result-question {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .result-icon {
        margin-left: 0;
    }
}
