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

:root {
  --bg: #0d1017;
  --bg-soft: #11151f;
  --card: rgba(255, 255, 255, 0.04);
  --card-solid: #161b26;
  --nav-bg: rgba(13, 16, 23, 0.78);
  --line: rgba(255, 255, 255, 0.09);
  --text: #f2f4f8;
  --muted: #9aa3b5;
  --accent: #ff8a3d;
  --accent-2: #ffc857;
  --accent-soft: rgba(255, 138, 61, 0.14);
  --good: #3ecf8e;
  --bad: #ff5c7a;
  --info: #58a6ff;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --radius: 18px;
  --font-head: 'Unbounded', system-ui, sans-serif;
  --font-body: 'Manrope', system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, 'Cascadia Code', 'JetBrains Mono', Consolas, monospace;
}

[data-theme="light"] {
  --bg: #faf7f2;
  --bg-soft: #ffffff;
  --card: #ffffff;
  --card-solid: #ffffff;
  --nav-bg: rgba(250, 247, 242, 0.82);
  --line: rgba(28, 34, 51, 0.1);
  --text: #1c2233;
  --muted: #5b6474;
  --accent-soft: rgba(255, 138, 61, 0.12);
  --shadow: 0 18px 50px rgba(50, 50, 90, 0.12);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(640px 420px at 85% -5%, rgba(255, 138, 61, 0.1), transparent 60%),
    radial-gradient(520px 380px at -5% 35%, rgba(88, 166, 255, 0.07), transparent 60%);
}

#fx {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.page,
.nav,
.marquee,
.footer,
.preloader { position: relative; z-index: 1; }

img { max-width: 100%; display: block; }

a { color: var(--accent); }

.container { width: min(1180px, 92vw); margin: 0 auto; }

.grad-text {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

::selection { background: var(--accent); color: #17130e; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(140, 140, 170, 0.3); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- кнопки ---------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  border: 0;
  border-radius: 14px;
  padding: 14px 24px;
  cursor: pointer;
  text-decoration: none;
  color: #17130e;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(255, 138, 61, 0.35);
}

.btn:active { transform: translateY(0); }

.btn-ghost {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
}

.btn-ghost:hover { box-shadow: var(--shadow); }

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.btn-lg { padding: 17px 30px; font-size: 16px; border-radius: 16px; }
.btn-sm { padding: 9px 16px; font-size: 13px; border-radius: 11px; }
.btn-block { width: 100%; }

.btn-loading { pointer-events: none; }
.btn-loading .btn-label { opacity: 0.45; }

.btn-loading::after {
  content: '';
  position: absolute;
  right: 14px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid rgba(23, 19, 14, 0.3);
  border-top-color: #17130e;
  animation: spin 0.7s linear infinite;
}

.btn-ghost.btn-loading::after {
  border-color: var(--line);
  border-top-color: var(--muted);
}

.icon-btn {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s;
}

.icon-btn:hover { border-color: var(--accent); transform: translateY(-1px); }

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- навбар ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 14px 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 18px;
}

.logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  font-size: 21px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 18px rgba(255, 138, 61, 0.35);
}

.nav-links {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 14.5px;
  padding: 9px 13px;
  border-radius: 10px;
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover { color: var(--text); background: var(--accent-soft); }

.nav-actions { display: flex; align-items: center; gap: 10px; }

.nav-login {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 14.5px;
  padding: 11px 20px;
  border-radius: 12px;
  border: 1px solid var(--line);
  transition: border-color 0.2s, color 0.2s, transform 0.15s;
}

.nav-login:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }

/* ---------- hero ---------- */

.hero { padding: 72px 0 60px; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(255, 138, 61, 0.3);
  padding: 7px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
}

.hero-title {
  font-family: var(--font-head);
  font-size: clamp(30px, 4.6vw, 52px);
  line-height: 1.14;
  font-weight: 900;
  letter-spacing: -0.01em;
  margin-bottom: 18px;
}

.type-line {
  font-family: var(--font-head);
  font-size: clamp(15px, 1.8vw, 19px);
  font-weight: 500;
  color: var(--accent-2);
  min-height: 1.6em;
  margin-bottom: 14px;
}

.type-line::after {
  content: '▍';
  animation: blink 1s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.hero-sub { color: var(--muted); font-size: 17px; max-width: 520px; margin-bottom: 30px; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 38px; }

.mini-stats { display: flex; flex-wrap: wrap; gap: 28px; }

.mini-stat b {
  display: block;
  font-family: var(--font-head);
  font-size: 20px;
}

.mini-stat span { color: var(--muted); font-size: 13px; }

.hero-visual { position: relative; }

.hero-card {
  position: relative;
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  animation: float 7s ease-in-out infinite;
}

.hero-card img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 5 / 4; }

