/* =============================================================================
   TgBotList — catalog-web stylesheet
   Framework-free port of the React (Tailwind v4) catalog-frontend design.
   Light theme is the default; `.dark` on <html> switches to dark (toggled
   client-side, persisted in localStorage, applied pre-paint — see head.eta).
   ========================================================================== */

/* ─── Theme tokens (light default) ─── */
:root {
  --font-display: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system,
    "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --bg-primary: #f9f8f5;
  --bg-main: #fcfcfc;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f4f3ef;
  --bg-subtle: #f4f3ef;
  --band-bg: #f0f1ef;
  --header-bg: rgba(249, 248, 245, 0.8);

  --text-primary: #0c0b0f;
  --text-secondary: #5a5750;
  --text-muted: #9b9890;
  --text-invert: #ffffff;

  --border-color: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.12);

  --brand: #2d5be3;
  --brand-hover: #2450cc;
  --brand-bg: rgba(45, 91, 227, 0.10);
  --brand-bg-hover: rgba(45, 91, 227, 0.16);
  --brand-border: rgba(45, 91, 227, 0.22);
  --indigo: #5b5bd6;
  --indigo-hover: #4d4dbf;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05), 0 0 0 1px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-card-hover: 0 8px 24px rgba(45, 91, 227, 0.11);
  --shadow-focus: 0 0 0 3px rgba(45, 91, 227, 0.18);

  --star: #f59e0b;
  --check: #10b981;
  --premium-bg: #fef3c7;
  --premium-text: #b45309;

  --hero-glow: rgba(45, 91, 227, 0.09);
  --grad-from: #2d5be3;
  --grad-to: #7c3aed;
}

/* ─── Dark theme ─── */
.dark {
  --bg-primary: #0c0b0f;
  --bg-main: #0c0b0f;
  --bg-secondary: #16151e;
  --bg-card: #1c1b26;
  --bg-card-hover: #232232;
  --bg-subtle: rgba(255, 255, 255, 0.05);
  --band-bg: transparent;
  --header-bg: rgba(18, 17, 24, 0.82);

  --text-primary: #ffffff;
  --text-secondary: #b4b1ab;
  --text-muted: #6b6860;
  --text-invert: #0c0b0f;

  --border-color: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);

  --brand: #6b8fff;
  --brand-hover: #8fa8ff;
  --brand-bg: rgba(107, 143, 255, 0.16);
  --brand-bg-hover: rgba(107, 143, 255, 0.26);
  --brand-border: rgba(107, 143, 255, 0.30);
  --indigo: #8b8bf0;
  --indigo-hover: #a0a0f5;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-card-hover: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-focus: 0 0 0 3px rgba(107, 143, 255, 0.25);

  --premium-bg: rgba(245, 158, 11, 0.18);
  --premium-text: #fbbf24;

  --hero-glow: rgba(107, 143, 255, 0.10);
  --grad-from: #6b8fff;
  --grad-to: #a78bfa;
}

/* ─── Reset & base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-display);
  font-size: 14px;
  line-height: 1.5;
  background: var(--bg-primary);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.25s ease, color 0.25s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 99px; }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.icon { display: inline-block; vertical-align: middle; flex: none; }

/* ─── Layout helpers ─── */
.container {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: 1rem;
}
@media (min-width: 640px) { .container { padding-inline: 1.5rem; } }
@media (min-width: 1024px) { .container { padding-inline: 2rem; } }

#main { flex: 1 0 auto; }

.section { padding-block: clamp(2.5rem, 6vw, 4rem); }
.muted { color: var(--text-muted); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ─── Section header / eyebrow ─── */
.eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
}
.section-head { text-align: center; max-width: 42rem; margin: 0 auto clamp(2rem, 5vw, 3.25rem); }
.section-head .eyebrow { margin-bottom: 0.75rem; }
.section-head h2 {
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 0.85rem;
}
.section-head p { color: var(--text-secondary); font-size: clamp(0.95rem, 1.6vw, 1.125rem); line-height: 1.6; }

/* ─── Pill badge (hero) ─── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }

/* ─── Gradient text ─── */
.gradient-text {
  background: linear-gradient(130deg, var(--grad-from), var(--grad-to));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 10px;
  border: 1px solid transparent;
  padding: 0.55rem 1.15rem;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease,
    color 0.2s ease, box-shadow 0.2s ease;
}
.btn:active { transform: scale(0.97); }
.btn-lg { padding: 0.8rem 1.6rem; font-size: 16px; }
.btn-sm { padding: 0.4rem 0.85rem; font-size: 13px; font-weight: 600; }
.btn-block { width: 100%; }

.btn-primary {
  background: linear-gradient(135deg, var(--grad-from), var(--grad-to));
  color: #fff;
  box-shadow: 0 4px 14px rgba(45, 91, 227, 0.28);
}
.btn-primary:hover { box-shadow: 0 6px 20px rgba(45, 91, 227, 0.36); }

