/* ========== Exam Simulator Page ========== */

/* Hero */
.exam-hero {
    padding: 140px 0 60px;
    background: var(--bg-cream);
    text-align: center;
}

.exam-hero h1 {
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
}

.exam-hero h1 .highlight {
    color: var(--primary);
}

.exam-hero .subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 0;
}

/* Exam Container */
.exam-container {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

/* Start Screen */
.exam-start {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 48px;
    box-shadow: var(--shadow-md);
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.exam-start .exam-icon {
    width: 72px;
    height: 72px;
    background: rgba(159, 47, 63, 0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    color: var(--primary);
}

.exam-start .exam-icon i {
    width: 32px;
    height: 32px;
}

.exam-start h2 {
    font-size: 1.6rem;
    margin-bottom: 8px;
}

.exam-start .exam-meta {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 28px;
}

.exam-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.exam-info-item {
    background: var(--bg-cream);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
}

.exam-info-item .info-number {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 4px;
}

.exam-info-item .info-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.exam-start .btn-start {
    padding: 16px 48px;
    font-size: 1.05rem;
}

/* Progress Bar */
.exam-progress {
    margin-bottom: 28px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.88rem;
    color: var(--text-muted);
    font-weight: 500;
}

.progress-bar-track {
    height: 6px;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 50px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 50px;
    transition: width 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    width: 0%;
}

/* Question Card */
.question-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0, 0, 0, 0.04);
    animation: fadeInQuestion 0.4s ease;
}

@keyframes fadeInQuestion {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.question-number {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--primary);
    background: rgba(159, 47, 63, 0.06);
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    letter-spacing: 0.02em;
}

.question-text {
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--text-main);
    margin-bottom: 28px;
    font-weight: 400;
    white-space: pre-line;
}

/* Answer Options */
.options-list {
    list-style: none;
    padding: 0;
    margin: 0 0 28px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-item {
    position: relative;
    cursor: pointer;
    transition: var(--transition);
}

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

.option-label {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 20px;
    border: 2px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-md);
    transition: var(--transition);
    cursor: pointer;
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-main);
}

.option-letter {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-cream);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: var(--transition);
    margin-top: 2px;
}

.option-label:hover {
    border-color: var(--primary);
    background: rgba(159, 47, 63, 0.02);
}

.option-label:hover .option-letter {
    background: rgba(159, 47, 63, 0.08);
    color: var(--primary);
}

.option-item input:checked+.option-label {
    border-color: var(--primary);
    background: rgba(159, 47, 63, 0.04);
}

.option-item input:checked+.option-label .option-letter {
    background: var(--primary);
    color: white;
}

/* Answered correct / wrong states */
.option-item.correct .option-label {
    border-color: #27ae60;
    background: rgba(39, 174, 96, 0.06);
}

.option-item.correct .option-letter {
    background: #27ae60;
    color: white;
}

.option-item.wrong .option-label {
    border-color: #e74c3c;
    background: rgba(231, 76, 60, 0.06);
}

.option-item.wrong .option-letter {
    background: #e74c3c;
    color: white;
}

.option-item.disabled {
    pointer-events: none;
}

/* Feedback */
.question-feedback {
    padding: 16px 20px;
    border-radius: var(--radius-md);
    font-size: 0.92rem;
    font-weight: 500;
    display: none;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    line-height: 1.6;
}

.question-feedback.show {
    display: flex;
}

.question-feedback.correct {
    background: rgba(39, 174, 96, 0.08);
    color: #1e8449;
    border: 1px solid rgba(39, 174, 96, 0.15);
}

.question-feedback.wrong {
    background: rgba(231, 76, 60, 0.08);
    color: #c0392b;
    border: 1px solid rgba(231, 76, 60, 0.15);
}

.question-feedback.all-correct {
    background: rgba(52, 152, 219, 0.08);
    color: #2471a3;
    border: 1px solid rgba(52, 152, 219, 0.15);
}

