/* ==========================================================================
   HPRCA LIVE CBT MOCK TEST STYLES (MOBILE-FIRST & DESKTOP CBT)
   Computer-Based Test (CBT) Portal Design for HP Patwari 2026
   Specially engineered for Mobile (360px-480px) and Desktop Displays
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Devanagari:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500;600;700&display=swap');

:root {
  --cbt-font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --cbt-font-hindi: 'Noto Sans Devanagari', 'Times New Roman', serif;
  --cbt-font-mono: 'JetBrains Mono', monospace;

  /* HPRCA Exam Hall Theme Colors */
  --cbt-navy-dark: #091322;
  --cbt-navy-med: #132238;
  --cbt-navy-light: #1e293b;
  --cbt-accent-blue: #2563eb;
  --cbt-accent-blue-hover: #1d4ed8;
  --cbt-gold: #f59e0b;
  --cbt-emerald: #10b981;
  --cbt-emerald-hover: #059669;
  --cbt-crimson: #ef4444;
  --cbt-purple: #8b5cf6;

  --cbt-bg-page: #f1f5f9;
  --cbt-bg-card: #ffffff;
  --cbt-border: #cbd5e1;
  --cbt-border-dark: #94a3b8;
  --cbt-text-main: #0f172a;
  --cbt-text-muted: #475569;
  --cbt-text-subtle: #64748b;

  --omr-bubble-border: #475569;
  --omr-bubble-bg: #ffffff;
  --omr-bubble-filled: #0f172a;
  --omr-bubble-filled-text: #ffffff;
}

/* Base Exam Room Container */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  background-color: var(--cbt-bg-page);
  color: var(--cbt-text-main);
  font-family: var(--cbt-font-sans);
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

/* Master CBT App Frame */
.cbt-app {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--cbt-bg-page);
}

/* ==========================================================================
   1. HPRCA PORTAL HEADER
   ========================================================================== */
.hprca-header {
  height: 60px;
  background: linear-gradient(135deg, #070d18 0%, #101c2e 60%, #1e293b 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  border-bottom: 2.5px solid var(--cbt-gold);
  flex-shrink: 0;
  z-index: 50;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  gap: 8px;
}

.hprca-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.hprca-emblem {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: radial-gradient(circle, #fef3c7 0%, #d97706 100%);
  border: 1.5px solid #fef3c7;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  color: #78350f;
  font-weight: 800;
  font-size: 8.5px;
  line-height: 1.05;
  text-align: center;
  letter-spacing: -0.2px;
  text-transform: uppercase;
  flex-shrink: 0;
}

.hprca-titles {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.hprca-main-title {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: #f8fafc;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hprca-sub-title {
  font-size: 11px;
  color: #93c5fd;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 1px;
  white-space: nowrap;
}

.hprca-badge-live {
  background: #dc2626;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  letter-spacing: 0.5px;
  animation: pulse-badge 2s infinite ease-in-out;
}

@keyframes pulse-badge {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(0.96); }
}

/* Center Countdown Clock */
.hprca-timer-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.9);
  border: 1.5px solid rgba(245, 158, 11, 0.8);
  padding: 5px 12px;
  border-radius: 8px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4), 0 0 10px rgba(245, 158, 11, 0.2);
  flex-shrink: 0;
}

.timer-icon {
  color: var(--cbt-gold);
  display: flex;
  align-items: center;
}

.timer-labels {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.timer-caption {
  font-size: 9px;
  font-weight: 600;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  white-space: nowrap;
}

.timer-digits {
  font-family: var(--cbt-font-mono);
  font-size: 18px;
  font-weight: 700;
  color: #fef08a;
  letter-spacing: 0.8px;
  line-height: 1.1;
}

.timer-digits.warning {
  color: #f87171;
  animation: blink-warning 1s infinite;
}

@keyframes blink-warning {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Right Candidate Info & Action Controls */
.hprca-right-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.candidate-profile-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 3px 8px;
  border-radius: 6px;
}

.candidate-avatar {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  background: #3b82f6;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 11.5px;
  border: 1px solid #93c5fd;
}

.candidate-details {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.cand-name {
  font-size: 11px;
  font-weight: 600;
  color: #ffffff;
}

.cand-meta {
  font-size: 9.5px;
  color: #94a3b8;
}

/* Header Buttons */
.hdr-btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.hdr-btn:hover, .hdr-btn:active {
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.4);
}

.hdr-btn.btn-exit {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.5);
  color: #fca5a5;
}