.hero-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(200deg, transparent 55%, rgba(13, 16, 23, 0.55));
}

.float-chip {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 700;
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px 15px;
  box-shadow: var(--shadow);
  animation: float 5.5s ease-in-out infinite;
}

.float-chip small { display: block; color: var(--muted); font-weight: 600; font-size: 11px; }

.chip-1 { top: 7%; left: -7%; animation-delay: 0.4s; }
.chip-2 { bottom: 12%; right: -6%; animation-delay: 1.1s; }
.chip-3 { top: 45%; right: -9%; animation-delay: 1.8s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* ---------- бегущая строка ---------- */

.marquee {
  overflow: hidden;
  border-block: 1px solid var(--line);
  padding: 15px 0;
  background: var(--bg-soft);
}

.marquee-track {
  display: flex;
  gap: 52px;
  width: max-content;
  animation: marquee 26s linear infinite;
}

.marquee span {
  color: var(--muted);
  font-family: var(--font-head);
  font-size: 12.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  white-space: nowrap;
}

@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- секции ---------- */

.section { padding: 84px 0; }

.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }

.section-head h2 {
  font-family: var(--font-head);
  font-size: clamp(24px, 3.2vw, 36px);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 14px;
}

.section-head p { color: var(--muted); }

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

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 138, 61, 0.4);
  box-shadow: var(--shadow);
}

.card-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  font-size: 25px;
  border-radius: 15px;
  background: var(--accent-soft);
  margin-bottom: 18px;
}

.card h3 { font-size: 17.5px; font-weight: 800; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 14.5px; }

/* ---------- статистика ---------- */

.stats-band { border-block: 1px solid var(--line); background: var(--bg-soft); padding: 52px 0; }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }

.stat b {
  display: block;
  font-family: var(--font-head);
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 900;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat span { color: var(--muted); font-size: 14px; font-weight: 600; }

/* ---------- галерея ---------- */

.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

.shot {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.shot img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.shot:hover img { transform: scale(1.07); }

.shot figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 34px 16px 13px;
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(transparent, rgba(10, 12, 18, 0.82));
}

/* ---------- шаги ---------- */

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }

.step { position: relative; padding-top: 6px; }

.step-num {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-family: var(--font-head);
  font-weight: 900;
  color: #17130e;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  margin-bottom: 16px;
}

.step h3 { font-size: 17px; font-weight: 800; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 14.5px; }

/* ---------- тарифы ---------- */

.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }

.price-card { display: flex; flex-direction: column; position: relative; }

.price-card.popular {
  border-color: var(--accent);
  box-shadow: 0 20px 60px rgba(255, 138, 61, 0.18);
  transform: scale(1.03);
}

.popular-badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: 800;
  color: #17130e;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  padding: 6px 14px;
  border-radius: 999px;
  white-space: nowrap;
}

.price-name { font-family: var(--font-head); font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.price-desc { color: var(--muted); font-size: 13.5px; margin-bottom: 18px; }

.price { font-family: var(--font-head); font-size: 34px; font-weight: 900; }
.price .per { font-size: 14px; color: var(--muted); font-family: var(--font-body); font-weight: 600; }

.price-list { list-style: none; margin: 20px 0 26px; display: grid; gap: 10px; flex: 1; }

.price-list li { display: flex; gap: 10px; font-size: 14.5px; color: var(--muted); }
.price-list li::before { content: '✓'; color: var(--good); font-weight: 900; }
.price-list li.off { opacity: 0.45; }
.price-list li.off::before { content: '✕'; color: var(--bad); }

/* ---------- отзывы ---------- */

.quote-card { display: flex; flex-direction: column; gap: 16px; }

.quote-text { font-size: 15px; color: var(--text); flex: 1; }

.quote-author { display: flex; align-items: center; gap: 12px; }

.quote-author img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
}

.quote-author b { display: block; font-size: 14.5px; }
.quote-author span { color: var(--muted); font-size: 12.5px; }

.stars { color: var(--accent-2); letter-spacing: 2px; font-size: 14px; }

/* ---------- фак + cta ---------- */

.faq-list { display: grid; gap: 12px; max-width: 760px; margin: 0 auto; }

