/* ══════════════════════════════════════════════════════════
   PTE PLATFORM — GLOBAL DESIGN SYSTEM
   ══════════════════════════════════════════════════════════ */

:root {
  --navy: #0a0f1e;
  --navy-2: #141b2d;
  --accent: #6366f1;
  --accent-hover: #818cf8;
  --accent-lt: #eef2ff;
  --accent-glow: rgba(99, 102, 241, 0.15);
  --bg: #f5f7fb;
  --border: #e2e5ef;
  --surface: #ffffff;
  --text1: #0f172a;
  --text2: #475569;
  --text3: #94a3b8;
  --success: #10b981;
  --success-lt: #ecfdf5;
  --danger: #ef4444;
  --danger-lt: #fef2f2;
  --warning: #f59e0b;
  --warning-lt: #fffbeb;
  --gold: #f59e0b;
  --silver: #6366f1;
  --font-h: 'Plus Jakarta Sans', sans-serif;
  --font-b: 'Plus Jakarta Sans', sans-serif;
  --font-m: 'DM Mono', monospace;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04);
  --shadow-glow: 0 0 40px var(--accent-glow);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-b);
  background: var(--bg);
  color: var(--text1);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── NAVBAR ── */
.hub-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 40px;
  height: 72px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.hub-logo {
  display: flex;
  align-items: center;
  gap: 14px;
}

.hub-logo-mark {
  background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 100%);
  color: white;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  border-radius: 12px;
  font-size: 20px;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.hub-logo-text {
  font-weight: 800;
  font-size: 18px;
  color: var(--navy);
  letter-spacing: -0.3px;
}

.hub-logo-sub {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text3);
  font-weight: 600;
}

/* ── HERO SECTION ── */
.hub-hero {
  padding: 60px 40px 40px;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
  position: relative;
}

.hub-eyebrow {
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 12px;
  margin-bottom: 16px;
}

.hub-h1 {
  font-size: 52px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--navy);
  margin-bottom: 20px;
  letter-spacing: -1.5px;
}

.hub-h1 em {
  background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 50%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-style: italic;
}

.hub-sub {
  font-size: 18px;
  color: var(--text2);
  line-height: 1.6;
  margin-bottom: 40px;
}

/* ── TABS ── */
.hub-tabs {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 40px;
  flex-wrap: wrap;
  padding: 6px;
  background: white;
  border-radius: 16px;
  border: 1px solid var(--border);
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  box-shadow: var(--shadow-sm);
}

.hub-tab {
  padding: 10px 22px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  border: none;
  background: transparent;
  transition: all var(--transition);
  font-size: 13px;
  white-space: nowrap;
  color: var(--text3);
  position: relative;
}

.hub-tab:hover {
  color: var(--text1);
  background: var(--bg);
}

.hub-tab.active {
  background: var(--navy);
  color: white;
  box-shadow: 0 2px 8px rgba(10, 15, 30, 0.2);
}

/* ── VIEW PANES ── */
.view-pane { display: none; }
.view-pane.active { display: block; }

/* ── SECTION CARDS GRID ── */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 0 40px 80px;
  max-width: 1200px;
  margin: 0 auto;
}

.sec-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  height: 100%;
}

.sec-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #8b5cf6);
  opacity: 0;
  transition: opacity var(--transition);
}

.sec-card:hover {
  transform: translateY(-4px);
  border-color: transparent;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.sec-card:hover::before {
  opacity: 1;
}

.sc-icon {
  font-size: 28px;
  margin-bottom: 14px;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border-radius: 14px;
}

.sc-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent);
  margin-bottom: 8px;
}

.sc-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 14px;
  min-height: 32px;
  letter-spacing: -0.3px;
}

.sc-score {
  font-size: 14px;
  color: var(--text3);
  font-weight: 600;
  margin-bottom: 20px;
}

.sc-sep {
  height: 1px;
  background: var(--border);
  margin-bottom: 20px;
}

.sc-feats {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.sc-feat {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text2);
  font-weight: 500;
}

.sc-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 100%;
}