.hdr-btn.btn-exit:hover, .hdr-btn.btn-exit:active {
  background: rgba(239, 68, 68, 0.45);
  color: #fff;
}

/* ==========================================================================
   2. MAIN TWO-PANE SPLIT LAYOUT
   ========================================================================== */
.cbt-split-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  background: #ffffff;
}

.cbt-split-main.is-resizing .paper-pane,
.cbt-split-main.is-resizing .omr-pane {
  transition: none !important;
}

/* Upper Pane: Question Paper Container */
.paper-pane {
  display: flex;
  flex-direction: column;
  height: 54%; /* Default ratio */
  min-height: 80px;
  background: #ffffff !important;
  background-color: #ffffff !important;
  overflow: hidden;
  border-bottom: 2px solid #0f172a;
}

/* Paper Toolbar */
.paper-toolbar {
  height: 38px;
  background: #ffffff;
  border-bottom: 1.5px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.paper-toolbar::-webkit-scrollbar {
  display: none;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.paper-heading {
  font-size: 11.5px;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 5px;
  text-transform: uppercase;
}

.paper-tag-pill {
  background: #e0f2fe;
  color: #0369a1;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 9.5px;
  font-weight: 700;
}

/* Quick Section Navigation Buttons */
.section-quick-tabs {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 1;
}

.section-quick-tabs::-webkit-scrollbar {
  display: none;
}

.sec-jump-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.12s;
  flex-shrink: 0;
}

.sec-jump-btn:hover, .sec-jump-btn:active {
  background: #e2e8f0;
  color: #0f172a;
}

.sec-jump-btn.active {
  background: var(--cbt-navy-dark);
  border-color: var(--cbt-navy-dark);
  color: #ffffff;
}

/* Zoom Controls */
.toolbar-zoom {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}

.zoom-btn {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #1e293b;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 25px;
  transition: all 0.12s;
}

.zoom-btn:hover, .zoom-btn:active {
  background: #e2e8f0;
  border-color: #94a3b8;
}

.zoom-val {
  min-width: 42px;
  text-align: center;
  font-size: 10.5px;
  font-weight: 700;
  color: #334155;
  font-family: var(--cbt-font-mono);
}

/* Paper Scroll Viewport - Desk Canvas Background (Neutral Slate Gray) */
.paper-viewport {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 16px 40px 16px;
  background-color: #cbd5e1;
  background: #cbd5e1;
  display: block !important;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

/* Actual Paper Document - Realistic White A4 Sheet */
.paper-document {
  width: 100%;
  max-width: 840px;
  margin: 0 auto 30px auto;
  background-color: #ffffff !important;
  background: #ffffff !important;
  padding: 24px 28px 45px 28px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.16), 0 1px 3px rgba(15, 23, 42, 0.08);
  border: 1px solid #94a3b8;
  border-radius: 4px;
  font-family: "Times New Roman", Times, Georgia, var(--cbt-font-hindi), serif;
  font-size: 10pt;
  line-height: 1.4;
  color: #000000;
  transform-origin: top center;
  transition: transform 0.1s ease-out;
  box-sizing: border-box;
  display: block !important;
  height: auto !important;
  min-height: fit-content;
}

/* TBT Header within Paper */
.paper-document .tbt-header {
  border-bottom: 2px solid #000000;
  padding-bottom: 6px;
  margin-bottom: 12px;
  background: transparent !important;
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
}

.paper-document .tbt-header-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 11pt;
  font-weight: 700;
  color: #000000;
  line-height: 1.35;
  background: transparent !important;
}

.paper-document .tbt-header-line.tbt-sub {
  font-size: 9.8pt;
  font-weight: 600;
  margin-top: 2px;
  background: transparent !important;
}

