/* KnowledgeQuest - Quiz Specific Styles */
/* Styles for quiz selection, quiz interface, and results pages */

/* Quiz Hero Section */
.quiz-hero {
    background: #fafafa;
    color: #1a1a1a;
    padding: 8rem 0 4rem;
    text-align: center;
}

.quiz-hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.quiz-hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Quiz Selection */
.quiz-selection {
    padding: 5rem 0;
    background-color: #f8f9fa;
}

.quiz-levels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.quiz-level-card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    border: 2px solid transparent;
}

.quiz-level-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.quiz-level-card.featured {
    border-color: #1a1a1a;
    transform: scale(1.05);
}

.quiz-level-card.featured:hover {
    transform: scale(1.05) translateY(-10px);
}

.featured-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a1a;
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(26, 26, 26, 0.2);
}

.level-header {
    text-align: center;
    margin-bottom: 2rem;
}

.level-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    display: block;
}

.level-title {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
}

.level-badge {
    background: #f5f5f5;
    color: #1a1a1a;
    padding: 0.25rem 1rem;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 500;
    display: inline-block;
}

.level-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: #666666;
    font-weight: 500;
}

.level-description {
    margin-bottom: 2rem;
}

.level-description p {
    color: #666666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.level-topics h4 {
    color: #1a1a1a;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.level-topics ul {
    list-style: none;
    padding: 0;
}

.level-topics li {
    padding: 0.5rem 0;
    color: #666666;
    position: relative;
    padding-left: 1.5rem;
}

.level-topics li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #1a1a1a;
    font-weight: bold;
}

.level-features {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #f8f8f8;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #333333;
}

.feature-icon {
    font-size: 1.1rem;
}

.level-footer {
    text-align: center;
}

.start-quiz-btn {
    width: 100%;
    justify-content: center;
    font-size: 1.1rem;
    padding: 1.25rem 2rem;
}

/* Quiz Info Section */
.quiz-info {
    margin-top: 4rem;
}