.sc-bot {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sc-tests {
  font-size: 13px;
  color: var(--text3);
  font-weight: 700;
}

.sc-btn {
  background: var(--navy);
  color: white;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  transition: all var(--transition);
}

.sc-btn:hover {
  background: var(--accent);
}

/* ── DRILL LIST (Question types within cards) ── */
.drill-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 0;
  width: 100%;
  padding-top: 6px;
}

.drill-item {
  padding: 11px 14px;
  background: var(--bg);
  color: var(--navy);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all var(--transition);
  text-align: left;
  position: relative;
  overflow: hidden;
}

.drill-item::after {
  content: '\2192';
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%) translateX(4px);
  opacity: 0;
  transition: all var(--transition);
  color: var(--accent);
  font-size: 14px;
}

.drill-item:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-lt);
  padding-right: 32px;
}

.drill-item:hover::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* ── SECTION OVERLAYS ── */
.sec-outer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  z-index: 1000;
  display: none;
  flex-direction: column;
  animation: slideUp 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.sec-outer.active {
  display: flex;
}

.sec-nav {
  height: 64px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
}

.sec-nav-l {
  display: flex;
  align-items: center;
  gap: 20px;
}

.sec-back {
  cursor: pointer;
  font-weight: 700;
  color: var(--text2);
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}

.sec-back:hover {
  color: var(--accent);
}

.sec-nav-tag {
  background: var(--accent-lt);
  color: var(--accent);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sec-inner {
  flex: 1;
  overflow: hidden;
  position: relative;
}

/* ── TOPBAR ── */
.topbar {
  height: 64px;
  background: white;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

/* ── BUTTONS ── */
.btn-primary {
  background: var(--accent);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 700;
  cursor: pointer;
  font-size: 14px;
  transition: all var(--transition);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
  transform: translateY(-1px);
}

.btn-secondary {
  background: white;
  color: var(--text1);
  border: 1px solid var(--border);
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 700;
  cursor: pointer;
  font-size: 14px;
  transition: all var(--transition);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-lt);
}

/* ── MODALS ── */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 15, 30, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
}

.overlay.open {
  display: flex;
}

