:root {
  --bg: #020617;
  --bg-elevated: #050816;
  --border-subtle: #1f2937;
  --accent: #f59e0b;
  --accent-strong: #f97316;
  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --danger: #f97373;
  --radius: 16px;
  --shadow: 0 18px 45px rgba(0,0,0,.6);
}

* { box-sizing: border-box; }
html, body { margin:0; padding:0; }
body {
  min-height: 100vh;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #111827 0, #020617 55%, #000 100%);
  color: var(--text-main);
}
a { color: inherit; text-decoration: none; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  border-bottom: 1px solid rgba(148,163,184,.3);
  background: linear-gradient(to bottom, rgba(15,23,42,.98), rgba(15,23,42,.9), transparent);
  backdrop-filter: blur(16px);
}
.header-inner { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:10px 0; }
.logo { display:flex; align-items:center; gap:10px; }
.logo-mark {
  width: 30px; height: 30px; border-radius: 999px;
  background: radial-gradient(circle at top left, var(--accent-strong), var(--accent));
  display:inline-flex; align-items:center; justify-content:center;
  font-size: 14px; font-weight: 700; color:#0b0f19;
  box-shadow: 0 12px 28px rgba(0,0,0,.7);
}
.logo-text { display:flex; flex-direction:column; font-size:15px; font-weight:600; }
.logo-sub { font-size:11px; color: var(--text-muted); }
.main-nav { display:flex; gap:8px; flex-wrap:wrap; }
.nav-link {
  padding:6px 12px; border-radius:999px; border:1px solid rgba(148,163,184,.5);
  background: rgba(15,23,42,.9); color: var(--text-muted); font-size:13px;
}
.nav-link-active, .nav-link:hover {
  background: linear-gradient(to right, var(--accent), var(--accent-strong)); color:#0b0f19; border-color:transparent;
}

/* main */
.page-main { padding:18px 0 32px; }
.hero { margin-bottom: 16px; }
.hero-subtitle { margin-top: 8px; color: var(--text-muted); }
.hero-hint { margin-top: 6px; font-size: 13px; color: var(--text-muted); }