.btn-indigo { background: var(--indigo); color: #fff; box-shadow: 0 4px 14px rgba(91, 91, 214, 0.25); }
.btn-indigo:hover { background: var(--indigo-hover); }

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--border-color);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover { border-color: var(--brand); color: var(--brand); }

.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--bg-subtle); color: var(--text-primary); }

.btn-soft { background: var(--brand-bg); color: var(--brand); }
.btn-soft:hover { background: var(--brand-bg-hover); }

/* =============================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 68px;
  display: flex;
  align-items: center;
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border-color);
}
/* Mobile: brand left, actions (lang / theme / burger) right. */
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; width: 100%; }
/* From the breakpoint where the primary nav appears, switch to a 3-column grid
   so the nav stays optically centred regardless of brand / actions widths.
   (Scoped to ≥768px because the nav is display:none below it — leaving it on
   mobile would drop the centre track and mis-place the actions.) */
@media (min-width: 768px) {
  .header-inner { display: grid; grid-template-columns: 1fr auto 1fr; }
  .header-inner .brand { justify-self: start; }
  .header-inner .site-nav { justify-self: center; }
  .header-inner .header-actions { justify-self: end; }
}
.brand { display: inline-flex; align-items: center; gap: 0.55rem; }
.brand-logo { width: 34px; height: 34px; border-radius: 9px; flex: none; }
.brand-name { font-size: 19px; font-weight: 800; letter-spacing: -0.02em; color: var(--text-primary); }

.site-nav { display: none; align-items: center; gap: 0.25rem; }
.site-nav a {
  padding: 0.5rem 1rem;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-secondary);
  transition: background 0.15s ease, color 0.15s ease;
}
.site-nav a:hover { color: var(--text-primary); background: var(--bg-subtle); }
@media (min-width: 768px) { .site-nav { display: flex; } }

.header-actions { display: flex; align-items: center; gap: 0.5rem; }

/* icon button (theme toggle, mobile menu) */
.icon-btn {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.icon-btn:hover { background: var(--bg-subtle); color: var(--text-primary); }

/* theme toggle shows sun in light, moon in dark */
.theme-toggle .icon-moon { display: none; }
.dark .theme-toggle .icon-sun { display: none; }
.dark .theme-toggle .icon-moon { display: inline-block; }

/* language switch via <details> (no-JS friendly) */
.lang { position: relative; }
.lang > summary {
  list-style: none;
  display: inline-flex; align-items: center; gap: 0.35rem;
  height: 40px; padding: 0 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 13px; font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.lang > summary::-webkit-details-marker { display: none; }
.lang > summary .chev { transition: transform 0.2s ease; }
.lang[open] > summary .chev { transform: rotate(180deg); }
.lang-menu {
  position: absolute;
  right: 0; top: calc(100% + 6px);
  min-width: 150px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  padding: 0.35rem;
  z-index: 60;
}
.lang-menu a {
  display: block;
  padding: 0.5rem 0.7rem;
  border-radius: 8px;
  font-size: 14px; font-weight: 600;
  color: var(--text-secondary);
}
.lang-menu a:hover { background: var(--bg-subtle); color: var(--text-primary); }
.lang-menu a.is-active { color: var(--brand); background: var(--brand-bg); }

.header-submit { display: none; }
@media (min-width: 768px) { .header-submit { display: inline-flex; } }

.menu-toggle { display: inline-flex; }
@media (min-width: 768px) { .menu-toggle { display: none; } }

/* mobile menu — drops below the header bar as a full-width panel. Positioned
   absolutely (not a flex child of the fixed-height .site-header, which would
   squeeze it into the bar). */
.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-card);
  box-shadow: var(--shadow-md);
}
.mobile-menu.open { display: block; }
@media (min-width: 768px) { .mobile-menu { display: none !important; } }
.mobile-menu nav { display: flex; flex-direction: column; gap: 0.4rem; padding: 1rem; }
/* :not(.btn) so the plain nav links get this treatment but the "Submit your
   bot" button keeps its own .btn-primary colour/padding (this selector would
   otherwise outrank .btn-primary and paint the button text dark). */
.mobile-menu a:not(.btn) {
  padding: 0.75rem 1rem; border-radius: 10px;
  font-size: 16px; font-weight: 700; color: var(--text-secondary);
}
.mobile-menu a:not(.btn):hover { background: var(--bg-subtle); color: var(--text-primary); }
.mobile-menu .btn { margin-top: 0.4rem; }

/* =============================================================================
   Hero
   ========================================================================== */
.hero { position: relative; overflow: hidden; padding-block: clamp(3.5rem, 9vw, 6rem); text-align: center; }
.hero .container { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; }
.glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(ellipse, var(--hero-glow) 0%, transparent 70%);
  width: 800px; height: 800px;
  z-index: 0;
}
.glow-1 { top: -260px; left: 8%; transform: translateX(-50%); }
.glow-2 { bottom: -360px; right: 8%; transform: translateX(50%); }

