/* Quiz Header */
.quiz-header {
    background: var(--card-bg);
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    gap: 1rem;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.back-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.875rem;
}

.back-link:hover {
    text-decoration: underline;
}

.exam-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.exam-badge {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.header-right {
    display: flex;
    align-items: center;
}

/* Stats in header */
.progress-info {
    display: flex;
    gap: 1.5rem;
}

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

.stat-value {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-color);
}

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

/* Navigation in header */
.question-navigation {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-position {
    font-size: 0.9375rem;
    color: var(--text-muted);
    min-width: 140px;
    text-align: center;
}

.btn-nav {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-nav:hover:not(:disabled) {
    background: var(--primary-color);
    color: white;
}

.btn-nav:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Quiz Layout - Two Column */
.quiz-layout {
    display: flex;
    gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem;
    min-height: calc(100vh - 60px);
}

/* Quiz Container - Main Content */
.quiz-container {
    flex: 1;
    max-width: 800px;
}

/* Hints Panel - Right Sidebar */
.hints-panel {
    width: 350px;
    flex-shrink: 0;
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 1.25rem;
    height: fit-content;
    position: sticky;
    top: 80px;
}

.hints-panel h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.hints-panel .hints-intro {
    color: var(--text-muted);
    font-size: 0.8125rem;
    margin-bottom: 1rem;
}

.hints-panel .hint-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.hints-panel .hint-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--card-bg);
    cursor: pointer;
    font-size: 0.8125rem;
    transition: all 0.15s ease;
    width: 100%;
}

.hints-panel .hint-btn:hover:not(:disabled) {
    border-color: var(--primary-color);
    background: #f8fbff;
}

.hints-panel .hint-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.hints-panel .hint-btn.revealed {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.hint-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--border-color);
    font-size: 0.75rem;
    font-weight: 600;
}

.hint-btn.revealed .hint-icon {
    background: rgba(255, 255, 255, 0.2);
}

/* Hint Content in sidebar */
.hints-panel .hints-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.hint {
    padding: 0.875rem;
    border-radius: 6px;
    animation: fadeIn 0.3s ease;
    font-size: 0.875rem;
}

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

.hint[data-level="1"] {
    background: var(--warning-bg);
    border-left: 3px solid var(--warning-color);
}

.hint[data-level="2"] {
    background: #e8f4ff;
    border-left: 3px solid var(--primary-color);
}

.hint[data-level="3"] {
    background: var(--success-bg);
    border-left: 3px solid var(--success-color);
}

.hint-label {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 0.375rem;
}

