/* ================================================
   GATE Mock Test Pro — Frontend Exam Styles
   GATE 2025 Official Interface Inspired
   ================================================ */

.gmt-exam-root *, .gmt-exam-root *::before, .gmt-exam-root *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Arial, sans-serif;
}

.gmt-exam-root {
  position: relative;
  background: #f4f4f4;
  min-height: 600px;
  font-size: 14px;
  line-height: 1.5;
  color: #1a1a1a;
}

/* ── INSTRUCTION SCREEN ───────────────────────── */
.gmt-instr-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 24px 16px;
}

.gmt-instr-header {
  background: #1d4ed8;
  color: #fff;
  border-radius: 8px 8px 0 0;
  padding: 24px 28px;
  text-align: center;
}

.gmt-logo-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 10px;
}

.gmt-logo-text {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: 4px;
  color: #fff;
}

.gmt-logo-sub {
  font-size: 14px;
  background: rgba(255,255,255,.15);
  padding: 3px 12px;
  border-radius: 4px;
  letter-spacing: 2px;
}

.gmt-exam-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 10px;
}

.gmt-exam-meta {
  display: flex;
  justify-content: center;
  gap: 24px;
  font-size: 14px;
  opacity: .85;
  flex-wrap: wrap;
}

.gmt-instr-body {
  background: #fff;
  border: 1px solid #ddd;
  padding: 20px 24px;
  border-bottom: none;
}

.gmt-instr-legend {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 14px 18px;
  margin-bottom: 18px;
}

.gmt-legend-title {
  font-weight: 700;
  margin-bottom: 10px;
  font-size: 13px;
}

.gmt-legend-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.gmt-leg-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