.hero h1 {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 1.4rem 0 1.25rem;
}
.hero-sub { color: var(--text-secondary); font-size: clamp(1rem, 2vw, 1.15rem); max-width: 42rem; line-height: 1.6; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.85rem; justify-content: center; }
@media (max-width: 520px) { .hero-actions { width: 100%; flex-direction: column; } }

/* search bar */
.search {
  width: 100%;
  max-width: 42rem;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 0.4rem 0.4rem 0.4rem 1rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.search:focus-within { border-color: var(--brand); box-shadow: var(--shadow-focus); }
.search .search-ico { color: var(--text-muted); flex: none; }
.search input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 15px;
  padding: 0.6rem 0;
  outline: none;
  min-width: 0;
}
.search input::placeholder { color: var(--text-muted); }
.search button { flex: none; }

/* =============================================================================
   Category grid
   ========================================================================== */
.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
@media (min-width: 640px) { .category-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px) { .category-grid { grid-template-columns: repeat(4, 1fr); gap: 1rem; } }
@media (min-width: 1024px) { .category-grid { grid-template-columns: repeat(6, 1fr); } }

.category-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1.1rem 0.75rem;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.category-tile:hover { box-shadow: var(--shadow-md); border-color: var(--brand-border); transform: translateY(-2px); }
.cat-icon-box {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-subtle);
  transition: background 0.2s ease;
}
.category-tile:hover .cat-icon-box { background: var(--brand-bg); }
.cat-name { font-size: 13px; font-weight: 600; color: var(--text-primary); text-align: center; line-height: 1.2; }
.cat-count { font-size: 11px; color: var(--text-muted); }

/* =============================================================================
   Bot card (grid)
   ========================================================================== */
.bot-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 640px) { .bot-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .bot-grid { grid-template-columns: repeat(3, 1fr); } }

.bot-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  padding: 1.5rem;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-top: 3px solid var(--brand);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.bot-card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-3px); }

.avatar {
  width: 56px; height: 56px;
  border-radius: 14px;
  object-fit: cover;
  margin-bottom: 1rem;
  background: var(--bg-subtle);
}
.avatar-fallback {
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 24px;
}
.bot-card h3 {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 16px; font-weight: 600; color: var(--text-primary);
  margin-bottom: 0.35rem;
}
.bot-card h3 .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.verified { color: var(--check); flex: none; display: inline-flex; }
.bot-username { font-size: 12px; color: var(--text-muted); }
.bot-card-desc {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
  margin: 0.75rem 0 1.25rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  /* Reserve exactly 3 lines so short and long descriptions yield equal-height
     cards across every grid row (matches the uniform React catalog look). */
  min-height: calc(1.6em * 3);
}
.bot-card-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border-color);
}
.metrics { display: flex; align-items: center; gap: 0.6rem; font-size: 12px; color: var(--text-secondary); min-width: 0; }
.metrics .rating { display: inline-flex; align-items: center; gap: 0.25rem; font-weight: 600; }
.metrics .rating .icon { color: var(--star); fill: var(--star); }
.metrics .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--border-strong); }
.metrics .users { display: inline-flex; align-items: center; gap: 0.25rem; }
.metrics .users .icon { color: var(--text-muted); }
.view-btn {
  flex: none;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-size: 13px; font-weight: 600;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}
.bot-card:hover .view-btn { background: var(--brand-hover); box-shadow: 0 4px 12px rgba(45, 91, 227, 0.35); }

.section-cta { display: flex; justify-content: center; margin-top: 2.5rem; }

/* =============================================================================
   Reviews
   ========================================================================== */
.review-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 768px) { .review-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .review-grid { grid-template-columns: repeat(3, 1fr); } }

.review-card {
  display: flex; flex-direction: column;
  padding: 1.25rem;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}
