@import url('https://fonts.googleapis.com/css2?family=Unbounded:wght@500;700;800;900&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #0a0a0b;
  --surface: #18181b;
  --surface-2: #222226;
  --accent: #ef4444;
  --accent-rgb: 239, 68, 68;
  --accent-hover: #ff5c5c;
  --text: #f5f5f7;
  --text-dim: #99999f;
  --border: rgba(255, 255, 255, 0.08);
  --font-display: "Unbounded", "Manrope", sans-serif;
  --font: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --container: 1280px;
  --radius-capsule: 999px;
  --radius-card: 14px;
  --radius-btn: 10px;
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --sidebar-w: 76px;
  --topbar-h: 68px;
}

* { box-sizing: border-box; }

/* Важно: без этого правила элементы с классом, где задан display (flex/grid),
   игнорируют атрибут hidden — авторский display перебивает [hidden] браузера
   при равной специфичности. Без этой строки, например, пустой баннер
   объявлений или свёрнутая панель чата показывались бы всегда. */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

button, input, select, textarea { font-family: inherit; }

button {
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

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

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ================= Каркас: топбар (сайдбар убран по запросу) ================= */

.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--topbar-h);
  background: rgba(10, 10, 11, 0.86);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  z-index: 45;
}

.topbar__brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: 0.3px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}
.topbar__brand .accent-dot { color: var(--accent); }

.topbar__quick { display: flex; gap: 8px; }

.topbar__search-group { flex: 1; max-width: 560px; margin: 0 auto; display: flex; align-items: center; gap: 8px; }
.topbar__search { flex: 1; position: relative; }
.topbar__search input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-capsule);
  padding: 10px 42px 10px 16px;
  font-size: 13.5px;
  color: var(--text);
}
.topbar__search svg { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--text-dim); pointer-events: none; }

.topbar__right { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.icon-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  transition: background 0.2s;
  position: relative;
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.12); }
.icon-btn--avatar { color: var(--accent); }
.icon-btn--logged-in { background: rgba(var(--accent-rgb), 0.16); }
.icon-btn__badge {
  position: absolute; top: -2px; right: -2px;
  background: var(--accent); color: #fff;
  font-size: 9.5px; font-weight: 700;
  min-width: 15px; height: 15px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
}

.page-wrap {
  padding-top: var(--topbar-h);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-wrap > main { flex: 1; }

.mobile-nav { display: none; }

@media (max-width: 900px) {
  .topbar { padding: 0 12px; gap: 8px; }
  .topbar__quick { display: none; }
  .topbar__search-group a.btn { display: none; }
  .topbar__right a.btn { display: none; }
  .topbar__brand span.brand-text { display: none; }
  .page-wrap { padding-bottom: 76px; }

  .mobile-nav {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 64px;
    background: #0d0d0f;
    border-top: 1px solid var(--border);
    z-index: 50;
    align-items: center;
    justify-content: space-around;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .mobile-nav a {
    color: var(--text-dim);
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    font-size: 10px;
  }
  .mobile-nav a.is-active { color: var(--accent); }
}

/* ---------- Поиск (выпадающая выдача) ---------- */
.search-panel {
  position: fixed;
  top: calc(var(--topbar-h) + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: min(460px, calc(100vw - 32px));
  background: rgba(15, 15, 17, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 10px;
  z-index: 46;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.search-panel__results { margin-top: 4px; max-height: 360px; overflow-y: auto; }
.search-panel__results a {
  display: flex; gap: 10px; align-items: center;
  padding: 8px; border-radius: 10px; font-size: 13px;
}
.search-panel__results a:hover { background: rgba(255, 255, 255, 0.06); }
.search-panel__results img { width: 32px; height: 44px; object-fit: cover; border-radius: 6px; background: var(--surface); }
.search-panel__empty { color: var(--text-dim); font-size: 13px; padding: 10px 8px; }

/* ================= Панель аккаунта ================= */

.account-panel {
  position: fixed;
  top: calc(var(--topbar-h) + 8px);
  right: max(20px, env(safe-area-inset-right));
  width: min(260px, calc(100vw - 32px));
  background: rgba(15, 15, 17, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px;
  z-index: 46;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  font-size: 13px;
}

.account-panel__title { font-weight: 700; margin-bottom: 10px; }
.account-panel__name { font-weight: 700; }
.account-panel__level { color: var(--text-dim); font-size: 12px; margin-bottom: 10px; }
.account-panel__link { display: block; padding: 8px 4px; border-bottom: 1px solid var(--border); color: var(--text); }
.account-panel__link:hover { color: var(--accent); }

.account-panel input {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
  margin-bottom: 8px;
}
.account-panel__row { display: flex; gap: 8px; }
.account-panel__row .btn { flex: 1; padding: 8px; font-size: 12.5px; }

/* ================= Баннер объявлений ================= */

.announcement-banner {
  margin: 20px auto 0;
  max-width: var(--container);
  background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.16), rgba(var(--accent-rgb), 0.06));
  border: 1px solid rgba(var(--accent-rgb), 0.25);
  border-radius: 16px;
  padding: 10px 20px;
  display: flex; align-items: center; justify-content: flex-start; gap: 16px;
  font-size: 13px; text-align: left;
}
.announcement-banner__close {
  color: var(--text-dim);
  font-size: 14px;
  flex: 0 0 auto;
  margin-left: auto;
}
.announcement-banner__close:hover { color: var(--text); }

/* ================= Кнопки ================= */

.btn {
  padding: 11px 22px;
  border-radius: var(--radius-btn);
  font-size: 13.5px;
  font-weight: 700;
  transition: transform 0.15s var(--spring), background 0.2s;
}
.btn:active { transform: scale(0.96); }
.btn--primary { background: var(--text); color: #0a0a0b; }
.btn--primary:hover { background: #fff; }
.btn--accent { background: var(--accent); color: #fff; }
.btn--accent:hover { background: var(--accent-hover); }
.btn--ghost { background: rgba(255, 255, 255, 0.08); color: var(--text); border: 1px solid var(--border); }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.14); }
.btn--pill { border-radius: var(--radius-capsule); }
.btn--sm { padding: 7px 14px; font-size: 12px; }

/* ================= Hero ================= */

.hero {
  position: relative;
  min-height: 56vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: #000;
}
.hero__bg {
  position: absolute; inset: 0; background-size: cover; background-position: center 20%; opacity: 0.5;
  animation: heroKenBurns 14s ease-in-out infinite alternate;
}
@keyframes heroKenBurns {
  from { transform: scale(1); }
  to { transform: scale(1.08); }
}
@media (prefers-reduced-motion: reduce) {
  .hero__bg { animation: none; }
}
.hero__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,10,11,0.15) 0%, rgba(10,10,11,0.55) 55%, var(--bg) 100%);
}
.hero__content { position: relative; padding: 0 0 48px; }
.hero__inner { max-width: 720px; }
.hero__eyebrow {
  display: inline-block;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-dim);
  margin-bottom: 14px;
  font-weight: 700;
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(32px, 5.5vw, 58px);
  line-height: 1.04;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
  text-align: left;
}
.hero__desc { font-size: 15px; line-height: 1.6; color: #d6d6db; max-width: 600px; margin: 0 0 26px; text-align: left; }
.hero__actions { display: flex; align-items: center; gap: 18px; }

.hero__dots { display: flex; gap: 6px; }
.hero__dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.3); transition: width 0.2s, background 0.2s; }
.hero__dot.is-active { background: var(--accent); width: 22px; border-radius: 4px; }