.modal {
  background: white;
  width: 440px;
  padding: 40px;
  border-radius: var(--radius-xl);
  text-align: center;
  box-shadow: 0 24px 80px rgba(0,0,0,0.15);
  animation: modalIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalIn {
  from { transform: scale(0.95) translateY(10px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.field-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text3);
  margin-bottom: 6px;
  text-align: left;
}

/* ── FORM ELEMENTS ── */
.l-fib-input {
  border: none;
  border-bottom: 2px solid var(--accent);
  background: var(--accent-lt);
  padding: 4px 8px;
  font-size: 16px;
  font-family: inherit;
  width: 120px;
  outline: none;
  margin: 0 4px;
  border-radius: 4px 4px 0 0;
  transition: all var(--transition);
  font-weight: 600;
}

.l-fib-input:focus {
  background: white;
  box-shadow: 0 4px 12px var(--accent-glow);
}

.results-overall {
  font-size: 72px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 20px 0;
}

/* ── HIGHLIGHT INCORRECT WORDS ── */
.hiw-word {
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  transition: all 0.15s;
}

.hiw-word:hover {
  background: var(--accent-lt);
}

.hiw-word.selected {
  background: #fef08a;
  border-bottom: 2px solid #eab308;
}

/* ── READING DROP ZONES ── */
.reading-drop-zone {
  display: inline-block;
  min-width: 80px;
  height: 28px;
  border: 2px dashed var(--accent);
  background: var(--accent-lt);
  border-radius: 6px;
  margin: 0 4px;
  vertical-align: middle;
  text-align: center;
  font-weight: 700;
  color: var(--accent);
}

/* ── VOCABULARY SCREEN ── */
.vocab-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.vocab-title {
  font-family: var(--font-h);
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
  flex: 1;
}

.vocab-progress-text {
  font-size: 13px;
  color: var(--text3);
  font-family: var(--font-m);
}

.vocab-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 24px;
  gap: 24px;
  max-width: 640px;
  margin: 0 auto;
  width: 100%;
}

.vocab-stats {
  display: flex;
  gap: 12px;
  width: 100%;
  justify-content: center;
}

.vocab-stat {
  flex: 1;
  max-width: 140px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  text-align: center;
}

.vocab-stat-num {
  font-size: 22px;
  font-weight: 800;
  font-family: var(--font-m);
}

.vocab-stat-label {
  font-size: 11px;
  color: var(--text3);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.vocab-stat.known .vocab-stat-num  { color: var(--success); }
.vocab-stat.learning .vocab-stat-num { color: var(--accent); }
.vocab-stat.remaining .vocab-stat-num { color: var(--text2); }

.vocab-card-wrap {
  width: 100%;
  perspective: 1000px;
  cursor: pointer;
  user-select: none;
}

.vocab-card-inner {
  position: relative;
  width: 100%;
  min-height: 240px;
  transform-style: preserve-3d;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 20px;
}

.vocab-card-inner.flipped {
  transform: rotateY(180deg);
}

.vocab-card-front,
.vocab-card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px 32px;
  box-shadow: var(--shadow-md);
}

.vocab-card-front {
  background: linear-gradient(135deg, var(--navy) 0%, #1e3a5f 100%);
  color: #fff;
}

.vocab-card-back {
  background: white;
  border: 1px solid var(--border);
  transform: rotateY(180deg);
  color: var(--text1);
}

.vocab-card-label {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.6;
  margin-bottom: 16px;
  font-family: var(--font-m);
}

.vocab-card-word {
  font-family: var(--font-h);
  font-size: 38px;
  font-weight: 700;
  text-align: center;
  line-height: 1.2;
}

.vocab-card-hint {
  font-size: 13px;
  opacity: 0.55;
  margin-top: 20px;
}

.vocab-card-definition {
  font-size: 24px;
  font-weight: 600;
  text-align: center;
  direction: rtl;
  line-height: 1.5;
  color: var(--navy);
}

.vocab-card-word-small {
  font-size: 14px;
  color: var(--text3);
  margin-top: 12px;
  font-style: italic;
}

.vocab-actions {
  display: flex;
  gap: 12px;
  width: 100%;
  justify-content: center;
}

.vocab-btn-know {
  flex: 1;
  max-width: 180px;
  padding: 14px;
  border: none;
  border-radius: 14px;
  background: var(--success);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.vocab-btn-learning {
  flex: 1;
  max-width: 180px;
  padding: 14px;
  border: none;
  border-radius: 14px;
  background: white;
  border: 2px solid var(--accent);
  color: var(--accent);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.vocab-btn-know:hover    { opacity: 0.88; transform: translateY(-1px); }
.vocab-btn-learning:hover { background: var(--accent); color: #fff; transform: translateY(-1px); }

.vocab-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}

.vocab-ctrl-btn {
  padding: 8px 18px;
  border-radius: 50px;
  border: 1px solid var(--border);
  background: white;
  color: var(--text2);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-b);
  transition: all 0.15s;
}

.vocab-ctrl-btn:hover { border-color: var(--accent); color: var(--accent); }
.vocab-ctrl-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.vocab-complete {
  text-align: center;
  padding: 40px 24px;
}

.vocab-complete-icon { font-size: 56px; margin-bottom: 16px; }
.vocab-complete-title {
  font-family: var(--font-h);
  font-size: 28px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}
.vocab-complete-sub { color: var(--text2); margin-bottom: 28px; }

.vocab-tier-badge {
  font-size: 11px;
  letter-spacing: 0.08em;
  margin-top: 10px;
  opacity: 0.65;
  font-family: var(--font-m);
}
.vocab-tier-badge.tier-1 { color: #22c55e; }
.vocab-tier-badge.tier-2 { color: #eab308; }
.vocab-tier-badge.tier-3 { color: #ef4444; }

/* ── VOCAB QUIZ ── */
.vquiz-wrap { padding: 32px 24px; max-width: 600px; margin: 0 auto; width: 100%; }
.vquiz-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 32px; }
.vquiz-progress { font-family: var(--font-m); font-weight: 700; color: var(--text3); }
.vquiz-word { text-align: center; margin-bottom: 40px; }
.vquiz-word-text { font-family: var(--font-h); font-size: 48px; font-weight: 800; color: var(--navy); margin-bottom: 8px; }
.vquiz-tier { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text3); }
.vquiz-options { display: flex; flex-direction: column; gap: 12px; margin-bottom: 32px; }
.vquiz-opt { background: white; border: 1.5px solid var(--border); padding: 16px 24px; border-radius: 16px; font-size: 16px; font-weight: 600; cursor: pointer; transition: all 0.15s; text-align: left; }
.vquiz-opt:hover { border-color: var(--accent); background: var(--accent-lt); }
.vquiz-opt.correct { background: var(--success-lt); border-color: var(--success); color: #166534; }
.vquiz-opt.wrong { background: var(--danger-lt); border-color: var(--danger); color: #991b1b; }
.vquiz-num-badge { width: 24px; height: 24px; background: var(--bg); border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; margin-right: 12px; }
.vquiz-feedback { text-align: center; font-size: 18px; font-weight: 700; margin-bottom: 24px; min-height: 27px; }
.vquiz-feedback.correct { color: var(--success); }
.vquiz-feedback.wrong { color: var(--danger); }
.vquiz-next { background: var(--navy); color: white; border: none; padding: 16px 32px; border-radius: 50px; font-weight: 700; font-size: 16px; cursor: pointer; width: 100%; display: none; transition: all var(--transition); }
.vquiz-next:hover { background: var(--accent); }
.vquiz-results { text-align: center; }
.vquiz-score { font-size: 72px; font-weight: 800; color: var(--accent); line-height: 1; margin-bottom: 8px; }
.vquiz-score-label { font-size: 14px; text-transform: uppercase; letter-spacing: 2px; color: var(--text3); margin-bottom: 32px; }
.vquiz-bar-wrap { height: 8px; background: var(--bg); border-radius: 4px; overflow: hidden; margin-bottom: 40px; }
.vquiz-bar { height: 100%; transition: width 1s ease-out; }

/* ── KNOWLEDGE BASE ── */
.kb-container { display: flex; height: 100%; background: var(--bg); }
.kb-sidebar { width: 280px; border-right: 1px solid var(--border); background: white; padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.kb-nav-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 10px; cursor: pointer; color: var(--text2); font-weight: 600; transition: all var(--transition); font-size: 14px; }
.kb-nav-item:hover { background: var(--bg); color: var(--accent); }
.kb-nav-item.active { background: var(--accent-lt); color: var(--accent); }
.kb-nav-icon { font-size: 18px; }
.kb-content { flex: 1; padding: 40px; overflow-y: auto; }
.kb-section h3 { font-size: 26px; font-weight: 800; color: var(--navy); margin-bottom: 24px; letter-spacing: -0.5px; }
.kb-section h4 { font-size: 18px; font-weight: 700; color: var(--navy); margin: 24px 0 12px; }
.kb-section p { color: var(--text2); line-height: 1.7; margin-bottom: 16px; }
.kb-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; margin-top: 20px; }
.kb-card { background: white; border: 1px solid var(--border); border-radius: 16px; padding: 20px; transition: all var(--transition); }
.kb-card:hover { box-shadow: var(--shadow-md); }
.kb-card ul { padding-left: 20px; margin-top: 12px; }
.kb-card li { margin-bottom: 8px; color: var(--text2); font-size: 14px; }
.kb-task-list { list-style: none !important; padding: 0 !important; margin-top: 15px !important; }
.kb-task-list li { padding: 8px 0; border-bottom: 1px solid var(--bg); font-size: 13px !important; color: var(--text2); line-height: 1.4; }
.kb-task-list li:last-child { border-bottom: none; }
.kb-task-list li strong { color: var(--navy); display: block; margin-bottom: 2px; }
.kb-info-box { background: var(--accent-lt); border-left: 4px solid var(--accent); padding: 20px; border-radius: 0 12px 12px 0; margin: 20px 0; }
.kb-warning-box { background: var(--warning-lt); border-left: 4px solid var(--warning); padding: 20px; border-radius: 0 12px 12px 0; margin: 20px 0; }
.kb-table { width: 100%; border-collapse: collapse; margin: 20px 0; background: white; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); }
.kb-table th, .kb-table td { padding: 14px 20px; text-align: left; border-bottom: 1px solid var(--border); }
.kb-table th { background: var(--bg); font-weight: 700; color: var(--navy); font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; }
.kb-location-card { background: linear-gradient(135deg, var(--navy) 0%, #1e3a5f 100%); color: white; padding: 24px; border-radius: 20px; margin-top: 20px; }
.kb-location-card h4 { color: white !important; margin-top: 0; }
.kb-location-card p { color: #cbd5e1 !important; }

/* RTL Overrides */
[dir="rtl"] .kb-info-box { border-left: none; border-right: 4px solid var(--accent); border-radius: 12px 0 0 12px; }
[dir="rtl"] .kb-warning-box { border-left: none; border-right: 4px solid var(--warning); border-radius: 12px 0 0 12px; }
[dir="rtl"] .kb-table th, [dir="rtl"] .kb-table td { text-align: right; }
[dir="rtl"] .kb-card ul { padding-left: 0; padding-right: 20px; }
[dir="rtl"] .kb-section h3, [dir="rtl"] .kb-section h4, [dir="rtl"] .kb-section p { text-align: right; }

@media (max-width: 768px) {
  .kb-container { flex-direction: column; }
  .kb-sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border); flex-direction: row; overflow-x: auto; padding: 12px; }
  .kb-nav-item { white-space: nowrap; padding: 8px 16px; }
  .kb-content { padding: 24px 20px; }
}

/* ── FULL TEST LIST ── */
.test-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  max-width: 800px;
  margin: 0 auto;
}

.test-item {
  background: white;
  padding: 22px 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  position: relative;
  transition: all var(--transition);
}

.test-item:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.test-item.locked {
  opacity: 0.6;
  background: var(--bg);
  cursor: not-allowed;
}

.tier-badge {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── PRICING ── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 30px;
}

.price-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
  background: white;
  transition: all var(--transition);
}

.price-card.featured {
  border: 2px solid var(--accent);
  box-shadow: var(--shadow-glow);
  transform: scale(1.05);
  position: relative;
}

.price-card.featured::before {
  content: 'Most Popular';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: white;
  padding: 4px 16px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.price-val {
  font-size: 36px;
  font-weight: 800;
  margin: 15px 0;
  color: var(--navy);
}

/* ── UTILITY PILLS & BADGES ── */
.hub-pills { display: flex; justify-content: center; gap: 16px; }
.hub-pill {
  background: white;
  padding: 8px 16px;
  border-radius: 100px;
  border: 1px solid var(--border);
  font-size: 14px;
  font-weight: 600;
  color: var(--text2);
}

.hub-stats { display: flex; justify-content: center; gap: 80px; padding-bottom: 80px; }
.hub-stat { text-align: center; }
.hs-n { font-size: 40px; font-weight: 800; color: var(--navy); }
.hs-l { font-size: 14px; color: var(--text3); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }

.stat-pill { background: white; border: 1px solid var(--border); padding: 6px 12px; border-radius: 100px; font-size: 12px; color: var(--text2); }
.btn-tab { background: white; border: 1.5px solid var(--border); padding: 8px 16px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all var(--transition); }
.btn-tab.active { border-color: var(--accent); color: var(--accent); background: var(--accent-lt); }

/* ── TOAST NOTIFICATIONS ── */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--navy);
  color: white;
  padding: 14px 24px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  animation: toastIn 0.3s ease, toastOut 0.3s ease 3.2s forwards;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 380px;
}

.toast.toast-success { background: var(--success); }
.toast.toast-warning { background: var(--warning); color: #1a1a1a; }
.toast.toast-error   { background: var(--danger); }
.toast.toast-info    { background: var(--accent); }

.toast-icon { font-size: 18px; flex-shrink: 0; }

@keyframes toastIn {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

@keyframes toastOut {
  from { transform: translateX(0); opacity: 1; }
  to   { transform: translateX(100%); opacity: 0; }
}

/* ── LANDING PAGE ── */
.landing-hero-inner { padding: 80px 40px 60px; text-align: center; max-width: 800px; margin: 0 auto; }
.landing-badge { display: inline-block; background: var(--accent-lt); color: var(--accent); padding: 6px 16px; border-radius: 100px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 20px; }
.landing-h1 { font-size: 52px; font-weight: 800; line-height: 1.1; color: var(--navy); letter-spacing: -1.5px; margin-bottom: 20px; }
.landing-gradient { background: linear-gradient(135deg, var(--accent), #8b5cf6); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; font-style: italic; }
.landing-sub { font-size: 18px; color: var(--text2); line-height: 1.6; max-width: 600px; margin: 0 auto 32px; }
.landing-cta-row { display: flex; gap: 12px; justify-content: center; margin-bottom: 48px; }
.landing-cta-btn { padding: 16px 36px; font-size: 16px; }
.landing-stats { display: flex; justify-content: center; gap: 48px; padding: 32px 40px; background: white; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.landing-stat { text-align: center; }
.landing-stat-num { font-size: 36px; font-weight: 800; color: var(--navy); }
.landing-stat-label { font-size: 12px; color: var(--text3); text-transform: uppercase; font-weight: 600; letter-spacing: 1px; }
.landing-features-wrap { max-width: 1000px; margin: 0 auto; padding: 60px 40px; }
.landing-features-title { text-align: center; font-size: 28px; font-weight: 800; color: var(--navy); margin-bottom: 40px; letter-spacing: -0.5px; }
.landing-features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.landing-feature-card { background: white; border: 1px solid var(--border); border-radius: 20px; padding: 28px; }
.landing-feature-icon { font-size: 28px; margin-bottom: 14px; }
.landing-feature-card h3 { font-weight: 800; color: var(--navy); margin-bottom: 8px; font-size: 16px; }
.landing-feature-card p { font-size: 13px; color: var(--text2); line-height: 1.6; }
.landing-bottom-cta { text-align: center; padding: 40px 40px 80px; }
.landing-bottom-cta-card { background: linear-gradient(135deg, var(--navy) 0%, #1e3a5f 100%); border-radius: 24px; padding: 48px; max-width: 700px; margin: 0 auto; color: white; }
.landing-bottom-cta-card h2 { font-size: 28px; font-weight: 800; margin-bottom: 12px; }
.landing-bottom-cta-card p { opacity: 0.7; margin-bottom: 28px; font-size: 15px; }

/* ── MOCK TEST BANNER ── */
.mock-test-banner { background: linear-gradient(135deg, var(--navy) 0%, #1e3a5f 100%); border-radius: 20px; padding: 32px 36px; margin-bottom: 28px; color: white; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 8px 32px rgba(10,15,30,0.2); }
.mock-test-eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: 2px; opacity: 0.7; margin-bottom: 8px; }
.mock-test-title { font-size: 24px; font-weight: 800; letter-spacing: -0.5px; }
.mock-test-sub { font-size: 14px; opacity: 0.7; margin-top: 6px; }
.mock-test-icons { display: flex; gap: 16px; align-items: center; }
.mock-test-icon-item { text-align: center; }
.mock-test-icon-item div { font-size: 28px; font-weight: 800; }
.mock-test-icon-item span { font-size: 10px; opacity: 0.6; margin-top: 4px; display: block; }
.mock-test-icon-sep { width: 1px; height: 32px; background: rgba(255,255,255,0.2); }

/* ══════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
  .hub-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 768px) {
  .hub-bar {
    padding: 12px 20px;
    height: auto;
    flex-wrap: wrap;
    gap: 12px;
  }

  .hub-hero {
    padding: 32px 20px 24px;
  }

  .hub-h1 {
    font-size: 32px;
    letter-spacing: -0.5px;
  }

  .hub-stats {
    flex-direction: column;
    gap: 32px;
    padding-bottom: 40px;
  }

  .hub-grid {
    grid-template-columns: 1fr !important;
    padding: 0 16px 40px !important;
    gap: 12px !important;
  }

  .hub-tabs {
    flex-wrap: wrap;
    padding: 4px;
    gap: 4px;
    border-radius: 12px;
  }

  .hub-tab {
    padding: 8px 16px;
    font-size: 12px;
    flex: 1;
    text-align: center;
    min-width: 100px;
  }

  .test-list {
    grid-template-columns: 1fr;
    padding: 0 16px;
  }

  .modal {
    width: 95%;
    padding: 28px 20px;
    border-radius: var(--radius-lg);
  }

  .sec-nav {
    padding: 0 16px;
    height: 56px;
  }

  .sec-nav-tag {
    display: none;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .price-card.featured {
    transform: none;
  }

  /* Toast on mobile */
  .toast-container { top: auto; bottom: 20px; right: 12px; left: 12px; }
  .toast { max-width: 100%; animation: toastInMobile 0.3s ease, toastOut 0.3s ease 3.2s forwards; }

  /* Landing page mobile */
  .landing-hero-inner { padding: 40px 20px 32px; }
  .landing-h1 { font-size: 32px; letter-spacing: -0.5px; }
  .landing-sub { font-size: 15px; margin-bottom: 24px; }
  .landing-cta-row { flex-direction: column; gap: 10px; }
  .landing-cta-btn { width: 100%; padding: 14px 24px; font-size: 15px; }
  .landing-stats { flex-wrap: wrap; gap: 20px; padding: 24px 20px; justify-content: center; }
  .landing-stat-num { font-size: 28px; }
  .landing-features-wrap { padding: 40px 20px; }
  .landing-features-title { font-size: 22px; margin-bottom: 24px; }
  .landing-features-grid { grid-template-columns: 1fr; gap: 12px; }
  .landing-feature-card { padding: 20px; }
  .landing-bottom-cta { padding: 20px 20px 60px; }
  .landing-bottom-cta-card { padding: 32px 20px; border-radius: 16px; }
  .landing-bottom-cta-card h2 { font-size: 22px; }

  /* Mock test banner mobile */
  .mock-test-banner { flex-direction: column; gap: 20px; padding: 24px 20px; border-radius: 16px; text-align: center; }
  .mock-test-title { font-size: 20px; }
  .mock-test-icons { justify-content: center; }

  /* User controls wrap on mobile */
  #user-controls { flex-wrap: wrap; justify-content: center; gap: 8px !important; }
  #user-controls button { font-size: 11px !important; padding: 6px 12px !important; }

  /* Hub bar buttons touch-friendly */
  .hub-bar .btn-primary, .hub-bar .btn-secondary,
  #auth-controls button, #user-controls button {
    min-height: 44px; display: inline-flex; align-items: center; justify-content: center;
  }

  /* Daily tracker compact */
  #daily-tracker-widget { padding: 0 16px !important; }
}

@media (max-width: 480px) {
  .hub-h1 { font-size: 26px; }
  .hub-sub { font-size: 15px; }
  .btn-primary, .btn-secondary { padding: 10px 16px; font-size: 13px; }
  .vocab-body { padding: 20px 12px; }
  .vocab-card-word { font-size: 24px; }
  .vocab-card-definition { font-size: 18px; }

  .landing-h1 { font-size: 26px; }
  .landing-stats { gap: 16px; }
  .landing-stat-num { font-size: 24px; }
  .mock-test-title { font-size: 18px; }
  .mock-test-icons { gap: 12px; }
  .mock-test-icon-item div { font-size: 22px; }

  /* Hub tabs scroll horizontally on small screens */
  .hub-tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .hub-tab { flex: none; min-width: auto; white-space: nowrap; }
}

/* Toast slide-up animation for mobile */
@keyframes toastInMobile {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