.review-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.85rem; }
.review-who { display: flex; align-items: center; gap: 0.65rem; }
.review-ava {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(91,91,214,0.22), rgba(91,91,214,0.10));
  color: var(--indigo); font-weight: 700; font-size: 14px; flex: none;
}
.review-name { font-size: 15px; font-weight: 700; color: var(--text-primary); display: flex; align-items: center; gap: 0.4rem; }
.premium {
  font-size: 10px; font-weight: 700; padding: 0.1rem 0.35rem; border-radius: 5px;
  background: var(--premium-bg); color: var(--premium-text); line-height: 1.2;
}
.stars { display: inline-flex; gap: 1px; margin-top: 0.3rem; }
.stars .icon { width: 13px; height: 13px; color: var(--star); fill: var(--star); }
.stars .icon.empty { color: var(--border-strong); fill: var(--border-strong); }
.review-date { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.review-text {
  font-size: 14px; color: var(--text-secondary); line-height: 1.55; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.review-card .review-link { margin-top: 0.85rem; font-size: 13px; font-weight: 700; color: var(--indigo); }
.review-card .review-link:hover { text-decoration: underline; }

/* =============================================================================
   Two-column info sections (home)
   ========================================================================== */
.split { display: grid; grid-template-columns: 1fr; gap: 3rem; align-items: center; }
@media (min-width: 1024px) { .split { grid-template-columns: 1fr 1fr; gap: 4rem; } }
.split .col-text .section-head { text-align: left; margin: 0 0 1.5rem; max-width: none; }
.split .col-text .section-head .eyebrow { margin-bottom: 0.6rem; }
.split.reverse .col-stats { order: -1; }
@media (min-width: 1024px) { .split.reverse .col-stats { order: 0; } }
.prose p { color: var(--text-secondary); font-size: 1.0625rem; line-height: 1.7; margin-bottom: 1.1rem; }

/* "Bot anatomy" / feature panel */
.panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: clamp(1.5rem, 4vw, 2rem);
  box-shadow: var(--shadow-md);
}
.panel-head { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 1.75rem; }
.panel-badge {
  width: 60px; height: 60px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: #fff; margin-bottom: 1rem;
}
.panel-head h3 { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; }
.feature-list { display: flex; flex-direction: column; gap: 0.75rem; }
.feature-row {
  display: flex; align-items: center; gap: 1rem;
  padding: 0.9rem;
  border-radius: 16px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.feature-row:hover { transform: scale(1.02); box-shadow: var(--shadow-sm); }
.feature-ico {
  width: 48px; height: 48px; border-radius: 12px; flex: none;
  display: flex; align-items: center; justify-content: center;
}
.feature-row span.txt { font-size: 15px; font-weight: 600; color: var(--text-primary); line-height: 1.3; }

/* stat cards (why useful) */
.stat-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 480px) { .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; } }
.stat-card {
  position: relative; overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 2rem 1.5rem 2.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.stat-card .stat-num {
  font-size: 2.85rem; line-height: 1; font-weight: 800; letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
  background: linear-gradient(120deg, var(--grad-from), var(--grad-to));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.stat-card .stat-cap { color: var(--text-muted); font-weight: 500; font-size: 13px; }
.stat-card .stat-line {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 7rem; height: 3px; border-radius: 99px 99px 0 0;
  background: linear-gradient(90deg, var(--grad-from), var(--grad-to));
}

/* benefit rows (why useful right side) */
.benefit { display: flex; gap: 1rem; padding: 1.1rem; border-radius: 16px; background: var(--bg-card); border: 1px solid var(--border-color); box-shadow: var(--shadow-sm); margin-bottom: 0.75rem; }
.benefit .feature-ico { width: 46px; height: 46px; }
.benefit h4 { font-size: 1.0625rem; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 0.3rem; color: var(--text-primary); }
.benefit p { font-size: 14px; color: var(--text-secondary); line-height: 1.45; }

/* how-to steps */
.steps { display: flex; flex-direction: column; gap: 1.75rem; }
.step { display: flex; gap: 1.25rem; align-items: flex-start; }
.step-num {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--indigo); color: #fff; font-weight: 700; font-size: 1.05rem;
}
.step h4 { font-size: 1.0625rem; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 0.4rem; color: var(--text-primary); }
.step p { font-size: 14px; color: var(--text-secondary); line-height: 1.55; max-width: 28rem; }

/* search-flow mock */
.flow-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 24px; padding: clamp(1.5rem, 4vw, 2rem); box-shadow: var(--shadow-md); }
.flow-head { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; margin-bottom: 1.5rem; color: var(--text-secondary); }
.flow-head h3 { font-size: 14px; font-weight: 500; color: var(--text-muted); }
.flow-query { background: var(--bg-subtle); border: 1px solid var(--border-color); border-radius: 12px; padding: 1rem; margin-bottom: 1rem; box-shadow: var(--shadow-sm); }
.flow-query .label { font-size: 12px; color: var(--text-muted); margin-bottom: 0.15rem; }
.flow-query .q { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.flow-result { display: flex; align-items: center; gap: 1rem; padding: 1rem; border-radius: 12px; border: 1px solid var(--border-color); margin-bottom: 0.75rem; }
.flow-result.best { background: var(--brand-bg); border-color: var(--brand-border); }
.flow-result.alt { background: var(--bg-card); box-shadow: var(--shadow-sm); }
.flow-result .emoji { font-size: 1.25rem; }
.flow-result h4 { font-size: 14px; font-weight: 700; margin-bottom: 0.15rem; }
.flow-result.best h4 { color: var(--brand); }
.flow-result p { font-size: 12px; color: var(--text-muted); }

/* for creators */
.creators-card {
  position: relative; overflow: hidden;
  max-width: 64rem; margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  box-shadow: var(--shadow-md);
}
.creators-card .glow { width: 400px; height: 400px; }
.creators-card .glow-1 { top: -120px; right: -120px; left: auto; transform: none; }
.creators-card .glow-2 { bottom: -120px; left: -120px; right: auto; transform: none; }
.creators-inner { position: relative; z-index: 1; padding: clamp(2rem, 5vw, 3.5rem); }
.creators-head { text-align: center; margin-bottom: 2.5rem; }
.creators-head .eyebrow { margin-bottom: 0.75rem; }
.creators-head h2 { font-size: clamp(1.5rem, 4vw, 2.25rem); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 0.75rem; }
.creators-head p { color: var(--text-secondary); max-width: 36rem; margin: 0 auto; line-height: 1.6; }
.creators-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-bottom: 2.5rem; }
@media (min-width: 640px) { .creators-grid { grid-template-columns: repeat(2, 1fr); } }
.creator-step { display: flex; gap: 1rem; padding: 1rem; border-radius: 12px; background: var(--bg-subtle); border: 1px solid var(--border-color); }
.creator-step .feature-ico { width: 40px; height: 40px; border-radius: 12px; }
.creator-step p.t { font-size: 14px; font-weight: 700; color: var(--text-primary); margin-bottom: 0.2rem; }
.creator-step p.d { font-size: 12px; color: var(--text-muted); line-height: 1.5; }
.creators-foot { display: flex; flex-direction: column; gap: 1.25rem; align-items: center; padding-top: 1.5rem; border-top: 1px solid var(--border-color); }
@media (min-width: 640px) { .creators-foot { flex-direction: row; justify-content: space-between; } }
.perks { display: flex; flex-wrap: wrap; gap: 0.3rem 1.25rem; justify-content: center; }
.perk { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 13px; font-weight: 500; color: var(--text-secondary); }
.perk .icon { color: var(--check); }

