/* ============================== */
/* EXAM VIEW STYLES               */
/* ============================== */

.exam-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem;
}

/* Exam Selection */
.exam-selection {
    text-align: center;
}

.exam-title {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin: 0;
}

.exam-subtitle {
    color: var(--text-muted);
    margin-top: 0.5rem;
    margin-bottom: 2rem;
}

.exam-options {
    margin-bottom: 2rem;
}

.exam-option-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: left;
}

.exam-option-card h3 {
    color: white;
    margin: 0 0 1.5rem 0;
    font-size: 1.1rem;
}

.option-group {
    margin-bottom: 1.25rem;
}

.option-group label {
    display: block;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.option-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.option-buttons button {
    padding: 0.6rem 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.option-buttons button:hover {
    border-color: var(--accent);
    color: white;
}

.option-buttons button.active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg-dark);
    font-weight: 600;
}

.subject-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    color: white;
    font-size: 0.95rem;
}

.start-exam-btn {
    padding: 1rem 3rem;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.start-exam-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.start-exam-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Active Exam */
.exam-active {
    position: relative;
}

.exam-timer-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    margin-bottom: 1rem;
}

.timer-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.timer-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    font-family: monospace;
}

.timer-text.warning {
    color: #ef4444;
    animation: pulse 1s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.question-progress {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.finish-btn {
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: transparent;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
}

.finish-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Question Dots */
.question-dots {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.2s;
}

.dot.answered {
    background: var(--primary);
}

.dot.current {
    background: var(--accent);
    transform: scale(1.3);
}

/* Question Card */
.question-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.question-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.question-number {
    color: var(--accent);
    font-weight: 600;
}

.question-subject {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.question-text {
    color: white;
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.option-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 2px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.option-item:hover {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

.option-item.selected {
    background: rgba(var(--primary-rgb), 0.2);
    border-color: var(--primary);
}

.option-letter {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    font-weight: 600;
    color: var(--text-muted);
    flex-shrink: 0;
}

.option-item.selected .option-letter {
    background: var(--primary);
    color: white;
}

.option-text {
    color: white;
    line-height: 1.5;
}

/* Question Navigation */
.question-nav {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.nav-btn {
    flex: 1;
    padding: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: transparent;
    color: white;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
}

.nav-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.nav-btn-next {
    background: var(--primary);
    border-color: var(--primary);
}

/* Exam Results */
.exam-results {
    text-align: center;
}

.results-header {
    margin-bottom: 2rem;
}

.results-icon {
    font-size: 4rem;
    margin-bottom: 0.5rem;
}

.results-header h2 {
    color: white;
    font-size: 1.5rem;
    margin: 0;
}

.results-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.result-card {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.result-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
}

.result-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.result-card.correct {
    border-left: 4px solid #22c55e;
}

.result-card.incorrect {
    border-left: 4px solid #ef4444;
}

.result-card.empty {
    border-left: 4px solid #6b7280;
}

.result-card.score {
    border-left: 4px solid var(--accent);
}

.results-xp {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(234, 179, 8, 0.15);
    border-radius: 20px;
    color: #fbbf24;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.results-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.review-btn,
.retry-btn {
    padding: 0.9rem 1.75rem;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.review-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.retry-btn {
    background: var(--primary);
    color: white;
}

/* Review Section */
.review-section {
    text-align: left;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 1.25rem;
}

.review-section h3 {
    color: white;
    margin: 0 0 1rem 0;
}

.review-item {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
}

.review-item.review-correct {
    border-left: 3px solid #22c55e;
}

.review-item.review-wrong {
    border-left: 3px solid #ef4444;
}

.review-item.review-empty {
    border-left: 3px solid #6b7280;
}

.review-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.25rem;
}

.review-num {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.review-status {
    font-weight: 700;
}

.review-correct .review-status {
    color: #22c55e;
}

.review-wrong .review-status {
    color: #ef4444;
}

.review-empty .review-status {
    color: #6b7280;
}

.review-question {
    color: white;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.review-answers {
    display: flex;
    gap: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 600px) {
    .results-summary {
        grid-template-columns: repeat(2, 1fr);
    }

    .results-actions {
        flex-direction: column;
    }
}