/* ============================
   ExamRange — Dark Cybersecurity Theme
   ============================ */
:root {
    --bg: #0a0e1a;
    --bg-card: #111827;
    --bg-surface: #1a2235;
    --bg-hover: #1e2a42;
    --primary: #00e5ff;
    --primary-dim: rgba(0,229,255,0.15);
    --primary-glow: rgba(0,229,255,0.3);
    --accent: #ff4d6a;
    --accent-dim: rgba(255,77,106,0.15);
    --success: #00e676;
    --success-dim: rgba(0,230,118,0.12);
    --warning: #ffab40;
    --warning-dim: rgba(255,171,64,0.12);
    --info: #448aff;
    --text: #e8edf5;
    --text-secondary: #8b95a8;
    --text-muted: #4a5568;
    --border: #1e2a42;
    --border-light: #2a3650;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.5);
    --radius: 10px;
    --radius-lg: 16px;
    --font: 'IBM Plex Sans', sans-serif;
    --font-display: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --answered: #448aff;
    --flagged: #ffab40;
    --unanswered: #2a3650;
    --current: #00e5ff;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; min-height: 100vh; -webkit-font-smoothing: antialiased; }
.screen { display: none; }
.screen.active { display: block; }

/* ============================
   TOP NAV
   ============================ */
.top-nav { background: rgba(17,24,39,0.95); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 200; backdrop-filter: blur(12px); }
.nav-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; height: 50px; }
.nav-brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); font-weight: 700; font-size: 1rem; font-family: var(--font-display); }
.nav-brand svg { color: var(--primary); }
.brand-hl { color: var(--primary); }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a { display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; color: var(--text-secondary); text-decoration: none; font-size: 0.8rem; font-weight: 500; border-radius: 6px; transition: all 0.2s; white-space: nowrap; }
.nav-links a svg { opacity: 0.6; flex-shrink: 0; }
.nav-links a:hover { color: var(--primary); background: var(--primary-dim); }
.nav-links a:hover svg { opacity: 1; color: var(--primary); }
.nav-toggle { display: none; background: var(--bg-surface); border: 1px solid var(--border); color: var(--text); font-size: 1.2rem; padding: 6px 10px; border-radius: 6px; cursor: pointer; }
@media (max-width: 768px) {
    .nav-toggle { display: block; }
    .nav-links { display: none; position: absolute; top: 50px; left: 0; right: 0; flex-direction: column; background: var(--bg-card); border-bottom: 1px solid var(--border); padding: 8px; gap: 2px; box-shadow: var(--shadow-md); }
    .nav-links.open { display: flex; }
    .nav-links a { padding: 10px 16px; width: 100%; border-radius: 8px; }
}

/* ============================
   LANDING SCREEN
   ============================ */