.hint[data-level="1"] .hint-label { color: #996600; }
.hint[data-level="2"] .hint-label { color: var(--primary-color); }
.hint[data-level="3"] .hint-label { color: var(--success-color); }

.hint-content {
    line-height: 1.5;
}

.hint-content ul {
    margin: 0.375rem 0 0 1rem;
    padding: 0;
}

.hint-content li {
    margin-bottom: 0.375rem;
}

/* Question Card */
.question-card {
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.question-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.question-number {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 0.375rem;
}

.question-header h2 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.category-badge {
    display: inline-block;
    background: var(--hover-bg);
    color: var(--text-muted);
    padding: 0.1875rem 0.625rem;
    border-radius: 12px;
    font-size: 0.6875rem;
}

/* Scenario */
.scenario {
    background: #f3f9ff;
    border-left: 4px solid var(--primary-color);
    padding: 1rem 1.25rem;
    margin: 0;
}

.scenario h3 {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary-color);
    margin-bottom: 0.375rem;
}

.scenario div {
    color: var(--text-color);
    line-height: 1.5;
    font-size: 0.9375rem;
}

/* Question Text */
.question-text {
    padding: 1.25rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
}

/* Choices */
.choices {
    padding: 0 1.5rem 1.25rem;
}

.choices fieldset {
    border: none;
}

.choice-option {
    display: flex;
    align-items: flex-start;
    padding: 0.875rem;
    margin-bottom: 0.5rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    background: var(--card-bg);
}

.choice-option:hover:not(.disabled) {
    border-color: var(--primary-color);
    background: #f8fbff;
}

.choice-option.selected {
    border-color: var(--primary-color);
    background: #e8f4ff;
}

.choice-option.correct {
    border-color: var(--success-color);
    background: var(--success-bg);
}

.choice-option.incorrect {
    border-color: var(--error-color);
    background: var(--error-bg);
}

.choice-option.disabled {
    cursor: default;
}

.choice-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.choice-letter {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--border-color);
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.8125rem;
    margin-right: 0.875rem;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.choice-option.selected .choice-letter {
    background: var(--primary-color);
    color: white;
}

.choice-option.correct .choice-letter {
    background: var(--success-color);
    color: white;
}

.choice-option.incorrect .choice-letter {
    background: var(--error-color);
    color: white;
}

.choice-text {
    flex: 1;
    line-height: 1.4;
    font-size: 0.9375rem;
}

/* Answer Actions */
.answer-actions {
    padding: 0 1.5rem 1.25rem;
}

/* Feedback */
.feedback {
    padding: 1rem 1.25rem;
    margin: 0 1.5rem 1.25rem;
    border-radius: 8px;
}

.feedback.correct {
    background: var(--success-bg);
    border: 1px solid var(--success-color);
}

.feedback.incorrect {
    background: var(--error-bg);
    border: 1px solid var(--error-color);
}

.feedback-icon {
    font-size: 1.125rem;
    margin-right: 0.5rem;
}

.feedback-text {
    font-weight: 600;
}

/* Loading Spinner */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem;
    background: var(--card-bg);
    border-radius: 8px;
}

.loading[hidden] {
    display: none;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading p {
    margin-top: 1rem;
    color: var(--text-muted);
}

/* Error Message */
.error-message {
    text-align: center;
    padding: 3rem;
    background: var(--card-bg);
    border-radius: 8px;
}

.error-message h2 {
    color: var(--error-color);
    margin-bottom: 1rem;
}

.error-message p {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

/* Continue Prompt */
.continue-prompt {
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 2rem;
    max-width: 500px;
    margin: 2rem auto;
    text-align: center;
}

.continue-prompt h2 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.continue-prompt > p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.saved-progress-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--hover-bg);
    border-radius: 6px;
}

.saved-progress-stats .stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.saved-progress-stats .stat-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
}

.saved-progress-stats .stat-label {
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.prompt-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.prompt-buttons .btn {
    padding: 0.625rem 1.5rem;
    font-size: 0.9375rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.prompt-buttons .btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
}

.prompt-buttons .btn-primary:hover {
    background: #1a5bb8;
}

.prompt-buttons .btn-secondary {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

.prompt-buttons .btn-secondary:hover {
    border-color: var(--text-muted);
    color: var(--text-color);
}

/* Responsive */
@media (max-width: 1100px) {
    .quiz-layout {
        flex-direction: column;
    }

    .hints-panel {
        width: 100%;
        position: static;
        order: 2;
    }

    .quiz-container {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .quiz-header {
        flex-direction: column;
        align-items: stretch;
        padding: 0.75rem 1rem;
        gap: 0.75rem;
    }

    .header-left {
        justify-content: space-between;
    }

    .header-center {
        order: 3;
    }

    .header-right {
        justify-content: center;
    }

    .quiz-layout {
        padding: 1rem;
    }

    .question-card {
        border-radius: 0;
        margin-left: -1rem;
        margin-right: -1rem;
    }
}

@media (max-width: 480px) {
    .progress-info {
        gap: 1rem;
    }

    .stat-value {
        font-size: 1rem;
    }

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

    .nav-position {
        font-size: 0.8125rem;
        min-width: auto;
    }
}