.faq-list details {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 17px 20px;
  background: var(--card);
  transition: border-color 0.2s;
}

.faq-list details[open] { border-color: rgba(255, 138, 61, 0.45); }

.faq-list summary {
  cursor: pointer;
  font-weight: 800;
  font-size: 15.5px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.faq-list summary::after { content: '+'; color: var(--accent); font-weight: 900; }
.faq-list details[open] summary::after { content: '–'; }

.faq-list details p { color: var(--muted); margin-top: 12px; font-size: 14.5px; }

.cta-band {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 64px 32px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(255, 138, 61, 0.16), rgba(255, 200, 87, 0.08));
  border: 1px solid rgba(255, 138, 61, 0.35);
}

.cta-band h2 { font-family: var(--font-head); font-size: clamp(24px, 3.4vw, 38px); font-weight: 900; margin-bottom: 12px; }
.cta-band p { color: var(--muted); margin-bottom: 28px; }

/* ---------- футер ---------- */

.footer { border-top: 1px solid var(--line); background: var(--bg-soft); padding: 52px 0 30px; margin-top: 40px; }

.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 36px; }

.footer-brand p { color: var(--muted); font-size: 13.5px; max-width: 260px; margin-top: 12px; }

.footer h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 14px; }

.footer-col a {
  display: block;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  padding: 5px 0;
  transition: color 0.2s;
}

.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 22px;
  color: var(--muted);
  font-size: 13px;
}

.link-dont { color: var(--muted); text-decoration: none; border-bottom: 1px dashed var(--line); }
.link-dont:hover { color: var(--bad); border-color: var(--bad); }

/* ---------- тосты ---------- */

.toast-stack {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 340px;
  background: var(--card-solid);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 16px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.25s, transform 0.25s;
}

.toast.show { opacity: 1; transform: none; }
.toast-ico { font-size: 17px; }
.toast-success { border-color: rgba(62, 207, 142, 0.5); }
.toast-error { border-color: rgba(255, 92, 122, 0.5); }
.toast-meow { border-color: rgba(255, 138, 61, 0.5); }

/* ---------- прогресс и след лапок ---------- */

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  z-index: 120;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.paw-trail {
  position: fixed;
  z-index: 90;
  pointer-events: none;
  font-size: 16px;
  opacity: 0.5;
  animation: pawFade 0.9s ease-out forwards;
}

@keyframes pawFade {
  to { opacity: 0; transform: translateY(-18px) scale(0.7) rotate(0deg) !important; }
}

/* ---------- прелоадер ---------- */

.preloader {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  background: var(--bg);
  transition: opacity 0.4s, visibility 0.4s;
}

.preloader.done { opacity: 0; visibility: hidden; }

.paw-loader { font-size: 44px; animation: pawPulse 0.9s ease-in-out infinite; }

@keyframes pawPulse {
  50% { transform: scale(1.3) rotate(-10deg); }
}

/* ---------- reveal и party ---------- */

.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: none; }

body.party .grad-text,
body.party .cta-band,
body.party .badge { animation: hue 3s linear infinite; }

body.party .logo-badge { animation: wiggle 0.5s ease-in-out infinite alternate; }

@keyframes hue { to { filter: hue-rotate(360deg); } }

@keyframes wiggle {
  from { transform: rotate(-8deg) scale(1.05); }
  to { transform: rotate(8deg) scale(1.05); }
}

.fact-swap { opacity: 0.2; }

[data-cat-fact] { transition: opacity 0.25s; }

/* ---------- терминал ---------- */

.terminal-overlay {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 7vh;
  background: rgba(5, 8, 14, 0.6);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.terminal-overlay.open { opacity: 1; pointer-events: auto; }

.terminal {
  width: min(720px, 92vw);
  background: #0b0e14;
  border: 1px solid #262c3a;
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  transform: translateY(20px);
  transition: transform 0.25s;
  overflow: hidden;
}

.terminal-overlay.open .terminal { transform: none; }

.term-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid #1d2330;
}

