/* ===== QUIZ PAGE WRAPPER ===== */
.quiz-page-wrapper {
    padding-bottom: 3rem;
}

/* ===== QUIZ INDEX ===== */
.quiz-difficulty-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

/* ===== QUIZ LANDING ===== */
.quiz-landing-card {
    background: #fff;
    border: 1px solid var(--color-border, #e0e0e0);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.quiz-landing-header {
    padding: 2.5rem 2rem;
    text-align: center;
    position: relative;
}

.quiz-landing-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
    opacity: 0.9;
}

.quiz-landing-title {
    font-size: 1.75rem;
    font-weight: 800;
    margin: 0 0 0.5rem;
}

.quiz-landing-desc {
    font-size: 1rem;
    opacity: 0.9;
    margin: 0;
    max-width: 600px;
    margin: 0 auto;
}

.quiz-landing-info {
    padding: 2rem;
}

.quiz-info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.quiz-info-item {
    text-align: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #eee;
}

.quiz-info-item i {
    font-size: 1.5rem;
    color: var(--cat-bg);
    display: block;
    margin-bottom: 0.5rem;
}

.quiz-info-value {
    font-size: 1.3rem;
    font-weight: 800;
    display: block;
    color: #2c3e50;
}

.quiz-info-label {
    font-size: 0.8rem;
    color: #95a5a6;
    display: block;
    margin-top: 2px;
}

.quiz-start-btn {
    display: block;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.quiz-start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.quiz-start-btn i {
    margin-right: 0.5rem;
}

/* ===== QUIZ PLAY ===== */
.quiz-play-card {
    background: #fff;
    border: 1px solid var(--color-border, #e0e0e0);
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
}

.quiz-progress-bar {
    height: 6px;
    background: #e0e0e0;
    border-radius: 0;
}

.quiz-progress-fill {
    height: 100%;
    border-radius: 0;
    transition: width 0.4s ease;
    width: 0%;
}

.quiz-progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #7f8c8d;
    border-bottom: 1px solid #f0f0f0;
}

.quiz-timer {
    font-variant-numeric: tabular-nums;
    color: var(--cat-bg);
    font-weight: 700;
}

.quiz-question-area {
    padding: 2rem 1.5rem 1rem;
}

.quiz-question-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.5;
    margin: 0;
}

.quiz-options {
    padding: 0 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.quiz-option-btn {
    display: block;
    width: 100%;
    padding: 1rem 1.25rem;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    color: #2c3e50;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    position: relative;
}

.quiz-option-btn:hover:not(.disabled) {
    border-color: var(--cat-bg);
    background: #f0f0ff;
    transform: translateX(4px);
}

.quiz-option-btn.selected {
    border-color: var(--cat-bg);
    background: rgba(123, 31, 162, 0.05);
}

.quiz-option-btn.correct {
    border-color: #4CAF50 !important;
    background: #e8f5e9 !important;
    color: #2e7d32 !important;
}

.quiz-option-btn.wrong {
    border-color: #F44336 !important;
    background: #ffebee !important;
    color: #c62828 !important;
}

.quiz-option-btn.disabled {
    pointer-events: none;
    opacity: 0.85;
}

.quiz-option-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #555;
    font-weight: 700;
    font-size: 0.85rem;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.quiz-option-btn.correct .quiz-option-label {
    background: #4CAF50;
    color: #fff;
}

.quiz-option-btn.wrong .quiz-option-label {
    background: #F44336;
    color: #fff;
}

/* Feedback */
.quiz-feedback {
    padding: 1rem 1.5rem;
    margin: 0 1.5rem;
    border-radius: 10px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
}

.quiz-feedback.correct {
    background: #e8f5e9;
    border-color: #4CAF50;
}

.quiz-feedback.wrong {
    background: #ffebee;
    border-color: #F44336;
}

.quiz-feedback-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.quiz-feedback-text {
    font-weight: 700;
    font-size: 1rem;
    margin: 0 0 0.5rem;
}

.quiz-explanation {
    font-size: 0.9rem;
    color: #555;
    margin: 0;
    line-height: 1.5;
}

.quiz-next-btn {
    display: block;
    margin: 1.5rem auto;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.quiz-next-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* ===== QUIZ RESULTS ===== */
.quiz-results-card {
    background: #fff;
    border: 1px solid var(--color-border, #e0e0e0);
    border-radius: 12px;
    overflow: hidden;
}

.quiz-results-header {
    padding: 1.5rem 2rem;
    text-align: center;
}

.quiz-results-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
}

.quiz-score-section {
    padding: 2rem;
    text-align: center;
}

.quiz-score-circle {
    width: 180px;
    height: 180px;
    margin: 0 auto 1.5rem;
    position: relative;
}

.quiz-score-svg {
    width: 100%;
    height: 100%;
}

.quiz-score-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    font-weight: 900;
    color: #2c3e50;
}

#quiz-score-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 0.25rem;
}

.quiz-time-detail {
    font-size: 0.9rem;
    color: #95a5a6;
    margin: 0;
}

/* Share */
.quiz-share-section {
    padding: 0 2rem 1.5rem;
    text-align: center;
}

.quiz-share-label {
    font-size: 0.9rem;
    color: #95a5a6;
    margin-bottom: 0.75rem;
}