/* Palette dots */
.gmt-pal-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 2px solid transparent;
}
.gmt-pal-dot.not-visited   { background: #d1d5db; border-color: #9ca3af; }
.gmt-pal-dot.not-answered  { background: #fca5a5; border-color: #ef4444; }
.gmt-pal-dot.answered      { background: #4ade80; border-color: #16a34a; }
.gmt-pal-dot.marked        { background: #a78bfa; border-color: #7c3aed; }
.gmt-pal-dot.answered-marked { background: #60a5fa; border-color: #2563eb; position: relative; }

.gmt-instr-text {
  font-size: 13px;
  line-height: 1.9;
  color: #334155;
  margin-bottom: 16px;
  white-space: pre-line;
}

.gmt-marking-scheme {
  margin-bottom: 16px;
}

.gmt-ms-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  font-size: 13px;
}

.gmt-ms-table th {
  background: #1d4ed8;
  color: #fff;
  padding: 8px 12px;
  text-align: center;
  font-weight: 600;
}

.gmt-ms-table td {
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  text-align: center;
}

.gmt-ms-table td.pos { color: #166534; font-weight: 700; }
.gmt-ms-table td.neg { color: #991b1b; font-weight: 700; }
.gmt-ms-table td.zero { color: #64748b; }

.gmt-student-form {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 0 0 8px 8px;
  padding: 20px 24px;
}

.gmt-sform-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.gmt-sfield label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: .7px;
  margin-bottom: 5px;
}

.gmt-sfield input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  transition: border-color .2s;
}

.gmt-sfield input:focus { border-color: #1d4ed8; box-shadow: 0 0 0 3px rgba(29,78,216,.1); }

.gmt-start-error {
  background: #fee2e2;
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 12px;
}

.gmt-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #475569;
  cursor: pointer;
  margin-bottom: 16px;
}

.gmt-btn-start {
  background: #1d4ed8;
  color: #fff;
  border: none;
  padding: 13px 48px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
  letter-spacing: .5px;
  display: block;
  margin: 0 auto;
}

.gmt-btn-start:hover { background: #1e40af; transform: translateY(-1px); }
.gmt-btn-start:disabled { opacity: .5; cursor: not-allowed; }

/* ── TOP BAR ─────────────────────────────────── */
.gmt-topbar {
  background: #1d4ed8;
  color: #fff;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
}

.gmt-topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gmt-topbar-logo {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 3px;
  border: 2px solid rgba(255,255,255,.4);
  padding: 2px 10px;
  border-radius: 4px;
}

.gmt-topbar-title {
  font-size: 13px;
  opacity: .85;
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gmt-topbar-center { display: flex; align-items: center; }

.gmt-timer-box {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 6px;
  padding: 4px 14px;
  text-align: center;
}

.gmt-timer-label {
  display: block;
  font-size: 9px;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: .7;
}

.gmt-timer {
  font-size: 22px;
  font-weight: 700;
  font-family: 'Courier New', monospace;
  letter-spacing: 2px;
}

.gmt-timer.warn  { color: #fde68a; }
.gmt-timer.danger { color: #fca5a5; animation: gmt-blink 1s infinite; }

@keyframes gmt-blink { 0%,100%{opacity:1} 50%{opacity:.4} }

.gmt-topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gmt-student-badge {
  font-size: 12px;
  background: rgba(255,255,255,.15);
  padding: 4px 12px;
  border-radius: 20px;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gmt-calc-toggle {
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.3);
  color: #fff;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  transition: background .2s;
}

.gmt-calc-toggle:hover { background: rgba(255,255,255,.25); }
.gmt-calc-toggle.active { background: #fff; color: #1d4ed8; }

/* ── SECTION BAR ─────────────────────────────── */
.gmt-section-bar {
  background: #1e40af;
  border-bottom: 2px solid #1d4ed8;
  overflow-x: auto;
}

.gmt-section-tabs {
  display: flex;
  min-width: max-content;
}

.gmt-sec-tab {
  padding: 10px 24px;
  color: rgba(255,255,255,.65);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all .2s;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
  border: none;
  background: none;
}

.gmt-sec-tab:hover { color: #fff; }
.gmt-sec-tab.active { color: #fff; border-bottom-color: #fbbf24; background: rgba(0,0,0,.1); }

/* ── EXAM LAYOUT ─────────────────────────────── */
.gmt-exam-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  min-height: calc(100vh - 52px);
}

.gmt-q-area {
  padding: 16px 20px;
  overflow-y: auto;
  background: #f9fafb;
}

.gmt-q-toprow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.gmt-q-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.gmt-q-num-badge {
  background: #1d4ed8;
  color: #fff;
  padding: 4px 14px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
}

.gmt-q-type-badge {
  background: #e0e7ff;
  color: #3730a3;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.gmt-q-marks {
  font-size: 12px;
  color: #475569;
  background: #f1f5f9;
  padding: 3px 10px;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
}

.gmt-q-body {
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 20px;
  min-height: 320px;
}

.gmt-q-text {
  font-size: 15px;
  line-height: 1.8;
  color: #1e293b;
  margin-bottom: 20px;
  font-family: 'Segoe UI', Arial, sans-serif;
}

.gmt-q-text img { max-width: 100%; border-radius: 4px; margin: 8px 0; }

/* Options */
.gmt-options { display: flex; flex-direction: column; gap: 10px; }

.gmt-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 6px;
  cursor: pointer;
  transition: all .15s;
  background: #fafafa;
}

.gmt-option:hover { border-color: #93c5fd; background: #eff6ff; }

.gmt-option.selected {
  border-color: #1d4ed8;
  background: #eff6ff;
}

.gmt-option-key {
  font-weight: 800;
  color: #64748b;
  font-size: 14px;
  min-width: 22px;
  flex-shrink: 0;
  padding-top: 1px;
}

.gmt-option.selected .gmt-option-key { color: #1d4ed8; }
.gmt-option-text { font-size: 14px; color: #334155; line-height: 1.6; }
.gmt-option-text img { max-width: 100%; }

/* NAT input */
.gmt-nat-wrap {
  padding: 16px 0;
}

.gmt-nat-label {
  font-size: 13px;
  color: #475569;
  margin-bottom: 10px;
}

.gmt-nat-input {
  padding: 10px 14px;
  border: 2px solid #d1d5db;
  border-radius: 6px;
  font-size: 18px;
  font-family: 'Courier New', monospace;
  width: 200px;
  outline: none;
  transition: border-color .2s;
}

.gmt-nat-input:focus { border-color: #1d4ed8; }
.gmt-nat-hint { font-size: 12px; color: #94a3b8; margin-top: 8px; }

/* Nav buttons */
.gmt-q-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  gap: 12px;
  flex-wrap: wrap;
}

.gmt-nav-mid { display: flex; gap: 8px; }

.gmt-nav-btn {
  padding: 9px 20px;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all .2s;
}

.gmt-btn-prev { background: #e2e8f0; color: #334155; }
.gmt-btn-prev:hover { background: #cbd5e1; }
.gmt-btn-prev:disabled { opacity: .4; cursor: default; }
.gmt-btn-mark { background: #a78bfa; color: #fff; }
.gmt-btn-mark:hover { background: #7c3aed; }
.gmt-btn-mark.active { background: #7c3aed; }
.gmt-btn-clear { background: #fde68a; color: #92400e; }
.gmt-btn-clear:hover { background: #fbbf24; }
.gmt-btn-next { background: #1d4ed8; color: #fff; }
.gmt-btn-next:hover { background: #1e40af; }

/* ── SIDEBAR ─────────────────────────────────── */
.gmt-sidebar {
  background: #fff;
  border-left: 1px solid #d1d5db;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.gmt-sidebar-student {
  background: #1d4ed8;
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.gmt-sb-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
}

.gmt-sb-name { font-weight: 600; font-size: 13px; }
.gmt-sb-role { font-size: 11px; opacity: .7; }

.gmt-palette-header {
  background: #e0e7ff;
  color: #1e3a8a;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.gmt-palette-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 11px;
}

.gmt-pl-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.gmt-pl-item .gmt-pal-dot {
  width: 22px;
  height: 22px;
}

.gmt-palette {
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  align-content: start;
}

.gmt-pal-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #9ca3af;
  background: #d1d5db;
  color: #374151;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gmt-pal-btn:hover { transform: scale(1.1); }
.gmt-pal-btn.visited       { background: #fca5a5; border-color: #ef4444; color: #7f1d1d; }
.gmt-pal-btn.answered      { background: #4ade80; border-color: #16a34a; color: #14532d; }
.gmt-pal-btn.marked        { background: #a78bfa; border-color: #7c3aed; color: #fff; }
.gmt-pal-btn.ans-marked    { background: #60a5fa; border-color: #2563eb; color: #fff; }
.gmt-pal-btn.current       { box-shadow: 0 0 0 3px #fbbf24; }

.gmt-submit-btn {
  background: #dc2626;
  color: #fff;
  border: none;
  padding: 14px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
  letter-spacing: .5px;
  flex-shrink: 0;
}

.gmt-submit-btn:hover { background: #b91c1c; }

/* ── VIRTUAL CALCULATOR ──────────────────────── */
.gmt-calc-overlay {
  position: fixed;
  z-index: 999;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  pointer-events: none;
}

.gmt-calculator {
  position: absolute;
  right: 300px;
  top: 80px;
  width: 320px;
  background: #1e293b;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
  overflow: hidden;
  pointer-events: all;
  user-select: none;
}

.gmt-calc-header {
  background: #0f172a;
  color: #fff;
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  cursor: move;
}

.gmt-calc-close {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 14px;
  padding: 2px 6px;
  border-radius: 4px;
}
.gmt-calc-close:hover { background: rgba(255,255,255,.1); color: #fff; }

.gmt-calc-display {
  background: #0f172a;
  padding: 12px 16px;
  border-bottom: 1px solid #334155;
  text-align: right;
  min-height: 72px;
}

.gmt-calc-expr {
  font-size: 11px;
  color: #64748b;
  min-height: 16px;
  font-family: 'Courier New', monospace;
  word-break: break-all;
}

.gmt-calc-val {
  font-size: 28px;
  color: #e2e8f0;
  font-family: 'Courier New', monospace;
  font-weight: 300;
  word-break: break-all;
  min-height: 36px;
}

.gmt-calc-btns {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: #334155;
  padding: 1px;
}

.cb {
  background: #1e293b;
  color: #e2e8f0;
  border: none;
  padding: 12px 4px;
  font-size: 13px;
  cursor: pointer;
  transition: background .1s;
  font-family: 'Segoe UI', Arial, sans-serif;
}

.cb:hover { background: #334155; }
.cb:active { background: #475569; }
.cb-fn { color: #93c5fd; font-size: 11px; }
.cb-op { color: #fbbf24; font-weight: 700; }
.cb-clear { color: #f87171; font-weight: 700; }
.cb-eq  { background: #1d4ed8; color: #fff; font-weight: 700; font-size: 18px; }
.cb-eq:hover { background: #2563eb; }
.cb-zero { grid-column: span 2; }

/* ── RESULT SCREEN ───────────────────────────── */
.gmt-result-wrap {
  max-width: 800px;
  margin: 0 auto;
  padding: 28px 16px;
}

.gmt-result-header {
  text-align: center;
  margin-bottom: 20px;
}

.gmt-result-title {
  font-size: 26px;
  font-weight: 800;
  color: #1e293b;
}

.gmt-result-subtitle {
  font-size: 14px;
  color: #64748b;
  margin-top: 4px;
}

.gmt-score-ring-wrap {
  position: relative;
  width: 180px;
  height: 180px;
  margin: 0 auto 24px;
}

.gmt-score-svg { width: 100%; height: 100%; }

.gmt-score-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.gmt-score-big {
  font-size: 34px;
  font-weight: 800;
  color: #1d4ed8;
  line-height: 1;
}

.gmt-score-out { font-size: 14px; color: #94a3b8; }

.gmt-result-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.gmt-rstat {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 14px;
  text-align: center;
}

.gmt-rstat-n {
  font-size: 24px;
  font-weight: 800;
  display: block;
  margin-bottom: 4px;
}

.gmt-rstat-l { font-size: 11px; color: #64748b; text-transform: uppercase; letter-spacing: .7px; }

.gmt-result-acts { display: flex; gap: 12px; justify-content: center; margin-bottom: 24px; flex-wrap: wrap; }

.gmt-res-btn {
  padding: 11px 28px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .2s;
}

.gmt-res-primary { background: #1d4ed8; color: #fff; }
.gmt-res-primary:hover { background: #1e40af; }
.gmt-res-outline { background: transparent; border: 2px solid #1d4ed8; color: #1d4ed8; }
.gmt-res-outline:hover { background: #eff6ff; }

/* Review */
.gmt-review-header {
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
  padding-bottom: 12px;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 14px;
}

.gmt-review-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.gmt-rf-btn {
  padding: 6px 16px;
  border: 1px solid #d1d5db;
  border-radius: 20px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all .15s;
}

.gmt-rf-btn.active,
.gmt-rf-btn:hover { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }

.gmt-review-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 12px;
  border-left: 4px solid #94a3b8;
}

.gmt-review-card.correct { border-left-color: #22c55e; }
.gmt-review-card.wrong   { border-left-color: #ef4444; }
.gmt-review-card.skipped { border-left-color: #94a3b8; }

.gmt-rc-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 8px;
}

.gmt-rc-qnum { font-size: 12px; color: #64748b; font-weight: 700; }
.gmt-rc-status { font-size: 12px; font-weight: 700; }
.gmt-rc-status.correct { color: #166534; }
.gmt-rc-status.wrong   { color: #991b1b; }
.gmt-rc-status.skipped { color: #64748b; }

.gmt-rc-text { font-size: 14px; line-height: 1.7; color: #334155; margin-bottom: 10px; }
.gmt-rc-text img { max-width: 100%; }

.gmt-rc-ans {
  font-size: 13px;
  padding: 7px 12px;
  border-radius: 5px;
  margin-bottom: 5px;
}

.gmt-rc-ans.your    { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.gmt-rc-ans.correct { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.gmt-rc-exp { background: #eff6ff; border-left: 3px solid #1d4ed8; padding: 10px 14px; border-radius: 0 5px 5px 0; font-size: 12px; color: #1e40af; line-height: 1.7; margin-top: 8px; }

/* ── MODAL ───────────────────────────────────── */
.gmt-modal-ov {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(3px);
}

.gmt-modal {
  background: #fff;
  border-radius: 12px;
  padding: 28px 32px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: 0 24px 80px rgba(0,0,0,.3);
}

.gmt-modal-icon { font-size: 40px; margin-bottom: 12px; }
.gmt-modal h3 { font-size: 18px; font-weight: 800; margin-bottom: 8px; color: #1e293b; }
.gmt-modal p { font-size: 13px; color: #64748b; margin-bottom: 20px; line-height: 1.6; }
.gmt-modal-btns { display: flex; gap: 12px; justify-content: center; }
.gmt-modal-cancel { padding: 10px 24px; border-radius: 6px; border: 2px solid #d1d5db; background: transparent; color: #64748b; cursor: pointer; font-size: 14px; font-weight: 600; transition: all .2s; }
.gmt-modal-cancel:hover { border-color: #94a3b8; color: #334155; }
.gmt-modal-confirm { padding: 10px 24px; border-radius: 6px; border: none; background: #dc2626; color: #fff; cursor: pointer; font-size: 14px; font-weight: 700; transition: background .2s; }
.gmt-modal-confirm:hover { background: #b91c1c; }

/* ── LOADING ─────────────────────────────────── */
.gmt-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  gap: 16px;
  color: #64748b;
}

.gmt-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e2e8f0;
  border-top-color: #1d4ed8;
  border-radius: 50%;
  animation: gmt-spin .8s linear infinite;
}

@keyframes gmt-spin { to { transform: rotate(360deg); } }

/* ── RESPONSIVE ──────────────────────────────── */
@media(max-width: 768px) {
  .gmt-exam-layout { grid-template-columns: 1fr; }
  .gmt-sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    flex-direction: row;
    flex-wrap: wrap;
    max-height: 220px;
    z-index: 90;
    box-shadow: 0 -4px 20px rgba(0,0,0,.15);
  }
  .gmt-sidebar-student { display: none; }
  .gmt-palette-legend { grid-template-columns: repeat(5,1fr); padding: 4px 8px; }
  .gmt-palette { padding: 6px 8px; max-height: 120px; }
  .gmt-submit-btn { width: 100%; }
  .gmt-q-area { padding-bottom: 240px; }
  .gmt-sform-row { grid-template-columns: 1fr; }
  .gmt-calculator { right: 8px; top: 60px; width: 280px; }
  .gmt-cb-zero { grid-column: span 1; }
  .gmt-topbar-title { display: none; }
}
