:root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #334155;
    --bg-card-hover: #475569;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent-primary: #818cf8;
    --accent-secondary: #a78bfa;
    --accent-tertiary: #22d3ee;
    --accent-gradient: linear-gradient(135deg, #818cf8, #a78bfa, #22d3ee);
    --success: #34d399;
    --danger: #f87171;
    --warning: #fbbf24;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--bg-card);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--bg-card-hover);
}

/* Accessibility */
:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *, ::before, ::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Base Screen Classes */
.screen {
    display: none;
    width: 100%;
    min-height: 100vh;
    flex-direction: column;
}

.screen.active {
    display: flex;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
}

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border-radius: 12px;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: 0 4px 15px rgba(129, 140, 248, 0.2);
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(129, 140, 248, 0.4);
}

.btn-secondary {
    background-color: var(--bg-card);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background-color: var(--bg-card-hover);
    color: var(--text-primary);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Language Switcher */
.screen-top-bar {
    position: absolute;
    top: 1.25rem;
    right: 1.5rem;
    z-index: 100;
}

.lang-switch-container {
    display: inline-flex;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 3px;
    gap: 3px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.lang-toggle-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.04em;
}

.lang-toggle-btn:hover {
    color: var(--text-primary);
}

.lang-toggle-btn.active {
    background: var(--accent-gradient);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(129, 140, 248, 0.45);
}

.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background-color: var(--bg-card);
    color: var(--text-primary);
}

.btn-icon.active {
    color: var(--warning);
}

/* Layout Utilities */
.centered-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

/* Welcome Screen */
#logo-container {
    width: 120px;
    height: 120px;
    animation: pulse 3s infinite ease-in-out;
}

#welcome-screen h1 {
    font-size: clamp(3rem, 8vw, 4.5rem);
    margin-bottom: -0.5rem;
}

.tagline {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    color: var(--text-secondary);
    font-weight: 500;
}

.subtitle {
    color: var(--text-muted);
    max-width: 600px;
}

.footer-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 2rem;
}

/* Mode Selection */
.mode-selection-container h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.mode-cards {
    display: flex;
    gap: 2rem;
    width: 100%;
}

.mode-card {
    flex: 1;
    background-color: var(--bg-secondary);
    border-radius: 16px;
    padding: 32px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.mode-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-primary);
    box-shadow: 0 10px 30px rgba(129, 140, 248, 0.1);
}

.mode-icon {
    color: var(--accent-primary);
    margin-bottom: 1rem;
}

.mode-card h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.mode-desc {
    color: var(--accent-tertiary);
    font-weight: 600;
    margin-bottom: 1rem;
}

.mode-sub {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.badge {
    position: absolute;
    top: -12px;
    right: 24px;
    background: var(--accent-gradient);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* Test Screen - Zero-Scroll Focus Layout */
#test-screen {
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    overflow: hidden;
    display: none;
    flex-direction: column;
    position: relative;
    user-select: none;
}

#test-screen.active {
    display: flex;
}

/* Compact Header (height ~48px) */
#test-header {
    height: 48px;
    flex-shrink: 0;
    background-color: var(--bg-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.5rem;
    z-index: 10;
    box-shadow: 0 1px 8px rgba(0,0,0,0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

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

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

.category-badge {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #fff;
}

.cat-pattern { background-color: var(--accent-primary); }
.cat-spatial { background-color: var(--accent-secondary); }
.cat-numerical { background-color: var(--accent-tertiary); }
.cat-logic { background-color: var(--success); }
.cat-perception { background-color: var(--warning); }

#question-counter {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
}

.timer-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.timer-svg {
    width: 28px;
    height: 28px;
    transform: rotate(-90deg);
}

#timer-ring {
    transition: stroke-dashoffset 1s linear, stroke 0.3s ease;
}

#timer-text {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    font-size: 1.05rem;
}

/* Slim Progress Bar */
.progress-bar-container {
    height: 3px;
    background-color: var(--bg-card);
    width: 100%;
    position: relative;
    flex-shrink: 0;
}

#progress-bar-fill {
    height: 100%;
    background: var(--accent-gradient);
    width: 0%;
    transition: width 0.3s ease;
}

#progress-text {
    display: none;
}

/* Test Main Area */
.test-main {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 0.75rem 1.5rem;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.question-container {
    width: 100%;
    max-width: 1100px;
    height: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.5rem;
}

#question-instruction {
    text-align: left;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    flex-shrink: 0;
    line-height: 1.3;
    padding-left: 4px;
}

/* Side-by-Side Stage on Desktop */
.test-stage {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 1.25rem;
    align-items: stretch;
}

#question-display {
    width: 100%;
    height: 100%;
    min-height: 0;
    background-color: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