.question-feedback i {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Navigation */
.question-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.question-nav .btn {
    min-width: 140px;
    justify-content: center;
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-main);
    font-size: 0.92rem;
}

.btn-ghost:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Results Screen */
.exam-results {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 48px;
    box-shadow: var(--shadow-md);
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.04);
    animation: fadeInQuestion 0.5s ease;
}

.results-icon {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.results-icon.pass {
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
}

.results-icon.fail {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

.results-icon i {
    width: 40px;
    height: 40px;
}

.results-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.results-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 32px;
}

/* Score Circle */
.score-circle-wrap {
    margin: 0 auto 32px;
    width: 160px;
    height: 160px;
    position: relative;
}

.score-circle-wrap svg {
    transform: rotate(-90deg);
}

.score-circle-bg {
    fill: none;
    stroke: rgba(0, 0, 0, 0.06);
    stroke-width: 10;
}

.score-circle-fill {
    fill: none;
    stroke-width: 10;
    stroke-linecap: round;
    transition: stroke-dashoffset 1.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.score-circle-fill.pass {
    stroke: #27ae60;
}

.score-circle-fill.fail {
    stroke: #e74c3c;
}

.score-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.score-number {
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1;
    color: var(--text-main);
}

.score-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Stats Grid */
.results-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.stat-item {
    background: var(--bg-cream);
    border-radius: var(--radius-md);
    padding: 20px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-value.green {
    color: #27ae60;
}

.stat-value.red {
    color: #e74c3c;
}

.stat-value.blue {
    color: #2980b9;
}

.stat-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 500;
}

.results-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Question Map */
.question-map {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 24px 0;
}

.qmap-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    border: 2px solid rgba(0, 0, 0, 0.08);
    background: var(--surface);
    color: var(--text-muted);
    transition: var(--transition);
}

.qmap-dot:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.qmap-dot.current {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

.qmap-dot.answered {
    border-color: rgba(0, 0, 0, 0.15);
    background: rgba(0, 0, 0, 0.04);
    color: var(--text-main);
}

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

.qmap-dot.wrong-dot {
    border-color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

/* Timer */
.exam-timer {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-cream);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
}

.exam-timer i {
    width: 16px;
    height: 16px;
}

/* ========== Mobile Responsive ========== */
@media (max-width: 768px) {
    .exam-hero {
        padding: 120px 0 40px;
    }

    .exam-hero h1 {
        font-size: 1.8rem;
    }

    .exam-container {
        padding: 0 16px 60px;
    }

    .exam-start,
    .question-card,
    .exam-results {
        padding: 24px 20px;
    }

    .exam-info-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .exam-info-item {
        padding: 16px;
        display: flex;
        align-items: center;
        gap: 12px;
        text-align: right;
    }

    .exam-info-item .info-number {
        font-size: 1.4rem;
        min-width: 40px;
    }

    .question-text {
        font-size: 0.95rem;
        line-height: 1.75;
    }

    .option-label {
        padding: 14px 16px;
        font-size: 0.88rem;
        gap: 10px;
    }

    .option-letter {
        width: 28px;
        height: 28px;
        font-size: 0.78rem;
    }

    .question-nav {
        flex-direction: column-reverse;
    }

    .question-nav .btn,
    .question-nav .btn-ghost {
        width: 100%;
        justify-content: center;
    }

    .results-stats {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .stat-item {
        display: flex;
        align-items: center;
        gap: 12px;
        text-align: right;
        padding: 16px;
    }

    .stat-value {
        min-width: 40px;
    }

    .score-circle-wrap {
        width: 130px;
        height: 130px;
    }

    .score-number {
        font-size: 2rem;
    }

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

    .results-actions .btn,
    .results-actions .btn-ghost {
        width: 100%;
        justify-content: center;
    }

    .qmap-dot {
        width: 32px;
        height: 32px;
        font-size: 0.72rem;
    }
}

@media (max-width: 480px) {
    .exam-hero h1 {
        font-size: 1.5rem;
    }

    .exam-hero .subtitle {
        font-size: 0.92rem;
    }
}