:root {
  --bg: #0a0b10;
  --panel: #14161d;
  --panel-2: #1c1f29;
  --border: #282c38;
  --text: #eef0f6;
  --muted: #8b90a4;
  --accent: #7b6cff;
  --accent-2: #1fd9b4;
  --danger: #ff5470;
  --grad: linear-gradient(135deg, #7b6cff 0%, #22c7e6 50%, #1fd9b4 100%);
}
* { box-sizing: border-box; }
body {
  margin: 0; color: var(--text); min-height: 100vh;
  background:
    radial-gradient(820px 560px at 10% -6%, rgba(123,108,255,.30), transparent 58%),
    radial-gradient(760px 540px at 95% -4%, rgba(31,217,180,.20), transparent 55%),
    radial-gradient(700px 600px at 60% 105%, rgba(34,199,230,.12), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.55; -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
.container { max-width: 1100px; margin: 0 auto; padding: 24px; }
header.top {
  display: flex; justify-content: space-between; align-items: center;
  padding: 15px 28px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: rgba(10,11,16,.72);
  backdrop-filter: blur(16px) saturate(140%); z-index: 10;
}
.logo { font-weight: 800; font-size: 21px; letter-spacing: -.6px; }
.logo span { background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; }
nav a { margin-left: 20px; color: var(--muted); font-weight: 500; font-size: 15px; transition: color .15s; }
nav a:hover { color: var(--text); }
.btn {
  display: inline-block; background: var(--grad); color: #fff; border: none;
  padding: 12px 24px; border-radius: 12px; font-weight: 650; font-size: 15px;
  cursor: pointer; text-align: center; box-shadow: 0 6px 20px rgba(123,108,255,.30);
  transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(123,108,255,.42); }
.btn:active { transform: translateY(0); }
.btn.secondary { background: var(--panel-2); color: var(--text); border: 1px solid var(--border); box-shadow: none; }
.btn.secondary:hover { border-color: var(--accent); }
.btn.ghost { background: transparent; border: 1px solid var(--border); color: var(--text); box-shadow: none; }
.btn.ghost:hover { border-color: var(--accent); }
.btn.block { display: block; width: 100%; }
.card {
  background: linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,0)), var(--panel);
  border: 1px solid var(--border); border-radius: 16px; padding: 22px;
}
input, select, textarea {
  width: 100%; padding: 12px 14px; background: var(--panel-2); color: var(--text);
  border: 1px solid var(--border); border-radius: 11px; font-size: 15px; margin-top: 6px;
  font-family: inherit; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(123,108,255,.18); }
label { font-weight: 600; font-size: 14px; color: var(--muted); }
.field { margin-bottom: 16px; }
.error { background: rgba(255,84,112,.12); color: var(--danger); padding: 11px 15px;
  border-radius: 11px; margin-bottom: 16px; font-size: 14px; border: 1px solid rgba(255,84,112,.22); }

/* лендинг */
.hero { text-align: center; padding: 96px 24px 44px; position: relative; }
.hero-badge { display: inline-flex; align-items: center; gap: 7px;
  background: rgba(123,108,255,.12); border: 1px solid rgba(123,108,255,.32);
  color: #c3bcff; font-size: 14px; font-weight: 600; padding: 7px 16px;
  border-radius: 100px; margin-bottom: 28px; }
.hero h1 { font-size: 62px; line-height: 1.03; margin: 0 0 22px; letter-spacing: -2px; font-weight: 800; }
.hero h1 .grad { background: var(--grad);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { font-size: 20px; color: var(--muted); max-width: 600px; margin: 0 auto 36px; line-height: 1.6; }
.hero .btn { font-size: 17px; padding: 16px 38px; }
.features { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; margin-top: 60px; }
.feature { transition: transform .18s, border-color .18s; }
.feature:hover { transform: translateY(-4px); border-color: rgba(123,108,255,.4); }
.feature h3 { margin: 0 0 8px; font-size: 17px; }
.feature p { color: var(--muted); font-size: 14px; margin: 0; }

/* формы авторизации */
.auth-wrap { max-width: 400px; margin: 60px auto; }
.auth-wrap h2 { text-align: center; margin-bottom: 24px; }
.auth-wrap .alt { text-align: center; color: var(--muted); margin-top: 18px; font-size: 14px; }

/* дашборд */
.page-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.page-head h2 { margin: 0; }
.project-list { display: grid; gap: 12px; }
.project-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 16px 20px;
}
.project-row:hover { border-color: var(--accent); }
.project-row-main { flex: 1; min-width: 0; text-decoration: none; color: var(--text); }
.project-row-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.project-row-actions form { margin: 0; }
.btn.btn-sm { padding: 7px 12px; font-size: 13px; box-shadow: none; }
.btn.btn-sm:hover { transform: none; }
.btn.ghost.danger { color: var(--danger); border-color: rgba(255,84,112,.4); }
.btn.ghost.danger:hover { border-color: var(--danger); background: rgba(255,84,112,.1); }
.status { font-size: 13px; padding: 4px 10px; border-radius: 20px; font-weight: 600;
  background: rgba(150,150,170,.15); color: var(--muted); }
.status.done { background: rgba(0,212,160,.15); color: var(--accent-2); }
.status.error { background: rgba(255,84,112,.15); color: var(--danger); }
.status.proc { background: rgba(108,92,255,.15); color: var(--accent); }
.empty { text-align: center; color: var(--muted); padding: 60px 0; }

/* загрузка */
.mode-tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.mode-tabs button { flex: 1; padding: 12px; background: var(--panel-2); border: 1px solid var(--border);
  color: var(--muted); border-radius: 10px; cursor: pointer; font-weight: 600; }
.mode-tabs button.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.dropzone { border: 2px dashed var(--border); border-radius: 12px; padding: 40px; text-align: center;
  color: var(--muted); cursor: pointer; }
.dropzone:hover { border-color: var(--accent); }

/* клипы */
.clips-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(240px,1fr));
  gap: 18px; align-items: stretch; }