/* accent backgrounds reused by feature icons */
.bg-blue { background: rgba(59,130,246,0.12); color: #3b82f6; }
.bg-violet { background: rgba(139,92,246,0.12); color: #8b5cf6; }
.bg-purple { background: rgba(168,85,247,0.12); color: #a855f7; }
.bg-emerald { background: rgba(16,185,129,0.12); color: #10b981; }
.bg-orange { background: rgba(249,115,22,0.12); color: #f97316; }
.bg-amber { background: rgba(245,158,11,0.14); color: #f59e0b; }
.bg-pink { background: rgba(236,72,153,0.12); color: #ec4899; }

/* =============================================================================
   Catalog / category pages
   ========================================================================== */
.page-head { padding-top: 2.5rem; padding-bottom: clamp(2rem, 5vw, 3rem); }
.page-head .eyebrow { margin-bottom: 0.75rem; }
.page-head h1 {
  font-size: clamp(2.25rem, 5vw, 2.625rem);
  font-weight: 800; letter-spacing: -0.03em; margin-bottom: 1rem;
  display: flex; align-items: center; gap: 0.65rem;
}
.page-head h1 .cat-emoji { display: inline-flex; }
.page-head p { color: var(--text-secondary); font-size: 1rem; max-width: 42rem; line-height: 1.6; }
/* Search + filters share one row (search left, filters right), matching the
   React catalog; wraps to a stack on narrow screens. */
.catalog-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.75rem; }
.catalog-toolbar .search { margin: 0; flex: 1 1 20rem; max-width: 30rem; }
.catalog-toolbar .filters { flex: 0 1 auto; }
.category-chips { margin-top: 1.5rem; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.chip-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.5rem; }
.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.filter-chip {
  display: inline-flex; align-items: center; gap: 0.4rem;
  height: 40px; padding: 0 1rem;
  border-radius: 12px;
  font-size: 13px; font-weight: 600;
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.filter-chip:hover { background: var(--bg-subtle); }
.filter-chip.is-active { background: var(--brand-bg); color: var(--brand); border-color: var(--brand-border); }
.filter-chip .icon { color: inherit; }

.results-band { background: var(--band-bg); border-top: 1px solid var(--border-color); padding-block: 2.5rem 6rem; min-height: 480px; }
.results-count { font-size: 13px; color: var(--text-muted); font-weight: 500; margin-bottom: 1.5rem; }

.empty-state {
  grid-column: 1 / -1;
  display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 5rem 1rem;
}
.empty-state .empty-ico {
  width: 56px; height: 56px; border-radius: 16px; margin-bottom: 1rem;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-subtle); color: var(--text-muted);
}
.empty-state p { color: var(--text-muted); font-size: 14px; font-weight: 500; }

/* breadcrumb */
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; font-size: 13px; color: var(--text-muted); margin-bottom: 1.25rem; }
.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb .sep { color: var(--border-strong); }

/* =============================================================================
   Bot detail page
   ========================================================================== */
.bot-hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #f3f4fd, var(--bg-main));
  border-bottom: 1px solid var(--border-color);
}
.dark .bot-hero { background: linear-gradient(135deg, rgba(49,46,129,0.18), var(--bg-main)); }
.bot-hero .container { position: relative; z-index: 1; padding-block: clamp(2rem, 5vw, 3.5rem); }
.bot-hero-glow { position: absolute; top: -120px; right: -10%; width: 500px; height: 500px; border-radius: 50%; background: radial-gradient(circle, rgba(99,102,241,0.18), transparent 70%); pointer-events: none; }

.bot-hero-main { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1.5rem; max-width: 64rem; margin: 0 auto; }
@media (min-width: 768px) { .bot-hero-main { flex-direction: row; align-items: center; text-align: left; gap: 3rem; } }
.bot-avatar {
  width: 96px; height: 96px; border-radius: 50%; flex: none;
  object-fit: cover;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12);
}
@media (min-width: 768px) { .bot-avatar { width: 130px; height: 130px; } }
.bot-avatar.avatar-fallback { font-size: 48px; }
.bot-hero-text { flex: 1; min-width: 0; }
.bot-hero-text h1 { font-size: clamp(1.75rem, 5vw, 2.625rem); font-weight: 800; letter-spacing: -0.03em; margin-bottom: 0.35rem; display: flex; align-items: center; gap: 0.5rem; justify-content: center; }
@media (min-width: 768px) { .bot-hero-text h1 { justify-content: flex-start; } }
.bot-hero-text .bot-username { font-size: 14px; margin-bottom: 1rem; }
.bot-desc { font-size: clamp(0.95rem, 1.6vw, 1.0625rem); color: var(--text-secondary); line-height: 1.6; max-width: 42rem; margin: 0 auto 1.75rem; font-weight: 500; }
@media (min-width: 768px) { .bot-desc { margin-inline: 0; } }

.bot-cats { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; margin: 0 auto 1.75rem; }
@media (min-width: 768px) { .bot-cats { justify-content: flex-start; } }
.bot-cat-chip {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.4rem 0.8rem; border-radius: 0.625rem;
  font-size: 13px; font-weight: 600; line-height: 1;
  color: var(--cat-color);
  background: color-mix(in srgb, var(--cat-color) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--cat-color) 30%, transparent);
  transition: background 0.15s ease, transform 0.15s ease;
}
.bot-cat-chip:hover { background: color-mix(in srgb, var(--cat-color) 20%, transparent); transform: translateY(-1px); }
.bot-cat-chip svg { width: 14px; height: 14px; flex: none; }

.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; max-width: 32rem; margin: 0 auto 1.75rem; }
.stats.has-users { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 768px) { .stats { margin-inline: 0; } }
.stat {
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: 16px; padding: 0.85rem 0.5rem;
  display: flex; flex-direction: column; align-items: center; gap: 0.3rem;
  box-shadow: var(--shadow-sm);
}
.stat .stat-value { font-size: 1.2rem; font-weight: 800; color: var(--indigo); }
.stat .stat-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; color: var(--text-muted); }

