/* =====================================================
   Frontend Learning Roadmap — Quest / Game UI
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

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

:root {
  /* Brand */
  --xp:          #f59e0b;   /* gold  */
  --xp-glow:     rgba(245,158,11,.25);
  --primary:     #6d28d9;   /* violet */
  --success:     #16a34a;
  --danger:      #dc2626;
  --warning:     #d97706;

  /* Zone palette */
  --html-clr:    #c2410c;
  --css-clr:     #1d4ed8;
  --js-clr:      #a16207;
  --practice-clr:#15803d;
  --career-clr:  #7e22ce;

  /* Surfaces */
  --bg:          #f8f7ff;
  --surface:     #ffffff;
  --surface-2:   #f1f0fb;
  --border:      #e0ddf7;
  --text:        #1a1523;
  --text-muted:  #6b6680;
  --code-bg:     #1e1b2e;
  --code-text:   #e2deff;

  /* Tints */
  --primary-dim:  #ede9fe;
  --primary-glow: rgba(109,40,217,.15);
  --success-dim:  #dcfce7;
  --warning-dim:  #fef3c7;

  /* Layout */
  --sidebar-w:   270px;
  --radius:      10px;
  --shadow:      0 2px 12px rgba(109,40,217,.08);
  --shadow-md:   0 4px 24px rgba(109,40,217,.12);
  --font-sans:   'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-mono:   'Cascadia Code','Fira Code','Consolas', monospace;
}

html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--font-sans); background: var(--bg); color: var(--text); line-height: 1.75; }

/* ════════════════════════════════════════
   SIDEBAR  — game nav panel
   ════════════════════════════════════════ */