.term-dot { width: 11px; height: 11px; border-radius: 50%; }
.term-dot:nth-child(1) { background: #ff5f56; }
.term-dot:nth-child(2) { background: #ffbd2e; }
.term-dot:nth-child(3) { background: #27c93f; }

.term-title { margin-left: auto; color: #8b93a7; font-size: 12px; font-family: var(--mono); }
.term-x { cursor: pointer; color: #8b93a7; padding: 0 6px; user-select: none; }
.term-x:hover { color: #fff; }

.term-body {
  height: 320px;
  overflow-y: auto;
  padding: 14px 16px;
  font: 13px/1.7 var(--mono);
  color: #d6e2f0;
}

.term-line.dim { color: #7f8aa3; }
.term-line.accent { color: var(--accent-2); }
.term-line.ok { color: var(--good); }
.term-line.err { color: var(--bad); }

.term-pre {
  white-space: pre-wrap;
  word-break: break-all;
  font: 12px/1.6 var(--mono);
  color: #9fd6b0;
  padding: 6px 0;
}

.term-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid #1d2330;
}

.term-prompt { color: var(--good); font: 13px var(--mono); white-space: nowrap; }

.term-input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  color: #eaf1fb;
  font: 13px var(--mono);
}

/* ---------- страница входа ---------- */

.auth-grid { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; }

.auth-promo {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px;
  background: linear-gradient(160deg, rgba(255, 138, 61, 0.16), rgba(255, 200, 87, 0.05) 60%), var(--bg-soft);
  border-right: 1px solid var(--line);
}

.auth-promo h2 { font-family: var(--font-head); font-size: clamp(24px, 2.6vw, 34px); font-weight: 900; line-height: 1.25; }

.auth-quote { color: var(--muted); font-size: 15px; max-width: 420px; }
.auth-quote b { color: var(--text); }

.auth-promo-img {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 20px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.auth-main { display: grid; place-items: center; padding: 40px 20px; }

.auth-card { width: min(440px, 100%); }

.auth-card h1 { font-family: var(--font-head); font-size: 24px; font-weight: 900; margin-bottom: 6px; }
.auth-card > p { color: var(--muted); font-size: 14px; margin-bottom: 24px; }

.tabs { display: flex; gap: 8px; margin-bottom: 22px; background: var(--card); border: 1px solid var(--line); border-radius: 13px; padding: 5px; }

.tab {
  flex: 1;
  text-align: center;
  padding: 10px;
  border-radius: 9px;
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.tab.active { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #17130e; }

.field { margin-bottom: 16px; }

.field label { display: block; font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 7px; }

.field input {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 15px;
  color: var(--text);
  font: 500 15px var(--font-body);
  outline: 0;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.auth-hint { font-size: 12.5px; color: var(--muted); text-align: center; margin-top: 16px; }
.auth-hint code { font-family: var(--mono); color: var(--accent-2); }

.token-view { display: grid; gap: 14px; }

.jwt-row { border: 1px solid var(--line); border-radius: 13px; padding: 13px 15px; background: var(--card); }

.jwt-row b { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; display: block; margin-bottom: 5px; }
.jwt-row.header b { color: #b48cff; }
.jwt-row.payload b { color: #4dd6c1; }
.jwt-row.signature b { color: var(--accent); }

.jwt-row code {
  display: block;
  font: 11.5px/1.55 var(--mono);
  word-break: break-all;
  color: var(--muted);
  max-height: 84px;
  overflow-y: auto;
}

.auth-success {
  text-align: center;
  font-size: 44px;
  animation: pop 0.4s cubic-bezier(0.3, 1.6, 0.6, 1);
}

@keyframes pop { from { transform: scale(0.4); opacity: 0; } }

/* ---------- дашборд ---------- */

.dash { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }

.dash-side {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: 22px 16px;
  border-right: 1px solid var(--line);
  background: var(--bg-soft);
}

.dash-side .logo { padding: 0 8px; }

.menu { display: grid; gap: 4px; }

.menu a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 14px;
  border-radius: 12px;
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.menu a:hover, .menu a.active { background: var(--accent-soft); color: var(--text); }
.menu a.active { border: 1px solid rgba(255, 138, 61, 0.3); }

.dash-side-foot { margin-top: auto; font-size: 12px; color: var(--muted); padding: 0 10px; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
  color: var(--good);
}

.status-pill::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 0 3px rgba(62, 207, 142, 0.2);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(62, 207, 142, 0.08); } }

.dash-main { display: flex; flex-direction: column; min-width: 0; }

.dash-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 28px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 5;
}

.dash-user { display: flex; align-items: center; gap: 12px; }

.dash-user img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid var(--accent); }
.dash-user b { display: block; font-size: 14px; line-height: 1.2; }
.dash-user span { color: var(--muted); font-size: 12px; }

.dash-content { padding: 28px; display: grid; gap: 22px; }

.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

.stat-card { padding: 20px; }

.stat-card .sc-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }

.stat-card .sc-ico { font-size: 21px; }

.delta { font-size: 12px; font-weight: 800; color: var(--good); background: rgba(62, 207, 142, 0.12); border-radius: 999px; padding: 4px 9px; }
.delta.down { color: var(--bad); background: rgba(255, 92, 122, 0.12); }

.stat-card b { font-family: var(--font-head); font-size: 24px; font-weight: 900; display: block; }
.stat-card span { color: var(--muted); font-size: 13px; font-weight: 600; }

.dash-cols { display: grid; grid-template-columns: 1.7fr 1fr; gap: 22px; align-items: start; }

.panel { padding: 0; overflow: hidden; }

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}

.panel-head h3 { font-size: 15.5px; font-weight: 800; }
.panel-head .dim { color: var(--muted); font-size: 12.5px; font-weight: 600; }

.panel-body { padding: 20px 22px; }

.chart-wrap { width: 100%; height: 270px; }
.chart-wrap canvas { width: 100%; height: 100%; display: block; }

.feed { display: grid; gap: 12px; max-height: 330px; overflow-y: auto; padding-right: 4px; }

.feed-item {
  border-left: 3px solid var(--accent);
  padding: 9px 13px;
  border-radius: 0 11px 11px 0;
  background: var(--card);
  animation: slideIn 0.35s ease;
}

.feed-item b { font-size: 13.5px; }
.feed-item p { font-size: 13px; color: var(--muted); }
.feed-item time { font-size: 11px; color: var(--muted); }

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-8px); }
}

.api-log {
  max-height: 220px;
  overflow-y: auto;
  font: 11.5px/1.8 var(--mono);
  color: var(--muted);
}

.api-log .log-ok { color: var(--good); }
.api-log .log-err { color: var(--bad); }

.table-wrap { overflow-x: auto; }

.cats-table { width: 100%; border-collapse: collapse; min-width: 640px; }

.cats-table th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.cats-table td { padding: 13px 14px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: middle; }

.cats-table tr:last-child td { border-bottom: 0; }

.cat-cell { display: flex; align-items: center; gap: 12px; font-weight: 700; }
.cat-cell img { width: 40px; height: 40px; border-radius: 12px; object-fit: cover; }
.cat-cell span { display: block; font-weight: 500; font-size: 12px; color: var(--muted); }

.mood-chip {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  white-space: nowrap;
}

.bar { width: 110px; height: 8px; border-radius: 6px; background: var(--line); overflow: hidden; }

.bar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width 0.5s ease; }

/* ---------- api docs ---------- */

.api-hero { padding: 54px 0 30px; }

.api-hero h1 { font-family: var(--font-head); font-size: clamp(26px, 3.4vw, 40px); font-weight: 900; margin-bottom: 10px; }
.api-hero p { color: var(--muted); max-width: 620px; }

.base-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font: 13px var(--mono);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 9px 14px;
  margin-top: 18px;
}

