/* showcritics — стиль 1a «Тёмный кинозал» из дизайн-концепции */
:root {
  --bg: #101014;
  --panel: #131318;
  --card: #17171d;
  --input: #1d1d24;
  --border: #24242c;
  --border-2: #2a2a32;
  --border-3: #3a3a44;
  --accent: #e8b04b;
  --accent-hover: #f0c06a;
  --on-accent: #14120c;
  --text: #f2f0ea;
  --text-body: #b8b5bf;
  --text-chip: #c8c5cf;
  --text-2: #9a97a0;
  --muted: #6e6a76;
  --dim: #4d4a55;
  --good: #8fca8f;
  --good-border: #2f3d2f;
  --bad: #cf8f8f;
  --bad-border: #443030;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--bg);
  font-family: 'Golos Text', sans-serif;
  color: var(--text);
}
a { color: var(--text-chip); }
a:hover { color: var(--accent); }
::placeholder { color: var(--muted); }
input, textarea { outline: none; font-family: 'Golos Text', sans-serif; }
img { max-width: 100%; }

/* logout как ссылка/иконка: форма-обёртка нужна для POST+CSRF, но не должна ломать раскладку */
.logout-form { display: inline; margin: 0; }
.logout-btn { border: 0; background: none; cursor: pointer; font: inherit; padding: 0; color: var(--text-2); }
.logout-btn:hover { color: var(--accent); }

/* h1 для поисковиков там, где визуального заголовка нет по дизайну */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.page { min-height: 100vh; display: flex; flex-direction: column; }
.site-main { flex: 1; }
.container { max-width: 1280px; margin: 0 auto; padding-left: 32px; padding-right: 32px; }