#question-display svg {
    max-height: 100%;
    max-width: 100%;
    width: auto;
    height: auto;
    display: block;
    margin: auto;
    object-fit: contain;
}

/* Rich Logic and Perception Question Cards inside Question Display */
.logic-card, .perception-card {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 1.25rem 1rem;
    gap: 0.85rem;
    color: var(--text-primary);
}

.logic-header, .perception-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    background: rgba(129, 140, 248, 0.15);
    border: 1px solid rgba(129, 140, 248, 0.3);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-primary);
}

.premises-container {
    width: 100%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: left;
}

.premise-row {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 7px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-primary);
}

.premise-bullet {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent-gradient);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.logic-prompt {
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-style: italic;
}

.perception-title {
    font-size: 1.25rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.perception-hint {
    font-size: 0.92rem;
    color: var(--text-secondary);
    max-width: 420px;
    line-height: 1.35;
}

.perception-rule-box {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 6px 16px;
    font-size: 0.85rem;
    color: var(--accent-tertiary);
}

.options-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    gap: 0.4rem;
    justify-content: center;
}

.options-header {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    flex-shrink: 0;
    padding-left: 2px;
}

/* Options Grid - 2 cols x 3 rows on Desktop */
#options-grid {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 10px;
    width: 100%;
    height: 100%;
}

.option-card {
    background-color: #1e293b;
    border-radius: 12px;
    padding: 8px;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.15s ease, border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    height: 100%;
    min-height: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.option-card:hover:not(.selected) {
    background-color: #243047;
    transform: translateY(-2px);
    border-color: rgba(129, 140, 248, 0.6);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35), 0 0 12px rgba(129, 140, 248, 0.2);
}

.option-card:hover:not(.selected) .option-label {
    color: var(--text-primary);
    background: rgba(129, 140, 248, 0.25);
    border-color: rgba(129, 140, 248, 0.4);
}

.option-card.selected {
    background-color: #22304d;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px var(--accent-primary), 0 8px 24px rgba(129, 140, 248, 0.4);
    transform: translateY(-2px);
}

.option-card.correct {
    border-color: var(--success);
    background-color: rgba(52, 211, 153, 0.15);
}

.option-card.wrong {
    border-color: var(--danger);
    background-color: rgba(248, 113, 113, 0.15);
    animation: shake 0.5s;
}

.option-label {
    position: absolute;
    top: 5px;
    left: 7px;
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--text-muted);
    background: rgba(15, 23, 42, 0.65);
    padding: 2px 6px;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    pointer-events: none;
    z-index: 2;
    transition: all 0.15s ease;
}

.option-card.selected .option-label {
    background: var(--accent-gradient);
    color: #ffffff;
    border: none;
    box-shadow: 0 2px 8px rgba(129, 140, 248, 0.55);
}

.option-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4px 8px;
}

.option-content svg {
    max-height: 100%;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.option-text {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.25;
    word-break: break-word;
}

/* Compact Footer */
.test-footer {
    height: 52px;
    flex-shrink: 0;
    background-color: var(--bg-secondary);
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
}

.nav-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 860px;
    width: 100%;
    margin: 0 auto;
}

.nav-buttons .btn {
    padding: 6px 18px;
    font-size: 0.88rem;
    border-radius: 8px;
    height: 36px;
}

.nav-toggle-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.kbd-hints {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
    user-select: none;
}

.kbd-hints kbd {
    background: var(--bg-card);
    border: 1px solid var(--bg-card-hover);
    padding: 1px 5px;
    border-radius: 4px;
    color: var(--accent-tertiary);
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 700;
}

@media (max-width: 900px) {
    .kbd-hints {
        display: none;
    }
}

/* Floating Question Map Popover */
.nav-grid {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    grid-template-columns: repeat(10, 1fr);
    gap: 6px;
    width: min(92vw, 440px);
    max-height: 50vh;
    overflow-y: auto;
    padding: 0.85rem;
    background-color: var(--bg-secondary);
    border: 1px solid var(--bg-card-hover);
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
    z-index: 100;
    animation: fadeIn 0.2s ease-out;
}

.nav-grid.active {
    display: grid;
}

.nav-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.15s ease;
}

.nav-dot:hover {
    background-color: var(--bg-card-hover);
    transform: scale(1.1);
}

.nav-dot.answered {
    background-color: var(--accent-primary);
    color: #fff;
}

.nav-dot.current {
    box-shadow: 0 0 0 2px var(--bg-secondary), 0 0 0 4px var(--accent-tertiary);
}

/* Results Screen */
.results-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 3rem;
    width: 100%;
}