.bot-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }
@media (min-width: 768px) { .bot-cta { justify-content: flex-start; } }
.copy-btn, .share-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  height: 46px; padding: 0 1.1rem; border-radius: 12px;
  background: var(--bg-card); border: 1px solid var(--border-color);
  color: var(--text-secondary); font-size: 14px; font-weight: 600;
  cursor: pointer; box-shadow: var(--shadow-sm);
  transition: background 0.15s ease, color 0.15s ease;
}
.copy-btn:hover, .share-btn:hover { background: var(--bg-subtle); color: var(--text-primary); }
.share-btn { padding: 0 0.9rem; }

.bot-body { max-width: 56rem; margin-inline: auto; }
.bot-body h2 { font-size: 1.375rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 1.25rem; }
.bot-body .reviews { display: grid; gap: 1rem; margin-bottom: 1.5rem; }
.bot-body .review-card { box-shadow: var(--shadow-sm); }
.related-section { margin-top: 3rem; }

/* related list cards — vertical cards (avatar + name header, description,
   rating/CTA footer), mirroring the React ListBotCard. */
.list-cards { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 640px) { .list-cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .list-cards { grid-template-columns: repeat(3, 1fr); } }
.list-card {
  display: flex; flex-direction: column; height: 100%; min-width: 0;
  gap: 0.85rem;
  padding: 1.25rem;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.list-card:hover { box-shadow: var(--shadow-md); border-color: var(--brand-border); transform: translateY(-2px); }
.list-card .lc-head { display: flex; align-items: center; gap: 0.85rem; min-width: 0; }
.list-card .avatar { width: 52px; height: 52px; border-radius: 50%; margin-bottom: 0; flex: none; }
.list-card .lc-body { flex: 1; min-width: 0; }
.list-card h3 {
  display: flex; align-items: center; gap: 0.4rem; min-width: 0;
  font-size: 15px; font-weight: 700; color: var(--text-primary); line-height: 1.25;
}
.list-card h3 .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-card .lc-username { display: block; margin-top: 0.15rem; font-size: 12px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-card .lc-desc {
  flex: 1;
  font-size: 13px; color: var(--text-secondary); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: calc(1.6em * 2);
}
.list-card .lc-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-top: auto; }
.list-card .lc-rating { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 13px; font-weight: 600; color: var(--star); }
.list-card .lc-rating .icon { color: var(--star); fill: var(--star); }
.list-card .lc-open { flex: none; }

/* =============================================================================
   Contact page
   ========================================================================== */
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; align-items: stretch; }
@media (min-width: 1024px) { .contact-grid { grid-template-columns: 1fr 1fr; gap: 2.5rem; } }
.contact-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 16px; padding: clamp(1.5rem, 4vw, 2rem); box-shadow: var(--shadow-md); }
.contact-form { display: flex; flex-direction: column; gap: 1.1rem; }
.contact-form label { display: flex; flex-direction: column; gap: 0.5rem; }
.contact-form label > span { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.contact-form input, .contact-form textarea {
  width: 100%;
  background: var(--bg-main); border: 1px solid var(--border-color);
  border-radius: 10px; padding: 0.7rem 0.85rem;
  font-size: 14px; color: var(--text-primary); font-family: inherit;
  outline: none; transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.contact-form input::placeholder, .contact-form textarea::placeholder { color: var(--text-muted); }
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--brand); box-shadow: var(--shadow-focus); }
.contact-form textarea { resize: vertical; min-height: 120px; }
.contact-form .btn { height: 52px; margin-top: 0.4rem; }
.form-status { font-size: 13px; color: var(--text-muted); min-height: 1.2em; }