.hero__content { transition: opacity 0.3s ease; }
.hero__content.is-fading { opacity: 0; }

/* ================= Жанры на главной ================= */

.genre-strip { display: flex; flex-wrap: wrap; gap: 8px; padding: 24px 0 4px; }
.genre-chip {
  padding: 8px 16px;
  border-radius: var(--radius-capsule);
  background: var(--surface);
  font-size: 12.5px;
  color: var(--text-dim);
  transition: background 0.2s, color 0.2s;
}
.genre-chip:hover { color: var(--text); background: var(--surface-2); }

/* ================= Каталожные секции ================= */

.cat-section { padding: 36px 0 8px; }
.cat-section__head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 16px; }
.cat-section__head h2 {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.4px;
  margin: 0 0 4px;
  position: relative;
  padding-left: 14px;
}
.cat-section__head h2::before {
  content: "";
  position: absolute; left: 0; top: 1px; bottom: 1px;
  width: 4px; background: var(--accent); border-radius: 2px;
}
.cat-section__subtitle { margin: 0 0 0 14px; color: var(--text-dim); font-size: 12.5px; }
.cat-section__all { color: var(--accent); font-size: 13px; white-space: nowrap; font-weight: 600; }

.row {
  display: flex; gap: 14px; overflow-x: auto;
  scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: none;
}
.row::-webkit-scrollbar { display: none; }