.base-chip b { color: var(--good); font-weight: 700; }

.api-cols { display: grid; grid-template-columns: 340px 1fr; gap: 22px; align-items: start; padding-bottom: 70px; }

.endpoint-list { display: grid; gap: 8px; }

.ep {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font: 13px var(--mono);
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  text-decoration: none;
}

.ep:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.ep.selected { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }

.m {
  font: 800 10.5px var(--mono);
  letter-spacing: 0.06em;
  padding: 4px 8px;
  border-radius: 7px;
  min-width: 44px;
  text-align: center;
}

.m-get { color: var(--good); background: rgba(62, 207, 142, 0.13); }
.m-post { color: var(--accent-2); background: rgba(255, 200, 87, 0.13); }
.m-put { color: var(--info); background: rgba(88, 166, 255, 0.13); }
.m-delete { color: var(--bad); background: rgba(255, 92, 122, 0.13); }

.ep .lock { margin-left: auto; font-size: 12px; opacity: 0.75; }

.code-block {
  background: #0b0e14;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 22px;
}

.code-head {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid #1d2330;
  align-items: center;
}

.code-head .tab {
  width: auto;
  padding: 7px 13px;
  border-radius: 8px;
  font-size: 12.5px;
  background: transparent;
  color: #8b93a7;
}

.code-head .tab.active { background: #1a2130; color: #eaf1fb; }

.code-block pre {
  padding: 17px 18px;
  overflow-x: auto;
  font: 12.5px/1.7 var(--mono);
  color: #c9d6e8;
  max-height: 380px;
  overflow-y: auto;
}

.playground { padding: 22px; display: grid; gap: 14px; }

.pg-row { display: flex; gap: 10px; flex-wrap: wrap; }

.pg-row select, .pg-row input {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--text);
  font: 500 14px var(--mono);
  padding: 11px 13px;
  outline: 0;
}