.hero-section {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

#score-display {
    font-size: clamp(4rem, 10vw, 6rem);
    font-weight: 800;
    line-height: 1;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.score-badge {
    position: static;
    display: inline-block;
    font-size: 1.2rem;
    padding: 8px 24px;
}

#percentile-text {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-top: 1rem;
}

.superpower-callout {
    background-color: var(--bg-secondary);
    border-radius: 16px;
    padding: 1.5rem;
    width: 100%;
    margin-top: 1rem;
    border-left: 4px solid var(--accent-tertiary);
}

.superpower-value {
    color: var(--accent-tertiary);
}

.stats-row {
    display: flex;
    gap: 1rem;
    width: 100%;
}

.stat-card {
    flex: 1;
    background-color: var(--bg-secondary);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
}

.stat-card h4 {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.stat-card p {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
}

.chart-section {
    background-color: var(--bg-secondary);
    border-radius: 16px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.chart-section h3 {
    margin-bottom: 1.5rem;
    align-self: flex-start;
}

#bell-curve-canvas {
    max-width: 100%;
    height: auto;
}

#radar-chart-container {
    width: 100%;
    max-width: 500px;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.review-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.review-item {
    background-color: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
}

.review-header {
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background-color: var(--bg-card);
}

.review-header:hover {
    background-color: var(--bg-card-hover);
}

.review-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 600;
}

.review-status {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.review-status.correct {
    background-color: rgba(52, 211, 153, 0.2);
    color: var(--success);
}

.review-status.wrong {
    background-color: rgba(248, 113, 113, 0.2);
    color: var(--danger);
}

.review-content {
    display: none;
    padding: 1.5rem;
    border-top: 1px solid var(--bg-primary);
}

.review-item.expanded .review-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.review-details {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.review-svg {
    flex: 1;
    background-color: var(--bg-primary);
    border-radius: 8px;
    padding: 1rem;
}

.review-explanation {
    flex: 1;
    color: var(--text-secondary);
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0% { transform: scale(1); filter: drop-shadow(0 0 15px rgba(129, 140, 248, 0.4)); }
    50% { transform: scale(1.05); filter: drop-shadow(0 0 30px rgba(167, 139, 250, 0.8)); }
    100% { transform: scale(1); filter: drop-shadow(0 0 15px rgba(129, 140, 248, 0.4)); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
}

.fade-in {
    animation: fadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Responsive - Vertical Stacking on Mobile & Tablets */
@media (max-width: 768px) {
    .mode-cards {
        flex-direction: column;
    }
    
    .stats-row {
        flex-direction: column;
    }

    .test-main {
        padding: 0.4rem 0.6rem;
    }

    .question-container {
        width: 100%;
        max-width: 100%;
        gap: 0.35rem;
    }

    #question-instruction {
        text-align: center;
        font-size: 0.95rem;
        padding-left: 0;
    }

    /* Switch to vertical stack on mobile/tablet */
    .test-stage {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 0.35rem;
        flex: 1;
        min-height: 0;
        overflow: hidden;
    }

    #question-display {
        width: 100%;
        max-width: 100%;
        flex: 1;
        min-height: 90px;
        max-height: 35vh;
        padding: 0.35rem;
        border-radius: 12px;
        box-sizing: border-box;
    }

    .options-wrapper {
        width: 100%;
        flex: none;
        height: auto;
        gap: 0;
    }

    .options-header {
        display: none;
    }
    
    #options-grid {
        width: 100%;
        box-sizing: border-box;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, 1fr);
        gap: 6px;
        flex: none;
        height: auto;
    }
    
    .option-card {
        height: 48px;
        min-height: 40px;
        border-radius: 8px;
        padding: 2px 4px;
        box-sizing: border-box;
    }

    .option-text {
        font-size: 0.78rem;
    }

    .test-footer {
        height: 48px;
        padding: 0 0.5rem;
    }

    .nav-buttons {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 6px;
        width: 100%;
    }

    .nav-buttons .btn {
        flex: 1 1 0;
        min-width: 0;
        padding: 4px 6px;
        font-size: 0.78rem;
        height: 34px;
        text-align: center;
        white-space: nowrap;
    }

    .nav-toggle-container {
        flex: 1.2 1 0;
        min-width: 0;
        gap: 0;
    }

    .nav-toggle-container #nav-toggle-btn {
        width: 100%;
        padding: 4px 6px;
        font-size: 0.78rem;
    }
    
    .nav-grid {
        grid-template-columns: repeat(6, 1fr);
    }
    
    #test-header {
        padding: 0 0.75rem;
        height: 44px;
    }

    #question-counter {
        font-size: 0.78rem;
    }
    
    .review-details {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    #question-counter {
        display: none;
    }

    .option-card {
        height: 50px;
    }

    .option-text {
        font-size: 0.72rem;
    }
}