.quiz-share-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.quiz-share-btn {
    padding: 0.5rem 1.25rem;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    color: #fff;
    transition: opacity 0.2s;
}

.quiz-share-btn:hover {
    opacity: 0.9;
}

.quiz-share-twitter {
    background: #1DA1F2;
}

.quiz-share-whatsapp {
    background: #25D366;
}

/* Actions */
.quiz-results-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    padding: 0 2rem 2rem;
}

.quiz-retry-btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.quiz-retry-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.quiz-all-btn {
    padding: 0.75rem 2rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    color: #555;
    text-decoration: none;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.quiz-all-btn:hover {
    border-color: var(--cat-bg);
    color: var(--cat-bg);
}

/* Review */
.quiz-review {
    padding: 1.5rem 2rem 2rem;
    border-top: 1px solid #f0f0f0;
}

.quiz-review-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.quiz-review-item {
    padding: 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.quiz-review-item.correct {
    border-left: 4px solid #4CAF50;
}

.quiz-review-item.wrong {
    border-left: 4px solid #F44336;
}

.quiz-review-q {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.quiz-review-answer {
    font-size: 0.85rem;
    color: #555;
}

.quiz-review-answer .correct-text {
    color: #4CAF50;
    font-weight: 600;
}

.quiz-review-answer .wrong-text {
    color: #F44336;
    font-weight: 600;
    text-decoration: line-through;
    margin-right: 0.5rem;
}

/* ===== RELATED QUIZZES ===== */
.quiz-related-section {
    margin-top: 2rem;
}

.quiz-related-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.quiz-related-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.quiz-related-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.quiz-related-card:hover {
    border-color: var(--cat-bg, #7B1FA2);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transform: translateX(4px);
}

.quiz-related-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.4rem;
}

.quiz-related-card-body {
    flex: 1;
    min-width: 0;
}

.quiz-related-card-cat {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #95a5a6;
    display: block;
    margin-bottom: 2px;
}

.quiz-related-card-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 6px;
    color: #2c3e50;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.quiz-related-card-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: #95a5a6;
}

.quiz-related-card-meta i {
    margin-right: 3px;
}

.quiz-related-badge {
    padding: 1px 8px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.quiz-related-card-arrow {
    flex-shrink: 0;
    color: #ccc;
    font-size: 1rem;
    transition: color 0.2s, transform 0.2s;
}

.quiz-related-card:hover .quiz-related-card-arrow {
    color: var(--cat-bg, #7B1FA2);
    transform: translateX(3px);
}

/* Stats grid (reuse from calculator show) */
.calc-stats-grid-6 {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.75rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.stat-premium-card {
    background: #fdfdfd;
    border: 1px solid var(--color-border, #e0e0e0);
    border-radius: 8px;
    padding: 1rem;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 100px;
}

.stat-premium-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #7f8c8d;
    margin-bottom: 0.75rem;
    display: block;
}

.stat-premium-value {
    font-size: 1.85rem;
    font-weight: 800;
    margin-bottom: 0;
    line-height: 1.1;
}

.stat-premium-time {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.1;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .calc-stats-grid-6 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .quiz-info-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

    .quiz-landing-title {
        font-size: 1.3rem;
    }

    .quiz-share-buttons {
        flex-direction: column;
    }

    .quiz-related-card {
        padding: 0.85rem 1rem;
    }

    .quiz-related-card-icon {
        width: 44px;
        height: 44px;
        font-size: 1.15rem;
    }

    .quiz-related-card-title {
        font-size: 0.9rem;
    }

    .quiz-related-card-meta {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}

/* ===== DARK MODE ===== */
[data-theme="dark"] .quiz-landing-card,
[data-theme="dark"] .quiz-play-card,
[data-theme="dark"] .quiz-results-card,
[data-theme="dark"] .stat-premium-card {
    background: var(--color-surface, #1e1e1e);
    border-color: var(--color-border, #333);
}

[data-theme="dark"] .quiz-option-btn {
    background: var(--color-surface, #1e1e1e);
    border-color: var(--color-border, #444);
    color: #e0e0e0;
}

[data-theme="dark"] .quiz-option-btn:hover:not(.disabled) {
    background: #2a2a2a;
}

[data-theme="dark"] .quiz-question-text,
[data-theme="dark"] .quiz-review-q,
[data-theme="dark"] .quiz-related-title,
[data-theme="dark"] .quiz-review-title,
[data-theme="dark"] .quiz-score-value,
[data-theme="dark"] #quiz-score-text,
[data-theme="dark"] .quiz-info-value {
    color: #e0e0e0;
}

[data-theme="dark"] .quiz-feedback {
    background: #2a2a2a;
    border-color: #444;
}

[data-theme="dark"] .quiz-info-item {
    background: #2a2a2a;
    border-color: #444;
}

[data-theme="dark"] .quiz-review-item {
    border-color: #444;
}

[data-theme="dark"] .quiz-all-btn {
    border-color: #444;
    color: #aaa;
}

[data-theme="dark"] .quiz-related-card {
    background: var(--color-surface, #1e1e1e);
    border-color: var(--color-border, #333);
}

[data-theme="dark"] .quiz-related-card-title {
    color: #e0e0e0;
}

[data-theme="dark"] .quiz-related-card-arrow {
    color: #555;
}