.paper-document .tbt-part2-header {
  border-top: 2px solid #000000;
  border-bottom: 1.5px solid #000000;
  padding: 6px 8px;
  margin-top: 20px;
  margin-bottom: 14px;
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  background: #f8fafc !important;
}

/* Questions Layout inside A4 sheet */
.paper-document .questions-layout {
  display: block !important;
  background: transparent !important;
}

.paper-document .question-item {
  display: block !important;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px dashed #e2e8f0;
  font-size: 10pt;
  line-height: 1.42;
  transition: background 0.15s ease, border-color 0.15s ease;
  border-radius: 6px;
  padding: 6px 8px;
  background: transparent !important;
}

.paper-document .question-item:hover {
  background: #f8fafc !important;
}

.paper-document .question-item.active-highlight {
  background: #eff6ff !important;
  border-left: 4px solid var(--cbt-accent-blue) !important;
  border-bottom: 1px solid #bfdbfe !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
}

.paper-document .q-title {
  display: flex;
  align-items: flex-start;
  margin-bottom: 6px;
}

.paper-document .q-num {
  min-width: 32px;
  width: 32px;
  font-weight: 700;
  font-size: 10.5pt;
  color: #000000;
  flex-shrink: 0;
  line-height: 1.4;
}

.paper-document .q-text-block {
  flex: 1;
}

.paper-document .q-en {
  display: block;
  font-weight: 600;
  font-size: 10.5pt;
  color: #0f172a;
  line-height: 1.4;
}

.paper-document .q-hi {
  display: block;
  font-family: var(--cbt-font-hindi) !important;
  font-size: 10.5pt;
  font-weight: 500;
  color: #1e293b;
  line-height: 1.48;
  margin-top: 3px;
}

/* Options Grid in Paper */
.paper-document .q-options-grid {
  display: block;
  padding-left: 32px;
  margin-top: 4px;
  font-size: 10pt;
}

.paper-document .opt-choice {
  display: flex;
  align-items: baseline;
  gap: 8px;
  line-height: 1.35;
  margin-bottom: 4px;
  padding: 5px 8px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.12s;
  min-height: 34px;
  border: 1px solid transparent;
}

.paper-document .opt-choice:hover, .paper-document .opt-choice:active {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.paper-document .opt-choice.selected-choice {
  background: #dbeafe !important;
  border-color: #93c5fd !important;
  font-weight: 700;
}

.paper-document .opt-letter {
  font-weight: 700;
  color: #000000;
  min-width: 26px;
  flex-shrink: 0;
}

.paper-document .opt-text {
  flex: 1;
}

.paper-end-notice {
  text-align: center;
  font-weight: 700;
  font-size: 10.5pt;
  margin-top: 24px;
  padding: 12px;
  border-top: 2px solid #000000;
  border-bottom: 2px solid #000000;
  background-color: #ffffff !important;
  background: #ffffff !important;
}

/* ==========================================================================
   3. RESIZABLE SPLITTER BAR (DRAG TO RESIZE WITH TOUCH SUPPORT)
   ========================================================================== */
.cbt-splitter {
  height: 24px;
  background: #1e293b;
  border-top: 2px solid #334155;
  border-bottom: 2px solid #0f172a;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  cursor: row-resize;
  position: relative;
  flex-shrink: 0;
  z-index: 40;
  user-select: none;
  touch-action: none !important;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.cbt-splitter:hover, .cbt-splitter.is-dragging {
  background: #2563eb;
  border-top-color: #60a5fa;
  border-bottom-color: #1d4ed8;
}

.splitter-drag-cue {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: row-resize;
  touch-action: none;
  pointer-events: none;
  background: rgba(15, 23, 42, 0.5);
  padding: 2.5px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  transition: all 0.15s ease;
  z-index: 1;
}

.cbt-splitter:hover .splitter-drag-cue,
.cbt-splitter.is-dragging .splitter-drag-cue {
  background: rgba(30, 58, 138, 0.7);
  border-color: rgba(255, 255, 255, 0.45);
}

.splitter-handle {
  width: 32px;
  height: 4px;
  border-radius: 3px;
  background: #cbd5e1;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.4);
}

.cbt-splitter:hover .splitter-handle,
.cbt-splitter.is-dragging .splitter-handle {
  background: #ffffff;
}

.splitter-grip-text {
  font-size: 9.5px;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  user-select: none;
  white-space: nowrap;
}

.cbt-splitter:hover .splitter-grip-text,
.cbt-splitter.is-dragging .splitter-grip-text {
  color: #ffffff;
}

.splitter-quick-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 5px;
  z-index: 2;
}

.split-preset-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 9.5px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1.2;
  transition: all 0.15s;
}