.work-card { background: var(--bg-subtle); border: 1px solid var(--border-color); border-radius: 16px; padding: clamp(1.5rem, 4vw, 2.25rem); height: 100%; }
.work-card h2 { font-size: 1.375rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 0.85rem; }
.work-card > p { font-size: 15px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 1.75rem; }
.work-feats { display: flex; flex-direction: column; gap: 0.75rem; }
.work-feat { display: flex; gap: 1rem; padding: 1rem; border-radius: 12px; background: var(--bg-card); border: 1px solid var(--border-color); }
.work-feat .feature-ico { width: 40px; height: 40px; border-radius: 10px; background: var(--brand-bg); color: var(--indigo); }
.work-feat h4 { font-size: 14px; font-weight: 700; color: var(--text-primary); margin-bottom: 0.25rem; }
.work-feat p { font-size: 13px; color: var(--text-secondary); line-height: 1.45; }

/* =============================================================================
   404
   ========================================================================== */
.error-page { display: flex; flex-direction: column; align-items: center; text-align: center; min-height: 70vh; justify-content: center; position: relative; overflow: hidden; }
.error-icon {
  width: 110px; height: 110px; border-radius: 28px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-card); border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md); color: var(--text-muted);
  transform: rotate(-6deg); margin-bottom: 2rem;
}
.error-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 0.85rem; border-radius: 999px; margin-bottom: 1.5rem;
  background: rgba(239,68,68,0.10); border: 1px solid rgba(239,68,68,0.2);
}
.error-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: #ef4444; }
.error-badge span { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; color: #ef4444; }
.error-page .big { font-size: clamp(4rem, 12vw, 7rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1; margin-bottom: 1rem; }
.error-page h1 { font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 700; margin-bottom: 1rem; }
.error-page > p { color: var(--text-secondary); font-size: 1.05rem; max-width: 32rem; line-height: 1.6; margin-bottom: 2.5rem; }
.error-actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }

/* =============================================================================
   Pagination
   ========================================================================== */
.pagination { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.5rem; margin-top: 1rem; }
.page-link {
  min-width: 40px; height: 40px; padding: 0 0.5rem;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px; font-size: 14px; font-weight: 700;
  background: var(--bg-card); border: 1px solid var(--border-color);
  color: var(--text-secondary); box-shadow: var(--shadow-sm);
  transition: background 0.15s ease, color 0.15s ease;
}
.page-link:hover { background: var(--bg-subtle); color: var(--text-primary); }
.page-link.is-active { background: var(--brand); color: #fff; border-color: var(--brand); }
.page-gap { color: var(--text-muted); padding: 0 0.25rem; }

/* =============================================================================
   Footer
   ========================================================================== */
.site-footer { margin-top: clamp(3rem, 8vw, 7rem); border-top: 1px solid var(--border-color); }
.footer-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2.5rem; padding-block: clamp(2.5rem, 6vw, 4rem); }
@media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(4, 1fr); gap: 3rem; } }
.footer-brand { grid-column: span 2; }
@media (min-width: 640px) { .footer-brand { grid-column: span 1; } }
.footer-brand .brand { margin-bottom: 1rem; }
.footer-brand p { font-size: 13px; color: var(--text-muted); line-height: 1.6; max-width: 14rem; }
.footer-col h3 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-primary); margin-bottom: 1rem; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.65rem; }
.footer-col a { font-size: 13px; color: var(--text-muted); transition: color 0.15s ease; }
.footer-col a:hover { color: var(--text-primary); }
.footer-bottom { display: flex; flex-direction: column; gap: 0.75rem; align-items: center; justify-content: space-between; padding-block: 1.5rem; border-top: 1px solid var(--border-color); }
@media (min-width: 640px) { .footer-bottom { flex-direction: row; } }
.footer-bottom span, .footer-bottom a { font-size: 12px; color: var(--text-muted); }
.footer-bottom a:hover { color: var(--text-secondary); }
.footer-links { display: flex; align-items: center; gap: 1rem; }
.footer-links .divider { width: 1px; height: 12px; background: var(--border-strong); }