.pg-row select:focus, .pg-row input:focus { border-color: var(--accent); }

.pg-row input.path-input { flex: 1; min-width: 220px; }

.pg-body {
  width: 100%;
  min-height: 90px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  font: 13px/1.6 var(--mono);
  padding: 13px 15px;
  outline: 0;
  resize: vertical;
}

.pg-body:focus { border-color: var(--accent); }

.resp-box {
  background: #0b0e14;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  font: 12.5px/1.7 var(--mono);
  color: #c9d6e8;
  max-height: 340px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 56px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 800 12px var(--mono);
  padding: 5px 11px;
  border-radius: 999px;
}

.status-chip.ok { color: var(--good); background: rgba(62, 207, 142, 0.13); }
.status-chip.bad { color: var(--bad); background: rgba(255, 92, 122, 0.13); }

/* ---------- 404 ---------- */

.nf-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 40px 16px;
  position: relative;
  z-index: 1;
}

.nf-code {
  position: relative;
  font-family: var(--font-head);
  font-size: clamp(90px, 18vw, 170px);
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  user-select: none;
}

.glitch::before, .glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  background: none;
  -webkit-background-clip: initial;
  clip-path: inset(30% 0 40% 0);
  opacity: 0.75;
}

.glitch::before { color: #ff5c7a; animation: glitchA 2.1s infinite linear alternate; }
.glitch::after { color: #58a6ff; animation: glitchB 1.7s infinite linear alternate; }

@keyframes glitchA {
  0% { transform: translate(-4px, 2px); clip-path: inset(12% 0 55% 0); }
  25% { transform: translate(3px, -1px); clip-path: inset(45% 0 20% 0); }
  50% { transform: translate(-2px, 3px); clip-path: inset(65% 0 8% 0); }
  75% { transform: translate(4px, -2px); clip-path: inset(25% 0 48% 0); }
  100% { transform: translate(-3px, 1px); clip-path: inset(50% 0 25% 0); }
}

@keyframes glitchB {
  0% { transform: translate(4px, -2px); clip-path: inset(55% 0 15% 0); }
  25% { transform: translate(-3px, 2px); clip-path: inset(15% 0 60% 0); }
  50% { transform: translate(2px, -3px); clip-path: inset(35% 0 35% 0); }
  75% { transform: translate(-4px, 1px); clip-path: inset(70% 0 5% 0); }
  100% { transform: translate(3px, 2px); clip-path: inset(20% 0 50% 0); }
}

.nf-page h1 { font-family: var(--font-head); font-size: clamp(20px, 3vw, 30px); font-weight: 900; margin: 18px 0 10px; }

.nf-page > div > p { color: var(--muted); max-width: 460px; margin: 0 auto 30px; }

.nf-cat {
  width: 190px;
  height: 190px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--accent);
  box-shadow: 0 20px 60px rgba(255, 138, 61, 0.35);
  margin: 0 auto;
  animation: float 5s ease-in-out infinite;
}

.nf-actions { display: flex; gap: 14px; justify-content: center; align-items: center; flex-wrap: wrap; margin-top: 8px; }

.nf-actions .internal { color: var(--muted); font-size: 14px; font-weight: 600; }

.countdown-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 34px;
  font: 600 13px var(--mono);
  color: var(--muted);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 17px;
}

.countdown-chip b { color: var(--accent); font-size: 15px; }

/* ---------- адаптив ---------- */

@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 560px; }
  .grid-3, .steps, .pricing-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .auth-grid { grid-template-columns: 1fr; }
  .auth-promo { display: none; }
  .dash { grid-template-columns: 1fr; }
  .dash-side {
    position: static;
    height: auto;
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .menu { display: flex; }
  .dash-side-foot { display: none; }
  .dash-cols { grid-template-columns: 1fr; }
  .stat-cards { grid-template-columns: 1fr 1fr; }
  .api-cols { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .grid-3, .steps, .pricing-grid, .gallery-grid { grid-template-columns: 1fr; }
  .price-card.popular { transform: none; }
  .hero { padding-top: 44px; }
  .section { padding: 60px 0; }
  .stat-cards { grid-template-columns: 1fr; }
  .float-chip { display: none; }
  .dash-top { padding: 14px 16px; }
  .dash-content { padding: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