.info-section {
    background: white;
    padding: 3rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.info-section h3 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.info-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.step-number {
    width: 50px;
    height: 50px;
    background: #1a1a1a;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.step-content h4 {
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.step-content p {
    color: #666666;
    line-height: 1.6;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.tip {
    text-align: center;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.tip:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.tip-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.tip h4 {
    color: #1a1a1a;
    margin-bottom: 0.75rem;
    font-size: 1.2rem;
}

.tip p {
    color: #666666;
    line-height: 1.5;
    font-size: 0.95rem;
}

/* Quiz Interface */
.quiz-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.quiz-header {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

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

.progress-text {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #1a1a1a;
}

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

.progress-fill {
    height: 100%;
    background: #1a1a1a;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.quiz-timer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    color: #1a1a1a;
}

.timer-icon {
    font-size: 1.5rem;
}

.question-card {
    background: white;
    padding: 3rem;
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.question-number {
    color: #1a1a1a;
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.question-text {
    font-size: 1.3rem;
    color: #1a1a1a;
    margin-bottom: 2rem;
    line-height: 1.5;
    font-weight: 500;
}

.question-category {
    display: inline-block;
    background: #f5f5f5;
    color: #1a1a1a;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 2rem;
}

.options-container {
    display: grid;
    gap: 1rem;
}

.option {
    background: #f8f9fa;
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.option:hover {
    background: #f8f8f8;
    border-color: #e0e0e0;
}

.option.selected {
    background: #f0f0f0;
    border-color: #1a1a1a;
}

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

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

.option-letter {
    width: 40px;
    height: 40px;
    background: #1a1a1a;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.option.selected .option-letter {
    background: #333333;
}

.option.correct .option-letter {
    background: #4a4a4a;
}

.option.incorrect .option-letter {
    background: #666666;
}

.option-text {
    flex: 1;
    font-size: 1.1rem;
    color: #1a1a1a;
}

.quiz-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.quiz-navigation {
    display: flex;
    gap: 1rem;
}

.btn-quiz {
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-quiz:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-next {
    background: #1a1a1a;
    color: white;
}

.btn-next:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(26, 26, 26, 0.2);
    background: #333333;
}

.btn-prev {
    background: #f5f5f5;
    color: #1a1a1a;
}

.btn-prev:hover:not(:disabled) {
    background: #e8e8e8;
}

.btn-submit {
    background: #1a1a1a;
    color: white;
}

.btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(26, 26, 26, 0.2);
    background: #333333;
}

/* Results Page */
.results-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.results-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 6rem 0 2rem;
}

.results-title {
    font-size: 2.5rem;
    color: #1a1a1a;
    margin-bottom: 2rem;
    font-weight: 600;
}

.action-buttons {
    display: flex;
    gap: 20px;
}

@media screen and (max-width: 768px) {
    .action-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }
}

.results-score {
    font-size: 4rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 1rem;
}

.results-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.rating-icon {
    font-size: 3rem;
}

.rating-text {
    font-size: 2rem;
    font-weight: 600;
    color: #1a1a1a;
}

.results-summary {
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.summary-stat {
    text-align: center;
}

.summary-stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a1a;
    display: block;
}

.summary-stat-label {
    color: #666666;
    font-weight: 500;
}

.results-feedback {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.results-celebration {
    position: relative;
    margin-bottom: 2rem;
    height: 100px;
    overflow: hidden;
}

.results-message {
    font-size: 1.2rem;
    color: #666666;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.progress-visualization {
    margin-top: 2rem;
}

.progress-visualization h3 {
    color: #1a1a1a;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.score-progress {
    margin-bottom: 1rem;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #666666;
    margin-top: 0.5rem;
}

.category-performance {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.category-performance h2 {
    color: #1a1a1a;
    margin-bottom: 2rem;
    text-align: center;
}

.category-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background: #f8f8f8;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
}

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

.category-header h4 {
    color: #1a1a1a;
    margin: 0;
    font-size: 1.1rem;
}

.category-score {
    color: #666666;
    font-weight: 600;
}

.category-progress {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.category-percentage {
    color: #1a1a1a;
    font-weight: 600;
    min-width: 40px;
}

.detailed-review {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.detailed-review h2 {
    color: #1a1a1a;
    margin-bottom: 2rem;
    text-align: center;
}

.review-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.questions-review {
    margin-top: 2rem;
}

.question-review-card {
    background: #f8f8f8;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid #1a1a1a;
}

.question-review-card.correct {
    border-left-color: #4a4a4a;
    background: #f9f9f9;
}

.question-review-card.incorrect {
    border-left-color: #666666;
    background: #f5f5f5;
}

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

.question-number {
    font-weight: 600;
    color: #1a1a1a;
}

.question-category {
    background: #e8e8e8;
    color: #1a1a1a;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.9rem;
}

.question-status {
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.9rem;
}

.question-status.correct {
    background: #f0f0f0;
    color: #1a1a1a;
}

.question-status.incorrect {
    background: #e8e8e8;
    color: #666666;
}

.question-review-content h4 {
    color: #1a1a1a;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.answer-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.user-answer {
    background: white;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.correct-answer {
    background: white;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid #d0d0d0;
}

.explanation {
    background: white;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    color: #333333;
    line-height: 1.5;
}

.next-steps {
    margin-top: 3rem;
}

.next-steps h3 {
    color: #1a1a1a;
    text-align: center;
    margin-bottom: 2rem;
}

.next-steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.next-step {
    text-align: center;
    padding: 2rem;
    background: #f8f8f8;
    border-radius: 12px;
    border: 1px solid #f0f0f0;
}

.step-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.next-step h4 {
    color: #1a1a1a;
    margin-bottom: 1rem;
}

.next-step p {
    color: #666666;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f0f0f0;
    border-top: 4px solid #1a1a1a;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.results-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Responsive Design */
@media (max-width: 768px) {
    .quiz-hero-title {
        font-size: 2.5rem;
    }

    .quiz-levels {
        grid-template-columns: 1fr;
    }

    .quiz-level-card.featured {
        transform: none;
    }

    .quiz-level-card.featured:hover {
        transform: translateY(-10px);
    }

    .level-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .level-features {
        justify-content: center;
    }

    .info-steps {
        grid-template-columns: 1fr;
    }

    .tips-grid {
        grid-template-columns: 1fr;
    }

    .quiz-header {
        flex-direction: column;
        text-align: center;
    }

    .question-card {
        padding: 2rem;
    }

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

    .quiz-navigation {
        width: 100%;
        justify-content: space-between;
    }

    .results-score {
        font-size: 3rem;
    }

    .rating-text {
        font-size: 1.5rem;
    }

    .summary-stats {
        grid-template-columns: repeat(2, 1fr);
    }

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