.page-wrapper { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  background: #fff;
  border-right: 2px solid var(--border);
  position: fixed; top: 0; left: 0;
  height: 100vh; overflow-y: auto; overflow-x: hidden;
  z-index: 100;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

/* Logo / game title */
.sidebar-logo {
  padding: 1.2rem 1.1rem 1rem;
  border-bottom: 2px solid var(--border);
  background: linear-gradient(135deg, #6d28d9 0%, #4f46e5 100%);
  position: relative; overflow: hidden;
}
.sidebar-logo::after {
  content: '🎮';
  position: absolute; right: 1rem; bottom: .6rem;
  font-size: 1.6rem; opacity: .2;
}
.sidebar-logo h2 {
  font-size: .82rem; font-weight: 900;
  color: #fff; line-height: 1.3;
  text-transform: uppercase; letter-spacing: .04em;
}
.sidebar-logo h2 span { color: #fcd34d; }
.sidebar-logo > span {
  font-size: .64rem; color: rgba(255,255,255,.65);
  display: block; margin-top: .2rem;
  font-weight: 500; text-transform: uppercase; letter-spacing: .06em;
}

/* Nav links */
.sidebar-nav { padding: .4rem 0 1rem; }

.sidebar-nav a {
  display: flex; align-items: center; gap: .55rem;
  padding: .4rem .9rem;
  color: var(--text-muted); text-decoration: none;
  font-size: .8rem; font-weight: 500;
  border-left: 3px solid transparent;
  transition: all .15s; position: relative;
}
.sidebar-nav a:hover {
  color: var(--primary); background: var(--surface-2);
  border-left-color: var(--primary);
}
.sidebar-nav a.active {
  color: var(--primary); background: #ede9fe;
  border-left-color: var(--primary); font-weight: 700;
}

/* Zone-color labels */
.nav-group-label {
  padding: .85rem .9rem .2rem;
  font-size: .6rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .12em;
  display: flex; align-items: center; gap: .4rem;
  color: var(--text-muted);
}
.nav-group-label::before { font-size: .8rem; }

/* Color-code nav sections by preceding label */
.sidebar-nav .nav-group-label:nth-of-type(1) { color: var(--html-clr); }
.sidebar-nav .nav-group-label:nth-of-type(2) { color: var(--css-clr); }
.sidebar-nav .nav-group-label:nth-of-type(3) { color: var(--js-clr); }
.sidebar-nav .nav-group-label:nth-of-type(4) { color: var(--practice-clr); }
.sidebar-nav .nav-group-label:nth-of-type(5) { color: var(--career-clr); }

/* ════════════════════════════════════════
   MAIN CONTENT
   ════════════════════════════════════════ */
.main-content { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; min-width: 0; }

/* Topbar */
.topbar {
  background: #fff; border-bottom: 2px solid var(--border);
  padding: .6rem 2rem; display: flex; align-items: center;
  gap: .5rem; font-size: .78rem; color: var(--text-muted);
  position: sticky; top: 0; z-index: 50;
}
.topbar a { color: var(--primary); text-decoration: none; font-weight: 600; }
.topbar a:hover { text-decoration: underline; }
.topbar .sep { color: var(--border); }

/* Page content */
.content { padding: 2.5rem 2.5rem 5rem; max-width: 880px; }

/* ════════════════════════════════════════
   PAGE HEADER  — zone/level feel
   ════════════════════════════════════════ */
.page-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px dashed var(--border);
}

.module-badge {
  display: inline-flex; align-items: center; gap: .4rem;
  background: linear-gradient(135deg, var(--xp), #fb923c);
  color: #fff;
  font-size: .66rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .1em;
  padding: .28rem .75rem; border-radius: 999px;
  margin-bottom: .8rem;
  box-shadow: 0 2px 8px var(--xp-glow);
}
.module-badge::before { content: '⚔'; font-size: .75rem; }

.page-header h1 {
  font-size: 1.85rem; font-weight: 900;
  color: var(--text); line-height: 1.15;
  margin-bottom: .4rem; letter-spacing: -.02em;
}
.page-header .subtitle { font-size: .95rem; color: var(--text-muted); }

.meta-row { display: flex; gap: .75rem; margin-top: .9rem; flex-wrap: wrap; }
.meta-item {
  display: flex; align-items: center; gap: .35rem;
  font-size: .75rem; color: var(--text-muted);
  background: var(--surface); border: 1.5px solid var(--border);
  padding: .22rem .65rem; border-radius: 999px;
  font-weight: 600;
}
.meta-item strong { color: var(--text); }

/* ════════════════════════════════════════
   CARDS  — quest panels
   ════════════════════════════════════════ */
.card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow);
  transition: box-shadow .2s, border-color .2s;
}
.card:hover {
  border-color: #c4b5fd;
  box-shadow: var(--shadow-md);
}
.card h2 {
  font-size: 1.05rem; font-weight: 800;
  margin-bottom: .9rem; color: var(--text);
  display: flex; align-items: center; gap: .5rem;
}

/* ════════════════════════════════════════
   LESSON LIST  — quest entries
   ════════════════════════════════════════ */
.lesson-list { list-style: none; display: flex; flex-direction: column; gap: .4rem; }

.lesson-list li {
  display: flex; align-items: center; gap: .75rem;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 8px; padding: .2rem .5rem .2rem 0;
  transition: all .15s;
}
.lesson-list li:hover { border-color: #c4b5fd; box-shadow: 0 2px 8px rgba(109,40,217,.08); }

.lesson-num {
  width: 32px; height: 32px; border-radius: 7px;
  background: var(--surface-2); border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: .68rem; font-weight: 800; color: var(--text-muted);
  flex-shrink: 0; font-family: var(--font-mono);
  margin-left: .35rem;
}

.lesson-list a {
  color: var(--text); text-decoration: none;
  font-size: .87rem; font-weight: 500; flex: 1;
  padding: .42rem .5rem; border-radius: 6px;
  transition: color .12s;
}
.lesson-list a:hover { color: var(--primary); }

.lesson-list .status {
  font-size: .62rem; padding: .2rem .6rem;
  border-radius: 999px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; flex-shrink: 0;
  margin-right: .4rem;
}
.status-coming { background: #fef3c7; color: #92400e; border: 1.5px solid #fde68a; }
.status-done   { background: #dcfce7; color: #166534; border: 1.5px solid #86efac; }

/* Completed quest style */
.lesson-list li.completed {
  background: #f0fdf4; border-color: #86efac;
}
.lesson-list li.completed .lesson-num {
  background: #dcfce7; border-color: #86efac; color: var(--success);
}
.lesson-list li.completed > a { color: var(--success); font-weight: 600; }

/* ════════════════════════════════════════
   ALERT BOXES  — game info panels
   ════════════════════════════════════════ */
.note, .tip, .warning, .danger {
  padding: .9rem 1.1rem; border-radius: 8px;
  margin: 1.1rem 0; border-left: 4px solid; font-size: .88rem;
}
.note    { background: #ede9fe; border-color: var(--primary); color: #4c1d95; }
.tip     { background: #dcfce7; border-color: var(--success); color: #14532d; }
.warning { background: #fef3c7; border-color: var(--warning); color: #78350f; }
.danger  { background: #fee2e2; border-color: var(--danger);  color: #7f1d1d; }
.note strong, .tip strong, .warning strong, .danger strong { display: block; margin-bottom: .2rem; font-weight: 800; }

/* ════════════════════════════════════════
   CODE  — terminal style
   ════════════════════════════════════════ */
pre {
  background: var(--code-bg); color: var(--code-text);
  padding: 1.1rem 1.4rem; border-radius: 8px;
  overflow-x: auto; font-family: var(--font-mono);
  font-size: .84rem; line-height: 1.75; margin: 1.1rem 0;
  border: 2px solid #2d2a4a; position: relative;
}
code {
  font-family: var(--font-mono); font-size: .84em;
  background: #ede9fe; color: #6d28d9;
  padding: .1em .4em; border-radius: 4px;
}
pre code { background: none; color: inherit; padding: 0; border: none; font-size: inherit; }

/* ════════════════════════════════════════
   TABLES
   ════════════════════════════════════════ */
table { width: 100%; border-collapse: collapse; margin: 1.1rem 0; font-size: .87rem; }
th { background: var(--surface-2); text-align: left; padding: .55rem 1rem; border: 1.5px solid var(--border); font-weight: 700; }
td { padding: .5rem 1rem; border: 1.5px solid var(--border); }
tr:nth-child(even) td { background: var(--surface-2); }

/* ════════════════════════════════════════
   XP PROGRESS BAR
   ════════════════════════════════════════ */
.progress-wrap { margin: 1rem 0; }
.progress-label {
  display: flex; justify-content: space-between;
  font-size: .75rem; color: var(--text-muted);
  margin-bottom: .4rem; font-weight: 600;
}
.progress-bar {
  height: 12px; background: var(--surface-2);
  border-radius: 999px; overflow: hidden;
  border: 2px solid var(--border); position: relative;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #fbbf24, #f97316);
  border-radius: 999px; transition: width .4s ease;
  box-shadow: 0 0 12px var(--xp-glow);
  position: relative;
}
.progress-fill::after {
  content: '⭐';
  position: absolute; right: -8px; top: 50%;
  transform: translateY(-50%);
  font-size: .7rem; line-height: 1;
}

/* ════════════════════════════════════════
   TYPOGRAPHY
   ════════════════════════════════════════ */
.content h2 { font-size: 1.25rem; font-weight: 800; margin: 2rem 0 .6rem; color: var(--text); letter-spacing: -.01em; }
.content h3 { font-size: 1rem; font-weight: 700; margin: 1.4rem 0 .4rem; color: var(--text); }
.content p { margin-bottom: .9rem; }
.content ul, .content ol { padding-left: 1.5rem; margin-bottom: .9rem; }
.content li { margin-bottom: .35rem; }
.content a { color: var(--primary); font-weight: 500; }
.content a:hover { text-decoration: underline; }
.content strong { font-weight: 700; }

/* ════════════════════════════════════════
   TAGS
   ════════════════════════════════════════ */
.tag {
  display: inline-block; font-size: .68rem; font-weight: 700;
  padding: .15rem .55rem; border-radius: 999px;
  background: #ede9fe; color: var(--primary);
  border: 1.5px solid #c4b5fd; margin: .15rem;
}

/* ════════════════════════════════════════
   COMPLETE BUTTON  — achievement unlock
   ════════════════════════════════════════ */
.lesson-complete-wrap { margin: 2rem 0 1rem; text-align: center; }

.lesson-complete-btn {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .7rem 2rem;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: #fff; border: none; border-radius: 999px;
  font-size: .9rem; font-weight: 800; cursor: pointer;
  font-family: var(--font-sans);
  transition: all .2s;
  box-shadow: 0 4px 16px var(--xp-glow);
  text-transform: uppercase; letter-spacing: .07em;
}
.lesson-complete-btn::before { content: '🏆'; font-size: 1rem; }
.lesson-complete-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(245,158,11,.4);
}
.lesson-complete-btn.is-complete,
.lesson-complete-btn:disabled {
  background: linear-gradient(135deg, #16a34a, #22c55e);
  box-shadow: 0 4px 16px rgba(34,197,94,.3);
  cursor: default; transform: none;
}
.lesson-complete-btn.is-complete::before { content: '✅'; }

/* ════════════════════════════════════════
   COMPLETION TOAST
   ════════════════════════════════════════ */
.completion-toast {
  position: fixed; bottom: 1.5rem; right: 1.5rem;
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: #fff;
  border: 2px solid #86efac;
  padding: .7rem 1.3rem; border-radius: 12px;
  font-size: .85rem; font-weight: 800;
  z-index: 9999; opacity: 0;
  transform: translateY(12px) scale(.95);
  transition: all .3s ease;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(34,197,94,.3);
}
.completion-toast.visible { opacity: 1; transform: translateY(0) scale(1); }

/* ════════════════════════════════════════
   PAGE FOOTER
   ════════════════════════════════════════ */
.page-footer {
  margin-top: 2.5rem; padding-top: 1.25rem;
  border-top: 2px dashed var(--border);
  display: flex; justify-content: space-between;
  align-items: center; font-size: .82rem;
  color: var(--text-muted); flex-wrap: wrap; gap: 1rem;
}
.page-footer a {
  display: inline-flex; align-items: center; gap: .35rem;
  color: var(--primary); text-decoration: none; font-weight: 600;
  background: var(--surface); border: 1.5px solid var(--border);
  padding: .35rem .9rem; border-radius: 999px;
  transition: all .15s;
}
.page-footer a:hover { border-color: #c4b5fd; background: #ede9fe; }

/* ════════════════════════════════════════
   BUTTONS
   ════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .45rem 1rem; border-radius: 8px;
  font-size: .84rem; font-weight: 700; text-decoration: none;
  cursor: pointer; border: none; transition: all .15s; font-family: var(--font-sans);
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: #5b21b6; }
.btn-outline { background: transparent; border: 1.5px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: #c4b5fd; color: var(--primary); }

/* details/summary for interview pages */
details { margin: .6rem 0; }
summary { cursor: pointer; color: var(--primary); font-weight: 700; font-size: .88rem; padding: .4rem 0; user-select: none; }
summary:hover { color: #5b21b6; }
details > div, details > p { padding: .75rem 0 .5rem 1rem; border-left: 3px solid #c4b5fd; margin-left: .5rem; font-size: .88rem; }

/* ════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════ */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); transition: transform .3s; }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .content { padding: 1.5rem 1rem 3rem; }
  .page-header h1 { font-size: 1.5rem; }
}

/* ════════════════════════════════════════
   AUTH BANNER  — fixed top bar
   ════════════════════════════════════════ */
.auth-banner {
  position: fixed; top: 0; left: 0; right: 0;
  height: 38px; z-index: 300;
  background: linear-gradient(90deg, #1e1b2e, #2d2a4a);
  border-bottom: 1px solid #3d3860;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.25rem; gap: 1rem;
  font-size: .78rem; color: rgba(255,255,255,.85);
}
.auth-banner-left {
  display: flex; align-items: center; gap: .35rem;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.auth-banner-left strong { color: #a594f9; }
.auth-banner-info { color: rgba(255,255,255,.6); font-size: .72rem; }
.auth-banner-btn {
  flex-shrink: 0;
  padding: .22rem .75rem; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.85); font-size: .72rem; font-weight: 700;
  cursor: pointer; transition: all .15s; font-family: var(--font-sans);
  white-space: nowrap;
}
.auth-banner-btn:hover { background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.35); }
.auth-banner-btn-primary {
  background: var(--primary); border-color: var(--primary); color: #fff;
}
.auth-banner-btn-primary:hover { background: #5b21b6; border-color: #5b21b6; }

/* ════════════════════════════════════════
   AUTH MODAL
   ════════════════════════════════════════ */
.auth-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.55); z-index: 400;
  backdrop-filter: blur(2px);
}
.auth-overlay.active { display: block; }

.auth-modal {
  display: none; position: fixed;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  z-index: 500; width: 100%; max-width: 380px;
  background: var(--surface); border: 2px solid var(--border);
  border-radius: 14px; padding: 1.75rem 1.75rem 1.5rem;
  box-shadow: 0 20px 60px rgba(109,40,217,.18);
}
.auth-modal.active { display: block; }

.auth-close-btn {
  position: absolute; top: .85rem; right: 1rem;
  background: none; border: none; font-size: 1.4rem;
  color: var(--text-muted); cursor: pointer; line-height: 1;
  padding: .1rem .3rem; border-radius: 4px; transition: color .12s;
}
.auth-close-btn:hover { color: var(--text); }

.auth-modal-title {
  font-size: 1.1rem; font-weight: 800;
  color: var(--text); margin-bottom: 1rem;
}

.auth-tabs {
  display: flex; gap: .4rem; margin-bottom: 1.1rem;
  background: var(--surface-2); padding: .25rem;
  border-radius: 8px; border: 1.5px solid var(--border);
}
.auth-tab {
  flex: 1; padding: .38rem .5rem; border: none;
  background: transparent; border-radius: 6px;
  font-size: .8rem; font-weight: 600; cursor: pointer;
  color: var(--text-muted); transition: all .15s; font-family: var(--font-sans);
}
.auth-tab.active { background: var(--surface); color: var(--primary); box-shadow: 0 1px 4px rgba(0,0,0,.08); }

.auth-field { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .85rem; }
.auth-field label { font-size: .76rem; font-weight: 700; color: var(--text-muted); }
.auth-input {
  width: 100%; padding: .55rem .8rem;
  border: 1.5px solid var(--border); border-radius: 8px;
  font-size: .88rem; font-family: var(--font-sans);
  background: var(--surface-2); color: var(--text);
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}
.auth-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(109,40,217,.1); }

.auth-error {
  font-size: .78rem; color: var(--danger);
  min-height: 1.2em; margin-bottom: .6rem; font-weight: 600;
}

.auth-submit-btn {
  width: 100%; padding: .65rem;
  background: linear-gradient(135deg, var(--primary), #4f46e5);
  color: #fff; border: none; border-radius: 8px;
  font-size: .9rem; font-weight: 700; cursor: pointer;
  font-family: var(--font-sans); transition: opacity .15s;
}
.auth-submit-btn:hover { opacity: .9; }

/* ════════════════════════════════════════
   LOGIN PROMPT TOAST
   ════════════════════════════════════════ */
.login-prompt-toast {
  position: fixed; bottom: 1.5rem; right: 1.5rem;
  background: #1e1b2e; border: 2px solid var(--primary);
  padding: .75rem 1.1rem; border-radius: 12px;
  font-size: .84rem; font-weight: 600; color: rgba(255,255,255,.9);
  z-index: 9999; opacity: 0;
  transform: translateY(12px) scale(.96);
  transition: all .3s ease;
  pointer-events: auto;
  display: flex; align-items: center; gap: .75rem;
  box-shadow: 0 8px 28px rgba(109,40,217,.25);
  max-width: 340px;
}
.login-prompt-toast.visible { opacity: 1; transform: translateY(0) scale(1); }
.login-prompt-btn {
  flex-shrink: 0;
  padding: .3rem .8rem; border-radius: 999px;
  border: none; background: var(--primary); color: #fff;
  font-size: .75rem; font-weight: 700; cursor: pointer;
  font-family: var(--font-sans); transition: background .15s;
}
.login-prompt-btn:hover { background: #5b21b6; }

/* ════════════════════════════════════════
   SEARCH BAR  (learn.html)
   ════════════════════════════════════════ */
.search-wrap {
  position: relative; margin-bottom: 1.5rem;
}
.search-input-wrap {
  display: flex; align-items: center; gap: .6rem;
  background: var(--surface); border: 2px solid var(--border);
  border-radius: var(--radius); padding: .55rem 1rem;
  transition: border-color .15s, box-shadow .15s;
}
.search-input-wrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(109,40,217,.1);
}
.search-icon { font-size: 1rem; color: var(--text-muted); flex-shrink: 0; }
.search-input {
  flex: 1; border: none; background: transparent;
  font-size: .9rem; font-family: var(--font-sans);
  color: var(--text); outline: none;
}
.search-input::placeholder { color: var(--text-muted); }
.search-clear {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: .85rem; padding: .1rem;
  display: none; transition: color .12s;
}
.search-clear:hover { color: var(--text); }
.search-clear.visible { display: block; }

.search-results {
  display: none; position: absolute; top: calc(100% + .4rem);
  left: 0; right: 0; z-index: 150;
  background: var(--surface); border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md); max-height: 380px; overflow-y: auto;
}
.search-results.visible { display: block; }
.search-result-item {
  display: flex; align-items: center; gap: .6rem;
  padding: .55rem 1rem; text-decoration: none;
  color: var(--text); border-bottom: 1px solid var(--border);
  transition: background .1s;
  font-size: .86rem;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--primary-dim); color: var(--primary); }
.search-result-num {
  font-size: .65rem; font-weight: 800; color: var(--text-muted);
  min-width: 32px; font-family: var(--font-mono);
}
.search-result-title { flex: 1; font-weight: 500; }
.search-result-module { font-size: .7rem; color: var(--text-muted); flex-shrink: 0; }
.search-no-results {
  padding: 1rem; text-align: center;
  color: var(--text-muted); font-size: .86rem;
}

/* ════════════════════════════════════════
   ACHIEVEMENTS & BADGES
   ════════════════════════════════════════ */
.achievements-wrap { margin-bottom: 1.75rem; }

.achievements-login-msg {
  font-size: .82rem; color: var(--text-muted);
  background: var(--surface-2); border: 1.5px dashed var(--border);
  border-radius: var(--radius); padding: .75rem 1rem;
  text-align: center;
}

.achievements-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: .75rem;
}
.achievements-label {
  font-size: .7rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--text-muted);
}
.achievements-count {
  font-size: .7rem; font-weight: 700;
  color: var(--primary); background: var(--primary-dim);
  padding: .18rem .6rem; border-radius: 999px;
}

.achievements-grid {
  display: flex; flex-wrap: wrap; gap: .55rem;
}

.badge-card {
  display: flex; align-items: center; gap: .5rem;
  padding: .45rem .85rem; border-radius: 999px;
  border: 1.5px solid; transition: all .2s; cursor: default;
}
.badge-unlocked {
  background: linear-gradient(135deg, #fef9c3, #fefce8);
  border-color: #fcd34d; color: #78350f;
  box-shadow: 0 2px 10px rgba(245,158,11,.2);
}
.badge-unlocked:hover { box-shadow: 0 4px 16px rgba(245,158,11,.35); transform: translateY(-1px); }
.badge-locked {
  background: var(--surface-2); border-color: var(--border);
  color: var(--text-muted); opacity: .45; filter: grayscale(1);
}
.badge-icon { font-size: .95rem; line-height: 1; }
.badge-info { display: flex; flex-direction: column; gap: .05rem; }
.badge-name { font-size: .76rem; font-weight: 800; line-height: 1.2; }
.badge-desc { font-size: .65rem; opacity: .7; line-height: 1.2; }

/* Achievement unlock toast */
.achievement-toast {
  position: fixed; bottom: 5.5rem; right: 1.5rem;
  background: linear-gradient(135deg, #fef9c3, #fef3c7);
  border: 2px solid #fcd34d; color: #78350f;
  padding: .75rem 1.1rem; border-radius: 12px;
  z-index: 9999; opacity: 0;
  transform: translateY(12px) scale(.96);
  transition: all .3s ease;
  display: flex; align-items: center; gap: .75rem;
  box-shadow: 0 8px 28px rgba(245,158,11,.3);
  max-width: 260px; pointer-events: none;
}
.achievement-toast.visible { opacity: 1; transform: translateY(0) scale(1); }
.achievement-toast-icon { font-size: 1.8rem; line-height: 1; flex-shrink: 0; }
.achievement-toast-label {
  font-size: .63rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .08em;
  opacity: .65; margin-bottom: .15rem;
}
.achievement-toast-name { font-size: .88rem; font-weight: 900; }
