/* ============================================================
   TCA Exam – Frontend Styles (Start + Taking + Shared)
   ============================================================ */

/* ── START SCREEN ─────────────────────────────────────────── */
.twt-sw {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: linear-gradient(150deg, #e0f2fe 0%, #f0f9ff 45%, #eff6ff 100%);
  padding: 28px 16px 36px;
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

/* Card shell */
.twt-sc {
  width: 100%;
  max-width: 960px;
  display: grid;
  grid-template-columns: 1fr 340px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 12px 48px rgba(14,92,148,.14), 0 2px 8px rgba(14,92,148,.06);
  border: 1px solid rgba(255,255,255,.95);
}

/* Left info panel */
.twt-lp {
  background: linear-gradient(148deg, #dbeafe 0%, #e0f2fe 55%, #eff6ff 100%);
  padding: 28px 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.twt-lp-header { display: flex; flex-direction: column; gap: 8px; }

.twt-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(99,102,241,.1);
  border: 1px solid rgba(99,102,241,.25);
  color: #4338ca;
  font-size: .72rem;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 99px;
  letter-spacing: .06em;
  text-transform: uppercase;
  width: fit-content;
}

.twt-bdot {
  width: 7px; height: 7px;
  background: #6366f1;
  border-radius: 50%;
  /* animation removed — prevents flash on page load */
}

.twt-etitle {
  font-size: 1.4rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.25;
  letter-spacing: -.025em;
  margin: 0;
}

.twt-edesc { font-size: .85rem; color: #475569; margin: 0; line-height: 1.5; }

/* Stats grid */
.twt-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.twt-stat {
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(255,255,255,.95);
  border-radius: 13px;
  padding: 11px 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  backdrop-filter: blur(10px);
  transition: all .18s;
}

.twt-stat:hover { background: rgba(255,255,255,.96); transform: translateY(-1px); }

.twt-sico {
  width: 34px; height: 34px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.twt-sico svg { width: 16px; height: 16px; }
.twt-sico--blue  { background: rgba(99,102,241,.14); color: #4f46e5; }
.twt-sico--cyan  { background: rgba(6,182,212,.14);  color: #0891b2; }
.twt-sico--green { background: rgba(16,185,129,.14); color: #059669; }
.twt-sico--red   { background: rgba(239,68,68,.14);  color: #dc2626; }

.twt-sval { font-size: 1rem; font-weight: 800; color: #0f172a; line-height: 1; display: block; }
.twt-slbl { font-size: .65rem; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: .05em; display: block; margin-top: 2px; }

/* Instructions */
.twt-instr {
  background: rgba(255,255,255,.65);
  border: 1px solid rgba(255,255,255,.88);
  border-radius: 12px;
  padding: 14px 15px;
}

.twt-instr-hd {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: .72rem;
  font-weight: 700;
  color: #334155;
  text-transform: uppercase;
  letter-spacing: .07em;
  margin: 0 0 9px;
}

.twt-instr-hd svg { width: 13px; height: 13px; color: #4f46e5; }

.twt-instr-list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 6px;
}

.twt-instr-list li {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: .8rem;
  color: #475569;
  line-height: 1.5;
}

.twt-instr-list li::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #6366f1;
  flex-shrink: 0;
  margin-top: 7px;
}

/* Right form panel */
.twt-rp {
  background: #fff;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-left: 1px solid rgba(226,232,240,.6);
}

.twt-rp-hd  { font-size: 1.05rem; font-weight: 800; color: #0f172a; margin: 0 0 4px; }
.twt-rp-sub { font-size: .8rem; color: #94a3b8; margin: 0 0 20px; }

/* User card */
.twt-ucard {
  display: flex;
  align-items: center;
  gap: 11px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 11px;
  padding: 11px 13px;
  margin-bottom: 16px;
}

.twt-uav {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #2563eb);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; font-weight: 800; color: #fff;
  flex-shrink: 0; overflow: hidden;
}

.twt-uav img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

.twt-uinfo { min-width: 0; }
.twt-uname { font-size: .88rem; font-weight: 700; color: #0f172a; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.twt-uemail { font-size: .74rem; color: #64748b; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.twt-ubadge { margin-left: auto; background: #f0fdf4; border: 1px solid #bbf7d0; color: #15803d; font-size: .65rem; font-weight: 700; padding: 3px 8px; border-radius: 99px; white-space: nowrap; flex-shrink: 0; }

/* Form */
.twt-field { margin-bottom: 11px; }

.twt-lbl {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: .72rem;
  font-weight: 700;
  color: #475569;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.twt-lbl svg { width: 12px; height: 12px; color: #94a3b8; }

.twt-inp {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  font-size: .9rem;
  font-family: inherit;
  border: 1.5px solid #e2e8f0;
  border-radius: 9px;
  background: #f8fafc;
  color: #0f172a;
  transition: border-color .18s, box-shadow .18s;
  outline: none;
}

.twt-inp:focus { border-color: #4f46e5; background: #fff; box-shadow: 0 0 0 3px rgba(79,70,229,.1); }

.twt-sbtn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #4f46e5, #2563eb);
  color: #fff;
  font-family: inherit;
  font-size: .95rem;
  font-weight: 700;
  padding: 14px 16px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all .2s;
  box-shadow: 0 4px 18px rgba(79,70,229,.28);
  margin-top: 4px;
}

.twt-sbtn:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(79,70,229,.4); }
.twt-sbtn .arrow { width: 18px; height: 18px; transition: transform .2s; }
.twt-sbtn:hover .arrow { transform: translateX(3px); }

/* Info checklist */
.twt-checks {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 14px;
  padding: 12px 14px;
  background: #f0f9ff;
  border-radius: 10px;
  border: 1px solid #bae6fd;
}

.twt-chk {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .74rem;
  color: #475569;
}

.twt-chk-ico {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #e0f2fe;
  border: 1px solid #93c5fd;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.twt-chk-ico svg { width: 9px; height: 9px; stroke: #2563eb; stroke-width: 3; fill: none; }

/* ── Responsive Start ─────────────────────────────────────── */
@media (max-width: 720px) {
  .twt-sw { padding: 0; gap: 0; }
  .twt-sc { grid-template-columns: 1fr; border-radius: 0; box-shadow: none; }
  .twt-lp { order: 1; padding: 16px; }
  .twt-rp { order: 2; padding: 16px; border-left: none; border-top: 1px solid #e2e8f0; }
}

/* ── TAKING INTERFACE ─────────────────────────────────────── */
.twt-ew {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: #f4f6f9;
  min-height: 100vh;
}

/* Top bar */
.twt-bar {
  position: sticky; top: 0; z-index: 300;
  background: #fff;
  border-bottom: 1.5px solid #e2e8f0;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  display: flex; align-items: center; gap: 10px;
  padding: 0 16px; height: 52px;
}

.twt-bar-icon {
  width: 32px; height: 32px; flex-shrink: 0;
  background: linear-gradient(135deg, #4f46e5, #2563eb);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
}

.twt-bar-icon svg { width: 16px; height: 16px; stroke: #fff; fill: none; stroke-width: 2.2; }

.twt-bar-title { flex: 1; min-width: 0; font-size: .85rem; font-weight: 700; color: #0f172a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.twt-bar-qnum {
  font-size: .72rem; font-weight: 700; color: #2563eb;
  background: #eff6ff; border: 1.5px solid #bfdbfe;
  border-radius: 99px; padding: 3px 10px; white-space: nowrap; flex-shrink: 0;
}

/* Timer */
.twt-timer {
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: none; border-radius: 10px;
  padding: 5px 11px 5px 8px;
  font-size: .82rem; font-weight: 800; color: #fff;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(15,23,42,.28);
}

.twt-timer-ico {
  width: 22px; height: 22px; flex-shrink: 0;
  background: rgba(255,255,255,.12);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
}

.twt-timer-ico svg { width: 13px; height: 13px; stroke: #60a5fa; fill: none; stroke-width: 2.2; }
.twt-timer-lbl { font-size: .52rem; font-weight: 700; color: #94a3b8; letter-spacing: .08em; text-transform: uppercase; display: block; line-height: 1; margin-bottom: 1px; }
.twt-timer-val { font-size: .85rem; font-weight: 900; color: #fff; display: block; line-height: 1; font-variant-numeric: tabular-nums; }

.twt-timer.warn {
  background: linear-gradient(135deg, #991b1b, #dc2626);
  box-shadow: 0 3px 14px rgba(220,38,38,.45);
  animation: tcaTimerPulse .55s ease-in-out infinite alternate;
}

@keyframes tcaTimerPulse {
  from { transform: scale(1); }
  to   { transform: scale(1.04); }
}

/* Progress */
.twt-prog-track { height: 4px; background: #e2e8f0; }
.twt-prog-bar   { height: 4px; background: linear-gradient(90deg, #4f46e5, #7c3aed); transition: width .4s ease; min-width: 0; }

/* Body layout */
.twt-body {
  max-width: 1020px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 250px;
  gap: 14px; padding: 14px 14px 28px;
  align-items: start;
}

.twt-sidebar { grid-column: 2; grid-row: 1; }
.twt-qarea   { grid-column: 1; grid-row: 1; }

/* Question card */
.twt-q-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 22px 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
  display: none;
}

.twt-q-card.active { display: block; }

.twt-q-num { font-size: .72rem; font-weight: 700; color: #4f46e5; text-transform: uppercase; letter-spacing: .07em; margin-bottom: 10px; }

.twt-q-text {
  font-size: 1rem; font-weight: 600; color: #0f172a;
  margin: 0 0 20px; line-height: 1.6;
}

/* Options */
.twt-options-grid { display: flex; flex-direction: column; gap: 2px; }

.twt-opt-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 4px 5px;
  cursor: pointer;
  transition: border-color .14s, background .14s;
  background: #fafafa;
}

.twt-opt-label:hover { border-color: #c7d2fe; background: #f0f4ff; }
.twt-opt-label.selected { border-color: #4f46e5; background: #eff6ff; }

.twt-opt-radio { display: none; }

.twt-opt-key {
  width: 26px; height: 26px; flex-shrink: 0;
  border: 1.5px solid #d1d5db;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .78rem; font-weight: 800;
  color: #475569;
  background: #fff;
  transition: background .14s, color .14s, border-color .14s;
  margin-top: 1px;
}

.twt-opt-label.selected .twt-opt-key { background: #4f46e5; border-color: #4f46e5; color: #fff; }

.twt-opt-text { font-size: .9rem; color: #1e293b; line-height: 1.5; }

/* Navigation bar */
.twt-nav-bar {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  justify-content: space-between;
}

.twt-nav-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 18px;
  border-radius: 9px;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  font-size: .85rem;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  transition: all .14s;
  font-family: inherit;
}

.twt-nav-btn svg { width: 16px; height: 16px; }
.twt-nav-btn:hover:not(:disabled) { border-color: #4f46e5; color: #4f46e5; background: #f0f4ff; }
.twt-nav-btn:disabled { opacity: .4; cursor: not-allowed; }

.twt-nav-btn--next {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #fff;
}
.twt-nav-btn--next:hover:not(:disabled) { background: #3730a3; border-color: #3730a3; color: #fff; }

.twt-nav-btn--skip { color: #94a3b8; font-size: .82rem; }

/* Submit card */
.twt-submit-card {
  text-align: center;
  padding: 32px 20px !important;
}

.twt-submit-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, #2563eb);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 8px 24px rgba(79,70,229,.3);
}

.twt-submit-icon svg { width: 30px; height: 30px; stroke: #fff; stroke-width: 2; fill: none; }
.twt-submit-title { font-size: 1.3rem; font-weight: 800; color: #0f172a; margin: 0 0 16px; }

.twt-sum-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }

.twt-sum-block {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 8px;
  text-align: center;
}

.twt-sum-block--green { background: #f0fdf4; border-color: #bbf7d0; }
.twt-sum-block--amber { background: #fffbeb; border-color: #fde68a; }

.twt-sum-block span { display: block; font-size: 1.5rem; font-weight: 900; color: #0f172a; }
.twt-sum-block label { font-size: .72rem; color: #64748b; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }

.twt-submit-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, #4f46e5, #2563eb);
  color: #fff;
  font-family: inherit;
  font-size: 1rem; font-weight: 700;
  padding: 14px 32px;
  border-radius: 12px;
  border: none; cursor: pointer;
  transition: all .2s;
  box-shadow: 0 4px 18px rgba(79,70,229,.28);
}

.twt-submit-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(79,70,229,.4); }
.twt-submit-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.twt-submit-btn svg { width: 18px; height: 18px; }

/* Sidebar */
.twt-palette-wrap {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
  margin-bottom: 10px;
}

.twt-palette-hd { font-size: .72rem; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: .07em; margin-bottom: 10px; }

.twt-palette {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
  margin-bottom: 10px;
}

.twt-palette-btn {
  aspect-ratio: 1;
  border: 1.5px solid #e2e8f0;
  border-radius: 7px;
  background: #f8fafc;
  font-size: .78rem;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  transition: all .14s;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
}

.twt-palette-btn.current  { background: #4f46e5; border-color: #4f46e5; color: #fff; }
.twt-palette-btn.answered { background: #dcfce7; border-color: #86efac; color: #15803d; }
.twt-palette-btn.skipped  { background: #fef9c3; border-color: #fde047; color: #92400e; }

.twt-palette-legend {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.twt-leg { display: flex; align-items: center; gap: 4px; font-size: .68rem; color: #64748b; }
.twt-leg-dot { width: 9px; height: 9px; border-radius: 50%; }
.twt-leg-answered { background: #86efac; }
.twt-leg-current  { background: #4f46e5; }
.twt-leg-skipped  { background: #fde047; }

.twt-sidebar-summary {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
  margin-bottom: 10px;
}

.twt-sum-item span  { display: block; font-size: 1.3rem; font-weight: 900; color: #0f172a; }
.twt-sum-item label { font-size: .65rem; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: .05em; }

.twt-review-btn {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  font-family: inherit;
  font-size: .88rem; font-weight: 700;
  padding: 11px 16px;
  border-radius: 10px;
  border: none; cursor: pointer;
  transition: all .2s;
  box-shadow: 0 3px 12px rgba(79,70,229,.25);
}

.twt-review-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(79,70,229,.38); }
.twt-review-btn svg { width: 15px; height: 15px; }

/* ── Responsive Taking ────────────────────────────────────── */
@media (max-width: 680px) {
  .twt-body {
    grid-template-columns: 1fr;
    padding: 10px 10px 24px;
  }
  .twt-sidebar { grid-column: 1; grid-row: 2; }
  .twt-qarea  { grid-column: 1; grid-row: 1; }
  .twt-q-card { padding: 16px 14px; }
  .twt-nav-bar { flex-wrap: wrap; }
  .twt-palette { grid-template-columns: repeat(6, 1fr); }
}

/* ── /current-affairs-test/ date-page wrapper ───────────────── */
.twt-date-exam-wrap { max-width:1100px; margin:0 auto; padding:0 16px 60px; }

/* ── No-exam state ──────────────────────────────────────────── */
.twt-no-exam-wrap { display:flex; justify-content:center; align-items:center; min-height:50vh; padding:48px 16px; }
.twt-no-exam-box  { text-align:center; max-width:440px; background:#fff; border:1px solid #e5e7eb; border-radius:16px; padding:48px 36px; box-shadow:0 4px 24px rgba(0,0,0,.07); }
.twt-no-exam-icon  { font-size:48px; margin-bottom:14px; }
.twt-no-exam-title { font-size:1.3rem; font-weight:700; color:#111827; margin:0 0 10px; }
.twt-no-exam-msg   { color:#6b7280; font-size:.97rem; line-height:1.6; margin:0 0 24px; }
.twt-no-exam-back  { display:inline-block; background:#4f46e5; color:#fff; text-decoration:none; padding:10px 22px; border-radius:8px; font-weight:600; font-size:.92rem; }
.twt-no-exam-back:hover { background:#4338ca; color:#fff; }


/* ============================================================
   TCA Leaderboard — "Toppers so far…"
   ============================================================ */

.twt-lb-wrap {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 0 10px;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

.twt-lb-card {
  background: #fff;
  border-radius: 20px;
  border: 1px solid rgba(99,102,241,.14);
  box-shadow: 0 10px 40px rgba(14,30,80,.10), 0 2px 8px rgba(14,30,80,.05);
  overflow: hidden;
}

/* ── Header ─────────────────────────────────────────────── */
.twt-lb-header {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 45%, #4338ca 100%);
  padding: 20px 24px 18px;
  position: relative;
  overflow: hidden;
}

.twt-lb-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 80% 50%, rgba(165,180,252,.22) 0%, transparent 60%);
  pointer-events: none;
}

.twt-lb-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  z-index: 1;
}

.twt-lb-trophy {
  font-size: 2.2rem;
  line-height: 1;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.35));
  flex-shrink: 0;
}

.twt-lb-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 3px;
  letter-spacing: -.02em;
}

.twt-lb-sub {
  font-size: .76rem;
  color: rgba(199,210,254,.85);
  margin: 0;
  font-weight: 500;
  letter-spacing: .02em;
}

/* ── Table wrapper ───────────────────────────────────────── */
.twt-lb-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.twt-lb-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 460px;
}

/* ── Column headers ─────────────────────────────────────── */
.twt-lb-th {
  padding: 10px 14px;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #6366f1;
  background: #f5f3ff;
  border-bottom: 1px solid #ede9fe;
  text-align: left;
  white-space: nowrap;
}
.twt-lb-th-rank  { width: 56px; text-align: center; }
.twt-lb-th-score { text-align: right; }
.twt-lb-th-pct   { min-width: 130px; }
.twt-lb-th-time  { text-align: right; white-space: nowrap; }

/* ── Rows ────────────────────────────────────────────────── */
.twt-lb-tr {
  transition: background .15s;
  border-bottom: 1px solid #f1f5f9;
}
.twt-lb-tr:last-child { border-bottom: none; }
.twt-lb-tr:hover { background: #f8faff; }

/* Gold / Silver / Bronze rows */
.twt-lb-gold   { background: linear-gradient(90deg, #fffbeb 0%, #fefce8 100%); }
.twt-lb-silver { background: linear-gradient(90deg, #f8fafc 0%, #f1f5f9 100%); }
.twt-lb-bronze { background: linear-gradient(90deg, #fff7ed 0%, #fef3e8 100%); }
.twt-lb-gold:hover   { background: #fef9c3; }
.twt-lb-silver:hover { background: #e2e8f0; }
.twt-lb-bronze:hover { background: #fde8c8; }

/* Highlighted "You" row */
.twt-lb-me {
  background: linear-gradient(90deg, #eef2ff 0%, #e0e7ff 100%) !important;
  border-left: 3px solid #6366f1;
}
.twt-lb-me:hover { background: #e0e7ff !important; }

.twt-lb-td {
  padding: 11px 14px;
  font-size: .88rem;
  color: #374151;
  vertical-align: middle;
}

/* Rank cell */
.twt-lb-rank-cell { text-align: center; width: 56px; }
.twt-lb-medal     { font-size: 1.35rem; line-height: 1; display: block; }
.twt-lb-ranknum   {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  font-size: .75rem;
  font-weight: 700;
  color: #64748b;
}

/* Name cell */
.twt-lb-name-cell {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 140px;
}

.twt-lb-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(99,102,241,.3);
}

.twt-lb-gold   .twt-lb-avatar { background: linear-gradient(135deg, #d97706, #f59e0b); box-shadow: 0 2px 6px rgba(217,119,6,.35); }
.twt-lb-silver .twt-lb-avatar { background: linear-gradient(135deg, #64748b, #94a3b8); box-shadow: 0 2px 6px rgba(100,116,139,.3); }
.twt-lb-bronze .twt-lb-avatar { background: linear-gradient(135deg, #b45309, #d97706); box-shadow: 0 2px 6px rgba(180,83,9,.3); }

.twt-lb-name {
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

.twt-lb-you-badge {
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  background: #6366f1;
  color: #fff;
  padding: 2px 7px;
  border-radius: 99px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Score cell */
.twt-lb-score-cell  { text-align: right; white-space: nowrap; }
.twt-lb-score       { font-size: 1rem; font-weight: 800; color: #1e293b; }
.twt-lb-maxscore    { font-size: .75rem; color: #94a3b8; margin-left: 2px; }

/* Accuracy / progress bar */
.twt-lb-pct-cell { min-width: 130px; }
.twt-lb-bar-wrap {
  height: 6px;
  background: #e2e8f0;
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 4px;
}
.twt-lb-bar {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  transition: width .6s cubic-bezier(.4,0,.2,1);
  min-width: 3px;
}
.twt-lb-gold   .twt-lb-bar { background: linear-gradient(90deg, #d97706, #f59e0b); }
.twt-lb-silver .twt-lb-bar { background: linear-gradient(90deg, #64748b, #94a3b8); }
.twt-lb-bronze .twt-lb-bar { background: linear-gradient(90deg, #b45309, #d97706); }
.twt-lb-me     .twt-lb-bar { background: linear-gradient(90deg, #4f46e5, #7c3aed); }

.twt-lb-pct-num { font-size: .78rem; font-weight: 700; color: #475569; }

/* Time cell */
.twt-lb-time-cell { text-align: right; white-space: nowrap; font-size: .82rem; color: #64748b; font-weight: 600; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 640px) {
  .twt-lb-wrap       { padding: 0 0 8px; }
  .twt-lb-card       { border-radius: 14px; }
  .twt-lb-header     { padding: 16px 16px 14px; }
  .twt-lb-trophy     { font-size: 1.8rem; }
  .twt-lb-title      { font-size: 1.05rem; }
  .twt-lb-th,
  .twt-lb-td         { padding: 9px 10px; }
  .twt-lb-name       { max-width: 100px; }
  .twt-lb-pct-cell   { min-width: 90px; }
  .twt-lb-score      { font-size: .9rem; }
}

/* Result page: leaderboard lives inside tca-res-wrap which has max-width 820px */
.twt-res-wrap .twt-lb-wrap { padding: 0 0 24px; }


/* ═══════════════════════════════════════════════════════════════
   TCA Leaderboard — shared styles (used on start screen + result page)
   Class prefix: tca-lb-* (matches Exam Management plugin exactly)
   ═══════════════════════════════════════════════════════════════ */
.tca-lb-wrap{width:100%;max-width:960px;margin:0 auto;padding:0 0 24px;font-family:'Segoe UI',system-ui,-apple-system,sans-serif}
.tca-lb-card{background:#fff;border-radius:20px;border:1px solid rgba(99,102,241,.14);box-shadow:0 10px 40px rgba(14,30,80,.10),0 2px 8px rgba(14,30,80,.05);overflow:hidden}
.tca-lb-header{background:linear-gradient(135deg,#1e1b4b 0%,#312e81 45%,#4338ca 100%);padding:20px 24px 18px;position:relative;overflow:hidden}
.tca-lb-header::before{content:'';position:absolute;inset:0;background:radial-gradient(ellipse at 80% 50%,rgba(165,180,252,.22) 0%,transparent 60%);pointer-events:none}
.tca-lb-title-row{display:flex;align-items:center;gap:14px;position:relative;z-index:1}
.tca-lb-trophy{font-size:2.2rem;line-height:1;filter:drop-shadow(0 2px 6px rgba(0,0,0,.35));flex-shrink:0}
.tca-lb-title{font-size:1.25rem;font-weight:800;color:#fff;margin:0 0 3px;letter-spacing:-.02em}
.tca-lb-sub{font-size:.76rem;color:rgba(199,210,254,.85);margin:0;font-weight:500;letter-spacing:.02em}
.tca-lb-table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
.tca-lb-table{width:100%;border-collapse:collapse;min-width:460px}
.tca-lb-th{padding:10px 14px;font-size:.68rem;font-weight:700;letter-spacing:.07em;text-transform:uppercase;color:#6366f1;background:#f5f3ff;border-bottom:1px solid #ede9fe;text-align:left;white-space:nowrap}
.tca-lb-th-rank{width:56px;text-align:center}
.tca-lb-th-score{text-align:right}
.tca-lb-th-pct{min-width:130px}
.tca-lb-th-time{text-align:right;white-space:nowrap}
.tca-lb-tr{transition:background .15s;border-bottom:1px solid #f1f5f9}
.tca-lb-tr:last-child{border-bottom:none}
.tca-lb-tr:hover{background:#f8faff}
.tca-lb-gold{background:linear-gradient(90deg,#fffbeb 0%,#fefce8 100%)}
.tca-lb-silver{background:linear-gradient(90deg,#f8fafc 0%,#f1f5f9 100%)}
.tca-lb-bronze{background:linear-gradient(90deg,#fff7ed 0%,#fef3e8 100%)}
.tca-lb-gold:hover{background:#fef9c3}
.tca-lb-silver:hover{background:#e2e8f0}
.tca-lb-bronze:hover{background:#fde8c8}
.tca-lb-me{background:#eef2ff !important;outline:2px solid #6366f1;outline-offset:-2px}
.tca-lb-me:hover{background:#e0e7ff !important}
.tca-lb-td{padding:11px 14px;font-size:.88rem;color:#374151;vertical-align:middle}
.tca-lb-rank-cell{text-align:center;width:56px}
.tca-lb-medal{font-size:1.35rem;line-height:1;display:block}
.tca-lb-ranknum{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;border-radius:50%;background:#f1f5f9;border:1px solid #e2e8f0;font-size:.75rem;font-weight:700;color:#64748b}
.tca-lb-name-cell{display:flex;align-items:center;gap:9px;min-width:140px}
.tca-lb-avatar{width:32px;height:32px;border-radius:50%;background:linear-gradient(135deg,#6366f1,#8b5cf6);color:#fff;font-size:.78rem;font-weight:700;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;box-shadow:0 2px 6px rgba(99,102,241,.3)}
.tca-lb-gold .tca-lb-avatar{background:linear-gradient(135deg,#d97706,#f59e0b);box-shadow:0 2px 6px rgba(217,119,6,.35)}
.tca-lb-silver .tca-lb-avatar{background:linear-gradient(135deg,#64748b,#94a3b8);box-shadow:0 2px 6px rgba(100,116,139,.3)}
.tca-lb-bronze .tca-lb-avatar{background:linear-gradient(135deg,#b45309,#d97706);box-shadow:0 2px 6px rgba(180,83,9,.3)}
.tca-lb-name{font-weight:600;color:#1e293b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:160px}
.tca-lb-score-cell{text-align:right;white-space:nowrap}
.tca-lb-score{font-size:1rem;font-weight:800;color:#1e293b}
.tca-lb-maxscore{font-size:.75rem;color:#94a3b8;margin-left:2px}
.tca-lb-pct-cell{min-width:130px}
.tca-lb-bar-wrap{height:6px;background:#e2e8f0;border-radius:99px;overflow:hidden;margin-bottom:4px}
.tca-lb-bar{height:100%;border-radius:99px;background:linear-gradient(90deg,#6366f1,#8b5cf6);transition:width .6s cubic-bezier(.4,0,.2,1);min-width:3px}
.tca-lb-gold .tca-lb-bar{background:linear-gradient(90deg,#d97706,#f59e0b)}
.tca-lb-silver .tca-lb-bar{background:linear-gradient(90deg,#64748b,#94a3b8)}
.tca-lb-bronze .tca-lb-bar{background:linear-gradient(90deg,#b45309,#d97706)}
.tca-lb-pct-num{font-size:.78rem;font-weight:700;color:#475569}
.tca-lb-time-cell{text-align:right;white-space:nowrap;font-size:.82rem;color:#64748b;font-weight:600}

@media (max-width: 640px) {
  .tca-lb-wrap    { padding: 0 0 8px; }
  .tca-lb-card    { border-radius: 14px; }
  .tca-lb-header  { padding: 16px 16px 14px; }
  .tca-lb-trophy  { font-size: 1.8rem; }
  .tca-lb-title   { font-size: 1.05rem; }
  .tca-lb-th,
  .tca-lb-td      { padding: 9px 10px; }
  .tca-lb-name    { max-width: 100px; }
  .tca-lb-pct-cell{ min-width: 90px; }
  .tca-lb-score   { font-size: .9rem; }
  .tca-lb-time-cell { display: none; }
}