.card { flex: 0 0 auto; width: 152px; display: block; position: relative; transition: transform 0.25s var(--spring); }
.card:hover { transform: translateY(-4px) scale(1.03); }
.card__poster { width: 152px; aspect-ratio: 148 / 208; height: auto; border-radius: var(--radius-card); object-fit: cover; background: var(--surface); display: block; }
.card__title { font-size: 13px; font-weight: 600; margin: 8px 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card__meta { font-size: 11.5px; color: var(--text-dim); }

.poster-empty { background: linear-gradient(160deg, #1c1c1e 0%, #131315 100%); display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.18); }
.poster-empty::before {
  content: "";
  width: 34%; height: 34%;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 4h16v16H4V4zm2 2v9.59l3.29-3.3a1 1 0 0 1 1.42 0L14 15.59l1.29-1.3a1 1 0 0 1 1.42 0L18 15.59V6H6zm3 3a2 2 0 1 1 0-4 2 2 0 0 1 0 4z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 4h16v16H4V4zm2 2v9.59l3.29-3.3a1 1 0 0 1 1.42 0L14 15.59l1.29-1.3a1 1 0 0 1 1.42 0L18 15.59V6H6zm3 3a2 2 0 1 1 0-4 2 2 0 0 1 0 4z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.card--skeleton .card__poster {
  background: linear-gradient(100deg, var(--surface) 30%, #2a2a2e 50%, var(--surface) 70%);
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.row__error { color: var(--text-dim); font-size: 13px; padding: 20px 0; }

/* ================= Мини-чат ================= */

.minichat-btn {
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(24px, env(safe-area-inset-bottom));
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(var(--accent-rgb), 0.4);
  z-index: 45;
  transition: transform 0.2s var(--spring);
}
.minichat-btn:hover { transform: scale(1.06); }

.minichat-panel {
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: 88px;
  width: min(320px, calc(100vw - 40px));
  background: rgba(15, 15, 17, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 14px;
  z-index: 45;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  height: 380px;
}
.minichat-panel__head { font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.minichat-panel__messages { flex: 1; overflow-y: auto; font-size: 12.5px; margin: 8px 0; }
.minichat-panel__msg { margin-bottom: 8px; }
.minichat-panel__author { font-weight: 700; margin-right: 6px; }
.minichat-panel__author--mod { color: var(--accent); }
.minichat-panel__input-row { display: flex; gap: 6px; }
.minichat-panel__input-row input {
  flex: 1; background: rgba(255,255,255,0.08); border: 1px solid var(--border);
  color: var(--text); border-radius: var(--radius-capsule); padding: 8px 12px; font-size: 12.5px;
}

@media (max-width: 900px) {
  .minichat-btn { bottom: 84px; }
  .minichat-panel { bottom: 148px; }
}

/* Заглушка для не-ссылочных пунктов меню */
.nav-stub-hint {
  position: fixed;
  top: calc(var(--topbar-h) + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-capsule);
  padding: 8px 16px;
  font-size: 12.5px;
  color: var(--text-dim);
  z-index: 46;
}

/* ================= Общий контейнер внутренних страниц ================= */

.page-inner { padding: 32px 0 80px; }

/* ================= Страница тайтла ================= */

.title-hero { display: grid; grid-template-columns: 220px 1fr; gap: 28px; margin-bottom: 28px; }
.title-hero__poster { width: 220px; height: 308px; border-radius: var(--radius-card); object-fit: cover; background: var(--surface); }
.title-hero__meta { color: var(--text-dim); font-size: 13px; margin: 6px 0 14px; }
.title-hero__title { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: 28px; margin: 0 0 6px; }
.title-hero__original { color: var(--text-dim); font-size: 14px; margin: 0 0 14px; }
.title-hero__desc { font-size: 14px; line-height: 1.6; color: #d8d8dc; max-width: 720px; }

.genre-pill {
  display: inline-block; font-size: 11.5px; padding: 4px 10px;
  border-radius: var(--radius-capsule); background: rgba(255,255,255,0.08); margin: 0 6px 6px 0;
}

@media (max-width: 720px) {
  .title-hero { grid-template-columns: 1fr; }
  .title-hero__poster { width: 140px; height: 196px; }
}

/* ---- Плеер ---- */
.player-card { background: var(--surface); border-radius: 20px; padding: 16px; margin-bottom: 32px; }

.player-card__row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.player-card__label { font-size: 12px; color: var(--text-dim); margin-right: 2px; text-transform: uppercase; letter-spacing: 0.4px; }

.translation-select {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-capsule);
  padding: 9px 14px;
  font-size: 13px;
  flex: 1 1 220px;
  max-width: 360px;
}

.episode-buttons { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.episode-btn {
  min-width: 40px; height: 36px; padding: 0 10px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text-dim);
  font-size: 12.5px;
  font-weight: 700;
  transition: background 0.15s, color 0.15s;
}
.episode-btn:hover { background: rgba(255,255,255,0.12); color: var(--text); }
.episode-btn.is-active { background: var(--accent); color: #fff; }

.player-status { font-size: 12.5px; color: var(--text-dim); margin-top: 10px; }

/* ---- Секции комментариев/рецензий ---- */
.social-section { margin-top: 36px; }
.social-section h2 {
  font-family: var(--font-display); text-transform: uppercase; font-weight: 700;
  font-size: 16px; margin: 0 0 14px;
}

.auth-box { background: var(--surface); border-radius: 16px; padding: 16px; margin-bottom: 18px; font-size: 13px; }
.auth-box__row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.auth-box input {
  background: rgba(255,255,255,0.08); border: 1px solid var(--border); color: var(--text);
  border-radius: 10px; padding: 8px 10px; font-size: 13px; flex: 1 1 160px;
}
.auth-box__user { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

.comment-form { display: flex; gap: 8px; margin-bottom: 18px; }
.comment-form textarea {
  flex: 1; background: rgba(255,255,255,0.08); border: 1px solid var(--border); color: var(--text);
  border-radius: 12px; padding: 10px 12px; font-size: 13px; min-height: 44px; resize: vertical;
}

.comment { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.comment__avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: var(--surface); flex: 0 0 auto; }
.comment__author { font-weight: 700; margin-right: 6px; color: var(--text); }
.comment__author:hover { color: var(--accent); }
.comment__time { color: var(--text-dim); font-size: 11.5px; }
.comment__text { margin-top: 4px; line-height: 1.5; }

.review { padding: 14px 0; border-bottom: 1px solid var(--border); }
.review__rating {
  display: inline-block; background: rgba(var(--accent-rgb), 0.16); color: var(--accent);
  font-weight: 700; font-size: 12.5px; padding: 3px 10px; border-radius: var(--radius-capsule); margin-right: 8px;
}

.empty-state { color: var(--text-dim); font-size: 13px; padding: 12px 0; }

/* ================= Личный кабинет ================= */

.profile-editor { display: flex; gap: 24px; flex-wrap: wrap; margin-bottom: 8px; }
.profile-editor__preview { position: relative; width: 260px; flex: 0 0 auto; }
.profile-editor__banner { width: 260px; height: 110px; border-radius: 16px; object-fit: cover; background: var(--surface); display: block; }
.profile-editor__avatar {
  width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: var(--surface);
  border: 3px solid var(--bg); position: absolute; left: 14px; bottom: -20px;
}

.profile-editor__fields { flex: 1 1 260px; display: flex; flex-direction: column; gap: 12px; }
.profile-editor__fields label { font-size: 12.5px; color: var(--text-dim); display: flex; flex-direction: column; gap: 4px; }
.file-input-row {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,0.06); border: 1px dashed var(--border);
  border-radius: 10px; padding: 8px 10px;
}
.file-input-row input[type="file"] { font-size: 12px; color: var(--text-dim); flex: 1; }
.file-input-row__status { font-size: 11.5px; color: var(--text-dim); white-space: nowrap; }
.profile-editor__fields input[type="color"] { width: 60px; height: 32px; border: none; background: none; padding: 0; }

.stats-row { display: flex; gap: 14px; flex-wrap: wrap; }
.stat-card { background: var(--surface); border-radius: 16px; padding: 16px 22px; min-width: 140px; }
.stat-card__value { font-family: var(--font-display); font-size: 24px; font-weight: 700; }
.stat-card__label { font-size: 12px; color: var(--text-dim); margin-top: 2px; }

.quest-card {
  background: var(--surface); border-radius: 14px; padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 10px;
}
.quest-card__title { font-weight: 700; font-size: 13.5px; }
.quest-card__desc { font-size: 12px; color: var(--text-dim); margin: 2px 0 8px; }
.quest-card__bar { width: 220px; max-width: 40vw; height: 6px; border-radius: 3px; background: rgba(255,255,255,0.08); overflow: hidden; }
.quest-card__bar-fill { height: 100%; background: var(--accent); }
.quest-card__progress-text { font-size: 12px; color: var(--text-dim); white-space: nowrap; }
.quest-card__done { font-size: 12px; color: #34c759; white-space: nowrap; }

.list-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.list-tab { padding: 7px 14px; border-radius: var(--radius-capsule); background: var(--surface); color: var(--text-dim); font-size: 12.5px; }
.list-tab.is-active { background: var(--accent); color: #fff; }

.friend-search { position: relative; margin-bottom: 14px; }
.friend-search input {
  width: 100%; max-width: 360px; background: rgba(255,255,255,0.08); border: 1px solid var(--border);
  color: var(--text); border-radius: var(--radius-capsule); padding: 9px 16px; font-size: 13px;
}
#friend-search-results { margin-top: 8px; max-width: 360px; }

.friend-row, .friend-request {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13px;
}

/* ================= Мессенджер ================= */

.messenger { display: grid; grid-template-columns: 280px 1fr; gap: 20px; height: 60vh; min-height: 420px; }
.messenger__sidebar { background: var(--surface); border-radius: 16px; padding: 14px; overflow-y: auto; }

.conversation-row { padding: 10px 8px; border-radius: 10px; cursor: pointer; margin-bottom: 4px; }
.conversation-row:hover, .conversation-row.is-active { background: rgba(255,255,255,0.06); }
.conversation-row__name { font-size: 13.5px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.conversation-row__preview { font-size: 12px; color: var(--text-dim); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversation-row__badge { background: var(--accent); color: #fff; font-size: 10.5px; border-radius: 999px; padding: 1px 6px; }

.messenger__chat { background: var(--surface); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; }
#chat-active { display: flex; flex-direction: column; height: 100%; }
.messenger__chat-head { font-weight: 700; font-size: 14px; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.messenger__messages { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }

.chat-msg { display: flex; }
.chat-msg--mine { justify-content: flex-end; }
.chat-msg__bubble { max-width: 70%; background: rgba(255,255,255,0.08); padding: 8px 12px; border-radius: 14px; font-size: 13px; line-height: 1.4; }
.chat-msg--mine .chat-msg__bubble { background: var(--accent); color: #fff; }

.messenger__input-row { display: flex; gap: 8px; margin-top: 10px; }
.messenger__input-row input {
  flex: 1; background: rgba(255,255,255,0.08); border: 1px solid var(--border); color: var(--text);
  border-radius: var(--radius-capsule); padding: 10px 16px; font-size: 13px;
}

@media (max-width: 720px) {
  .messenger { grid-template-columns: 1fr; height: auto; }
  .messenger__sidebar { max-height: 240px; }
}

/* ================= Админ-панель ================= */

.admin-user-row {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 14px 0; border-bottom: 1px solid var(--border); font-size: 13px;
}
.admin-user-row__name { font-weight: 700; margin-bottom: 6px; }
.admin-user-row__badges { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.admin-user-row__actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.admin-user-row select, .admin-user-row input {
  background: rgba(255,255,255,0.08); border: 1px solid var(--border); color: var(--text);
  border-radius: 8px; padding: 6px 8px; font-size: 12px;
}

/* ================= Каталог с фильтрами (catalog.html) ================= */

.browse-layout { display: grid; grid-template-columns: 220px 1fr; gap: 28px; align-items: start; }
.filter-panel { background: var(--surface); border-radius: 16px; padding: 18px; position: sticky; top: calc(var(--topbar-h) + 20px); }
.filter-panel h3 { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text-dim); margin: 0 0 10px; }
.filter-group { margin-bottom: 22px; }
.filter-chip-list { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-chip { padding: 6px 12px; border-radius: var(--radius-capsule); background: var(--surface-2); font-size: 12px; color: var(--text-dim); }
.filter-chip.is-active { background: var(--accent); color: #fff; }
.catalog-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px 14px; }
.catalog-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; flex-wrap: wrap; gap: 10px; }
.catalog-toolbar select {
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  border-radius: var(--radius-capsule); padding: 8px 14px; font-size: 12.5px;
}

@media (max-width: 900px) {
  .browse-layout { grid-template-columns: 1fr; }
  .filter-panel { position: static; }
  .catalog-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 600px) {
  .catalog-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ================= Топ-100 (top100.html) ================= */

.top100-tabs { display: flex; gap: 8px; margin-bottom: 22px; flex-wrap: wrap; }
.top100-list { display: flex; flex-direction: column; gap: 2px; }
.top100-row { display: flex; align-items: center; gap: 14px; padding: 10px 8px; border-radius: 12px; }
.top100-row:hover { background: rgba(255,255,255,0.04); }
.top100-row__rank { font-family: var(--font-display); font-weight: 800; font-size: 20px; color: var(--text-dim); width: 36px; text-align: center; flex: 0 0 auto; }
.top100-row__rank.is-top3 { color: var(--accent); }
.top100-row__poster { width: 48px; height: 68px; border-radius: 8px; object-fit: cover; background: var(--surface); flex: 0 0 auto; }
.top100-row__title { font-size: 13.5px; font-weight: 700; }
.top100-row__meta { font-size: 11.5px; color: var(--text-dim); }

/* ================= Оверлей модалок (используется модалкой входа/регистрации) ================= */

.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.65);
  z-index: 80; display: flex; align-items: center; justify-content: center; padding: 20px;
}

/* ================= Подвал сайта ================= */

.site-footer {
  background: #0d0d0f;
  border-top: 1px solid var(--border);
  padding: 40px 0 24px;
  margin-top: 60px;
}
.site-footer__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.site-footer__col h3 {
  font-family: var(--font-display);
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.7px;
  color: var(--text-dim); margin: 0 0 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border);
}
.site-footer__col a, .site-footer__col .footer-text { display: block; font-size: 13px; color: var(--text); padding: 6px 0; }
.site-footer__col a:hover { color: var(--accent); }
.site-footer__col .footer-text { color: var(--text-dim); }

.site-footer__social { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.site-footer__social a {
  width: 36px; height: 36px; border-radius: 10px; background: var(--surface);
  display: flex; align-items: center; justify-content: center; color: var(--text-dim);
}
.site-footer__social a:hover { color: var(--accent); background: rgba(var(--accent-rgb), 0.14); }

.site-footer__bottom {
  text-align: center; font-size: 12px; color: var(--text-dim);
  margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--border);
}

@media (max-width: 900px) {
  .site-footer__grid { grid-template-columns: 1fr; gap: 24px; }
}

/* ================= Модалка входа/регистрации ================= */

.auth-modal {
  display: grid;
  grid-template-columns: 340px 1fr;
  background: var(--surface);
  border-radius: 20px;
  overflow: hidden;
  max-width: 860px;
  width: 100%;
  max-height: 90vh;
}

.auth-modal__promo {
  background: linear-gradient(160deg, rgba(var(--accent-rgb), 0.28) 0%, #0a0a0b 65%);
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.auth-modal__promo::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at 80% 10%, rgba(var(--accent-rgb), 0.25), transparent 55%);
}
.auth-modal__brand { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 800; font-size: 16px; position: relative; }
.auth-modal__headline { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: 26px; line-height: 1.15; margin: 24px 0 10px; position: relative; }
.auth-modal__headline span { color: var(--accent); }
.auth-modal__tagline { font-size: 13px; color: var(--text-dim); line-height: 1.5; position: relative; max-width: 260px; }

.auth-modal__features { display: flex; flex-direction: column; gap: 8px; position: relative; margin-top: 24px; }
.auth-modal__feature {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 12.5px;
}
.auth-modal__feature .accent-dot { color: var(--accent); }

.auth-modal__form { padding: 32px; overflow-y: auto; }
.auth-modal__form-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.auth-modal__step { font-size: 12px; color: var(--text-dim); }
.auth-modal__title { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: 22px; margin: 0 0 24px; }

.auth-modal__field { margin-bottom: 16px; }
.auth-modal__field label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-dim); margin-bottom: 6px; }
.auth-modal__field input {
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
}
.auth-modal__field input:focus { border-color: var(--accent); }

.auth-modal__submit { width: 100%; padding: 13px; font-size: 14px; margin-top: 6px; }
.auth-modal__switch { text-align: center; font-size: 13px; color: var(--text-dim); margin-top: 18px; }
.auth-modal__switch a, .auth-modal__switch button { color: var(--accent); font-weight: 700; display: inline; }
.auth-modal__error { color: #ff6b6b; font-size: 12.5px; margin-top: 10px; text-align: center; }
.auth-modal__close { position: absolute; top: 14px; right: 16px; color: var(--text-dim); font-size: 18px; z-index: 2; }
.auth-modal__close:hover { color: var(--text); }

@media (max-width: 720px) {
  .auth-modal { grid-template-columns: 1fr; max-height: 92vh; overflow-y: auto; }
  .auth-modal__promo { display: none; }
}

/* Кнопка "Войти" в топбаре для гостя */
.topbar__login-btn { padding: 9px 18px; font-size: 13px; }

/* ================= Плавная анимация каталога ================= */

.catalog-grid { transition: opacity 0.25s ease; }
.catalog-grid.is-loading { opacity: 0.35; pointer-events: none; }

@keyframes cardFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.catalog-grid .card { animation: cardFadeIn 0.35s ease both; }

.filter-chip { transition: background 0.2s, color 0.2s; }

/* ================= Объявления на главной ================= */

.announcements-section { padding: 8px 0 4px; }
.announcement-card {
  background: var(--surface);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 10px;
  border-left: 3px solid var(--accent);
}
.announcement-card__title { font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.announcement-card__body { font-size: 13px; color: var(--text-dim); line-height: 1.5; }
.announcement-card__meta { font-size: 11px; color: var(--text-dim); margin-top: 8px; opacity: 0.7; }

/* ================= Страница тайтла v2 (без плеера, с вкладками) ================= */

.title-actions { display: flex; align-items: center; gap: 10px; margin-top: 8px; }

.content-tabs { display: flex; gap: 4px; margin: 32px 0 20px; border-bottom: 1px solid var(--border); }
.content-tab {
  padding: 12px 18px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-dim);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.content-tab:hover { color: var(--text); }
.content-tab.is-active { color: var(--text); border-bottom-color: var(--accent); }

.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.info-row { background: var(--surface); border-radius: 12px; padding: 14px 16px; }
.info-row__label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-dim); margin-bottom: 4px; }
.info-row__value { font-size: 14px; font-weight: 600; }

/* ================= Страница просмотра (watch.html) ================= */
.watch-back { display: inline-block; margin-bottom: 16px; color: var(--text-dim); font-size: 13px; }
.watch-back:hover { color: var(--text); }

/* ================= Страница просмотра v2 ================= */

.content-tabs { display: flex; gap: 4px; margin: 32px 0 20px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.content-tab {
  padding: 12px 18px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-dim);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.content-tab:hover { color: var(--text); }
.content-tab.is-active { color: var(--text); border-bottom-color: var(--accent); }

.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.info-row { background: var(--surface); border-radius: 12px; padding: 14px 16px; }
.info-row__label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-dim); margin-bottom: 4px; }
.info-row__value { font-size: 14px; font-weight: 600; }

.release-bar {
  background: var(--surface);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 13px;
  color: var(--text-dim);
  margin: 28px 0 14px;
}
.release-bar strong { color: var(--accent); }

.watch-controls { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.watch-controls__search { flex: 1; min-width: 180px; }
.watch-controls__search input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-capsule);
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text);
}

/* ---- Video.js: тема под сайт ---- */
.video-js {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 14px;
  overflow: hidden;
  font-family: var(--font);
}
.video-js .vjs-tech { border-radius: 14px; }
.video-js .vjs-big-play-button {
  top: 50%; left: 50%; margin: 0; transform: translate(-50%, -50%);
  width: 64px; height: 64px; line-height: 62px;
  border-radius: 50%;
  border: none;
  background: rgba(var(--accent-rgb), 0.85);
}
.video-js:hover .vjs-big-play-button,
.video-js .vjs-big-play-button:focus { background: var(--accent); }
.video-js .vjs-control-bar {
  background: linear-gradient(0deg, rgba(0,0,0,0.75), rgba(0,0,0,0));
  font-family: var(--font);
}
.video-js .vjs-play-progress,
.video-js .vjs-volume-level { background: var(--accent); }
.video-js .vjs-slider { background: rgba(255, 255, 255, 0.2); }
.video-js .vjs-load-progress div { background: rgba(255, 255, 255, 0.25); }
.video-js .vjs-menu-content { background: rgba(15, 15, 17, 0.97); backdrop-filter: blur(16px); }
.video-js .vjs-menu li { font-size: 12.5px; }
.video-js .vjs-menu li.vjs-selected,
.video-js .vjs-menu li:hover { background: var(--accent); color: #fff; }
.video-js .vjs-control:focus,
.video-js .vjs-control:focus:before { text-shadow: none; }

.player-embed-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
}
.player-embed-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.player-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.skip-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-dim);
  white-space: nowrap;
}
.skip-toggle input { accent-color: var(--accent); width: 15px; height: 15px; }

.episode-thumbs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 14px 0;
  scrollbar-width: none;
}
.episode-thumbs::-webkit-scrollbar { display: none; }
.episode-thumb { flex: 0 0 auto; width: 120px; cursor: pointer; opacity: 0.75; transition: opacity 0.15s; }
.episode-thumb:hover { opacity: 1; }
.episode-thumb.is-active { opacity: 1; }
.episode-thumb img, .episode-thumb__placeholder {
  width: 120px; height: 68px; border-radius: 10px; object-fit: cover; background: var(--surface); display: block;
}
.episode-thumb.is-active img, .episode-thumb.is-active .episode-thumb__placeholder { outline: 2px solid var(--accent); }
.episode-thumb__label { display: block; font-size: 11.5px; color: var(--text-dim); margin-top: 4px; text-align: center; }
.episode-thumb.is-active .episode-thumb__label { color: var(--text); font-weight: 700; }

.current-episode-bar {
  background: var(--surface);
  border-radius: 14px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 8px;
}
.current-episode-bar__title { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; font-size: 13px; }
.current-episode-bar__meta { font-size: 12px; color: var(--text-dim); margin-top: 2px; }

/* ================= Статистика на главной ================= */

.stats-card {
  background: var(--surface);
  border-radius: 16px;
  padding: 18px 20px;
  max-width: 320px;
}
.stats-card__title {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.4px;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 2px solid var(--accent);
}
.stats-card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 13px;
  color: var(--text-dim);
}
.stats-card__row strong { color: var(--text); font-weight: 700; }

/* Аватарка в выпадающей панели аккаунта */
.account-panel__user { display: flex; align-items: center; gap: 10px; }
.account-panel__avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.account-panel__avatar--fallback {
  display: flex; align-items: center; justify-content: center;
  background: rgba(var(--accent-rgb), 0.16); color: var(--accent);
}

/* ================= Бейджи ролей, аватар-фолбэк, инлайн-модерация ================= */

.role-badge {
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  margin-left: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  vertical-align: middle;
}
.role-badge--admin { background: rgba(var(--accent-rgb), 0.18); color: var(--accent); }
.role-badge--moderator { background: rgba(96, 165, 250, 0.18); color: #60a5fa; }

.comment__avatar--fallback,
.profile-editor__avatar--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--accent-rgb), 0.16);
  color: var(--accent);
  font-weight: 700;
  font-size: 13px;
}

.comment__mod-actions { display: flex; gap: 10px; margin-top: 6px; }
.comment__mod-actions button { font-size: 11.5px; color: var(--text-dim); text-decoration: underline; }
.comment__mod-actions button:hover { color: var(--accent); }

.announcement-card__mod-actions { margin-top: 8px; }
.announcement-card__mod-actions button {
  font-size: 11.5px; color: var(--text-dim); text-decoration: underline;
}
.announcement-card__mod-actions button:hover { color: var(--accent); }

/* Небольшая модалка (наказание и т.п.) — переиспользует .modal-overlay */
.mini-modal { background: var(--surface); border-radius: 16px; padding: 20px; width: min(340px, 100%); }
.mini-modal h3 { margin: 0 0 14px; font-size: 15px; font-family: var(--font-display); text-transform: uppercase; }
.mini-modal label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.4px; color: var(--text-dim); margin: 10px 0 4px; }
.mini-modal select, .mini-modal input {
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
}
.mini-modal__actions { display: flex; gap: 8px; margin-top: 16px; }
.mini-modal__actions .btn { flex: 1; }

/* ================= Мобильная адаптация (тонкая доводка) ================= */

@media (max-width: 600px) {
  .container { padding: 0 16px; }

  .hero { min-height: 46vh; }
  .hero__content { padding-bottom: 32px; }
  .hero__title { font-size: clamp(24px, 8vw, 34px); }
  .hero__desc { font-size: 13px; }
  .hero__actions { flex-wrap: wrap; gap: 12px; }

  .card { width: 128px; }
  .card__poster { width: 128px; }

  .cat-section { padding: 28px 0 4px; }
  .cat-section__head { flex-wrap: wrap; gap: 6px; }

  .genre-strip { gap: 6px; padding: 18px 0 4px; }
  .genre-chip { padding: 6px 12px; font-size: 12px; }

  .title-hero__title, .current-episode-bar__title { line-height: 1.15; }

  .content-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 22px 0 16px;
  }
  .content-tabs::-webkit-scrollbar { display: none; }
  .content-tab { padding: 10px 14px; white-space: nowrap; }

  .episode-thumb { width: 96px; }
  .episode-thumb img, .episode-thumb__placeholder { width: 96px; height: 56px; }

  .current-episode-bar { flex-direction: column; align-items: flex-start; }

  .watch-controls { flex-direction: column; align-items: stretch; }
  .translation-select { max-width: none; }

  .stats-card { max-width: none; }

  .profile-editor__preview { width: 100%; }
  .profile-editor__banner { width: 100%; }

  .mini-modal, .auth-modal__form { padding: 20px; }
}

/* ================= Быстрый выбор статуса просмотра (страница тайтла) ================= */

.status-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 8px;
  background: var(--surface);
  border-radius: var(--radius-capsule);
  width: fit-content;
}
.status-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  transition: background 0.2s, color 0.2s;
}
.status-btn:hover { background: rgba(255, 255, 255, 0.08); color: var(--text); }
.status-btn.is-active { background: var(--accent); color: #fff; }
.status-row__hint { font-size: 12px; color: var(--text-dim); padding-right: 6px; white-space: nowrap; }

/* ================= Публичный профиль пользователя (user.html) ================= */

.user-banner {
  position: relative;
  width: 100%;
  height: 220px;
  border-radius: 20px;
  background-size: cover;
  background-position: center;
  margin-bottom: 44px;
}
.user-banner__avatar {
  position: absolute;
  left: 28px;
  bottom: -32px;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--bg);
  background: var(--surface);
}