.split-preset-btn:hover, .split-preset-btn:active {
  background: rgba(255, 255, 255, 0.4);
}

.split-preset-btn.active-preset {
  background: var(--cbt-gold);
  color: #0f172a;
  border-color: var(--cbt-gold);
}

/* ==========================================================================
   4. LOWER PANE: INTERACTIVE OMR SHEET
   ========================================================================== */
.omr-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  overflow: hidden;
  min-height: 120px;
}

/* OMR Header */
.omr-header {
  height: 40px;
  background: #0f172a;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  flex-shrink: 0;
  gap: 8px;
  position: relative;
}

.omr-title-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 32%;
  z-index: 1;
}

.omr-badge {
  background: var(--cbt-gold);
  color: #0f172a;
  font-size: 9.5px;
  font-weight: 800;
  padding: 1.5px 5px;
  border-radius: 3px;
  flex-shrink: 0;
}

.omr-title {
  font-size: 12px;
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Counters in OMR Header - Perfectly Centered right below drag icon */
.omr-stats {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  white-space: nowrap;
  z-index: 2;
}

.omr-jump {
  margin-left: auto;
  z-index: 1;
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10.5px;
}

.stat-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.stat-dot.green { background: #22c55e; }
.stat-dot.gray { background: #94a3b8; }
.stat-dot.purple { background: #c084fc; }

.stat-lbl {
  color: #cbd5e1;
}

.stat-pill strong {
  color: #ffffff;
  font-family: var(--cbt-font-mono);
}

/* Jump to Q Select */
.omr-jump {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  color: #cbd5e1;
  flex-shrink: 0;
}

.q-select {
  background: #1e293b;
  border: 1px solid #475569;
  color: #ffffff;
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 11px;
  font-family: var(--cbt-font-mono);
  outline: none;
  cursor: pointer;
}

/* Filter Tabs above OMR Grid */
.omr-filter-bar {
  background: #f1f5f9;
  border-bottom: 1px solid #cbd5e1;
  padding: 4px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.omr-filter-bar::-webkit-scrollbar {
  display: none;
}

.filter-tabs {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-tabs::-webkit-scrollbar {
  display: none;
}

.filter-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.12s;
  flex-shrink: 0;
}

.filter-btn:hover, .filter-btn:active {
  background: #f8fafc;
  border-color: #94a3b8;
}

.filter-btn.active {
  background: #2563eb;
  border-color: #1d4ed8;
  color: #ffffff;
}

/* OMR Scrollable Matrix */
.omr-scroll-area {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 10px;
  background: #f8fafc;
  -webkit-overflow-scrolling: touch;
}

.omr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 6px 10px;
}

/* Single OMR Question Row */
.omr-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 6px;
  padding: 5px 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: all 0.12s;
}

.omr-row:hover {
  border-color: #94a3b8;
}

.omr-row.state-answered {
  border-color: #4ade80;
  background: #f0fdf4;
}

.omr-row.state-marked {
  border-color: #d8b4fe;
  background: #faf5ff;
}

.omr-row.state-answered.state-marked {
  border-color: #c084fc;
  background: #f5f3ff;
}

.omr-q-indicator {
  display: flex;
  align-items: center;
  gap: 5px;
}

.omr-qnum-btn {
  background: #f1f5f9;
  border: 1.2px solid #cbd5e1;
  color: #0f172a;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--cbt-font-mono);
  cursor: pointer;
  min-width: 44px;
  text-align: center;
  transition: all 0.12s;
}

.omr-qnum-btn:hover, .omr-qnum-btn:active {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}

.btn-mark-review {
  background: none;
  border: none;
  color: #94a3b8;
  padding: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  transition: color 0.12s;
}

.btn-mark-review:hover, .btn-mark-review:active {
  color: var(--cbt-purple);
}

.omr-row.state-marked .btn-mark-review {
  color: #9333ea;
}

.omr-row.state-marked .btn-mark-review svg {
  fill: #9333ea;
}

/* OMR Bubbles Group */
.omr-bubbles {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Real OMR Round Bubble - Large touch target */
.omr-bubble {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.8px solid #475569;
  background: #ffffff;
  color: #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  outline: none;
  transition: transform 0.08s ease, background 0.1s ease;
  padding: 0;
  touch-action: manipulation;
}

.omr-bubble:active {
  transform: scale(0.92);
}

/* Filled OMR Bubble (Graphite / Ballpoint Pen Filled Look) */
.omr-bubble.filled {
  background: #0f172a !important;
  border-color: #0f172a !important;
  color: #ffffff !important;
  box-shadow: inset 0 0 4px rgba(255, 255, 255, 0.4), 0 0 6px rgba(15, 23, 42, 0.35);
  transform: scale(1.04);
}

.btn-clear-row {
  background: none;
  border: none;
  color: #cbd5e1;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 6px;
  line-height: 1;
  transition: color 0.12s;
}

.btn-clear-row:hover, .btn-clear-row:active {
  color: var(--cbt-crimson);
}

/* OMR Bottom Sticky Bar */
.omr-bottom-bar {
  height: 52px;
  background: #ffffff;
  border-top: 2px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  flex-shrink: 0;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.06);
  gap: 8px;
}

.bottom-progress {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 130px;
}

.progress-text {
  font-size: 11px;
  font-weight: 700;
  color: #334155;
  white-space: nowrap;
}

.progress-bar-bg {
  width: 100%;
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6 0%, #10b981 100%);
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* Quick Prev/Next Navigator in Bottom Bar */
.bottom-nav-btns {
  display: flex;
  align-items: center;
  gap: 5px;
}

.btn-q-nav {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #1e293b;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.12s;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.btn-q-nav:hover, .btn-q-nav:active {
  background: #e2e8f0;
  color: #0f172a;
}

.current-q-pill {
  font-family: var(--cbt-font-mono);
  font-size: 11.5px;
  font-weight: 700;
  color: #0f172a;
  background: #e0f2fe;
  padding: 4px 8px;
  border-radius: 4px;
}

.bottom-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-secondary {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 7px 12px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-secondary:hover, .btn-secondary:active {
  background: #e2e8f0;
  color: #0f172a;
}

/* Glowing Submit Exam Button */
.btn-submit-exam {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: 1.5px solid #047857;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(16, 185, 129, 0.35);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-submit-exam:hover, .btn-submit-exam:active {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.45);
}

/* ==========================================================================
   5. MODALS & SCORECARD (INSTRUCTIONS, CONFIRMATION, RESULT)
   ========================================================================== */
.cbt-dialog {
  border: none;
  background: transparent;
  padding: 0;
  max-width: 92vw;
  width: 620px;
  margin: auto;
}

.cbt-dialog::backdrop {
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(4px);
}

.dialog-card {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.dialog-header {
  background: #0f172a;
  color: #ffffff;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dialog-title {
  font-size: 14.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 7px;
}

.dialog-close-btn {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  font-size: 18px;
}

.dialog-close-btn:hover {
  color: #ffffff;
}

.dialog-body {
  padding: 16px;
  max-height: 72vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.dialog-footer {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  padding: 10px 16px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Confirmation Table */
.summary-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
}

.summary-table th, .summary-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  font-size: 12.5px;
}

.summary-table th {
  background: #f1f5f9;
  font-weight: 600;
  color: #334155;
}

/* ==========================================================================
   6. RESULT & SCORECARD VIEW
   ========================================================================== */
.result-dialog {
  width: 860px;
  max-width: 95vw;
}

.score-banner {
  background: linear-gradient(135deg, #091322 0%, #1e293b 100%);
  color: #ffffff;
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1.5px solid var(--cbt-gold);
  flex-wrap: wrap;
  gap: 12px;
}

.score-big {
  display: flex;
  flex-direction: column;
}

.score-num {
  font-size: 34px;
  font-weight: 800;
  color: #fef08a;
  font-family: var(--cbt-font-mono);
  line-height: 1.1;
}

.score-sub {
  font-size: 12px;
  color: #94a3b8;
}

.metrics-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.metric-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 6px;
  text-align: center;
}

.metric-val {
  font-size: 20px;
  font-weight: 700;
  font-family: var(--cbt-font-mono);
  margin-top: 3px;
}

.metric-val.green { color: #16a34a; }
.metric-val.red { color: #dc2626; }
.metric-val.gray { color: #64748b; }
.metric-val.blue { color: #2563eb; }

.metric-title {
  font-size: 10px;
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
}

/* Solution Review List */
.solution-section-title {
  font-size: 14px;
  font-weight: 700;
  margin: 16px 0 8px 0;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.solution-filters {
  display: flex;
  gap: 5px;
  overflow-x: auto;
}

.sol-filter-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.sol-filter-btn.active {
  background: #0f172a;
  color: #ffffff;
}

.solution-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.solution-card {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
}

.solution-card.is-correct {
  border-left: 4px solid #16a34a;
}

.solution-card.is-wrong {
  border-left: 4px solid #dc2626;
}

.solution-card.is-unattempted {
  border-left: 4px solid #94a3b8;
}

.sol-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.sol-qnum {
  font-weight: 700;
  font-size: 12.5px;
  color: #0f172a;
}

.sol-status-pill {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
}

.sol-status-pill.correct {
  background: #dcfce7;
  color: #15803d;
}

.sol-status-pill.wrong {
  background: #fee2e2;
  color: #b91c1c;
}

.sol-status-pill.unattempted {
  background: #f1f5f9;
  color: #64748b;
}

.sol-text {
  font-size: 12px;
  margin-bottom: 6px;
  color: #1e293b;
  line-height: 1.4;
}

.sol-ans-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 11.5px;
  background: #f8fafc;
  padding: 5px 8px;
  border-radius: 4px;
  margin-bottom: 6px;
}

.sol-explanation {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 11px;
  color: #166534;
  line-height: 1.45;
  font-family: var(--cbt-font-hindi);
}

/* ==========================================================================
   7. DEDICATED MOBILE OPTIMIZATIONS (Max Width: 768px - Smartphones & Tablets)
   ========================================================================== */
@media (max-width: 768px) {
  /* 1. Mobile Header */
  .hprca-header {
    height: 50px;
    padding: 0 8px;
    gap: 6px;
  }

  .hprca-emblem {
    width: 32px;
    height: 32px;
    font-size: 7px;
    line-height: 1.05;
  }

  .hprca-main-title {
    font-size: 11px;
  }

  .hprca-sub-title {
    display: none;
  }

  /* Compact Centered Timer on Mobile */
  .hprca-timer-box {
    padding: 3px 8px;
    gap: 5px;
  }

  .timer-caption {
    font-size: 8px;
  }

  .timer-digits {
    font-size: 15px;
  }

  .timer-icon svg {
    width: 16px;
    height: 16px;
  }

  /* Compact Action Icons on Mobile */
  .candidate-profile-chip {
    display: none;
  }

  .hdr-btn {
    padding: 5px 7px;
    font-size: 10px;
  }

  .hdr-btn span {
    display: none; /* Icon-only on mobile to prevent overflow */
  }

  /* 2. Split Main Viewport */
  .paper-pane {
    height: 52%; /* Balanced default for phone screen */
    min-height: 80px;
    background-color: #ffffff !important;
    background: #ffffff !important;
  }

  .cbt-splitter {
    height: 26px;
    padding: 0 8px;
    touch-action: none !important;
  }

  .splitter-drag-cue {
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 2px 8px;
    gap: 5px;
  }

  .splitter-handle {
    width: 24px;
    height: 3.5px;
  }

  .splitter-grip-text {
    font-size: 8.5px;
  }

  .paper-toolbar {
    height: 34px;
    padding: 0 6px;
    gap: 4px;
    background: #ffffff !important;
  }

  .paper-heading span {
    display: none; /* Keep icon & series pill */
  }

  .sec-jump-btn {
    padding: 2px 6px;
    font-size: 10px;
  }

  .toolbar-zoom {
    gap: 2px;
  }

  .zoom-btn {
    height: 23px;
    padding: 1px 5px;
    font-size: 10px;
  }

  .zoom-val {
    min-width: 36px;
    font-size: 9.5px;
  }

  /* 3. Paper Document - A4 Sheet on Mobile */
  .paper-viewport {
    padding: 8px 6px 30px 6px !important;
    background-color: #e2e8f0 !important;
    background: #e2e8f0 !important;
    display: block !important;
  }

  .paper-document {
    padding: 12px 10px 35px 10px !important;
    margin: 0 auto 20px auto !important;
    background-color: #ffffff !important;
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.12) !important;
    border-radius: 4px !important;
    display: block !important;
    height: auto !important;
    min-height: fit-content;
  }

  .paper-document .questions-layout,
  .paper-document .question-item {
    background: transparent !important;
  }

  .paper-document .tbt-header-line {
    font-size: 9.8pt;
  }

  .paper-document .tbt-header-line.tbt-sub {
    font-size: 8.8pt;
  }

  .paper-document .question-item {
    padding: 6px 4px;
    margin-bottom: 10px;
  }

  .paper-document .q-num {
    min-width: 26px;
    width: 26px;
    font-size: 9.8pt;
  }

  .paper-document .q-en {
    font-size: 9.8pt;
    line-height: 1.35;
  }

  .paper-document .q-hi {
    font-size: 10pt;
    line-height: 1.42;
    margin-top: 2px;
  }

  .paper-document .q-options-grid {
    padding-left: 10px; /* Squeeze indent on mobile so choices have full width */
    margin-top: 4px;
    font-size: 9.6pt;
  }

  .paper-document .opt-choice {
    padding: 6px 6px;
    margin-bottom: 4px;
    min-height: 36px; /* Touch target */
    border-radius: 4px;
    background: #fafafa;
    border: 1px solid #f1f5f9;
  }

  /* 4. Splitter Bar on Mobile (Touch Handle & Mode Presets) */
  .cbt-splitter {
    height: 24px; /* Generous touch target for fingers */
  }

  .splitter-handle {
    width: 44px;
    height: 4px;
  }

  .split-preset-btn {
    padding: 2px 6px;
    font-size: 9px;
  }

  /* 5. Lower Pane (OMR Sheet) */
  .omr-header {
    height: 36px;
    padding: 0 8px;
    position: relative;
  }

  .omr-title-wrap {
    z-index: 1;
  }

  .omr-title {
    display: none; /* Hide on mobile so stats fit comfortably in center */
  }

  .omr-stats {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    gap: 4px;
    z-index: 2;
    white-space: nowrap;
  }

  .stat-pill {
    padding: 2px 5px;
    font-size: 9px;
  }

  .omr-jump {
    margin-left: auto;
    z-index: 1;
    font-size: 9px;
    gap: 2px;
  }

  .omr-jump label {
    display: none;
  }

  .q-select {
    padding: 1px 3px;
    font-size: 9.5px;
  }

  .omr-filter-bar {
    padding: 3px 6px;
  }

  .filter-btn {
    padding: 2px 6px;
    font-size: 9.5px;
  }

  .omr-scroll-area {
    padding: 6px 6px;
  }

  .omr-grid {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  /* Single OMR Row Mobile Touch Optimization */
  .omr-row {
    padding: 6px 8px;
    min-height: 44px; /* Standard mobile touch size */
  }

  .omr-qnum-btn {
    padding: 4px 6px;
    font-size: 11px;
    min-width: 42px;
  }

  .omr-bubbles {
    gap: 8px; /* Room for thumb clicks */
  }

  .omr-bubble {
    width: 31px;
    height: 31px;
    font-size: 11.5px;
  }

  .btn-mark-review {
    padding: 5px;
  }

  .btn-mark-review svg {
    width: 15px;
    height: 15px;
  }

  .btn-clear-row {
    font-size: 18px;
    padding: 4px 8px;
  }

  /* 6. Sticky Bottom Action Bar */
  .omr-bottom-bar {
    height: 50px;
    padding: 0 8px;
    gap: 6px;
    padding-bottom: max(0px, env(safe-area-inset-bottom));
  }

  .bottom-progress {
    min-width: 85px;
    gap: 1px;
  }

  .progress-text {
    font-size: 9.5px;
  }

  .progress-bar-bg {
    height: 4px;
  }

  .btn-q-nav {
    padding: 5px 8px;
    font-size: 10.5px;
  }

  .current-q-pill {
    padding: 3px 6px;
    font-size: 10.5px;
  }

  .bottom-actions #btnBottomInstructions {
    display: none; /* Access instructions from top bar */
  }

  .btn-submit-exam {
    padding: 7px 12px;
    font-size: 11.5px;
  }

  /* 7. Dialogs Mobile Tuning */
  .cbt-dialog {
    width: 96vw;
    max-width: 96vw;
  }

  .dialog-body {
    padding: 12px;
    max-height: 78vh;
  }

  .score-banner {
    padding: 12px;
  }

  .score-num {
    font-size: 26px;
  }

  .metrics-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  .metric-card {
    padding: 8px 4px;
  }

  .metric-val {
    font-size: 17px;
  }
}

/* ==========================================================================
   8. FULLSCREEN LAUNCHPAD & WARNING STYLES
   ========================================================================== */
.cbt-fullscreen-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: radial-gradient(circle at center, #0f1f38 0%, #060b14 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cbt-fullscreen-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.launchpad-card {
  width: 100%;
  max-width: 480px;
  background: #ffffff;
  border-radius: 16px;
  padding: 26px 20px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.65), 0 0 0 1.5px rgba(245, 158, 11, 0.5);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.launchpad-emblem {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: radial-gradient(circle, #fef3c7 0%, #d97706 100%);
  border: 2px solid #fef3c7;
  color: #78350f;
  font-weight: 800;
  font-size: 11px;
  line-height: 1.1;
  text-align: center;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.35);
}

.launchpad-title {
  font-size: 14.5px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: 0.3px;
  margin-bottom: 2px;
}

.launchpad-subtitle {
  font-size: 11.5px;
  color: #64748b;
  margin-bottom: 16px;
}

.launchpad-exam-box {
  width: 100%;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.exam-box-tag {
  display: inline-block;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  margin-bottom: 5px;
}

.exam-box-name {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 6px;
}

.exam-box-meta {
  font-size: 11px;
  color: #475569;
  font-weight: 600;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.launchpad-notice {
  background: #fefce8;
  border: 1px solid #fef08a;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 18px;
  text-align: left;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.notice-icon {
  font-size: 18px;
  line-height: 1;
}

.launchpad-notice p {
  font-size: 11.5px;
  color: #854d0e;
  line-height: 1.42;
  margin: 0;
}

.btn-start-fullscreen {
  width: 100%;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: 2px solid #047857;
  padding: 13px 18px;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
  transition: all 0.2s ease;
  animation: pulse-start-btn 2s infinite ease-in-out;
}

@keyframes pulse-start-btn {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

.btn-start-fullscreen:hover, .btn-start-fullscreen:active {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.55);
}

/* Floating Warning Banner when Fullscreen is Exited */
.fullscreen-warning-banner {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9998;
  background: #dc2626;
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 11.5px;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(220, 38, 38, 0.45);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.fullscreen-warning-banner button {
  background: #ffffff;
  color: #dc2626;
  border: none;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 10.5px;
  font-weight: 800;
  cursor: pointer;
}