/* ── Шапка ── */
.site-header { background: var(--panel); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; gap: 28px; padding-top: 14px; padding-bottom: 14px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-badge {
  width: 36px; height: 36px; border-radius: 9px; background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Unbounded', sans-serif; font-weight: 800; font-size: 13px; color: var(--on-accent);
}
.logo-badge-sm { width: 28px; height: 28px; border-radius: 7px; font-size: 10px; }
.logo-badge-lg { width: 44px; height: 44px; border-radius: 11px; font-size: 16px; }
.logo-text { font-family: 'Unbounded', sans-serif; font-weight: 600; font-size: 15px; color: var(--text); }
.logo-text em { font-style: normal; color: var(--accent); }
.main-nav { display: flex; align-items: center; gap: 22px; font-size: 14px; }
.main-nav a { color: var(--text-2); text-decoration: none; }
.main-nav a.active { color: var(--text); font-weight: 500; }
.main-nav a:hover { color: var(--accent); }
/* ── Мега-меню при наведении ── */
.nav-item { position: relative; }
.nav-item > a { display: inline-block; padding: 14px 0; margin: -14px 0; }
.mega {
  position: absolute; top: calc(100% + 14px); left: -20px; z-index: 60;
  display: flex; gap: 28px; padding: 22px 26px; min-width: 560px;
  background: var(--panel); border: 1px solid var(--border-2); border-radius: 0 0 12px 12px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.55);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s;
}
/* мостик, чтобы курсор не «проваливался» между пунктом и панелью */
.nav-item::after {
  content: ""; position: absolute; left: -20px; right: -20px; top: 100%; height: 16px;
}
.nav-item:hover .mega, .nav-item:focus-within .mega {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.mega-col { min-width: 120px; }
.mega-col-wide { min-width: 240px; max-width: 280px; }
.mega-title { color: var(--accent); font-family: 'Oswald', sans-serif; font-size: 13px; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 12px; }
.mega-links { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.mega-col-wide .mega-links, .mega-col .mega-links { column-gap: 14px; }
.mega-links a { color: var(--text-2); text-decoration: none; font-size: 13px; line-height: 1.7; white-space: nowrap; }
.mega-links a:hover { color: var(--accent); }
.mega-links-years { max-width: 150px; }

/* ── Живые подсказки поиска ── */
.header-search { flex: 1; max-width: 360px; margin-left: auto; position: relative; }
.suggest-box {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 70;
  background: var(--panel); border: 1px solid var(--border-2); border-radius: 10px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.55); overflow: hidden;
  max-height: 480px; overflow-y: auto;
}
/* в шапке панель шире поля — чтобы название и бейджи рейтингов помещались */
.header-search .suggest-box { width: 480px; max-width: 60vw; left: auto; }
.suggest-item { display: flex; align-items: center; gap: 12px; padding: 9px 12px; text-decoration: none; }
.suggest-item:hover, .suggest-item.hover { background: var(--input); }
.suggest-poster { width: 38px; height: 56px; border-radius: 5px; object-fit: cover; flex-shrink: 0; background: repeating-linear-gradient(45deg, #23232b, #23232b 6px, #1d1d24 6px, #1d1d24 12px); }
.suggest-body { min-width: 0; flex: 1; }
.suggest-name { color: var(--text); font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggest-item:hover .suggest-name, .suggest-item.hover .suggest-name { color: var(--accent); }
.suggest-meta { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* фирменные бейджи рейтингов рядом с названием (как на постерах карточек) */
.suggest-name-row { display: flex; align-items: center; gap: 4px 6px; min-width: 0; flex-wrap: wrap; }
.suggest-name-row .suggest-name { flex: 0 1 auto; }
.suggest-badge {
  flex-shrink: 0; font-size: 10.5px; font-weight: 800;
  padding: 2px 6px; border-radius: 5px; line-height: 1.3; white-space: nowrap;
}
.suggest-badge-kp { background: #ff5500; color: #fff; }
.suggest-badge-imdb { background: #f5c518; color: #121212; }
.suggest-all { display: block; padding: 10px 12px; text-align: center; color: var(--text-2); font-size: 13px; text-decoration: none; border-top: 1px solid var(--border); }
.suggest-all:hover { color: var(--accent); }
.suggest-empty { padding: 14px 12px; color: var(--muted); font-size: 13px; text-align: center; }
.header-search input {
  width: 100%; background: var(--input); border: 1px solid var(--border-2);
  border-radius: 8px; padding: 10px 14px; color: var(--text); font-size: 14px;
}
.header-search input:focus { border-color: var(--accent); }
.header-auth { display: flex; align-items: center; gap: 16px; font-size: 14px; }
.user-name { color: var(--accent); font-weight: 500; font-size: 14px; }
.link-muted { color: var(--text-2); text-decoration: none; font-size: 14px; }

/* ── Бургер и боковое меню (мобильная версия, ≤750px) ── */
.burger {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px; padding: 8px; border-radius: 8px;
  background: var(--input); border: 1px solid var(--border-2); cursor: pointer;
}
.burger span { display: block; height: 2px; border-radius: 2px; background: var(--text); }
.burger:hover span { background: var(--accent); }
.mobile-auth { display: none; margin-left: auto; align-items: center; gap: 10px; }
.icon-btn {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--input); border: 1px solid var(--border-2);
  color: var(--text-chip); cursor: pointer; text-decoration: none;
}
.icon-btn:hover { color: var(--accent); border-color: var(--accent); }
.mobile-user {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--accent); color: var(--on-accent);
  font-weight: 700; font-size: 16px; text-decoration: none;
  border: 0; cursor: pointer; font-family: inherit;
}
.drawer-overlay {
  position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, 0.6);
  opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility .25s;
}
.drawer {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 95;
  width: 290px; max-width: 85vw; padding: 18px 20px 24px;
  background: var(--panel); border-right: 1px solid var(--border-2);
  display: flex; flex-direction: column; gap: 20px;
  transform: translateX(-100%); transition: transform .25s ease;
  overflow-y: auto;
}
body.drawer-open { overflow: hidden; }
body.drawer-open .drawer { transform: translateX(0); }
body.drawer-open .drawer-overlay { opacity: 1; visibility: visible; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; }
.drawer-close {
  width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--border-2);
  background: var(--input); color: var(--text-2); font-size: 15px; cursor: pointer;
}
.drawer-close:hover { color: var(--accent); border-color: var(--accent); }
.drawer-search input {
  width: 100%; background: var(--input); border: 1px solid var(--border-2);
  border-radius: 8px; padding: 11px 14px; color: var(--text); font-size: 14px;
}
.drawer-search input:focus { border-color: var(--accent); }
/* подсказки в боковом меню — обычным блоком под полем, панель сама скроллится */
.drawer-search .suggest-box {
  position: static; margin-top: 10px; max-height: none;
  box-shadow: none; border-radius: 10px;
}
.drawer-nav { display: flex; flex-direction: column; }
.drawer-nav a {
  color: var(--text-2); text-decoration: none; font-size: 16px;
  padding: 13px 4px; border-bottom: 1px solid var(--border);
}
.drawer-nav a.active { color: var(--text); font-weight: 600; }
.drawer-nav a:hover { color: var(--accent); }
.drawer-auth { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.drawer-user { color: var(--accent); font-weight: 600; font-size: 15px; text-align: center; }

/* ── Кнопки ── */
.btn { display: inline-block; text-decoration: none; border-radius: 8px; border: 0; cursor: pointer; font-family: 'Golos Text', sans-serif; }
.btn-accent { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.btn-accent:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn-sm { font-size: 14px; font-weight: 600; padding: 10px 20px; }
.btn-lg { font-size: 15px; padding: 13px 26px; }
.btn-outline { border: 1px solid var(--border-3); color: var(--text); font-weight: 500; font-size: 15px; padding: 13px 26px; background: transparent; }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-block { display: block; width: 100%; text-align: center; padding: 13px; font-size: 15px; }

/* ── Герой: карусель ── */
.hero-carousel { position: relative; margin-top: 32px; }
.hero-slides { display: grid; }
.hero-slide {
  grid-area: 1 / 1;
  position: relative; overflow: hidden;
  border: 1px solid var(--border-2); border-radius: 16px;
  background: linear-gradient(135deg, #1d1a22 0%, #131318 55%);
  padding: 32px 72px 44px; display: flex; gap: 36px;
  opacity: 0; visibility: hidden; transition: opacity .6s ease, visibility .6s;
}
.hero-slide.active { opacity: 1; visibility: visible; }
/* размытый кадр/постер фоном слайда; поверх — затемнение, чтобы текст читался */
.hero-backdrop {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: blur(28px) brightness(.5) saturate(1.1);
  transform: scale(1.12); /* прячем светлую кромку блюра у краёв */
}
.hero-slide::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(16,16,20,.78) 0%, rgba(16,16,20,.5) 55%, rgba(16,16,20,.72) 100%);
}
.hero-slide > a, .hero-slide .hero-body { position: relative; z-index: 1; }
.hero-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border-3);
  background: rgba(19, 19, 24, 0.8); color: var(--text-chip);
  font-size: 22px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center; padding-bottom: 3px;
}
.hero-arrow:hover { border-color: var(--accent); color: var(--accent); }
.hero-arrow-prev { left: 14px; }
.hero-arrow-next { right: 14px; }
.hero-dots {
  position: absolute; bottom: 16px; left: 0; right: 0; z-index: 5;
  display: flex; justify-content: center; gap: 8px;
}
.hero-dot {
  width: 8px; height: 8px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
  background: var(--border-3); transition: background .2s, width .2s;
}
.hero-dot.active { background: var(--accent); width: 22px; border-radius: 4px; }
.hero-dot:hover { background: var(--accent-hover); }
.hero-poster { width: 250px; height: 375px; object-fit: cover; border-radius: 12px; display: block; box-shadow: 0 20px 50px rgba(0,0,0,0.5); flex-shrink: 0; }
.hero-body { display: flex; flex-direction: column; gap: 14px; justify-content: center; max-width: 640px; }
.hero-label { color: var(--accent); font-family: 'Oswald', sans-serif; font-size: 14px; letter-spacing: 3px; }
.hero-title { font-family: 'Oswald', sans-serif; font-weight: 600; font-size: 44px; line-height: 1.1; color: var(--text); text-decoration: none; }
.hero-meta { color: var(--text-2); font-size: 15px; }
.hero-desc { color: var(--text-body); font-size: 15px; line-height: 1.6; }
.hero-actions { display: flex; gap: 12px; margin-top: 6px; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1px solid var(--border-3); color: var(--text-chip); font-size: 13px; padding: 5px 12px; border-radius: 6px; }
.chip-pill { background: var(--input); border: 1px solid var(--border-2); border-radius: 20px; padding: 6px 12px; }

.scores { display: flex; gap: 18px; align-items: center; }
.score { display: flex; align-items: baseline; gap: 6px; }
.score b { font-family: 'Oswald', sans-serif; font-size: 22px; font-weight: 600; color: var(--text); }
.score.kp b { color: var(--accent); }
.score span { color: var(--muted); font-size: 12px; }

/* ── Секции и сетка карточек ── */
.section { display: flex; flex-direction: column; gap: 18px; padding-top: 24px; }
.section:last-of-type { padding-bottom: 48px; }
.section-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.section-head .section-link { margin-left: auto; }
.sort-tabs { display: flex; gap: 6px; }
.section-grid { transition: opacity .15s ease; }
.section-title { margin: 0; font-family: 'Oswald', sans-serif; font-size: 24px; font-weight: 500; letter-spacing: 1px; color: var(--text); text-decoration: none; }
.section-title a { color: inherit; text-decoration: none; }
.section-title a:hover, a.section-title:hover { color: var(--accent); }
.section-link { color: var(--text-2); font-size: 14px; text-decoration: none; }

.cards-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.card { display: flex; flex-direction: column; gap: 8px; text-decoration: none; position: relative; }
.card-poster { aspect-ratio: 2/3; border-radius: 10px; position: relative; overflow: hidden; background: repeating-linear-gradient(45deg, #23232b, #23232b 10px, #1d1d24 10px, #1d1d24 20px); }
.card-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* фирменные цвета сервисов — читаются на любом постере */
.card-rating {
  position: absolute; bottom: 8px; font-weight: 800; font-size: 13px;
  padding: 3px 8px; border-radius: 6px; white-space: nowrap; line-height: 1.3;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}
.card-rating-kp { left: 8px; background: #ff5500; color: #fff; }
.card-rating-imdb { right: 8px; background: #f5c518; color: #121212; }
/* иконка «i» с всплывающей подсказкой (вне .card-poster: там overflow hidden) */
.card-info { position: absolute; top: 8px; right: 8px; z-index: 15; }
.card-info-icon {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); border: 2px solid #14120c;
  color: var(--on-accent); font-size: 17px; font-weight: 800; font-style: italic;
  font-family: Georgia, serif; cursor: help;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
  transition: transform .15s ease, background .15s ease;
}
.card-info:hover .card-info-icon { background: var(--accent-hover); transform: scale(1.12); }
.card-tip {
  position: absolute; top: calc(100% + 8px); right: -8px; z-index: 40;
  width: 300px; padding: 16px; border-radius: 12px;
  background: var(--panel); border: 1px solid var(--border-2);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65);
  opacity: 0; visibility: hidden; transform: translateY(4px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s;
  pointer-events: none; text-align: left; white-space: normal; cursor: default;
}
.card-info:hover .card-tip { opacity: 1; visibility: visible; transform: translateY(0); }
.card-tip-name { color: var(--text); font-family: 'Oswald', sans-serif; font-size: 17px; font-weight: 500; margin-bottom: 10px; }
.card-tip-rows { display: flex; flex-direction: column; gap: 5px; margin-bottom: 10px; }
.card-tip-row { display: flex; gap: 10px; font-size: 12.5px; }
.card-tip-row span { color: var(--muted); flex: 0 0 58px; }
.card-tip-row b { color: var(--text-chip); font-weight: 500; }
.card-tip-desc { color: var(--text-body); font-size: 12.5px; line-height: 1.55; border-top: 1px solid var(--border); padding-top: 10px; }

.card-name { color: var(--text); font-weight: 500; font-size: 14px; }
.card:hover .card-name { color: var(--accent); }
.card-meta { color: var(--muted); font-size: 12px; }

/* ── Страница тайтла — «журнальный разворот» ── */
.breadcrumbs { display: flex; gap: 8px; font-size: 13px; color: var(--muted); padding-top: 24px; }
.breadcrumbs a { color: var(--text-2); text-decoration: none; }
.breadcrumbs .current { color: var(--text-chip); }

.tp { max-width: 1040px; margin: 0 auto; padding: 4px 32px 56px; display: flex; flex-direction: column; gap: 32px; }
.tp-head { display: flex; flex-direction: column; gap: 18px; }
.tp-rule-row { display: flex; align-items: center; gap: 16px; }
.tp-rule { flex: 1; height: 1px; background: var(--border-2); }
.tp-kicker { color: var(--accent); font-family: 'Oswald', sans-serif; font-size: 13px; letter-spacing: 3px; }
.tp-meta { color: var(--muted); font-family: 'Oswald', sans-serif; font-size: 13px; letter-spacing: 2px; text-align: right; }
.tp-title { margin: 0; font-family: 'Oswald', sans-serif; font-weight: 600; font-size: 76px; line-height: 0.95; text-transform: uppercase; }

.tp-scores { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.tp-score { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 18px; text-align: center; display: flex; flex-direction: column; gap: 4px; }
.tp-score b { font-family: 'Oswald', sans-serif; font-size: 32px; font-weight: 600; color: var(--text); }
.tp-score.kp b { color: var(--accent); }
.tp-score span { color: var(--muted); font-size: 13px; }

.tp-lead { display: flex; gap: 28px; }
.tp-poster-col { width: 250px; flex-shrink: 0; display: flex; flex-direction: column; gap: 12px; }
.tp-poster { width: 100%; height: 375px; object-fit: cover; border-radius: 12px; display: block; box-shadow: 0 20px 50px rgba(0,0,0,0.5); background: repeating-linear-gradient(45deg, #23232b, #23232b 10px, #1d1d24 10px, #1d1d24 20px); }
.tp-lead-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.tp-poster-link { display: block; }
/* Страна / Год / Жанр / Время — карточка между рейтингами и описанием */
.tp-quick {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 24px;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 16px 18px;
}
.tp-quick-item { display: flex; flex-direction: column; gap: 3px; }
.tp-quick .tp-info-v a { color: var(--text-chip); text-decoration: none; }
.tp-quick .tp-info-v a:hover { color: var(--accent); text-decoration: underline; }
.tp-sec { display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 76px; }

/* мини-меню разделов: плавающая капсула, появляется при прокрутке */
.tp-minimenu {
  position: fixed; top: 12px; left: 50%; z-index: 60;
  display: flex; gap: 4px; padding: 6px;
  max-width: calc(100vw - 24px); overflow-x: auto; scrollbar-width: none;
  background: #211d29; border: 1px solid rgba(232, 176, 75, 0.5);
  border-radius: 30px; backdrop-filter: blur(8px);
  box-shadow: 0 4px 14px rgba(232, 176, 75, 0.12), 0 14px 34px rgba(0, 0, 0, 0.65);
  transform: translateX(-50%) translateY(-70px);
  opacity: 0; visibility: hidden;
  transition: transform .3s ease, opacity .3s ease, visibility .3s;
}
.tp-minimenu::-webkit-scrollbar { display: none; }
.tp-minimenu.visible { transform: translateX(-50%) translateY(0); opacity: 1; visibility: visible; }
.tp-minimenu a {
  color: var(--text); text-decoration: none; font-size: 14px; font-weight: 500;
  padding: 8px 16px; border-radius: 20px; white-space: nowrap;
}
.tp-minimenu a:hover { color: var(--accent); }
.tp-minimenu a.active { background: var(--accent); color: var(--on-accent); }
.tp-minimenu a.active:hover { color: var(--on-accent); }
@media (max-width: 560px) {
  .tp-minimenu a { font-size: 12px; padding: 7px 11px; }
}
.tp-sec-title { margin: 0; font-family: 'Oswald', sans-serif; font-size: 20px; font-weight: 500; letter-spacing: 2px; }

/* голосование под постером */
.tp-vote { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tp-vote-btn {
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
  flex: 1; font-size: 15px; padding: 9px 12px; border-radius: 24px;
  background: transparent; font-family: 'Golos Text', sans-serif;
}
.tp-vote-btn.up { border: 1px solid var(--good-border); color: var(--good); }
.tp-vote-btn.down { border: 1px solid var(--bad-border); color: var(--bad); }
.tp-vote-btn.up:hover:not(:disabled) { background: rgba(143, 202, 143, 0.12); }
.tp-vote-btn.down:hover:not(:disabled) { background: rgba(207, 143, 143, 0.12); }
.tp-vote-btn:disabled { cursor: default; opacity: 0.55; }
.tp-vote-btn.chosen { opacity: 1; }
.tp-vote-btn.up.chosen { background: rgba(143, 202, 143, 0.16); }
.tp-vote-btn.down.chosen { background: rgba(207, 143, 143, 0.16); }
.tp-vote-n { font-weight: 600; }
.tp-vote-thanks { color: var(--muted); font-size: 13px; flex-basis: 100%; text-align: center; }

/* актёры и съёмочная группа */
.tp-crew { display: grid; grid-template-columns: 1fr 300px; gap: 14px; align-items: start; }
.tp-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.tp-actors { display: flex; flex-wrap: wrap; gap: 8px; }
.tp-info { gap: 12px; font-size: 14px; }
.tp-info-row { display: flex; flex-direction: column; gap: 4px; }
.tp-info-k { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }
.tp-info-v { color: var(--text-chip); line-height: 1.5; }
.tp-div { height: 1px; background: var(--border); }

/* похожие: сетка постеров */
.tp-similar { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.tp-sim { display: flex; flex-direction: column; gap: 8px; text-decoration: none; }
.tp-sim-poster { aspect-ratio: 2/3; border-radius: 10px; overflow: hidden; background: repeating-linear-gradient(45deg, #23232b, #23232b 10px, #1d1d24 10px, #1d1d24 20px); }
.tp-sim-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tp-sim-name { color: var(--text); font-weight: 500; font-size: 14px; }
.tp-sim:hover .tp-sim-name { color: var(--accent); }
.tp-sim-year { color: var(--muted); font-size: 12px; }

/* подробная статья (deepseek) */
.tp-article { max-width: 900px; display: flex; flex-direction: column; gap: 14px; }
.tp-article-title { font-family: 'Oswald', sans-serif; font-size: 26px; font-weight: 600; line-height: 1.25; color: var(--text); }
.tp-article-head { display: flex; gap: 24px; align-items: flex-start; }
.tp-article-poster { width: 210px; height: auto; aspect-ratio: 2/3; object-fit: cover; border-radius: 12px; flex-shrink: 0; }
.tp-article-lead { color: var(--text); font-size: 16px; line-height: 1.7; font-weight: 500; }
.tp-article p { color: var(--text-body); font-size: 15px; line-height: 1.7; }
@media (max-width: 640px) {
  .tp-article-head { flex-direction: column; }
  .tp-article-title { text-align: center; }
  .tp-article-poster { width: 170px; align-self: center; }
}

/* кинозал: луч проектора из угла, постер как экран, просмотр на внешнем сайте */
.cinema {
  position: relative; overflow: hidden;
  border: 1px solid var(--border-2); border-radius: 16px;
  background: #0c0c10;
  display: flex; align-items: center; justify-content: center; gap: 60px;
  padding: 72px 48px;
}
.cinema::before { /* точка света и мягкий конус луча из левого верхнего угла */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(circle 5px at 9% 9%, rgba(255, 224, 160, .95), rgba(232, 176, 75, .4) 60%, transparent 75%),
    radial-gradient(ellipse 55% 48% at 7% 6%, rgba(232, 176, 75, .15), transparent 65%);
}
.cinema-body { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; max-width: 560px; }
.cinema-kicker { color: var(--accent); font-family: 'Oswald', sans-serif; font-size: 13px; letter-spacing: 4px; }
.cinema-title { font-family: 'Oswald', sans-serif; font-weight: 600; font-size: 38px; line-height: 1.1; color: var(--text); text-transform: uppercase; }
.cinema-meta { color: var(--text-2); font-size: 15px; }
.cinema-btn { margin-top: 8px; }
.cinema-note { color: var(--muted); font-size: 14px; margin-top: 8px; }
@media (max-width: 700px) {
  .cinema { padding: 44px 20px; }
  .cinema-title { font-size: 28px; }
}

/* описание: табы */
.desc-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.pill-tabs { display: flex; gap: 6px; }
.pill-tab { cursor: pointer; font-size: 13px; padding: 6px 14px; border-radius: 20px; background: var(--input); color: var(--text-2); border: 0; font-family: 'Golos Text', sans-serif; }
.pill-tab.active { background: var(--accent); color: var(--on-accent); }
.desc-text { color: var(--text-body); font-size: 15px; line-height: 1.7; }

/* кадры: одна строка с прокруткой вправо */
.frames-grid { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; scrollbar-color: var(--border-3) transparent; }
.frames-grid a { display: block; flex: 0 0 290px; }
.frames-grid img { width: 100%; aspect-ratio: 16/13; object-fit: cover; border-radius: 10px; display: block; }
.frames-grid::-webkit-scrollbar { height: 6px; }
.frames-grid::-webkit-scrollbar-thumb { background: var(--border-3); border-radius: 3px; }
.frames-grid::-webkit-scrollbar-track { background: transparent; }

/* факты */
.facts-list { display: flex; flex-direction: column; gap: 10px; }
.fact { display: flex; gap: 12px; background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; }
.fact-n { color: var(--accent); font-family: 'Oswald', sans-serif; font-size: 14px; flex-shrink: 0; }
.fact-text { color: var(--text-body); font-size: 14px; line-height: 1.6; }
.toggle-btn { cursor: pointer; align-self: flex-start; border: 1px solid var(--border-3); color: var(--text-chip); font-size: 14px; padding: 10px 20px; border-radius: 8px; background: transparent; font-family: 'Golos Text', sans-serif; }
.toggle-btn:hover { border-color: var(--accent); color: var(--accent); }

/* отзывы */
.reviews-list { display: flex; flex-direction: column; gap: 14px; }
.review-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
/* тон карточки по типу отзыва: позитивный — зеленоватый, негативный — красноватый */
.review-card.pos { background: linear-gradient(0deg, rgba(111, 175, 111, 0.11), rgba(111, 175, 111, 0.11)), var(--card); border-color: rgba(111, 175, 111, 0.28); }
.review-card.neg { background: linear-gradient(0deg, rgba(175, 111, 111, 0.11), rgba(175, 111, 111, 0.11)), var(--card); border-color: rgba(175, 111, 111, 0.28); }
.review-head { display: flex; align-items: center; gap: 12px; }
.review-avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--border-2); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; color: var(--accent); flex-shrink: 0; }
.review-author { font-weight: 600; font-size: 15px; }
.review-role { color: var(--muted); font-size: 12px; }
.review-badge { margin-left: auto; font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 20px; white-space: nowrap; }
.review-badge.pos { background: rgba(111, 175, 111, 0.15); color: var(--good); }
.review-badge.neg { background: rgba(175, 111, 111, 0.15); color: var(--bad); }
.review-badge.neu { background: rgba(140, 140, 160, 0.15); color: var(--text-2); }
.review-title { font-family: 'Oswald', sans-serif; font-size: 19px; font-weight: 500; }
.review-text { color: var(--text-body); font-size: 14px; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden; }
.review-card.open .review-text { -webkit-line-clamp: unset; display: block; }
.review-foot { display: flex; align-items: center; gap: 16px; }
.review-toggle { cursor: pointer; color: var(--accent); font-size: 14px; font-weight: 500; background: none; border: 0; padding: 0; font-family: 'Golos Text', sans-serif; }
.review-votes { margin-left: auto; display: flex; gap: 10px; }
.vote { display: flex; align-items: center; gap: 6px; font-size: 13px; padding: 6px 14px; border-radius: 20px; }
.vote.up { border: 1px solid var(--good-border); color: var(--good); }
.vote.down { border: 1px solid var(--bad-border); color: var(--bad); }
/* голосование за отзыв: один голос на посетителя, как у тайтла */
.rvote-btn { cursor: pointer; background: transparent; font-family: 'Golos Text', sans-serif; }
.rvote-btn.up:hover:not(:disabled) { background: rgba(143, 202, 143, 0.12); }
.rvote-btn.down:hover:not(:disabled) { background: rgba(207, 143, 143, 0.12); }
.rvote-btn:disabled { cursor: default; opacity: 0.55; }
.rvote-btn.chosen { opacity: 1; }
.rvote-btn.up.chosen { background: rgba(143, 202, 143, 0.16); }
.rvote-btn.down.chosen { background: rgba(207, 143, 143, 0.16); }

/* ── Подборки ── */
.collections-list { display: flex; flex-direction: column; gap: 18px; padding-bottom: 48px; }
.collection-card {
  display: flex; gap: 24px; align-items: center; text-decoration: none;
  background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 20px;
}
.collection-card:hover { border-color: var(--accent); }
.collection-posters { display: flex; flex-shrink: 0; }
.collection-posters img {
  width: 72px; height: 108px; object-fit: cover; border-radius: 8px;
  border: 2px solid var(--card); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
}
.collection-posters img + img { margin-left: -36px; }
.collection-info { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.collection-title { font-family: 'Oswald', sans-serif; font-size: 24px; font-weight: 600; color: var(--text); }
.collection-card:hover .collection-title { color: var(--accent); }
.collection-desc { color: var(--text-body); font-size: 14px; line-height: 1.6; }
.collection-meta { color: var(--muted); font-size: 13px; }
.collection-article { color: var(--text-body); font-size: 15px; line-height: 1.7; max-width: 860px; margin-bottom: 26px; white-space: pre-line; }
@media (max-width: 700px) {
  .collection-card { flex-direction: column; align-items: flex-start; }
}

/* ── Админ-панель ── */
.admin { padding-bottom: 48px; display: flex; flex-direction: column; gap: 26px; }
.admin-head { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; margin-top: 26px; }
.admin-head .catalog-title { margin: 0; }
.admin-nav { display: flex; gap: 8px; }
.admin-nav .pill-tab { text-decoration: none; }
.admin-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.admin-tile {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 18px; display: flex; flex-direction: column; gap: 6px;
}
.admin-tile b { font-family: 'Oswald', sans-serif; font-size: 28px; color: var(--accent); font-weight: 600; }
.admin-tile span { color: var(--text-2); font-size: 13px; }
.admin-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 900px) { .admin-cols { grid-template-columns: 1fr; } }
.admin-block { display: flex; flex-direction: column; gap: 14px; }
.admin-dim { color: var(--muted); font-size: 13px; }
.admin-table { border-collapse: collapse; width: 100%; font-size: 14px; }
.admin-table th { text-align: left; color: var(--muted); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; padding: 8px 10px; border-bottom: 1px solid var(--border-2); }
.admin-table td { padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.admin-table a { color: var(--text); text-decoration: none; }
.admin-table a:hover { color: var(--accent); }
.admin-table .admin-dim { display: block; }
.admin-table-wrap { overflow-x: auto; }
.admin-filter { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.admin-filter input, .admin-filter select, .admin-form input, .admin-form textarea, .admin-add-form input {
  background: var(--input); border: 1px solid var(--border-2); border-radius: 8px;
  color: var(--text); padding: 10px 14px; font-size: 14px;
}
.admin-filter input { width: 320px; max-width: 100%; }
.admin-form { display: flex; flex-direction: column; gap: 10px; max-width: 860px; }
.admin-form-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.admin-desc { font-size: 14px; }
.admin-items { display: flex; gap: 12px; flex-wrap: wrap; }
.admin-item { position: relative; width: 92px; display: flex; flex-direction: column; gap: 4px; }
.admin-item img, .admin-item-empty { width: 92px; height: 138px; object-fit: cover; border-radius: 8px; background: var(--border-2); display: block; }
.admin-item-name { font-size: 11px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-item-off { opacity: 0.4; }
.admin-x {
  position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%;
  border: 0; cursor: pointer; background: rgba(16, 16, 20, 0.85); color: var(--bad);
  font-size: 12px; line-height: 1;
}
.admin-x:hover { background: var(--bad); color: #fff; }
.admin-collection-foot { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.admin-add-form { display: flex; gap: 8px; flex: 1; min-width: 260px; }
.admin-add-form input { flex: 1; }
.admin-danger { color: var(--bad); border-color: var(--bad-border); }
.admin-danger:hover { color: #fff; border-color: var(--bad); background: var(--bad); }

/* ── Комментарии ── */
.comment-form {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 16px 18px; display: flex; flex-direction: column; gap: 10px;
}
.cf-name, .cf-text {
  width: 100%; background: var(--input); border: 1px solid var(--border-2);
  border-radius: 8px; padding: 10px 14px; color: var(--text); font-size: 14px;
}
.cf-name { max-width: 280px; }
.cf-name:focus, .cf-text:focus { border-color: var(--accent); }
.cf-name[readonly] { color: var(--accent); font-weight: 500; }
.cf-text { resize: vertical; min-height: 70px; font-family: 'Golos Text', sans-serif; }
.cf-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cf-actions .btn { margin-left: auto; }
.btn-spoiler {
  cursor: pointer; background: var(--input); border: 1px dashed var(--border-3);
  color: var(--text-chip); font-size: 13px; padding: 7px 14px; border-radius: 8px;
  font-family: 'Golos Text', sans-serif;
}
.btn-spoiler:hover { border-color: var(--accent); color: var(--accent); }
.cf-hint { color: var(--muted); font-size: 12px; }

.comments-list { display: flex; flex-direction: column; gap: 14px; }
.comments-empty { color: var(--muted); font-size: 14px; }
.comment {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 16px 18px; display: flex; flex-direction: column; gap: 10px;
}
.comment-head { display: flex; align-items: center; gap: 12px; }
.comment-author { font-weight: 600; font-size: 14px; }
.comment-badge { color: var(--accent); font-size: 12px; }
.comment-date { color: var(--muted); font-size: 12px; }
.comment-text { color: var(--text-body); font-size: 14px; line-height: 1.65; overflow-wrap: break-word; }
.comment-foot { display: flex; align-items: center; gap: 18px; }
.comment-reply-btn {
  cursor: pointer; background: none; border: 0; padding: 0;
  color: var(--text-2); font-size: 13px; font-weight: 500; font-family: 'Golos Text', sans-serif;
}
.comment-reply-btn:hover { color: var(--accent); }
/* ветка ответов */
.comment-children {
  display: flex; flex-direction: column; gap: 10px;
  margin-left: 18px; padding-left: 16px; border-left: 2px solid var(--border-2);
}
.comment-children .comment { background: var(--input); }
.comment-children .cf-name, .comment-children .cf-text { background: var(--bg); }

/* спойлер в тексте: скрыт, открывается кликом */
.spoiler {
  background: var(--border-2); color: transparent; border-radius: 4px;
  padding: 0 5px; cursor: pointer; user-select: none;
  transition: color .15s ease, background .15s ease;
}
.spoiler.open { color: var(--text-body); background: rgba(232, 176, 75, 0.08); user-select: auto; }

/* оценка комментария: − счёт + */
.cvote { display: flex; align-items: center; gap: 8px; }
.cvote-btn {
  cursor: pointer; width: 26px; height: 26px; border-radius: 7px; line-height: 1;
  background: var(--input); border: 1px solid var(--border-2); color: var(--text-chip);
  font-size: 16px; display: flex; align-items: center; justify-content: center;
  font-family: 'Golos Text', sans-serif;
}
.cvote-btn.plus:hover:not(:disabled) { border-color: var(--good-border); color: var(--good); }
.cvote-btn.minus:hover:not(:disabled) { border-color: var(--bad-border); color: var(--bad); }
.cvote-btn:disabled { cursor: default; opacity: 0.4; }
.cvote-btn.chosen { opacity: 1; }
.cvote-btn.plus.chosen { border-color: var(--good-border); color: var(--good); }
.cvote-btn.minus.chosen { border-color: var(--bad-border); color: var(--bad); }
.cvote-score { font-weight: 700; font-size: 14px; min-width: 24px; text-align: center; color: var(--text-2); }
.cvote-score.pos { color: var(--good); }
.cvote-score.neg { color: var(--bad); }

/* чипы актёров и кнопка-ссылка «Показать всех» */
.actor-chip { background: var(--input); border: 1px solid var(--border-2); color: var(--text-chip); font-size: 13px; padding: 6px 12px; border-radius: 20px; }
.side-toggle { cursor: pointer; color: var(--accent); font-size: 13px; font-weight: 500; background: none; border: 0; padding: 0; text-align: left; font-family: 'Golos Text', sans-serif; }

/* ── Каталог ── */
.catalog-head { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; padding-top: 32px; }
.catalog-title { font-family: 'Oswald', sans-serif; font-size: 34px; font-weight: 500; letter-spacing: 1px; }
.catalog-head .catalog-title { margin: 0; }
.catalog-count { color: var(--muted); font-size: 14px; }
.catalog-filters { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.catalog-sorts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 16px; }
.catalog-sorts .filter-bar-label { margin-right: 2px; }
.filter-link { font-size: 13px; padding: 6px 14px; border-radius: 20px; background: var(--input); color: var(--text-2); text-decoration: none; }
.filter-link.active { background: var(--accent); color: var(--on-accent); }
.genre-row { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 14px; }

/* ── Кнопки-фильтры с выпадающими окнами (каталог) ── */
.filter-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 16px; position: relative; }
.filter-bar-label { color: var(--muted); font-size: 14px; }
.fdrop { position: relative; }
.fbtn {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  font-family: 'Golos Text', sans-serif; font-size: 14px;
  padding: 9px 16px; border-radius: 8px;
  background: var(--input); border: 1px solid var(--border-2); color: var(--text-chip);
}
.fbtn:hover { border-color: var(--accent); color: var(--accent); }
.fbtn.has { border-color: var(--accent); color: var(--text); }
.fbtn-count {
  background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 12px;
  min-width: 20px; height: 20px; border-radius: 10px; padding: 0 6px;
  display: flex; align-items: center; justify-content: center;
}
.fbtn-caret { color: var(--muted); font-size: 11px; }
.fdrop.open .fbtn { border-color: var(--accent); }
.fdrop.open .fbtn-caret { color: var(--accent); }
.fpanel {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 80;
  width: 420px; max-width: 90vw; padding: 16px;
  background: var(--panel); border: 1px solid var(--border-2); border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.55);
  display: flex; flex-direction: column; gap: 14px;
}
.fpanel-list {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px 14px;
  max-height: 320px; overflow-y: auto; padding-right: 4px;
}
.fopt {
  display: flex; align-items: center; gap: 9px; cursor: pointer;
  color: var(--text-chip); font-size: 14px; padding: 6px 4px; border-radius: 6px;
}
.fopt:hover { background: var(--input); color: var(--text); }
.fopt input { accent-color: var(--accent); width: 15px; height: 15px; flex-shrink: 0; margin: 0; cursor: pointer; }
.fpanel-actions { display: flex; align-items: center; gap: 14px; border-top: 1px solid var(--border); padding-top: 14px; }
.freset {
  cursor: pointer; background: none; border: 0; padding: 0;
  color: var(--text-2); font-size: 14px; font-family: 'Golos Text', sans-serif;
}
.freset:hover { color: var(--accent); }

.pagination { display: flex; gap: 8px; justify-content: center; padding: 32px 0 48px; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 38px; text-align: center; padding: 8px 12px; border-radius: 8px; font-size: 14px; text-decoration: none; background: var(--input); color: var(--text-2); }
.pagination .current { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.pagination a:hover { color: var(--accent); }

/* ── Авторизация ── */
.auth-page { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 20px; background: radial-gradient(circle at 50% 0%, #1d1a22, #101014 60%); }
.auth-box { width: 400px; max-width: 100%; display: flex; flex-direction: column; gap: 24px; }
.auth-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; align-self: center; }
.auth-logo .logo-text { font-size: 18px; }
.auth-card { background: var(--card); border: 1px solid var(--border-2); border-radius: 16px; padding: 32px; display: flex; flex-direction: column; gap: 18px; }
.auth-title { font-family: 'Oswald', sans-serif; font-size: 26px; font-weight: 500; letter-spacing: 1px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field-label { color: var(--text-2); font-size: 13px; }
.field-row { display: flex; justify-content: space-between; }
.field input, .field textarea { width: 100%; background: var(--input); border: 1px solid var(--border-2); border-radius: 8px; padding: 12px 14px; color: var(--text); font-size: 14px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--accent); }
.auth-note { color: var(--muted); font-size: 12px; line-height: 1.5; }
.auth-alt { color: var(--muted); font-size: 13px; text-align: center; }
.auth-alt a { color: var(--accent); text-decoration: none; font-weight: 500; }
.auth-back { color: var(--muted); font-size: 13px; text-decoration: none; align-self: center; }
.forgot { color: var(--muted); font-size: 13px; text-decoration: none; }

.flash { background: rgba(207, 143, 143, 0.12); border: 1px solid var(--bad-border); color: var(--bad); border-radius: 8px; padding: 12px 16px; font-size: 14px; margin-top: 16px; }
.flash-ok { background: rgba(143, 202, 143, 0.12); border-color: var(--good-border); color: var(--good); }

/* ── Заглушка подборок ── */
.stub { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; padding: 100px 20px; text-align: center; }
.stub-icon { width: 88px; height: 88px; border-radius: 22px; background: var(--card); border: 1px solid var(--border-2); display: flex; align-items: center; justify-content: center; color: var(--accent); font-size: 44px; line-height: 1; }
.stub-title { font-family: 'Oswald', sans-serif; font-size: 34px; font-weight: 500; letter-spacing: 1px; }
.stub-text { color: var(--text-2); font-size: 15px; line-height: 1.6; max-width: 480px; }

/* ── Правообладателям ── */
.doc-page { max-width: 840px; margin: 0 auto; padding: 40px 32px 56px; display: flex; flex-direction: column; gap: 24px; }
.doc-title { font-family: 'Oswald', sans-serif; font-size: 34px; font-weight: 500; letter-spacing: 1px; }
.doc-text { color: var(--text-body); font-size: 15px; line-height: 1.7; display: flex; flex-direction: column; gap: 14px; }
.doc-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.doc-card-title { font-family: 'Oswald', sans-serif; font-size: 18px; font-weight: 500; letter-spacing: 1px; }
.doc-steps { display: flex; flex-direction: column; gap: 10px; color: var(--text-body); font-size: 14px; line-height: 1.6; }
.doc-step { display: flex; gap: 12px; }
.doc-step b { color: var(--accent); font-family: 'Oswald', sans-serif; font-weight: 400; }
.doc-hint { color: var(--text-2); font-size: 14px; }
.doc-hint a { color: var(--accent); text-decoration: none; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.check-label { display: flex; align-items: flex-start; gap: 10px; color: var(--text-2); font-size: 13px; line-height: 1.5; cursor: pointer; }
.check-label input { margin-top: 2px; accent-color: var(--accent); }

/* ── Подвал ── */
.site-footer { margin-top: auto; background: var(--panel); border-top: 1px solid var(--border); }
.footer-inner { padding-top: 28px; padding-bottom: 28px; display: flex; align-items: center; gap: 32px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-copy { color: var(--muted); font-size: 13px; }
.footer-links { display: flex; gap: 24px; margin-left: auto; font-size: 13px; }
.footer-links a { color: var(--text-2); text-decoration: none; }
.footer-links a:hover { color: var(--accent); }
.footer-note { padding-bottom: 24px; color: var(--dim); font-size: 12px; line-height: 1.5; }

/* ── Адаптив ── */
@media (max-width: 1100px) {
  .cards-grid { grid-template-columns: repeat(4, 1fr); }
  .header-search { max-width: 220px; }
  .tp-title { font-size: 56px; }
}

@media (max-width: 900px) {
  /* шапка: поиск уходит на отдельную строку, меню не переносится вразнобой */
  .header-inner { flex-wrap: wrap; row-gap: 12px; }
  .main-nav { gap: 16px; }
  .header-auth { margin-left: auto; }
  .header-search { order: 10; flex-basis: 100%; max-width: none; margin-left: 0; }
  /* поиск занимает всю строку — подсказки растягиваются на ширину поля */
  .header-search .suggest-box { width: auto; max-width: none; left: 0; right: 0; }
  /* на тач-экранах нет ховера — мега-меню прячем, пункты работают как ссылки */
  .mega, .nav-item::after { display: none; }

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

  /* карусель на мобильных не показываем — сразу «Популярное кино» */
  .hero-carousel { display: none; }

  /* кадры на узких экранах компактнее */
  .frames-grid a { flex-basis: 200px; }
  .tp-similar::-webkit-scrollbar { height: 6px; }
  .tp-similar::-webkit-scrollbar-thumb { background: var(--border-3); border-radius: 3px; }
  .tp-similar::-webkit-scrollbar-track { background: transparent; }
  .form-grid { grid-template-columns: 1fr; }
  .scores, .hero-actions { flex-wrap: wrap; }

  .tp-title { font-size: 40px; }
  .tp-lead { flex-direction: column; }
  .tp-poster-col { align-self: center; }
  .tp-crew { grid-template-columns: 1fr; }
  /* похожие — одной строкой, на узких экранах прокручиваются вправо */
  .tp-similar { display: flex; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; scrollbar-color: var(--border-3) transparent; }
  .tp-sim { flex: 0 0 150px; }
}

@media (max-width: 750px) {
  /* навигация, поиск и авторизация переезжают в боковое меню; в шапке — иконки */
  .main-nav, .header-search, .header-auth { display: none; }
  .burger { display: flex; }
  .mobile-auth { display: flex; }
}

@media (max-width: 770px) {
  /* подвал: всё в столбик и по центру */
  .footer-inner { flex-direction: column; gap: 14px; text-align: center; }
  .footer-brand { flex-direction: column; gap: 8px; justify-content: center; }
  .footer-links { margin-left: 0; justify-content: center; flex-wrap: wrap; gap: 18px; }
  .footer-note { text-align: center; }
}

@media (max-width: 670px) {
  /* шапки секций (заголовок + сортировка + ссылка) не переносятся,
     а скроллятся по горизонтали */
  .section-head { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
  .section-head::-webkit-scrollbar { display: none; }
  .section-head > * { flex-shrink: 0; }
  .section-title, .section-link, .sort-tabs .pill-tab { white-space: nowrap; }
}

@media (max-width: 700px) {
  /* окна фильтров крепятся к экрану на всю ширину (top задаёт JS по кнопке):
     position fixed выводит окно из строки фильтров — при overflow-x
     скроллящаяся строка обрезала бы absolute-панель */
  .fpanel { position: fixed; left: 16px; right: 16px; width: auto; max-width: none; }
  .fpanel-list { grid-template-columns: repeat(2, 1fr); max-height: 260px; }
}

@media (max-width: 650px) {
  /* строка сортировки не переносится, а скроллится по горизонтали */
  .catalog-sorts { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .catalog-sorts::-webkit-scrollbar { display: none; }
  .catalog-sorts > * { flex-shrink: 0; white-space: nowrap; }
}

@media (max-width: 450px) {
  /* строка фильтров тоже скроллится */
  .filter-bar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .filter-bar::-webkit-scrollbar { display: none; }
  .filter-bar > * { flex-shrink: 0; }
}

@media (max-width: 560px) {
  .container { padding-left: 14px; padding-right: 14px; }
  .header-inner { gap: 12px; }

  .cards-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .card-name { font-size: 13px; }
  .card-rating { font-size: 11px; padding: 2px 6px; }
  .card-info-icon { width: 26px; height: 26px; font-size: 14px; }
  .card-tip { width: 240px; }

  .section { padding-top: 18px; }
  .section-head { gap: 10px; }
  .section-title { font-size: 19px; }
  .section-link { font-size: 12px; }
  .pill-tab { font-size: 12px; padding: 5px 10px; }

  .hero-slide { padding: 18px 14px 50px; }
  .hero-poster { width: 160px; height: 240px; }
  .hero-title { font-size: 24px; }
  .hero-meta, .hero-desc { font-size: 13px; }
  .hero-actions .btn { font-size: 14px; padding: 11px 18px; }
  .score b { font-size: 18px; }

  .catalog-title { font-size: 26px; }
  .doc-title { font-size: 26px; }
  .stub-title { font-size: 24px; }
  .breadcrumbs { flex-wrap: wrap; }

  .tp { padding-left: 14px; padding-right: 14px; }
  .tp-title { font-size: 30px; }
  .tp-poster-col { width: 200px; }
  .tp-poster { height: 300px; }
  .tp-head .tp-rule-row { flex-wrap: wrap; row-gap: 6px; }
  .tp-head .tp-rule { display: none; }
  .tp-head .tp-meta { text-align: left; }
  .auth-box { width: 100%; }
  .auth-card { padding: 22px; }
}