.user-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.user-header__name { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: 22px; margin: 0; }
.user-header__meta { font-size: 12.5px; color: var(--text-dim); margin-top: 4px; }

.user-bio { font-size: 14px; line-height: 1.6; color: #d8d8dc; max-width: 640px; margin: 0 0 24px; }

@media (max-width: 600px) {
  .user-banner { height: 140px; margin-bottom: 36px; }
  .user-banner__avatar { width: 68px; height: 68px; left: 16px; bottom: -24px; }
}

/* ================= Расписание онгоингов + Обновления аниме ================= */

.panels-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.panel-card {
  background: var(--surface);
  border-radius: 16px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  max-height: 480px;
}
.panel-card__head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  text-transform: uppercase;
  font-weight: 700;
  font-size: 13px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 2px solid var(--accent);
}

.schedule-days { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 12px; scrollbar-width: none; }
.schedule-days::-webkit-scrollbar { display: none; }
.schedule-day-btn {
  flex: 0 0 auto;
  min-width: 46px;
  padding: 7px 6px;
  border-radius: 10px;
  background: var(--surface-2);
  text-align: center;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-dim);
}
.schedule-day-btn.is-active { background: var(--accent); color: #fff; }
.schedule-day-btn__count {
  display: block;
  font-size: 9.5px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 1px 5px;
  margin: 2px auto 0;
  width: fit-content;
}
.schedule-day-btn.is-active .schedule-day-btn__count { background: rgba(255, 255, 255, 0.3); }

.schedule-list, .updates-list { overflow-y: auto; flex: 1; scrollbar-width: none; }
.schedule-list::-webkit-scrollbar, .updates-list::-webkit-scrollbar { display: none; }

.schedule-item, .update-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
  border-radius: 8px;
  transition: background 0.15s;
}
.schedule-item:hover, .update-item:hover { background: rgba(255, 255, 255, 0.05); }
.schedule-item:last-child, .update-item:last-child { border-bottom: none; }
.schedule-item img, .update-item img, .schedule-item__placeholder {
  width: 38px;
  height: 52px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--surface-2);
  flex: 0 0 auto;
}
.schedule-item__title, .update-item__title { font-weight: 600; font-size: 12.5px; line-height: 1.3; }
.schedule-item__meta, .update-item__meta { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.schedule-item__time { font-size: 12px; font-weight: 700; white-space: nowrap; color: var(--text-dim); }

@media (max-width: 900px) {
  .panels-grid { grid-template-columns: 1fr; }
}

/* ================= Новости ================= */

.news-tabs { display: flex; gap: 6px; margin-bottom: 16px; }

.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }

.news-card { background: var(--surface); border-radius: 14px; overflow: hidden; display: block; transition: transform 0.2s var(--spring); }
.news-card:hover { transform: translateY(-3px); }
.news-card__cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--surface-2); display: block; }
.news-card__body { padding: 14px; }
.news-card__category {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 3px 9px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.news-card__category--anime { background: rgba(var(--accent-rgb), 0.18); color: var(--accent); }
.news-card__category--site { background: rgba(96, 165, 250, 0.18); color: #60a5fa; }
.news-card__title { font-size: 13.5px; font-weight: 700; margin: 0 0 6px; line-height: 1.35; }
.news-card__excerpt { font-size: 12px; color: var(--text-dim); line-height: 1.5; }
.news-card__meta { font-size: 11px; color: var(--text-dim); margin-top: 10px; }

/* ================= Страница списка новостей ================= */

.news-page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }

/* ================= Редактор новостей (модалка) ================= */

.news-editor {
  background: var(--surface);
  border-radius: 18px;
  padding: 22px;
  width: min(640px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}
.news-editor__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-display);
  text-transform: uppercase;
  font-weight: 700;
  font-size: 15px;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--accent);
}
.news-editor__close { color: var(--text-dim); font-size: 16px; }
.news-editor__close:hover { color: var(--text); }