/* filters */
.filters { margin-bottom: 16px; }
.filters-inner { display:flex; flex-wrap:wrap; gap:16px; padding:12px 14px; border-radius:14px; border:1px dashed rgba(148,163,184,.5); background: rgba(15,23,42,.8); }
.filters-label { font-size:12px; text-transform:uppercase; letter-spacing:.08em; color: var(--text-muted); }
.filters-input { margin-top:4px; width:100%; padding:6px 10px; border-radius:999px; border:1px solid rgba(148,163,184,.6); background:#020617; color: var(--text-main); }
.chips { display:flex; flex-wrap:wrap; gap:6px; margin-top:4px; }
.chip { border-radius:999px; padding:4px 10px; font-size:12px; border:1px solid rgba(148,163,184,.5); background: rgba(15,23,42,.9); color: var(--text-muted); cursor:pointer; }
.chip-active { background: var(--accent); color:#0b0f19; border-color:transparent; }

/* two-column layout */
.layout { display:grid; grid-template-columns: minmax(0,3fr) minmax(260px,1.2fr); gap:18px; }
.layout-main, .layout-sidebar {
  background: rgba(15,23,42,.95);
  border-radius: 20px; border: 1px solid rgba(148,163,184,.35); box-shadow: var(--shadow); padding:16px 18px 20px;
}
.section-title { margin:0 0 8px; }
.sidebar-block + .sidebar-block { margin-top:14px; padding-top:12px; border-top:1px solid rgba(31,41,55,.9); }
.sidebar-title { margin:0 0 6px; font-size:14px; }
.sidebar-text { margin:0; font-size:13px; color: var(--text-muted); }

/* news */
.news-list { display:flex; flex-direction:column; gap:12px; }
.news-card { display:grid; grid-template-columns: minmax(0,3fr) minmax(120px,1.4fr); gap:12px; padding:10px 12px; border-radius:14px; border:1px solid rgba(148,163,184,.5); background: rgba(15,23,42,.98); }
.news-card-image-wrap { border-radius:10px; overflow:hidden; background:#020617; }
.news-card-image { width:100%; height:100%; object-fit:cover; }
.news-card-body { display:flex; flex-direction:column; gap:4px; }
.news-card-title { margin:0; font-size:16px; }
.news-card-meta { display:flex; flex-wrap:wrap; gap:8px; font-size:12px; color: var(--text-muted); }
.news-card-summary { margin:4px 0 0; font-size:14px; color:#e5e7eb; }
.news-card-footer { margin-top:6px; display:flex; justify-content:space-between; align-items:center; gap:8px; }
.news-card-link { font-size:13px; color: var(--accent); }
.news-card-tags { display:flex; flex-wrap:wrap; gap:4px; }
.tag-badge { border-radius:999px; border:1px solid rgba(148,163,184,.6); background: rgba(15,23,42,.9); padding:2px 8px; font-size:11px; color: var(--text-muted); cursor:pointer; }

/* states */
.loading { margin-top:8px; font-size:13px; color: var(--text-muted); }
.error { margin-top:8px; font-size:13px; color: var(--danger); }
.empty-state { margin-top:8px; font-size:13px; color: var(--text-muted); }

/* article page */
.article-layout { display:grid; grid-template-columns: minmax(0,3fr) minmax(260px,1.2fr); gap:18px; margin-top:18px; }
.article { background: rgba(15,23,42,.98); border-radius:20px; border:1px solid rgba(148,163,184,.5); box-shadow:var(--shadow); padding:18px 20px 22px; }
.article-breadcrumbs { margin:0 0 4px; font-size:12px; color: var(--text-muted); }
.article-title { margin:0 0 4px; font-size:22px; }
.article-meta { display:flex; gap:8px; font-size:12px; color: var(--text-muted); }
.article-image-wrap { margin:10px 0; border-radius:14px; overflow:hidden; }
.article-image { width:100%; display:block; }
.article-body { font-size:15px; line-height:1.7; color:#e5e7eb; }
.article-body p { margin:0 0 12px; }
.article-footer { margin-top:14px; display:flex; gap:8px; }
.primary-btn, .secondary-btn { padding:6px 12px; border-radius:999px; border:1px solid rgba(148,163,184,.6); font-size:13px; }
.primary-btn { background: linear-gradient(to right, var(--accent), var(--accent-strong)); color:#0b0f19; border-color:transparent; }
.secondary-btn { background: rgba(15,23,42,.95); color: var(--text-main); }

/* related */
.article-sidebar { background: rgba(15,23,42,.98); border-radius:20px; border:1px solid rgba(148,163,184,.5); box-shadow:var(--shadow); padding:14px 16px 18px; }
.related-list { display:flex; flex-direction:column; gap:6px; }
.related-item { display:flex; justify-content:space-between; font-size:13px; padding:4px 6px; border-radius:8px; background: rgba(15,23,42,.9); }
.related-title { max-width:70%; }
.related-date { color: var(--text-muted); font-size:12px; }

/* footer */
.site-footer { border-top:1px solid rgba(148,163,184,.3); margin-top:24px; padding:10px 0 16px; font-size:12px; color: var(--text-muted); }
.footer-inner { display:flex; justify-content:space-between; gap:10px; }
.footer-link { color: var(--accent); }

/* responsive */
@media (max-width: 960px) {
  .layout, .article-layout { grid-template-columns: 1fr; }
  .layout-sidebar, .article-sidebar { order:-1; }
  .news-card { grid-template-columns: 1fr; }
}
.update-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(74, 222, 128, 0.4);
  background: rgba(22, 163, 74, 0.12);
  color: #bbf7d0;
  font-size: 13px;
}

.primary-btn-sm {
  padding: 4px 10px;
  font-size: 12px;
}
/* ===== Видео-раздел ===== */

/* Сетка карточек каналов */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

/* Карточка канала */
.video-card {
  background: rgba(7, 12, 25, 0.9);
  border-radius: 20px;
  padding: 16px 18px 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Заголовок и подпись */
.video-card__title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 4px;
}

.video-card__meta {
  margin: 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

/* Если у канала несколько роликов — сетка роликов внутри карточки */
.video-card__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

/* Контейнер плеера */
.video-card__player {
  position: relative;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
}

/* Соотношение сторон 16:9 */
.video-card__player::before {
  content: "";
  display: block;
  padding-bottom: 56.25%; /* 16:9 */
}

/* Сам iframe поверх псевдоэлемента */
.video-card__player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Заглушка вместо плеера, если что-то пошло не так */
.video-card__player--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
}

/* Подвал карточки с кнопкой */
.video-card__footer {
  margin-top: 8px;
  display: flex;
  justify-content: flex-start;
}

/* Чуть адаптивности под совсем узкие экраны */
@media (max-width: 600px) {
  .video-grid {
    grid-template-columns: 1fr;
  }

  .video-card {
    padding: 14px 14px 12px;
  }
}

