@font-face { font-family: Inter; src: url("/static/fonts/inter-cyrillic-ext-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; unicode-range: U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F; }
@font-face { font-family: Inter; src: url("/static/fonts/inter-cyrillic-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: Inter; src: url("/static/fonts/inter-latin-ext-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; unicode-range: U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: Inter; src: url("/static/fonts/inter-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
:root {
  color-scheme: dark;
  --bg: #07090d;
  --bg-soft: #0c1017;
  --panel: rgba(15, 20, 29, .78);
  --panel-solid: #101722;
  --panel-raised: rgba(255,255,255,.075);
  --line: rgba(255,255,255,.105);
  --line-strong: rgba(255,255,255,.18);
  --text: #f4f7fb;
  --muted: #9aa7ba;
  --faint: #667389;
  --accent: #8b5cf6;
  --accent-soft: rgba(139,92,246,.18);
  --mint: #55e6a5;
  --mint-soft: rgba(85,230,165,.14);
  --blue: #57b7ff;
  --danger: #ff6879;
  --warning: #ffc76d;
  --radius-lg: 28px;
  --radius: 20px;
  --radius-sm: 13px;
  --shadow: 0 24px 90px rgba(0,0,0,.38);
  --shadow-soft: 0 16px 48px rgba(0,0,0,.24);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; color: var(--text); background: var(--bg); font-family: var(--font);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .42;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
}
.ambient { position: fixed; pointer-events: none; border-radius: 50%; filter: blur(78px); opacity: .32; z-index: -1; }
.ambient-a { width: 48vw; height: 48vw; left: -18vw; top: -20vw; background: #6638d8; }
.ambient-b { width: 34vw; height: 34vw; right: -12vw; top: -8vw; background: #0f9f78; }
button, input, select { font: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

.topbar {
  position: sticky; top: 0; z-index: 50;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px;
  padding: 13px clamp(16px, 3vw, 36px);
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(7,9,13,.76); backdrop-filter: blur(22px) saturate(1.35);
}
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; min-width: 0; }
.brand-mark {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 14px;
  color: #06110c; background: linear-gradient(135deg, var(--mint), #c9ffe8); font-size: 12px; font-weight: 950;
  box-shadow: 0 10px 30px rgba(85,230,165,.24), inset 0 1px 0 rgba(255,255,255,.55);
}
.brand-copy { display: grid; line-height: 1.05; }
.brand-copy strong { font-size: 15px; letter-spacing: -.02em; }
.brand-copy small { margin-top: 4px; color: var(--faint); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.system-pill {
  justify-self: center; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 11px; color: var(--muted); background: rgba(255,255,255,.045); font-size: 12px; white-space: nowrap;
}
.system-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--warning); box-shadow: 0 0 18px currentColor; }
.system-pill.ok i { background: var(--mint); }
.system-pill.bad i { background: var(--danger); }
.system-pill.warn i { background: var(--warning); }
.top-actions { justify-self: end; display: flex; gap: 9px; }


.app-frame { display: grid; grid-template-columns: 78px minmax(0, 1fr); min-height: calc(100vh - 65px); }
.app-nav {
  position: sticky; top: 65px; height: calc(100vh - 65px); z-index: 20;
  display: flex; flex-direction: column; gap: 8px; align-items: center; padding: 18px 9px;
  border-right: 1px solid rgba(255,255,255,.07); background: rgba(8,10,15,.52); backdrop-filter: blur(16px);
}
.nav-item {
  width: 58px; min-height: 54px; display: grid; place-items: center; gap: 2px; border: 1px solid transparent; border-radius: 16px;
  color: var(--faint); text-decoration: none; transition: all .15s ease;
}
.nav-item span { font-size: 18px; line-height: 1; }
.nav-item small { font-size: 9px; font-weight: 760; letter-spacing: .03em; }
.nav-item:hover, .nav-item.active { color: var(--mint); border-color: rgba(85,230,165,.18); background: rgba(85,230,165,.065); }

.shell { width: min(1500px, 100%); margin: 0 auto; padding: 24px clamp(14px, 2.6vw, 36px) 74px; }
.hero-panel {
  position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) 185px; gap: 18px; align-items: center;
  min-height: 116px; margin-bottom: 12px; padding: clamp(16px, 2.1vw, 23px);
  border: 1px solid var(--line); border-radius: 32px;
  background:
    linear-gradient(115deg, rgba(139,92,246,.22), transparent 42%),
    linear-gradient(245deg, rgba(85,230,165,.14), transparent 40%),
    rgba(13,17,25,.72);
  box-shadow: var(--shadow);
}
.hero-panel::after { content: ""; position: absolute; inset: 1px; border-radius: 31px; pointer-events: none; background: linear-gradient(180deg, rgba(255,255,255,.08), transparent 28%); }
.eyebrow { display: inline-block; color: var(--mint); font-size: 10px; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.hero-copy h1 { max-width: 850px; margin: 8px 0 0; font-size: clamp(26px, 3vw, 38px); line-height: 1.02; letter-spacing: -.065em; }
.hero-copy p { max-width: 720px; margin: 8px 0 0; color: var(--muted); font-size: clamp(13px, 1.35vw, 14px); line-height: 1.55; }
.hero-orbit { position: relative; height: 76px; opacity: .86; }
.hero-orbit span { position: absolute; border-radius: 50%; border: 1px solid rgba(255,255,255,.16); animation: pulse 4.5s ease-in-out infinite; }
.hero-orbit span:nth-child(1) { inset: 8px 18px; background: radial-gradient(circle, rgba(85,230,165,.12), transparent 62%); }
.hero-orbit span:nth-child(2) { inset: 30px 50px; animation-delay: .5s; }
.hero-orbit span:nth-child(3) { width: 18px; height: 18px; right: 78px; top: 64px; border: 0; background: var(--mint); box-shadow: 0 0 38px var(--mint); }
@keyframes pulse { 50% { transform: scale(1.05); opacity: .68; } }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.stat {
  position: relative; overflow: hidden; min-height: 68px; padding: 12px 16px;
  border: 1px solid var(--line); border-radius: 24px; background: rgba(13,18,26,.72); box-shadow: var(--shadow-soft);
}
.stat::after { content: ""; position: absolute; inset: auto 14px 0; height: 2px; border-radius: 999px; background: linear-gradient(90deg, transparent, rgba(85,230,165,.5), transparent); opacity: .7; }
.stat b { display: block; font-size: clamp(21px, 2.1vw, 27px); line-height: 1; letter-spacing: -.055em; }
.stat span { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; }
.stat small { position: absolute; right: 14px; top: 14px; color: var(--faint); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }

section[id] { scroll-margin-top: 78px; }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 405px; gap: 16px; align-items: start; }
.feed-panel, .panel {
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.025)), var(--panel);
  box-shadow: var(--shadow-soft); backdrop-filter: blur(18px);
}
.layout > *, .feed-panel, .panel { min-width: 0; }
.feed-panel { min-height: 590px; padding: clamp(16px, 2vw, 24px); }
.panel { padding: 16px; margin-bottom: 14px; }
.side { position: sticky; top: 78px; }
.digest-panel { border-color: rgba(139,92,246,.26); background: linear-gradient(180deg, rgba(139,92,246,.13), rgba(255,255,255,.025)), var(--panel); }
.feed-head, .panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
h1, h2, h3 { margin: 0; letter-spacing: -.04em; }
h2 { margin-top: 5px; font-size: clamp(21px, 2.3vw, 29px); }
.panel h2 { font-size: 18px; }
.muted { color: var(--muted); }
.feed-head p { max-width: 650px; margin: 8px 0 0; font-size: 13px; line-height: 1.45; }
.feed-tools { display: flex; align-items: center; gap: 9px; }
.feed-count { color: var(--faint); font-size: 12px; white-space: nowrap; }

.primary, .ghost {
  border: 0; border-radius: 14px; padding: 10px 14px; color: var(--text);
  transition: transform .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.primary {
  background: linear-gradient(135deg, #7c4dff, #a88bff); font-weight: 800;
  box-shadow: 0 12px 34px rgba(124,77,255,.28), inset 0 1px 0 rgba(255,255,255,.22);
}
.primary:hover { box-shadow: 0 15px 42px rgba(124,77,255,.36), inset 0 1px 0 rgba(255,255,255,.25); }
.primary:hover, .ghost:hover { transform: translateY(-1px); }
.ghost { border: 1px solid var(--line); background: rgba(255,255,255,.055); }
.ghost:hover { border-color: var(--line-strong); background: rgba(255,255,255,.08); }
.small { padding: 7px 10px; font-size: 12px; border-radius: 11px; }
.wide { width: 100%; }
.icon-btn { width: 38px; height: 38px; padding: 0; display: inline-grid; place-items: center; }
button:disabled { opacity: .55; cursor: wait; transform: none !important; }

.filters { margin: 19px 0 15px; }
.network-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 11px; }
.tab {
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; color: var(--muted);
  background: rgba(255,255,255,.035); transition: all .15s ease;
}
.tab.active, .tab:hover { color: var(--text); border-color: rgba(85,230,165,.52); background: var(--mint-soft); }
.tab .count { margin-left: 5px; color: var(--faint); font-size: 11px; }
.filter-row { display: grid; grid-template-columns: minmax(190px,1fr) 118px 148px; gap: 8px; }
.search-wrap { position: relative; display: block; }
.search-wrap span { position: absolute; left: 12px; top: 50%; translate: 0 -50%; color: var(--faint); font-size: 18px; }
.search-wrap input { padding-left: 36px; }
input, select {
  width: 100%; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; color: var(--text);
  background: rgba(255,255,255,.052); outline: none; transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
input::placeholder { color: #59667b; }
input:focus, select:focus { border-color: rgba(85,230,165,.52); box-shadow: 0 0 0 4px rgba(85,230,165,.09); background: rgba(255,255,255,.07); }
select option { background: #121722; }

.state { padding: 16px 4px; }
.empty-state { display: grid; gap: 6px; justify-items: center; padding: 44px 18px; border: 1px dashed var(--line-strong); border-radius: 22px; color: var(--muted); text-align: center; }
.empty-state strong { color: var(--text); font-size: 17px; }
.feed { display: grid; gap: 12px; }
.skeleton { height: 174px; border-radius: 24px; border: 1px solid var(--line); background: linear-gradient(90deg, rgba(255,255,255,.035), rgba(255,255,255,.075), rgba(255,255,255,.035)); background-size: 220% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -220% 0; } }

.card {
  position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,.058), rgba(255,255,255,.026));
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}
.card:hover { transform: translateY(-1px); border-color: rgba(255,255,255,.2); background: linear-gradient(180deg, rgba(255,255,255,.072), rgba(255,255,255,.03)); }
.card-inner { display: grid; grid-template-columns: 212px minmax(0,1fr); min-height: 172px; }
.card-media { position: relative; min-height: 100%; background: linear-gradient(135deg, rgba(139,92,246,.22), rgba(85,230,165,.08)); }
.card-media img { width: 100%; height: 100%; min-height: 172px; object-fit: cover; display: block; }
.card-media .no-thumb { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,.34); font-size: 32px; font-weight: 900; }
.card-body { min-width: 0; padding: 15px 15px 14px; }
.card-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 9px; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 8px; font-size: 10px; font-weight: 850; text-transform: uppercase; letter-spacing: .07em; }
.badge.telegram { background: rgba(58,167,255,.16); color: #78c9ff; }
.badge.youtube { background: rgba(255,70,70,.14); color: #ff8d8d; }
.badge.instagram { background: rgba(236,72,153,.16); color: #ff91c9; }
.badge.tiktok { background: rgba(85,230,165,.14); color: #7deec4; }
.badge.x { background: rgba(255,255,255,.11); color: #dce5f1; }
.author { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12px; }
.time { color: var(--faint); font-size: 11px; margin-left: auto; white-space: nowrap; }
.card h3 { margin: 0 0 7px; font-size: 17px; line-height: 1.22; }
.card p { margin: 0; color: #c9d3e2; font-size: 13px; line-height: 1.5; white-space: pre-wrap; }
.card p.clamped { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.expand-btn { margin-top: 5px; padding: 0; border: 0; color: #9fcfff; background: transparent; font-size: 12px; }
.card-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 12px; }
.metric, .reason { border-radius: 999px; padding: 4px 8px; font-size: 10px; color: var(--muted); background: rgba(255,255,255,.052); }
.reason { color: #a9b8d3; }
.open-link { color: #a9cfff; font-size: 12px; text-decoration: none; }
.open-link:hover { text-decoration: underline; }
.score { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 850; }
.scorebar { width: 52px; height: 6px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.08); }
.scorebar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--mint)); }
.score.high { color: var(--mint); } .score.mid { color: var(--warning); } .score.low { color: var(--muted); }

.inline-form { display: grid; grid-template-columns: 1fr 40px; gap: 8px; margin-top: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.chip { display: inline-flex; align-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: rgba(255,255,255,.043); font-size: 12px; }
.chip button { border: 0; padding: 7px 9px; color: inherit; background: transparent; }
.chip-use:hover { color: var(--mint); }
.chip button:last-child { color: var(--faint); border-left: 1px solid var(--line); }
.chip button:last-child:hover { color: var(--danger); }
.source-form { display: grid; gap: 8px; margin-top: 12px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sources { display: grid; gap: 9px; margin-top: 12px; max-height: 350px; overflow: auto; padding-right: 2px; }
.source-row { display: flex; justify-content: space-between; gap: 10px; padding: 10px; border: 1px solid rgba(255,255,255,.07); border-radius: 15px; background: rgba(255,255,255,.032); }
.source-row strong { display: block; font-size: 13px; }
.source-row small { display: block; margin-top: 4px; color: var(--faint); font-size: 11px; line-height: 1.35; }
.source-actions { display: flex; align-items: flex-start; gap: 5px; }
.source-actions button { border: 1px solid var(--line); border-radius: 9px; padding: 6px 8px; color: var(--muted); background: transparent; }
.source-actions button:hover { color: var(--text); }
.status-ok { color: var(--mint); }
.status-error { color: var(--danger); }
.connectors { display: grid; gap: 8px; margin-top: 12px; color: var(--muted); font-size: 12px; }
.connector { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px solid rgba(255,255,255,.06); padding-bottom: 8px; }
.connector:last-child { border-bottom: 0; padding-bottom: 0; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 7px; background: var(--danger); box-shadow: 0 0 12px currentColor; }
.dot.ok { background: var(--mint); }
.digest { max-height: 520px; overflow: auto; margin-top: 12px; padding-right: 5px; font-size: 13px; line-height: 1.58; }
.digest h1, .digest h2, .digest h3 { margin: 15px 0 8px; color: var(--text); }
.digest h1 { font-size: 19px; } .digest h2 { font-size: 16px; } .digest h3 { font-size: 14px; }
.digest ul, .digest ol { padding-left: 20px; }
.digest li { margin: 5px 0; }
.digest a { color: #a9cfff; }
.digest strong { color: #eef5ff; }
.error { color: var(--danger); }
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 100; translate: -50% 20px; max-width: min(520px, calc(100vw - 28px));
  border: 1px solid var(--line-strong); border-radius: 15px; padding: 11px 14px; color: var(--text);
  background: rgba(17,23,33,.92); box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: all .18s ease;
}
.toast.show { opacity: 1; translate: -50% 0; }
.mobile-actions { display: none; }

.login { display: grid; place-items: center; min-height: 100vh; padding: 20px; }
.login-card { width: min(400px, 100%); display: grid; gap: 12px; border: 1px solid var(--line); border-radius: 28px; padding: 25px; background: rgba(12,16,23,.82); box-shadow: var(--shadow); }
.login-brand { justify-content: center; font-size: 20px; }
.login-card .muted { margin: 0 0 8px; text-align: center; }

@media (max-width: 1120px) {
  .app-frame { display: block; }
  .app-nav { display: none; }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
  .panel { margin-bottom: 0; }
  .digest-panel { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
  .hero-panel { grid-template-columns: 1fr; }
  .hero-orbit { display: none; }
  .stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .card-inner { grid-template-columns: 1fr; }
  .card-media img { max-height: 220px; }
}
@media (max-width: 680px) {
  .shell { padding: 14px 12px 92px; }
  .topbar { grid-template-columns: 1fr auto; padding: 11px 12px; }
  .system-pill { display: none; }
  .brand-copy small { display: none; }
  .top-actions .ghost { display: none; }
  .hero-panel { border-radius: 25px; padding: 18px; }
  .hero-copy h1 { font-size: 26px; }
  .hero-copy p { font-size: 13px; line-height: 1.45; }
  .stats { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 3px; scrollbar-width: none; }
  .stats::-webkit-scrollbar { display: none; }
  .stat { flex: 0 0 146px; min-height: 70px; padding: 12px; border-radius: 19px; }
  .stat small { display: none; }
  .filter-row, .side { grid-template-columns: minmax(0, 1fr); }
  .network-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 3px; scrollbar-width: none; }
  .network-tabs::-webkit-scrollbar { display: none; }
  .tab { flex: 0 0 auto; }
  .feed-panel { padding: 14px; border-radius: 24px; }
  .feed-head { align-items: flex-start; }
  .feed-count { display: none; }
  .time { margin-left: 0; width: 100%; }
  .score { margin-left: 0; width: 100%; }
  .mobile-actions {
    position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 80;
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 6px;
    border: 1px solid var(--line-strong); border-radius: 22px; background: rgba(12,16,23,.88); backdrop-filter: blur(20px); box-shadow: var(--shadow);
  }
  .mobile-actions button { border: 0; border-radius: 16px; padding: 8px 6px 7px; color: var(--muted); background: transparent; font-size: 10px; font-weight: 780; display: grid; gap: 3px; justify-items: center; }
  .mobile-actions button span { font-size: 18px; line-height: 1; }
  .mobile-actions button.active, .mobile-actions button:active { color: #07110c; background: var(--mint); }
}