.news-editor__title-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
}

.news-editor__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  background: var(--surface-2);
  border-radius: 10px 10px 0 0;
  padding: 6px;
  border-bottom: 2px solid var(--accent);
}
.news-editor__toolbar button {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  color: var(--text-dim);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.news-editor__toolbar button:hover { background: rgba(255, 255, 255, 0.1); color: var(--text); }

.news-editor__body {
  min-height: 200px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 10px 10px;
  padding: 14px;
  font-size: 13.5px;
  line-height: 1.6;
  margin-bottom: 16px;
}
.news-editor__body:focus { outline: none; }
.news-editor__body img { max-width: 100%; border-radius: 8px; }
.news-editor__body blockquote { border-left: 3px solid var(--accent); margin: 8px 0; padding: 4px 14px; color: var(--text-dim); }
.news-editor__body h2 { font-family: var(--font-display); text-transform: uppercase; font-size: 16px; margin: 12px 0 8px; }

.news-editor__row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.news-editor__row label { flex: 1 1 180px; font-size: 11px; text-transform: uppercase; color: var(--text-dim); display: flex; flex-direction: column; gap: 4px; }
.news-editor__row select, .news-editor__row input {
  background: rgba(255,255,255,0.06); border: 1px solid var(--border); color: var(--text);
  border-radius: 8px; padding: 8px 10px; font-size: 13px;
}
.news-editor__anime-label { display: block; font-size: 11px; text-transform: uppercase; color: var(--text-dim); margin-bottom: 6px; }
.news-editor__actions { display: flex; gap: 8px; margin-top: 6px; }
.news-editor__actions .btn { flex: 1; }

/* Спойлер и видео-вставка — используются и в редакторе, и на самой странице новости */
.news-spoiler {
  background: rgba(255, 255, 255, 0.1);
  color: transparent;
  border-radius: 4px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.news-spoiler.is-revealed { background: transparent; color: inherit; }

.news-embed-yt { position: relative; width: 100%; aspect-ratio: 16 / 9; margin: 12px 0; border-radius: 12px; overflow: hidden; }
.news-embed-yt iframe { width: 100%; height: 100%; border: none; }

/* ================= Страница отдельной новости ================= */

.news-post-cover { width: 100%; max-height: 420px; object-fit: cover; border-radius: 18px; margin-bottom: 22px; }
.news-post-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; font-size: 12.5px; color: var(--text-dim); }
.news-post-body { font-size: 15px; line-height: 1.75; color: #e2e2e6; }
.news-post-body img { max-width: 100%; border-radius: 10px; margin: 10px 0; }
.news-post-body blockquote { border-left: 3px solid var(--accent); margin: 14px 0; padding: 6px 18px; color: var(--text-dim); }
.news-post-body h2 { font-family: var(--font-display); text-transform: uppercase; font-size: 20px; margin: 24px 0 12px; }
.news-post-body ul, .news-post-body ol { padding-left: 22px; }
.news-post-actions { display: flex; gap: 8px; margin-top: 20px; }