/* ─── Leave-a-review form (bot page) ─── */
.rate-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}
.rate-box h3 { font-size: 17px; font-weight: 700; color: var(--text-primary); margin-bottom: 0.4rem; }
.rate-desc { font-size: 14px; color: var(--text-muted); margin-bottom: 1.1rem; }
.rate-form { display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; }
.star-input { display: flex; gap: 0.15rem; }
.star-btn {
  background: none; border: none; cursor: pointer; padding: 0.2rem; line-height: 0;
  color: var(--star); border-radius: 8px; transition: transform 0.12s ease;
}
.star-btn:hover { transform: scale(1.12); }
.star-btn .icon { fill: currentColor; }
.star-btn .icon.empty { color: var(--border-strong); fill: var(--border-strong); }
.rate-comment {
  width: 100%; padding: 0.75rem 0.9rem; font: inherit; font-size: 15px;
  color: var(--text-primary); background: var(--bg-subtle);
  border: 1px solid var(--border-color); border-radius: 12px; resize: vertical; min-height: 96px;
}
.rate-comment::placeholder { color: var(--text-muted); }
.rate-comment:focus { outline: none; border-color: var(--brand); box-shadow: var(--shadow-focus); }
.rate-msg { font-size: 13px; font-weight: 600; color: #dc2626; margin: -0.3rem 0 0; }
.rate-verify { text-align: center; padding: 0.5rem 0; }
.rate-verify-ico { font-size: 2.5rem; margin-bottom: 0.75rem; }
.rate-verify p { font-size: 14px; color: var(--text-muted); margin-bottom: 1.1rem; }

/* ─── Submit-a-bot modal ─── */
html.modal-open { overflow: hidden; }
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal[hidden] { display: none; }
.modal-overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.45); backdrop-filter: blur(3px); }
.dark .modal-overlay { background: rgba(0, 0, 0, 0.6); }
.modal-card {
  position: relative; width: 100%; max-width: 440px;
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: 18px; box-shadow: var(--shadow-md); overflow: hidden;
  animation: modalIn 0.18s ease-out;
}
@keyframes modalIn { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--border-color); }
.modal-head h3 { font-size: 17px; font-weight: 700; color: var(--text-primary); }
.modal-body { padding: 1.25rem; }
.modal-desc { font-size: 14px; color: var(--text-muted); margin-bottom: 1.1rem; }
.add-bot-form { display: flex; flex-direction: column; gap: 0.6rem; }
.field-label { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.input-prefix { position: relative; }
.input-prefix .prefix { position: absolute; left: 0.85rem; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-weight: 600; pointer-events: none; }
.input-prefix input {
  width: 100%; padding: 0.7rem 0.9rem 0.7rem 2rem; font: inherit; font-size: 15px;
  color: var(--text-primary); background: var(--bg-subtle);
  border: 1px solid var(--border-color); border-radius: 12px;
}
.input-prefix input::placeholder { color: var(--text-muted); }
.input-prefix input:focus { outline: none; border-color: var(--brand); box-shadow: var(--shadow-focus); }
.add-bot-msg { font-size: 13px; font-weight: 600; color: #dc2626; margin: 0.2rem 0 0; }
.modal-actions { display: flex; gap: 0.75rem; margin-top: 0.8rem; }
.modal-actions .btn { flex: 1; }
.add-bot-verify { text-align: center; }
.add-bot-verify .rate-verify-ico { font-size: 2.75rem; margin-bottom: 0.5rem; }
.add-bot-waiting { display: flex; align-items: center; justify-content: center; gap: 0.5rem; font-size: 13px; color: var(--text-muted); margin-top: 1rem; }
.spinner {
  width: 16px; height: 16px; border: 2px solid var(--border-strong);
  border-top-color: var(--indigo); border-radius: 50%; animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
