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

/* ── START SCREEN ─────────────────────────────────────────── */
.tca-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 */
.tca-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 */
.tca-lp {
  background: linear-gradient(148deg, #dbeafe 0%, #e0f2fe 55%, #eff6ff 100%);
  padding: 28px 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

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

.tca-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;
}

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

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

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

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

.tca-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;
}

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

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

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

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

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

.tca-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;
}

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

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

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

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

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

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

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

.tca-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;
}

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

.tca-uinfo { min-width: 0; }
.tca-uname { font-size: .88rem; font-weight: 700; color: #0f172a; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tca-uemail { font-size: .74rem; color: #64748b; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tca-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 */
.tca-field { margin-bottom: 11px; }

.tca-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;
}

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

.tca-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;
}

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

.tca-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;
}

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

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

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

.tca-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;
}

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

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

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

/* Top bar */
.tca-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;
}

.tca-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;
}

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

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

.tca-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 */
.tca-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);
}

.tca-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;
}

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

.tca-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 */
.tca-prog-track { height: 4px; background: #e2e8f0; }
.tca-prog-bar   { height: 4px; background: linear-gradient(90deg, #4f46e5, #7c3aed); transition: width .4s ease; min-width: 0; }

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

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

/* Question card */
.tca-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;
}

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

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

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

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

.tca-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;
}

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

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

.tca-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;
}

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

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

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

.tca-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;
}

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

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

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

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

.tca-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);
}

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

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

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

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

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

.tca-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);
}

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

/* Sidebar */
.tca-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;
}

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

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

.tca-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;
}

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

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

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

.tca-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;
}

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

.tca-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);
}

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

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

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

/* ── No-exam state ──────────────────────────────────────────── */
.tca-no-exam-wrap { display:flex; justify-content:center; align-items:center; min-height:50vh; padding:48px 16px; }
.tca-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); }
.tca-no-exam-icon  { font-size:48px; margin-bottom:14px; }
.tca-no-exam-title { font-size:1.3rem; font-weight:700; color:#111827; margin:0 0 10px; }
.tca-no-exam-msg   { color:#6b7280; font-size:.97rem; line-height:1.6; margin:0 0 24px; }
.tca-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; }
.tca-no-exam-back:hover { background:#4338ca; color:#fff; }


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

.tca-lb-wrap {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 0 10px;
  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;
}

/* ── Header ─────────────────────────────────────────────── */
.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;
}

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

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

/* ── Column headers ─────────────────────────────────────── */
.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; }

/* ── Rows ────────────────────────────────────────────────── */
.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; }

/* Gold / Silver / Bronze rows */
.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; }

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

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

/* Rank cell */
.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;
}

/* Name cell */
.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-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 */
.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; }

/* Accuracy / progress bar */
.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-me     .tca-lb-bar { background: linear-gradient(90deg, #4f46e5, #7c3aed); }

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

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

/* ── Responsive ─────────────────────────────────────────── */
@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; }
}

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

