/* ============================================================
   NexusAI — Master Stylesheet
   ============================================================ */

/* ── Variables ──────────────────────────────────────────── */
:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #eef2ff;
  --accent: #f59e0b;
  --success: #10b981;
  --danger: #ef4444;
  --info: #06b6d4;
  --dark: #0f172a;
  --body-bg: #f8fafc;
  --card-bg: #ffffff;
  --border: #e2e8f0;
  --text-muted: #64748b;
  --radius: 14px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 4px 16px rgba(99,102,241,.10), 0 2px 8px rgba(0,0,0,.06);
  --shadow-lg: 0 12px 40px rgba(99,102,241,.15);
  --font-head: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --transition: all .22s cubic-bezier(.4,0,.2,1);
}

/* ── Base ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); background: var(--body-bg); color: var(--dark); font-size: 0.925rem; }
h1,h2,h3,h4,h5,h6 { font-family: var(--font-head); }
a { text-decoration: none; color: inherit; }
.x-small { font-size: 0.72rem; }

/* ── Navbar ─────────────────────────────────────────────── */
.nexus-nav {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
  border-bottom: 1px solid rgba(255,255,255,.07);
  backdrop-filter: blur(12px);
  padding: .6rem 0;
  z-index: 1050;
}
.brand-icon {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1rem;
}
.brand-name { font-family: var(--font-head); font-weight: 800; font-size: 1.25rem; color: #fff; letter-spacing: -.5px; }
.nav-pill { color: rgba(255,255,255,.7) !important; border-radius: 8px; padding: .4rem .85rem !important; font-size: .85rem; transition: var(--transition); }
.nav-pill:hover, .nav-pill.active { color: #fff !important; background: rgba(255,255,255,.1) !important; }

/* ── Search ─────────────────────────────────────────────── */
.nav-search-wrap { position: relative; }
.nav-search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: rgba(255,255,255,.4); font-size: .85rem; pointer-events: none; }
.nav-search {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  color: #fff !important;
  padding: .45rem 1rem .45rem 2.2rem;
  border-radius: 100px;
  width: 280px;
  font-size: .85rem;
  transition: var(--transition);
}
.nav-search::placeholder { color: rgba(255,255,255,.4); }
.nav-search:focus { outline: none; background: rgba(255,255,255,.14); border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,102,241,.25); width: 320px; }
.search-dropdown {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow-lg); border: 1px solid var(--border);
  z-index: 9999; overflow: hidden; max-height: 380px; overflow-y: auto;
  display: none;
}
.search-dropdown.show { display: block; }
.search-item {
  display: flex; align-items: center; gap: 10px;
  padding: .65rem 1rem; cursor: pointer; transition: var(--transition);
  border-bottom: 1px solid #f1f5f9;
}
.search-item:hover { background: var(--primary-light); }
.search-item-type { font-size: .65rem; font-weight: 700; padding: 2px 7px; border-radius: 6px; flex-shrink: 0; text-transform: uppercase; }
.sit-tool { background: #eef2ff; color: var(--primary); }
.sit-cat  { background: #f0fdf4; color: #166534; }
.sit-tag  { background: #fff7ed; color: #9a3412; }

/* ── Buttons ────────────────────────────────────────────── */
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-icon-nav {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.8); display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.btn-icon-nav:hover { background: rgba(255,255,255,.18); color: #fff; }
.btn-filter {
  border: 1px solid var(--border); background: #fff; color: var(--text-muted);
  border-radius: 100px; padding: .3rem .9rem; font-size: .8rem;
  cursor: pointer; transition: var(--transition);
}
.btn-filter.active, .btn-filter:hover { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }
.btn-poll {
  border: 1px solid var(--border); background: #fff; border-radius: 100px;
  padding: .3rem .9rem; font-size: .8rem; cursor: pointer; transition: var(--transition);
}
.btn-poll:hover { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }
.btn-xs { font-size: .72rem; }

/* ── Notifications ──────────────────────────────────────── */
.notif-badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--danger); color: #fff;
  font-size: .62rem; font-weight: 700;
  min-width: 18px; height: 18px;
  border-radius: 100px; display: flex; align-items: center; justify-content: center;
  border: 2px solid #0f172a;
}
.notif-panel {
  position: absolute; right: 0; top: calc(100% + 10px);
  width: 340px; background: #fff;
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  border: 1px solid var(--border); z-index: 9998;
}
.notif-header { padding: .75rem 1rem; border-bottom: 1px solid var(--border); }
.notif-list { max-height: 320px; overflow-y: auto; }
.notif-item { display: flex; gap: 10px; align-items: flex-start; padding: .75rem 1rem; border-bottom: 1px solid #f8fafc; cursor: pointer; transition: var(--transition); }
.notif-item.unread { background: var(--primary-light); }
.notif-item:hover { background: #f8fafc; }
.notif-icon { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: .75rem; flex-shrink: 0; }

/* ── Hero ───────────────────────────────────────────────── */
.hero-section {
  background: linear-gradient(135deg, #0a0f1e 0%, #0f172a 40%, #1e1b4b 70%, #312e81 100%);
  position: relative; overflow: hidden;
}
.hero-bg-grid {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(99,102,241,.18) 1px, transparent 1px);
  background-size: 32px 32px;
}
.hero-glow-orb {
  position: absolute; border-radius: 50%; pointer-events: none; filter: blur(80px);
  z-index: 0;
}
.hero-glow-orb--1 {
  width: 500px; height: 500px; top: -150px; right: -100px;
  background: radial-gradient(circle, rgba(99,102,241,.25) 0%, transparent 70%);
}
.hero-glow-orb--2 {
  width: 350px; height: 350px; bottom: -100px; left: -80px;
  background: radial-gradient(circle, rgba(139,92,246,.2) 0%, transparent 70%);
}
.hero-section > .container { position: relative; z-index: 2; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(99,102,241,.18); border: 1px solid rgba(99,102,241,.45);
  color: #a5b4fc; border-radius: 100px; padding: .35rem 1.1rem;
  font-size: .8rem; font-weight: 600; cursor: default;
}
.hero-badge-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #22c55e;
  box-shadow: 0 0 6px #22c55e; animation: blink 1.6s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.3} }

/* Tagline */
.hero-tagline {
  font-size: 1rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase;
  background: linear-gradient(90deg, #818cf8, #c4b5fd);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

/* Headline */
.hero-title {
  font-size: clamp(2.1rem, 5vw, 3.7rem); font-weight: 800; color: #fff;
  line-height: 1.12; letter-spacing: -.02em;
}
.hw { font-style: italic; }
.hw-right { color: #818cf8; }
.hw-ai    { color: #f97316; }
.hw-tool  { color: #38bdf8; }

/* Sub-text */
.hero-sub {
  color: rgba(255,255,255,.68); font-size: 1.08rem; line-height: 1.78;
  max-width: 500px; font-weight: 400;
}
.hero-sub-accent { color: #e0e7ff; font-weight: 700; }

/* CTAs */
.hero-cta {
  box-shadow: 0 8px 28px rgba(99,102,241,.45);
  transition: transform .18s ease, box-shadow .18s ease;
}
.hero-cta:hover { transform: translateY(-2px); box-shadow: 0 14px 38px rgba(99,102,241,.6); }
.hero-cta-outline { transition: background .18s, color .18s, transform .18s; }
.hero-cta-outline:hover { background: rgba(255,255,255,.1); transform: translateY(-2px); }

/* Trust chips */
.hero-trust { row-gap: .5rem; }
.trust-chip {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.13);
  color: rgba(255,255,255,.75); border-radius: 100px;
  padding: .25rem .85rem; font-size: .74rem; font-weight: 600;
  backdrop-filter: blur(8px); letter-spacing: .01em;
  transition: background .18s, border-color .18s;
}
.trust-chip:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.22); }

/* Stats */
.hero-stat { display: flex; flex-direction: column; gap: 2px; }
.stat-num {
  font-family: var(--font-head); font-size: 1.8rem; font-weight: 800; color: #fff;
  line-height: 1;
}
.stat-label { font-size: .7rem; color: rgba(255,255,255,.42); text-transform: uppercase; letter-spacing: .08em; margin-top: 3px; }
.hero-stat-divider { width: 1px; height: 38px; background: rgba(255,255,255,.14); align-self: center; flex-shrink: 0; }

/* Hero Visual */
.hero-visual-wrap { position: relative; width: 380px; height: 380px; }
.center-orb {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 130px; height: 130px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem; color: #fff;
  box-shadow: 0 0 60px rgba(99,102,241,.55);
  animation: pulse 3s ease-in-out infinite;
}
.float-card {
  position: absolute; background: rgba(15,23,42,.7); backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.18); border-radius: 14px;
  padding: .6rem 1rem; color: #fff; font-size: .8rem; font-weight: 600;
  display: flex; align-items: center; gap: 8px;
  animation: floatCard 4s ease-in-out infinite;
  box-shadow: 0 4px 20px rgba(0,0,0,.3);
}
.fc1 { top: 8%; left: 0; animation-delay: 0s; }
.fc2 { top: 12%; right: 0; animation-delay: 1s; }
.fc3 { bottom: 28%; left: 3%; animation-delay: .5s; }
.fc4 { bottom: 12%; right: 3%; animation-delay: 1.5s; }
.fc5 { top: 44%; left: -5px; animation-delay: 2s; }
@keyframes pulse { 0%,100%{box-shadow:0 0 40px rgba(99,102,241,.4)} 50%{box-shadow:0 0 90px rgba(99,102,241,.75)} }
@keyframes floatCard { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }

/* Hero Sponsors */
.hero-sponsors { text-align: center; width: 100%; max-width: 420px; }
.hero-sponsors--mobile { text-align: left; max-width: 100%; }
.hero-sponsors--mobile .sponsors-row { justify-content: flex-start; }
.sponsors-label {
  font-size: .7rem; color: rgba(255,255,255,.35); text-transform: uppercase;
  letter-spacing: .12em; margin-bottom: .75rem; font-weight: 600;
}
.sponsors-row { display: flex; align-items: center; justify-content: center; gap: .6rem; flex-wrap: wrap; }
.sponsor-logo {
  display: flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px; padding: .38rem .85rem;
  transition: background .2s, border-color .2s, transform .2s;
  cursor: default;
}
.sponsor-logo:hover {
  background: rgba(99,102,241,.18); border-color: rgba(99,102,241,.4);
  transform: translateY(-2px);
}
.sponsor-icon { font-size: .85rem; color: rgba(255,255,255,.5); }
.sponsor-text { color: rgba(255,255,255,.55); font-size: .72rem; font-weight: 700; letter-spacing: .03em; }

/* ── Stats Bar ──────────────────────────────────────────── */
.stats-bar { background: #fff; border-bottom: 1px solid var(--border); padding: .6rem 0; }
.stat-bar-item { display: flex; align-items: center; justify-content: center; gap: 8px; padding: .5rem; font-size: .82rem; font-weight: 600; color: var(--dark); }

/* ── Section Headers ────────────────────────────────────── */
.section-label {
  display: inline-block; padding: .25rem .85rem;
  background: var(--primary-light); color: var(--primary);
  border-radius: 100px; font-size: .78rem; font-weight: 700; margin-bottom: .5rem;
}
.section-title { font-size: 1.6rem; font-weight: 800; color: var(--dark); margin-bottom: 0; }

/* ── Tool Card ──────────────────────────────────────────── */
.tool-card {
  background: var(--card-bg); border-radius: var(--radius);
  border: 1px solid var(--border);
  cursor: pointer; transition: var(--transition);
  overflow: hidden; display: flex; flex-direction: column;
}
.tool-card:hover { border-color: var(--primary); box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.tool-card-body { padding: 1.2rem 1.2rem .8rem; flex: 1; }
.tool-card-footer { padding: .7rem 1.2rem; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; background: #fafbfc; }
.tool-logo { width: 44px; height: 44px; background: var(--primary-light); border-radius: 10px; display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; }
.tool-logo img { object-fit: contain; max-width: 36px; max-height: 36px; }
.tool-name { font-family: var(--font-head); font-weight: 700; font-size: .95rem; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tool-tagline { font-size: .78rem; color: var(--text-muted); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ── Auto Badges ────────────────────────────────────────── */
.badge-tool { font-size: .65rem; font-weight: 700; padding: 2px 7px; border-radius: 6px; }
.badge-hot      { background: #fff1f2; color: #e11d48; border: 1px solid #fecdd3; }
.badge-fav      { background: #fffbeb; color: #d97706; border: 1px solid #fde68a; }
.badge-gem      { background: #f5f3ff; color: #7c3aed; border: 1px solid #ddd6fe; }
.badge-new      { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.badge-sponsor  { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }
.badge-verified { background: #f0fdf4; color: #15803d; border: 1px solid #86efac; }

/* ── Meta Chips ─────────────────────────────────────────── */
.meta-chip { background: #f1f5f9; color: #475569; border-radius: 100px; padding: 2px 10px; font-size: .75rem; display: inline-flex; align-items: center; }

/* ── Tool of the Week ───────────────────────────────────── */
.totw-card { background: linear-gradient(135deg, #f8faff 0%, #fff 100%); border: 1.5px solid #c7d2fe; border-radius: 20px; overflow: hidden; }
.totw-logo { width: 80px; height: 80px; background: var(--primary-light); border-radius: 18px; display: flex; align-items: center; justify-content: center; margin: 0 auto; }
.rb-item { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; font-size: .78rem; }
.rb-item span:first-child { width: 60px; color: var(--text-muted); }
.rb-track { flex: 1; height: 6px; background: #e2e8f0; border-radius: 3px; overflow: hidden; }
.rb-fill { height: 100%; background: linear-gradient(90deg, var(--primary), #8b5cf6); border-radius: 3px; }
.big-score { font-family: var(--font-head); font-size: 3rem; font-weight: 800; color: var(--dark); line-height: 1; }
.mini-metric { display: flex; align-items: center; gap: 4px; font-size: .75rem; color: var(--text-muted); }

/* ── Category Cards ─────────────────────────────────────── */
.cat-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.2rem; display: flex; flex-direction: column; align-items: center;
  text-align: center; transition: var(--transition); cursor: pointer; display: block;
}
.cat-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.cat-icon { width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; margin: 0 auto .7rem; }
.cat-name { font-weight: 700; font-size: .88rem; color: var(--dark); margin-bottom: 2px; }
.cat-count { font-size: .72rem; color: var(--text-muted); }

/* ── Quiz CTA ───────────────────────────────────────────── */
.quiz-cta-section { background: #f0f4ff; }
.quiz-cta-card {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  border-radius: 24px; box-shadow: 0 16px 48px rgba(99,102,241,.3);
}
.quiz-icon-float {
  width: 120px; height: 120px;
  background: rgba(255,255,255,.15); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 3.5rem; color: #fff;
  animation: floatCard 3s ease-in-out infinite;
}
.quiz-card { background: #fff; border-radius: 20px; padding: 2rem; box-shadow: var(--shadow-lg); }
.quiz-option-btn {
  width: 100%; text-align: left; background: #f8fafc;
  border: 1.5px solid var(--border); border-radius: 12px;
  padding: .8rem 1rem; cursor: pointer; transition: var(--transition);
  font-size: .88rem; margin-bottom: .5rem;
}
.quiz-option-btn:hover, .quiz-option-btn.selected { border-color: var(--primary); background: var(--primary-light); color: var(--primary); font-weight: 600; }
.quiz-result-card {
  border: 1.5px solid var(--border); border-radius: 14px;
  padding: 1rem 1.2rem; margin-bottom: .75rem; transition: var(--transition);
}
.quiz-result-card:nth-child(1) { border-color: #fbbf24; background: #fffbeb; }
.quiz-match-score {
  font-family: var(--font-head); font-size: 1.5rem; font-weight: 800;
  color: var(--primary);
}

/* ── Engagement Bar ─────────────────────────────────────── */
.eng-metric { padding: .6rem .4rem; }
.eng-action { transition: var(--transition); }
.eng-action.liked .eng-icon { color: var(--primary) !important; }
.eng-action.disliked .eng-icon { color: var(--danger) !important; }
.eng-icon { font-size: 1.1rem; color: var(--text-muted); line-height: 1; transition: var(--transition); }
.eng-num { font-weight: 700; font-size: .82rem; margin: 2px 0; }
.eng-label { font-size: .65rem; color: var(--text-muted); text-transform: uppercase; }
.eng-metric:hover .eng-icon { color: var(--primary); }
.eng-metric.buzz-pulse .eng-num { animation: buzzPop .6s ease; }
@keyframes buzzPop { 0%,100%{transform:scale(1)} 40%{transform:scale(1.35);color:var(--primary)} }

/* ── Sparkline ──────────────────────────────────────────── */
.sparkline-wrap { font-size: .75rem; }
.sparkline { display: inline-flex; align-items: flex-end; gap: 3px; height: 28px; }
.spark-bar { width: 5px; background: var(--primary); border-radius: 2px 2px 0 0; transition: var(--transition); }
.spark-bar:hover { background: var(--accent); }

/* ── Tool Tabs ──────────────────────────────────────────── */
.tool-tabs { gap: 4px; }
.tool-tabs .nav-link { border-radius: 100px; color: var(--text-muted); font-size: .82rem; padding: .4rem 1rem; border: 1px solid transparent; }
.tool-tabs .nav-link:hover { background: var(--primary-light); color: var(--primary); }
.tool-tabs .nav-link.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.tab-pane-custom { animation: fadeIn .2s ease; }
@keyframes fadeIn { from{opacity:0;transform:translateY(4px)} to{opacity:1;transform:translateY(0)} }

/* ── Rating Dimensions ──────────────────────────────────── */
.overall-score { font-family: var(--font-head); font-size: 3.5rem; font-weight: 800; color: var(--dark); line-height: 1; }
.stars-lg { font-size: 1.2rem; }
.rating-dim { display: flex; align-items: center; gap: 10px; }
.rd-label { font-size: .8rem; color: var(--text-muted); width: 130px; }
.rd-bar { flex: 1; height: 8px; background: #e2e8f0; border-radius: 4px; overflow: hidden; }
.rd-fill { height: 100%; background: linear-gradient(90deg, var(--accent), #f97316); border-radius: 4px; }
.rd-score { font-size: .82rem; font-weight: 700; width: 28px; text-align: right; }

/* ── Review Card ────────────────────────────────────────── */
.review-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.2rem; margin-bottom: .75rem;
}
.review-card .star-display { color: var(--accent); font-size: .9rem; }
.review-verified-badge { background: #f0fdf4; color: #15803d; font-size: .65rem; padding: 2px 8px; border-radius: 6px; }
.helpful-btn {
  background: none; border: 1px solid var(--border); border-radius: 100px;
  padding: 3px 10px; font-size: .75rem; cursor: pointer; transition: var(--transition);
  color: var(--text-muted);
}
.helpful-btn:hover, .helpful-btn.liked { border-color: var(--success); color: var(--success); background: #f0fdf4; }

/* ── Comments ───────────────────────────────────────────── */
.comment-item { padding: .8rem 0; border-bottom: 1px solid #f8fafc; }
.comment-reply { padding: .6rem 0 .6rem 1rem; border-left: 2px solid #e2e8f0; margin-left: 44px; }
.comment-like-btn {
  background: none; border: none; font-size: .75rem; color: var(--text-muted);
  cursor: pointer; transition: var(--transition); padding: 2px 6px; border-radius: 6px;
}
.comment-like-btn:hover, .comment-like-btn.liked { color: var(--danger); background: #fff1f2; }
.reply-toggle-btn {
  background: none; border: none; font-size: .75rem; color: var(--primary);
  cursor: pointer; padding: 2px 6px;
}

/* ── Use Case Cards ─────────────────────────────────────── */
.usecase-item { padding: .9rem 0; border-bottom: 1px solid #f8fafc; }
.usecase-item:last-child { border-bottom: none; }
.upvote-btn {
  background: #f8fafc; border: 1.5px solid var(--border); border-radius: 10px;
  padding: .4rem .7rem; cursor: pointer; text-align: center; transition: var(--transition);
  font-size: .75rem; font-weight: 700; color: var(--text-muted); min-width: 44px;
}
.upvote-btn:hover, .upvote-btn.upvoted { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }

/* ── Poll Results ───────────────────────────────────────── */
.pb-row { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; font-size: .8rem; }
.pb-label { width: 120px; font-size: .78rem; }
.pb-track { flex: 1; height: 8px; background: #e2e8f0; border-radius: 4px; overflow: hidden; }
.pb-fill { height: 100%; border-radius: 4px; transition: width .6s ease; }
.pb-pct { width: 36px; font-weight: 700; text-align: right; font-size: .78rem; }

/* ── Sidebar ────────────────────────────────────────────── */
.pricing-tier { background: var(--primary-light); border: 1.5px solid #c7d2fe; border-radius: 12px; padding: .8rem 1rem; display: flex; justify-content: space-between; align-items: center; }
.pt-name { font-weight: 700; color: var(--primary); }
.pt-price { font-weight: 800; font-size: 1rem; color: var(--dark); }
.alt-item { display: flex; gap: 10px; align-items: center; padding: .5rem 0; border-bottom: 1px solid #f8fafc; }
.alt-item:last-child { border-bottom: none; }
.alt-logo { width: 34px; height: 34px; background: var(--primary-light); border-radius: 8px; display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; }
.alt-logo img { max-height: 24px; max-width: 24px; object-fit: contain; }
.alt-name { font-size: .83rem; font-weight: 600; color: var(--dark); }
.alt-score { font-size: .73rem; color: var(--text-muted); }

/* ── Star Picker ────────────────────────────────────────── */
.star-picker { display: flex; gap: 4px; cursor: pointer; }
.star-pick { font-size: 1.4rem; cursor: pointer; transition: var(--transition); color: #e2e8f0; }
.star-pick.lit { color: var(--accent); }
.star-pick:hover { transform: scale(1.2); }

/* ── Browse Page ────────────────────────────────────────── */
.filter-sidebar { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem; }
.filter-section-title { font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-bottom: .7rem; }
.filter-checkbox-item { display: flex; align-items: center; gap: 8px; margin-bottom: .4rem; font-size: .82rem; cursor: pointer; }
.filter-checkbox-item input { accent-color: var(--primary); width: 15px; height: 15px; cursor: pointer; }
.tools-grid-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.sort-select { border: 1px solid var(--border); border-radius: 8px; padding: .3rem .7rem; font-size: .82rem; background: #fff; }

/* ── Blog ───────────────────────────────────────────────── */
.blog-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: var(--transition); height: 100%; display: flex; flex-direction: column; }
.blog-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.blog-cover { height: 200px; background: linear-gradient(135deg, var(--primary-light), #e0e7ff); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.blog-cover img { width: 100%; height: 100%; object-fit: cover; }
.blog-body { padding: 1.2rem; flex: 1; display: flex; flex-direction: column; }
.blog-type-chip { font-size: .68rem; font-weight: 700; padding: 2px 8px; border-radius: 6px; }
.blog-title { font-family: var(--font-head); font-weight: 700; font-size: .95rem; margin: .5rem 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.blog-excerpt { font-size: .8rem; color: var(--text-muted); flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.blog-meta { display: flex; gap: 12px; align-items: center; margin-top: .8rem; font-size: .75rem; color: var(--text-muted); }
.blog-detail-body h2,h3,h4 { font-family: var(--font-head); font-weight: 700; margin: 1.5rem 0 .75rem; }
.blog-detail-body p { line-height: 1.8; margin-bottom: 1rem; font-size: .92rem; }

/* ── Profile ────────────────────────────────────────────── */
.profile-hero { background: linear-gradient(135deg, #0f172a, #1e1b4b); padding: 2.5rem 0; }
.profile-avatar { width: 90px; height: 90px; border-radius: 50%; border: 4px solid rgba(255,255,255,.2); object-fit: cover; }
.badge-grid-item { background: #f8fafc; border: 1px solid var(--border); border-radius: 12px; padding: .8rem; text-align: center; transition: var(--transition); }
.badge-grid-item.earned { background: linear-gradient(135deg, #fffbeb, #fef3c7); border-color: var(--accent); }
.badge-grid-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.badge-icon-lg { font-size: 2rem; margin-bottom: .3rem; }
.badge-name { font-size: .72rem; font-weight: 700; }
.rank-badge-display { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); border-radius: 100px; padding: .3rem 1rem; color: #fff; font-size: .82rem; }
.progress-to-rank { height: 8px; border-radius: 4px; background: rgba(255,255,255,.15); overflow: hidden; }
.progress-to-rank-fill { height: 100%; background: linear-gradient(90deg, var(--primary), #8b5cf6); border-radius: 4px; transition: width 1s ease; }
.profile-tab-pane { max-height: 480px; overflow-y: auto; padding-right: 4px; }
.profile-tab-pane::-webkit-scrollbar { width: 4px; }
.profile-tab-pane::-webkit-scrollbar-track { background: transparent; }
.profile-tab-pane::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
.points-log-scroll { max-height: 320px; overflow-y: auto; padding-right: 4px; }
.points-log-scroll::-webkit-scrollbar { width: 4px; }
.points-log-scroll::-webkit-scrollbar-track { background: transparent; }
.points-log-scroll::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
.points-log-item { display: flex; align-items: center; justify-content: space-between; padding: .5rem 0; border-bottom: 1px solid #f8fafc; font-size: .82rem; }
.pts-earned { font-weight: 800; color: var(--success); }

/* ── Leaderboard ────────────────────────────────────────── */
.leader-card-hover { transition: var(--transition); cursor: pointer; }
.leader-card-hover:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(99,102,241,.15) !important; }
.leader-row { display: flex; align-items: center; gap: 12px; padding: .8rem 1rem; border-radius: 12px; margin-bottom: .4rem; transition: var(--transition); background: #fff; border: 1px solid var(--border); }
.leader-row:hover { border-color: var(--primary); background: var(--primary-light); }
.leader-rank { font-family: var(--font-head); font-weight: 800; font-size: 1.1rem; width: 32px; text-align: center; }
.rank-1 { color: #f59e0b; }
.rank-2 { color: #94a3b8; }
.rank-3 { color: #cd7c2f; }
.leader-pts { font-family: var(--font-head); font-weight: 800; font-size: 1rem; color: var(--primary); margin-left: auto; }

/* ── Admin ──────────────────────────────────────────────── */
.admin-sidebar { background: #0f172a; min-height: 100vh; width: 240px; position: fixed; top: 0; left: 0; padding-top: 1rem; z-index: 100; }
.admin-nav-link { display: flex; align-items: center; gap: 10px; padding: .6rem 1.2rem; color: rgba(255,255,255,.6); font-size: .85rem; transition: var(--transition); border-radius: 8px; margin: 2px 8px; }
.admin-nav-link:hover, .admin-nav-link.active { background: rgba(99,102,241,.25); color: #fff; }
.admin-content { margin-left: 240px; padding: 1.5rem; }
.stat-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.3rem; }
.stat-card-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.stat-card-num { font-family: var(--font-head); font-size: 2rem; font-weight: 800; }
.admin-table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); border-bottom: 2px solid var(--border); padding: .6rem 1rem; }
.admin-table td { padding: .75rem 1rem; vertical-align: middle; border-bottom: 1px solid #f8fafc; font-size: .85rem; }
.tool-logo-admin { width: 36px; height: 36px; background: var(--primary-light); border-radius: 8px; display: flex; align-items: center; justify-content: center; overflow: hidden; }

/* ── Footer ─────────────────────────────────────────────── */
.nexus-footer { background: #0f172a; }
.footer-links li { margin-bottom: .4rem; }
.footer-links a { color: rgba(255,255,255,.5); font-size: .84rem; transition: var(--transition); }
.footer-links a:hover { color: #fff; }

/* ── Forms ──────────────────────────────────────────────── */
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,102,241,.15); }
.auth-card { background: #fff; border-radius: 20px; padding: 2.5rem; box-shadow: var(--shadow-lg); max-width: 440px; margin: 0 auto; }

/* ── Tool Detail ─────────────────────────────────────────── */
.tool-logo-lg { width: 70px; height: 70px; background: var(--primary-light); border-radius: 16px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.tool-logo-lg img { max-width: 52px; max-height: 52px; object-fit: contain; }
.sentiment-badge { display: inline-flex; align-items: center; gap: 6px; background: #f0fdf4; color: #166534; border-radius: 100px; padding: .3rem .9rem; font-size: .8rem; font-weight: 700; }
.signal-card { background: #f8fafc; border-radius: 12px; padding: .8rem 1rem; margin-bottom: .5rem; }
.tech-desc { border-left: 3px solid var(--primary); }

/* ── Pagination ─────────────────────────────────────────── */
.pagination .page-link { border-radius: 8px !important; margin: 0 2px; color: var(--primary); border-color: var(--border); }
.pagination .page-link:hover { background: var(--primary-light); }
.pagination .active .page-link { background: var(--primary); border-color: var(--primary); }

/* ── Animations ─────────────────────────────────────────── */
@keyframes slideUp { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:translateY(0)} }
.animate-up { animation: slideUp .4s ease forwards; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-search { width: 200px; }
  .hero-title { font-size: 1.8rem; }
  .admin-sidebar { width: 100%; min-height: auto; position: relative; }
  .admin-content { margin-left: 0; }
  .totw-card .border-start { border-top: 1px solid var(--border) !important; border-left: none !important; }
}

/* ── Filter Panel ───────────────────────────────────────── */
.filter-chip {
    display:inline-flex;align-items:center;gap:4px;
    background:#eef2ff;color:#4f46e5;border:1px solid #c7d2fe;
    border-radius:999px;padding:.2rem .65rem;font-size:.78rem;
    font-weight:600;cursor:pointer;transition:all .15s;white-space:nowrap;
}
.filter-chip:hover { background:#c7d2fe; }
.filter-chip i { font-size:.65rem; }
.filter-section-toggle {
    background:none;border:none;border-bottom:1px solid #f1f5f9;
    text-align:left;padding:.55rem 0;transition:color .15s;width:100%;
}
.filter-section-toggle:hover { color:#6366f1 !important; }
.filter-chevron { transition:transform .2s ease; }
.filter-collapse-body { overflow:hidden;opacity:1; }
.filter-collapse-body.collapsed { max-height:0 !important;opacity:0; }
.offcanvas-footer { background:#fff; }

/* ── Mobile Nav User Menu ───────────────────────────────── */
@media (max-width: 991.98px) {
  /* Dropdown stays within viewport on mobile */
  .dropdown-menu {
      position: fixed !important;
      top: 64px !important;
      right: 8px !important;
      left: auto !important;
      width: calc(100vw - 16px) !important;
      max-width: 320px !important;
      max-height: calc(100vh - 80px);
      overflow-y: auto;
      z-index: 9999;
  }
  /* Bigger tap targets */
  .dropdown-item { padding: .65rem 1rem !important; font-size: .92rem; }
  /* Hide desktop auth section inside collapse on mobile */
  .navbar-collapse .d-flex.align-items-center.gap-2:last-child { display: none !important; }
}