.clip-card { background: var(--panel); border: 1px solid var(--border); border-radius: 14px;
  overflow: hidden; display: flex; flex-direction: column; }
.clip-card video { width: 100%; aspect-ratio: 9/16; background: #000; display: block; }
.clip-body { padding: 14px; display: flex; flex-direction: column; flex: 1; }
.clip-body .score { display: inline-block; background: rgba(108,92,255,.15); color: var(--accent);
  font-weight: 700; font-size: 13px; padding: 2px 8px; border-radius: 6px; }
/* одинаковые высоты заголовка и описания → ровные карточки */
.clip-body h4 { margin: 8px 0 4px; font-size: 15px; line-height: 1.3; height: 2.6em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clip-body .reason { color: var(--muted); font-size: 13px; margin: 4px 0 12px; line-height: 1.5;
  height: 4.5em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.clip-actions { display: flex; gap: 8px; margin-top: auto; }
.clip-actions .btn { flex: 1; padding: 9px; font-size: 13px; }
.clip-actions form { display: flex; }
.processing-banner { background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  padding: 18px 22px; margin-bottom: 20px; display: flex; align-items: center; gap: 14px; }
.spinner { width: 20px; height: 20px; border: 3px solid var(--border); border-top-color: var(--accent);
  border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* редактор */
.editor { display: grid; grid-template-columns: 360px 1fr; gap: 24px; align-items: start; }
.editor-preview { position: sticky; top: 90px; }
.editor-preview video { width: 100%; aspect-ratio: 9/16; background: #000; border-radius: 14px; }
.editor-controls h3 { font-size: 15px; margin: 22px 0 12px; color: var(--accent); }
.editor-controls h3:first-child { margin-top: 0; }
.check { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 500;
  margin: 10px 0; cursor: pointer; }
.check input { width: auto; margin: 0; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
input[type=color] { height: 44px; padding: 4px; cursor: pointer; }
@media (max-width: 760px) {
  .editor { grid-template-columns: 1fr; }
  .editor-preview { position: static; }
  .features { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr !important; }
  .hero h1 { font-size: 38px; }
}

/* «Как это работает» — шаги */
.section { padding: 56px 0 16px; }
.section h2 { text-align: center; font-size: 32px; margin: 0 0 8px; letter-spacing: -.5px; }
.section .sub { text-align: center; color: var(--muted); margin: 0 0 36px; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.step { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 22px; }
.step .num { width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px; font-size: 17px; }
.step h3 { margin: 0 0 6px; font-size: 16px; }
.step p { margin: 0; color: var(--muted); font-size: 14px; }

/* онбординг-чеклист в кабинете */
.onboard { background: linear-gradient(135deg, rgba(108,92,255,.12), rgba(0,212,160,.08));
  border: 1px solid var(--border); border-radius: 16px; padding: 24px; margin-bottom: 24px; }
.onboard h3 { margin: 0 0 16px; font-size: 18px; }
.onboard-steps { display: grid; gap: 12px; }
.ob-step { display: flex; gap: 14px; align-items: flex-start; }
.ob-step .dot { flex: 0 0 28px; height: 28px; border-radius: 50%; background: var(--panel-2);
  border: 1px solid var(--border); display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; color: var(--accent); }
.ob-step .txt b { display: block; }
.ob-step .txt span { color: var(--muted); font-size: 14px; }

/* FAQ аккордеон */
.faq { max-width: 760px; margin: 0 auto; }
.faq details { background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  margin-bottom: 12px; overflow: hidden; }
.faq summary { padding: 18px 20px; cursor: pointer; font-weight: 600; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 22px; font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details[open] summary { border-bottom: 1px solid var(--border); }
.faq .answer { padding: 16px 20px; color: var(--muted); line-height: 1.6; }

/* текстовые посты */
.posts-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px; align-items: stretch; }
/* единый размер карточек — ровная сетка */
.post-card { background: var(--panel); border: 1px solid var(--border); border-radius: 14px;
  padding: 18px; display: flex; flex-direction: column; height: 360px; }
.post-head { display: flex; justify-content: space-between; align-items: center; gap: 8px;
  margin-bottom: 10px; flex-shrink: 0; }
.post-topic { background: rgba(108,92,255,.15); color: var(--accent); font-size: 12px;
  font-weight: 600; padding: 3px 10px; border-radius: 6px; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post-len { color: var(--muted); font-size: 12px; flex-shrink: 0; white-space: nowrap; }
.post-title { margin: 0 0 10px; font-size: 16px; line-height: 1.3; flex-shrink: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* текст занимает остаток высоты, низ плавно затухает — кнопка всегда внизу */
.post-body { color: var(--text); font-size: 14px; line-height: 1.6; white-space: pre-wrap;
  flex: 1; min-height: 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 80%, transparent);
  mask-image: linear-gradient(180deg, #000 80%, transparent); }
.copy-btn { padding: 9px; font-size: 14px; flex-shrink: 0; margin-top: 14px; }

/* тарифы — премиум, карточки строго одной высоты */
.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; align-items: stretch; }
.plan { background: linear-gradient(180deg, var(--panel), rgba(255,255,255,.01));
  border: 1px solid var(--border); border-radius: 18px; padding: 28px 24px; position: relative;
  display: flex; flex-direction: column; box-shadow: 0 4px 18px rgba(0,0,0,.22);
  transition: transform .2s, border-color .2s; }
.plan:hover { transform: translateY(-4px); }
.plan.featured { border-color: transparent;
  box-shadow: 0 0 0 1.5px var(--accent), 0 24px 60px rgba(108,92,255,.28);
  background: linear-gradient(180deg, rgba(108,92,255,.10), var(--panel)); }
.plan-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, #8b7bff, #6c5cff); color: #fff; font-size: 12px; font-weight: 700;
  padding: 4px 14px; border-radius: 20px; white-space: nowrap; box-shadow: 0 6px 16px rgba(108,92,255,.4); }
.plan h3 { margin: 0 0 14px; font-size: 14px; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: .05em; }
.plan-price { font-size: 32px; font-weight: 800; letter-spacing: -1.2px; }
.plan-price span { font-size: 15px; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.plan-limit { margin: 12px 0 20px; font-weight: 600; font-size: 14px; }
.plan-limit .muted { display: block; color: var(--muted); font-weight: 400; font-size: 13px; margin-top: 2px; }
.plan-feats { list-style: none; padding: 0; margin: 0 0 22px; flex: 1; }
.plan-feats li { font-size: 13.5px; color: var(--text); padding: 8px 0 8px 30px; position: relative; line-height: 1.4; }
.plan-feats li::before { content: ""; position: absolute; left: 0; top: 5px; width: 20px; height: 20px;
  border-radius: 6px; background: rgba(0,212,160,.13)
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300d4a0' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E")
  no-repeat center / 12px; }
.plan .btn.block { margin-top: auto; }
.plan form { margin-top: auto; display: flex; }
.plan form .btn { width: 100%; }
.nav-home { display: inline-flex !important; align-items: center; gap: 6px; }
.nav-home svg { width: 16px; height: 16px; }
@media (max-width: 760px) { .plans { grid-template-columns: 1fr 1fr; } }

/* блок публикации в каналы */
.publish-box { margin-top: 8px; }
.publish-box summary { list-style: none; }
.publish-box summary::-webkit-details-marker { display: none; }
.publish-form { background: var(--panel-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px; margin-top: 8px; }
.publish-form .check { font-size: 14px; margin: 6px 0; }

/* подсказки-тултипы (для новичков) */
[data-tip] { position: relative; }
[data-tip]:hover::after, [data-tip]:focus-visible::after {
  content: attr(data-tip);
  position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  background: #2b2f3a; color: var(--text); border: 1px solid var(--border);
  padding: 9px 12px; border-radius: 9px; font-size: 13px; line-height: 1.4; font-weight: 400;
  width: max-content; max-width: 240px; text-align: center; white-space: normal;
  z-index: 50; pointer-events: none; box-shadow: 0 8px 24px rgba(0,0,0,.4);
}
[data-tip]:hover::before, [data-tip]:focus-visible::before {
  content: ""; position: absolute; top: calc(100% + 2px); left: 50%; transform: translateX(-50%);
  border: 6px solid transparent; border-bottom-color: #2b2f3a; z-index: 51; pointer-events: none;
}

/* футер */
footer.bottom { border-top: 1px solid var(--border); margin-top: 64px; padding: 28px 24px;
  text-align: center; color: var(--muted); font-size: 14px; }
footer.bottom a { margin: 0 12px; color: var(--muted); }
footer.bottom a:hover { color: var(--text); }

/* === современный рефреш: ховеры и полировка === */
.step, .clip-card, .post-card, .plan { transition: transform .18s, border-color .18s, box-shadow .18s; }
.step:hover, .clip-card:hover, .post-card:hover {
  transform: translateY(-4px); border-color: rgba(123,108,255,.40);
  box-shadow: 0 14px 36px rgba(0,0,0,.35);
}
.plan:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0,0,0,.4); }
.project-row { transition: transform .15s, border-color .15s; }
.project-row:hover { transform: translateX(3px); }
.step .num { box-shadow: 0 6px 18px rgba(123,108,255,.35); }
.section h2 { font-size: 34px; letter-spacing: -1px; }
.clip-card video { border-radius: 14px 14px 0 0; }
.btn:disabled { opacity: .5; cursor: default; transform: none; box-shadow: none; }

/* === лендинг 2.0: герой в 2 колонки, мокап, анимации === */
.hero { padding: 68px 0 28px; text-align: left; }
.hero-inner { max-width: 1100px; margin: 0 auto; padding: 0 24px; display: grid;
  grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.hero-left .hero-badge { margin-bottom: 22px; }
.hero-left h1 { font-size: 56px; line-height: 1.04; margin: 0 0 20px; letter-spacing: -2px; font-weight: 800; }
.hero-left p { font-size: 19px; margin: 0 0 30px; max-width: 520px; color: var(--muted); line-height: 1.6; }
.hero-note { margin-top: 16px; color: var(--muted); font-size: 14px; }

/* мокап-телефон */
.hero-visual { position: relative; min-height: 470px; display: flex; align-items: center; justify-content: center; }
.hero-stage { position: relative; width: 230px; }
.phone { width: 230px; height: 460px; border-radius: 36px; padding: 8px; position: relative; z-index: 2;
  background: linear-gradient(160deg, #2a2e3a, #14161d); border: 1px solid #3a3f4d;
  box-shadow: 0 34px 80px rgba(0,0,0,.6), inset 0 0 0 1px rgba(255,255,255,.03); }
.phone-screen { width: 100%; height: 100%; border-radius: 30px; overflow: hidden; position: relative; background: #000; }
.phone-scene { position: absolute; inset: 0;
  background:
    radial-gradient(130px 130px at 50% 30%, rgba(255,255,255,.20), transparent 70%),
    linear-gradient(160deg, #7b6cff 0%, #d65adb 36%, #ff8a5b 70%, #ffd36b 100%); }
.phone-scene::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 52%, rgba(0,0,0,.6)); }
.phone-score { position: absolute; top: 14px; left: 14px; z-index: 3; background: rgba(0,0,0,.5);
  backdrop-filter: blur(6px); color: #fff; font-size: 13px; font-weight: 700; padding: 5px 11px; border-radius: 20px; }
.phone-subs { position: absolute; left: 12px; right: 12px; bottom: 66px; z-index: 3; text-align: center;
  font-weight: 800; font-size: 23px; line-height: 1.18; letter-spacing: .3px; }
.phone-subs span { color: #fff; -webkit-text-stroke: 2.5px #000; paint-order: stroke fill; }
.phone-subs .hl { color: #ffe000; }
/* горизонтальный "источник" сзади */
.mock-before { position: absolute; top: -16px; left: -120px; width: 196px; height: 112px; border-radius: 14px;
  background: linear-gradient(135deg, #1c1f29, #12141b); border: 1px solid var(--border);
  transform: rotate(-8deg); box-shadow: 0 22px 54px rgba(0,0,0,.5); z-index: 1; overflow: hidden; }
.mock-before .mb-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: var(--grad); }
.mock-before .mb-label { position: absolute; top: 12px; left: 14px; color: var(--muted); font-size: 13px; font-weight: 600; }

/* объёмные карточки фич */
.feat-ico { width: 50px; height: 50px; border-radius: 14px; display: flex; align-items: center;
  justify-content: center; font-size: 26px; margin-bottom: 16px; }
.features .feature:nth-child(1) .feat-ico { background: rgba(123,108,255,.18); }
.features .feature:nth-child(2) .feat-ico { background: rgba(31,217,180,.18); }
.features .feature:nth-child(3) .feat-ico { background: rgba(34,199,230,.18); }
.feature h3 { font-size: 19px; }

/* анимации появления (с фолбэком: без JS всё видно) */
.js-reveal .reveal { opacity: 0; transform: translateY(26px); transition: opacity .6s ease, transform .6s ease; }
.js-reveal .reveal.in { opacity: 1; transform: none; }

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; gap: 36px; }
  .hero-left p { margin-left: auto; margin-right: auto; }
  .hero-left h1 { font-size: 40px; }
}

/* === веер из 3 телефонов === */
.phones { position: relative; width: 440px; height: 482px; margin: 0 auto; transform: translateX(24px); }
.phone-main { position: absolute; left: 50%; top: 0; transform: translateX(-50%); z-index: 3; }
.phone-back { position: absolute; top: 30px; z-index: 1; transform-origin: top center; opacity: .97; }
.phone-left { left: -14px; transform: rotate(-14deg) scale(.86); }
.phone-right { right: -14px; z-index: 2; transform: rotate(14deg) scale(.86); }
.phone-scene.scene-2 { background:
  radial-gradient(120px 120px at 50% 30%, rgba(255,255,255,.18), transparent 70%),
  linear-gradient(160deg, #1fd9b4 0%, #22c7e6 46%, #7b6cff 100%); }
.phone-scene.scene-3 { background:
  radial-gradient(120px 120px at 50% 30%, rgba(255,255,255,.18), transparent 70%),
  linear-gradient(160deg, #ff6fb5 0%, #c15cff 50%, #6a5cff 100%); }
@media (max-width: 480px) { .phones { transform: scale(.82); } }
