/* Practice test page – consistent with home / free mock tests */
.test-page .navbar {
    /* Uses same navbar as home via styles.css + home.css */
}
.test-header-hero {
    background: linear-gradient(135deg, #0f3460 0%, #1a5f7a 50%, #0d3b4c 100%);
    color: #fff;
    padding: 1rem 0;
    position: relative;
}
.test-header-hero .test-header-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.test-header-hero .test-header-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    position: relative;
}
.test-header-hero .test-back-link {
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
}
.test-header-hero .test-back-link:hover {
    color: #fff;
    text-decoration: underline;
}
.test-header-hero .test-header-left {
    flex: 1;
    min-width: 120px;
}
.test-header-hero .test-exam-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.15rem;
    color: #fff;
}
.test-header-hero .test-type-label {
    display: inline-block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(0, 0, 0, 0.2);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}
.test-header-hero .test-header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.test-header-hero .timer-container,
.test-header-hero .timer-display {
    color: #fff;
}
.test-header-hero .camera-status {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
}
.test-header-hero .btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
}
.test-header-hero .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    color: #fff;
}

/* Subject bar: horizontal scroll strip (no wrap, elegant) */
.test-subject-bar {
    background: rgba(15, 52, 96, 0.06);
    border-bottom: 1px solid rgba(15, 52, 96, 0.12);
    padding: 0.5rem 0;
    overflow: hidden;
}
.test-subject-bar .container {
    padding-left: 1rem;
    padding-right: 1rem;
}
.test-subject-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.4rem;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.25rem 0;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}
.test-subject-tabs::-webkit-scrollbar {
    height: 6px;
}
.test-subject-tabs::-webkit-scrollbar-track {
    background: rgba(15, 52, 96, 0.06);
    border-radius: 3px;
}
.test-subject-tabs::-webkit-scrollbar-thumb {
    background: rgba(15, 52, 96, 0.25);
    border-radius: 3px;
}
.test-subject-tab {
    font-size: 0.78rem;
    padding: 0.4rem 0.75rem;
    border: 1px solid rgba(15, 52, 96, 0.2);
    background: #fff;
    color: var(--primary-color);
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.test-subject-tab:hover {
    background: rgba(15, 52, 96, 0.06);
    border-color: var(--accent-color);
}
.test-subject-tab.active {
    background: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
}
/* Subject as small pill above question (no full-width bar) */
.question-subject-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-color);
    background: rgba(15, 52, 96, 0.08);
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.test-container.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}
.score-banner {
    background: linear-gradient(135deg, #0f3460 0%, #1a5f7a 100%);
    color: #fff;
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.score-banner h3 {
    margin: 0;
    font-size: 1.15rem;
}
.score-banner .btn-primary {
    background: #fff;
    color: #0f3460;
    border: none;
}
.score-banner .btn-primary:hover {
    background: rgba(255, 255, 255, 0.9);
    color: #0d3b4c;
}

/* Practice test page – review section (answer + key facts + rare fact) */
.answer-explanation {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-page, #f5f7f9);
    border-radius: 8px;
    border-left: 4px solid var(--primary, #1e4d64);
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-muted, #444);
}
.answer-explanation .answer-key-fact {
    margin: 0.6rem 0 0;
    padding-left: 0.5rem;
}
.answer-explanation .answer-rare-fact {
    margin: 0.6rem 0 0;
    padding-left: 0.5rem;
    font-style: italic;
    border-left: 2px solid #ca8a04;
    padding-left: 0.75rem;
}