#landing-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg); position: relative; overflow: hidden; }
.landing-wrapper { position: relative; z-index: 2; width: 100%; max-width: 640px; padding: 3rem 2rem; }
.landing-decoration { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.grid-bg { position: absolute; inset: 0; background-image: linear-gradient(rgba(0,229,255,0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(0,229,255,0.03) 1px, transparent 1px); background-size: 40px 40px; }
.glow { position: absolute; border-radius: 50%; filter: blur(80px); }
.glow-1 { width: 400px; height: 400px; top: -100px; right: -100px; background: rgba(0,229,255,0.06); }
.glow-2 { width: 300px; height: 300px; bottom: -50px; left: -80px; background: rgba(255,77,106,0.04); }
.scan-line { position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, transparent, rgba(0,229,255,0.2), transparent); animation: scanMove 4s ease-in-out infinite; }
@keyframes scanMove { 0%, 100% { top: 0; opacity: 0; } 50% { top: 100%; opacity: 1; } }

.landing-content { text-align: center; }
.landing-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 18px; background: var(--primary-dim); border: 1px solid rgba(0,229,255,0.2); border-radius: 100px; color: var(--primary); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.5px; margin-bottom: 2rem; font-family: var(--font-mono); }
.landing-title { margin-bottom: 1.2rem; }
.title-accent { display: block; font-size: 0.85rem; font-weight: 600; letter-spacing: 5px; text-transform: uppercase; color: var(--accent); margin-bottom: 0.3rem; font-family: var(--font-mono); }
.title-main { display: block; font-size: clamp(2.8rem, 7vw, 4.5rem); font-weight: 800; color: #fff; letter-spacing: -2px; line-height: 1.05; font-family: var(--font-display); }
.title-main .highlight { color: var(--primary); }
.landing-desc { font-size: 0.95rem; color: var(--text-secondary); max-width: 440px; margin: 0 auto 1rem; line-height: 1.7; }
.landing-cta { font-size: 0.85rem; color: var(--text-muted); margin: 0 auto 2.5rem; line-height: 1.7; }
.landing-cta a { color: var(--primary); text-decoration: none; font-weight: 600; transition: all 0.2s; }
.landing-cta a:hover { color: #fff; text-shadow: 0 0 12px rgba(0,229,255,0.5); }

/* Stats */
.landing-stats { display: flex; align-items: center; justify-content: center; gap: 2rem; margin-bottom: 2.5rem; padding: 1.2rem 2rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.stat-item { text-align: center; }
.stat-number { font-size: 1.8rem; font-weight: 700; color: var(--primary); font-family: var(--font-display); line-height: 1.2; }
.stat-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-muted); font-weight: 500; }
.stat-divider { width: 1px; height: 40px; background: var(--border-light); }

/* Mode Display */
.mode-display { display: flex; align-items: center; gap: 16px; padding: 16px 20px; background: var(--bg-surface); border: 1px solid rgba(0,229,255,0.15); border-radius: var(--radius); margin-bottom: 2rem; text-align: left; }
.mode-icon-wrap { width: 48px; height: 48px; border-radius: 12px; background: var(--primary-dim); display: flex; align-items: center; justify-content: center; color: var(--primary); flex-shrink: 0; }
.mode-name { font-weight: 700; color: var(--primary); display: block; font-size: 0.95rem; font-family: var(--font-display); }
.mode-desc-text { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.5; }

/* Registration */
.reg-form { margin-bottom: 1.5rem; }
.reg-field { margin-bottom: 1rem; text-align: left; }
.reg-field label { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; font-weight: 500; color: var(--text-secondary); margin-bottom: 6px; }
.req { color: var(--accent); }
.reg-field input { width: 100%; padding: 12px 16px; background: var(--bg-card); border: 1px solid var(--border-light); border-radius: 8px; color: var(--text); font-size: 0.9rem; font-family: var(--font); transition: all 0.2s; outline: none; }
.reg-field input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-dim); }
.reg-field input.error { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.reg-field input::placeholder { color: var(--text-muted); }
.reg-error { font-size: 0.82rem; color: var(--accent); min-height: 1.2em; margin-top: 4px; }

/* Buttons */
.landing-actions { display: flex; flex-direction: column; gap: 10px; margin-bottom: 2rem; }
.btn-primary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 28px; background: var(--primary); color: var(--bg); font-weight: 700; font-size: 0.95rem; border: none; border-radius: var(--radius); cursor: pointer; transition: all 0.25s; font-family: var(--font-display); letter-spacing: 0.3px; }
.btn-primary:hover { background: #33ecff; box-shadow: 0 0 24px rgba(0,229,255,0.35); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-secondary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 24px; background: var(--bg-surface); color: var(--text); font-weight: 600; font-size: 0.9rem; border: 1px solid var(--border-light); border-radius: var(--radius); cursor: pointer; transition: all 0.2s; font-family: var(--font); }
.btn-secondary:hover { background: var(--bg-hover); border-color: var(--primary); color: var(--primary); }
.btn-danger { background: var(--accent); }
.btn-danger:hover { background: #ff6b85; box-shadow: 0 0 20px rgba(255,77,106,0.3); }

/* Landing info */
.landing-info { display: flex; flex-direction: column; gap: 8px; }
.info-item { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; color: var(--text-muted); }
.info-item svg { color: var(--success); flex-shrink: 0; }

/* ============================
   EXAM SCREEN
   ============================ */
.exam-header { display: flex; align-items: center; justify-content: space-between; padding: 10px 20px; background: var(--bg-card); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; backdrop-filter: blur(12px); }
.header-left { display: flex; align-items: center; gap: 10px; }
.header-logo { width: 34px; height: 34px; border-radius: 8px; background: var(--primary-dim); display: flex; align-items: center; justify-content: center; color: var(--primary); }
.header-title { font-weight: 700; font-size: 0.9rem; color: var(--text); font-family: var(--font-display); }
.header-mode-badge { font-size: 0.65rem; padding: 2px 8px; border-radius: 4px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; vertical-align: middle; margin-left: 6px; }
.exam-badge { background: var(--primary-dim); color: var(--primary); }
.header-sub { font-size: 0.75rem; color: var(--text-muted); }
.header-center { flex: 1; display: flex; justify-content: center; }
.timer-container { display: flex; align-items: center; gap: 8px; padding: 6px 16px; background: var(--bg-surface); border: 1px solid var(--border); border-radius: 8px; font-family: var(--font-mono); font-size: 1.1rem; font-weight: 600; color: var(--text); }
.timer-container svg { color: var(--text-muted); }
.timer-container.warning { border-color: var(--warning); color: var(--warning); }
.timer-container.warning svg { color: var(--warning); }
.timer-container.danger { border-color: var(--accent); color: var(--accent); animation: timerPulse 1s infinite; }
.timer-container.danger svg { color: var(--accent); }
@keyframes timerPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }
.header-right { display: flex; align-items: center; gap: 12px; }
.progress-info { font-size: 0.8rem; color: var(--text-muted); font-family: var(--font-mono); }
.btn-icon { width: 36px; height: 36px; border-radius: 8px; background: var(--bg-surface); border: 1px solid var(--border); color: var(--text-secondary); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.btn-icon:hover { border-color: var(--primary); color: var(--primary); }
.btn-submit-header { padding: 8px 18px; background: var(--accent); color: #fff; border: none; border-radius: 8px; font-weight: 700; font-size: 0.82rem; cursor: pointer; transition: all 0.2s; font-family: var(--font-display); }
.btn-submit-header:hover { background: #ff6b85; box-shadow: 0 0 16px rgba(255,77,106,0.3); }

/* Progress Bar */
.exam-progress-bar { height: 3px; background: var(--border); position: relative; }
.exam-progress-fill { height: 100%; background: linear-gradient(90deg, var(--primary), #448aff); transition: width 0.4s ease; width: 0%; box-shadow: 0 0 8px rgba(0,229,255,0.3); }

/* Exam Body */
.exam-body { display: flex; max-width: 1100px; margin: 0 auto; padding: 24px 20px; gap: 20px; min-height: calc(100vh - 55px); }
.question-panel { flex: 1; min-width: 0; }
.question-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.question-number { display: flex; align-items: baseline; gap: 8px; }
.q-label { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.q-num { font-size: 1.8rem; font-weight: 800; color: var(--primary); font-family: var(--font-display); }
.q-of { font-size: 0.8rem; color: var(--text-muted); }
.btn-flag { display: flex; align-items: center; gap: 6px; padding: 8px 14px; background: var(--bg-surface); border: 1px solid var(--border); border-radius: 8px; color: var(--text-secondary); font-size: 0.8rem; cursor: pointer; transition: all 0.2s; }
.btn-flag:hover { border-color: var(--flagged); color: var(--flagged); }
.btn-flag.flagged { background: var(--warning-dim); border-color: var(--flagged); color: var(--flagged); }
.question-body { font-size: 1.05rem; line-height: 1.8; color: var(--text); margin-bottom: 24px; padding: 20px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); }

/* Options */
.options-container { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.option-item { display: flex; align-items: flex-start; gap: 14px; padding: 16px 18px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; transition: all 0.2s; }
.option-item:hover { background: var(--bg-hover); border-color: var(--border-light); transform: translateX(2px); }
.option-item.selected { background: var(--primary-dim); border-color: var(--primary); box-shadow: 0 0 0 1px rgba(0,229,255,0.2); }
.option-item.option-correct { background: var(--success-dim); border-color: var(--success); }
.option-item.option-incorrect { background: var(--accent-dim); border-color: var(--accent); }
.option-radio, .option-checkbox { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border-light); flex-shrink: 0; margin-top: 2px; transition: all 0.2s; }
.option-checkbox { border-radius: 5px; }
.option-item.selected .option-radio, .option-item.selected .option-checkbox { border-color: var(--primary); background: var(--primary); box-shadow: inset 0 0 0 3px var(--bg-card); }
.option-letter { font-weight: 700; color: var(--text-muted); font-family: var(--font-mono); font-size: 0.85rem; min-width: 24px; margin-top: 1px; }
.option-item.selected .option-letter { color: var(--primary); }
.option-text { flex: 1; font-size: 0.92rem; color: var(--text); line-height: 1.5; }

/* Question Nav */
.question-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.btn-nav { display: flex; align-items: center; gap: 6px; padding: 10px 18px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; color: var(--text-secondary); font-size: 0.85rem; font-weight: 500; cursor: pointer; transition: all 0.2s; }
.btn-nav:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.btn-nav:disabled { opacity: 0.3; cursor: not-allowed; }
.nav-dots { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; flex: 1; }
.nav-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--unanswered); transition: all 0.2s; cursor: pointer; }
.nav-dot.answered { background: var(--answered); }
.nav-dot.flagged { background: var(--flagged); }
.nav-dot.current { background: var(--current); box-shadow: 0 0 6px var(--current); transform: scale(1.3); }

/* Navigator Panel */
.navigator-panel { width: 280px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; position: sticky; top: 70px; max-height: calc(100vh - 90px); overflow-y: auto; display: none; }
.navigator-panel.open { display: block; }
.nav-panel-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.nav-panel-header h3 { font-size: 0.85rem; font-weight: 700; color: var(--text); font-family: var(--font-display); }
.btn-close-nav { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 4px; }
.btn-close-nav:hover { color: var(--accent); }
.nav-legend { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.legend-item { display: flex; align-items: center; gap: 5px; font-size: 0.7rem; color: var(--text-muted); }
.legend-dot { width: 10px; height: 10px; border-radius: 3px; }
.dot-unanswered { background: var(--unanswered); }
.dot-answered { background: var(--answered); }
.dot-flagged { background: var(--flagged); }
.dot-current { background: var(--current); box-shadow: 0 0 4px var(--current); }
.nav-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 14px; }
.nav-cell { width: 100%; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 600; border-radius: 6px; cursor: pointer; transition: all 0.15s; background: var(--bg-surface); border: 1px solid var(--border); color: var(--text-muted); font-family: var(--font-mono); }
.nav-cell:hover { border-color: var(--primary); }
.nav-cell.answered { background: rgba(68,138,255,0.15); border-color: var(--answered); color: var(--answered); }
.nav-cell.flagged { background: var(--warning-dim); border-color: var(--flagged); color: var(--flagged); }
.nav-cell.current { background: var(--primary-dim); border-color: var(--current); color: var(--current); box-shadow: 0 0 8px rgba(0,229,255,0.2); }
.nav-summary { font-size: 0.78rem; color: var(--text-muted); text-align: center; padding-top: 8px; border-top: 1px solid var(--border); }

/* ============================
   MODALS
   ============================ */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 1000; align-items: center; justify-content: center; backdrop-filter: blur(4px); }
.modal-overlay.show { display: flex; }
.modal-box { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2rem; max-width: 400px; width: 90%; text-align: center; box-shadow: var(--shadow-lg); }
.modal-icon { margin-bottom: 1rem; color: var(--warning); }
.modal-icon.timeup { color: var(--accent); }
.modal-box h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; font-family: var(--font-display); color: var(--text); }
.modal-box p { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 1.5rem; }
.modal-actions { display: flex; gap: 10px; justify-content: center; }

/* ============================
   RESULTS SCREEN
   ============================ */
#results-screen { background: var(--bg); min-height: 100vh; }
.results-wrapper { max-width: 700px; margin: 0 auto; padding: 2rem 1.5rem; }
.results-header { text-align: center; margin-bottom: 2rem; }
.results-badge { width: 80px; height: 80px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 1rem; }
.results-badge.pass { background: var(--success-dim); color: var(--success); border: 2px solid rgba(0,230,118,0.3); }
.results-badge.fail { background: var(--accent-dim); color: var(--accent); border: 2px solid rgba(255,77,106,0.3); }
.results-header h2 { font-size: 1.8rem; font-weight: 800; font-family: var(--font-display); }
.result-subtitle { color: var(--text-secondary); font-size: 0.95rem; margin-top: 4px; }

/* Score Card */
.score-card { display: flex; gap: 24px; align-items: center; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; margin-bottom: 2rem; }
.score-ring-container { position: relative; width: 120px; height: 120px; flex-shrink: 0; }
.score-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--border); stroke-width: 8; }
.ring-fg { fill: none; stroke: var(--success); stroke-width: 8; stroke-linecap: round; stroke-dasharray: 326.73; stroke-dashoffset: 326.73; transition: stroke-dashoffset 1.2s cubic-bezier(0.4, 0, 0.2, 1); }
.ring-fg.fail { stroke: var(--accent); }
.score-text { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 2px; }
.score-percent { font-size: 2rem; font-weight: 800; color: var(--text); font-family: var(--font-display); }
.score-label { font-size: 0.9rem; color: var(--text-muted); font-weight: 600; }
.score-details { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.score-detail-item { display: flex; justify-content: space-between; padding: 6px 10px; background: var(--bg-surface); border-radius: 6px; font-size: 0.82rem; }
.detail-label { color: var(--text-muted); }
.detail-value { font-weight: 600; color: var(--text); }
.detail-value.correct { color: var(--success); }
.detail-value.incorrect { color: var(--accent); }
.detail-value.unanswered { color: var(--warning); }
.detail-name { grid-column: 1 / -1; font-size: 0.9rem; }

/* CTA */
.results-cta { background: linear-gradient(135deg, rgba(0,229,255,0.08), rgba(68,138,255,0.08)); border: 1px solid rgba(0,229,255,0.2); border-radius: var(--radius-lg); padding: 24px; text-align: center; margin-bottom: 1.5rem; }
.cta-text { font-size: 0.95rem; color: var(--text-secondary); margin-bottom: 14px; }
.btn-cta { display: inline-flex; align-items: center; gap: 8px; padding: 14px 32px; background: var(--primary); color: var(--bg); font-weight: 700; font-size: 1rem; border-radius: var(--radius); text-decoration: none; transition: all 0.25s; font-family: var(--font-display); }
.btn-cta:hover { background: #33ecff; box-shadow: 0 0 30px rgba(0,229,255,0.4); transform: translateY(-2px); }

/* Study Note */
.study-note { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-top: 1.5rem; text-align: center; }
.study-note p { font-size: 0.88rem; color: var(--text-secondary); margin-bottom: 12px; }
.study-links { display: flex; flex-direction: column; gap: 6px; }
.study-links a { color: var(--primary); text-decoration: none; font-size: 0.85rem; font-weight: 500; font-family: var(--font-mono); transition: color 0.2s; }
.study-links a:hover { color: #fff; }

/* Results Actions */
.results-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* ============================
   REVIEW
   ============================ */
.review-section { margin-top: 2rem; }
.review-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 1rem; font-family: var(--font-display); color: var(--text); }
.review-filters { display: flex; gap: 8px; margin-bottom: 1.5rem; flex-wrap: wrap; }
.filter-btn { padding: 8px 16px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; color: var(--text-secondary); font-size: 0.82rem; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.filter-btn.active { background: var(--primary-dim); border-color: var(--primary); color: var(--primary); }
.review-item { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
.review-q-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.review-q-num { font-weight: 700; font-size: 0.85rem; color: var(--text-secondary); font-family: var(--font-mono); }
.review-status { font-size: 0.75rem; font-weight: 700; padding: 3px 10px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.review-status.correct { background: var(--success-dim); color: var(--success); }
.review-status.incorrect { background: var(--accent-dim); color: var(--accent); }
.review-status.unanswered-s { background: var(--warning-dim); color: var(--warning); }
.review-q-text { font-size: 0.92rem; color: var(--text); margin-bottom: 10px; line-height: 1.6; }
.review-answers { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.review-answer-tag { font-size: 0.8rem; padding: 5px 12px; border-radius: 6px; }
.tag-user { background: var(--accent-dim); color: var(--accent); }
.tag-user.is-correct { background: var(--success-dim); color: var(--success); }
.tag-correct { background: var(--success-dim); color: var(--success); }
.review-explanation { font-size: 0.85rem; color: var(--text-secondary); padding: 10px 12px; background: var(--bg-surface); border-radius: 6px; line-height: 1.6; border-left: 3px solid var(--primary); }
.correct-item { border-left: 3px solid var(--success); }
.incorrect-item { border-left: 3px solid var(--accent); }

/* ============================
   CERTIFICATE (PRINT)
   ============================ */
@media print {
    .no-print { display: none !important; }
    .print-only { display: block !important; }
    body { background: #fff; color: #000; }
    .certificate { page-break-inside: avoid; }
}
.print-only { display: none; }
.certificate { position: relative; overflow: hidden; }
.cert-watermark { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-30deg); font-size: 4rem; font-weight: 800; color: rgba(0,0,0,0.04); font-family: var(--font-display); pointer-events: none; white-space: nowrap; }
.cert-inner { padding: 2rem; border: 2px solid #ddd; border-radius: 8px; position: relative; }
.cert-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 2px solid #eee; }
.cert-logo { display: flex; align-items: center; gap: 10px; }
.cert-logo-text { display: flex; flex-direction: column; }
.cert-brand { font-size: 1.1rem; font-weight: 800; color: #0a2540; font-family: var(--font-display); }
.cert-brand-sub { font-size: 0.7rem; color: #666; }
.cert-exam-id { font-size: 0.7rem; color: #999; font-family: var(--font-mono); }
.cert-title-section { text-align: center; margin-bottom: 1.5rem; }
.cert-ornament { color: #0a2540; font-size: 1rem; margin-bottom: 4px; }
.cert-title { font-size: 1.5rem; font-weight: 800; color: #0a2540; margin-bottom: 4px; font-family: var(--font-display); }
.cert-subtitle { font-size: 0.85rem; color: #666; font-weight: 400; }
.cert-status-banner { text-align: center; padding: 8px; border-radius: 6px; margin-bottom: 1.5rem; font-weight: 800; font-size: 1.1rem; letter-spacing: 2px; }
.cert-status-banner.pass { background: #e8f5e9; color: #2e7d32; }
.cert-status-banner.fail { background: #fce4ec; color: #c62828; }
.cert-candidate { text-align: center; margin-bottom: 1.5rem; }
.cert-candidate-label { font-size: 0.7rem; color: #999; text-transform: uppercase; letter-spacing: 2px; }
.cert-candidate-name { font-size: 1.3rem; font-weight: 700; color: #0a2540; font-family: var(--font-display); }
.cert-candidate-email { font-size: 0.8rem; color: #666; }
.cert-detail-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 1.5rem; }
.cert-detail-item { text-align: center; padding: 8px; background: #f8f9fa; border-radius: 6px; }
.cd-label { display: block; font-size: 0.65rem; color: #999; text-transform: uppercase; letter-spacing: 1px; }
.cd-value { display: block; font-size: 0.95rem; font-weight: 700; color: #0a2540; }
.cert-bar-section { margin-bottom: 1.5rem; }
.cert-bar-track { height: 12px; background: #eee; border-radius: 6px; position: relative; overflow: visible; }
.cert-bar-fill { height: 100%; border-radius: 6px; transition: width 0.5s; }
.cert-bar-fill.pass { background: #4caf50; }
.cert-bar-fill.fail { background: #ef5350; }
.cert-bar-marker { position: absolute; left: 70%; top: -18px; transform: translateX(-50%); font-size: 0.65rem; font-weight: 700; color: #666; }
.cert-footer { display: flex; justify-content: space-between; align-items: flex-end; padding-top: 1.5rem; border-top: 1px solid #eee; }
.cert-sig-block { text-align: center; }
.cert-sig-line { width: 120px; height: 1px; background: #ccc; margin-bottom: 4px; }
.cert-sig-name { font-size: 0.8rem; font-weight: 700; color: #0a2540; }
.cert-sig-role { font-size: 0.65rem; color: #999; }
.cert-sig-url { font-size: 0.6rem; color: #bbb; }
.cert-seal { text-align: center; }
.cert-seal span { display: block; font-size: 0.6rem; font-weight: 700; color: #0a2540; letter-spacing: 2px; margin-top: 2px; }
.cert-disclaimer { text-align: center; font-size: 0.65rem; color: #bbb; margin-top: 1rem; padding-top: 0.5rem; border-top: 1px solid #f0f0f0; }

/* ============================
   FOOTER
   ============================ */
.site-footer { padding: 16px; text-align: center; border-top: 1px solid var(--border); }
.footer-content { font-size: 0.8rem; color: var(--text-muted); display: flex; align-items: center; justify-content: center; gap: 6px; }
.footer-content a { color: var(--primary); text-decoration: none; font-weight: 600; }
.footer-content a:hover { color: #fff; }
.footer-sep { color: var(--text-muted); margin: 0 2px; }

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 768px) {
    .exam-header { flex-wrap: wrap; gap: 8px; padding: 8px 12px; }
    .header-center { order: -1; width: 100%; justify-content: center; }
    .exam-body { flex-direction: column; padding: 16px 12px; }
    .navigator-panel { width: 100%; position: static; max-height: none; }
    .score-card { flex-direction: column; text-align: center; }
    .score-details { grid-template-columns: 1fr; }
    .landing-stats { gap: 1rem; padding: 1rem; }
    .stat-number { font-size: 1.4rem; }
    .cert-detail-grid { grid-template-columns: repeat(2, 1fr); }
    .results-actions { flex-direction: column; }
    .modal-actions { flex-direction: column; }
    .question-nav { flex-wrap: wrap; }
    .nav-dots { order: 3; width: 100%; }
}
