/* КиноВселенная (CineVerse) PHP v3.0 — тёмная неоновая тема
   Палитра: cyan / fuchsia / emerald (без blue/indigo), glassmorphism, glow */
:root {
  --bg: #0a0e17;
  --bg-2: #0f1524;
  --bg-3: #141b2e;
  --card: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.09);
  --text: #e8ecf4;
  --muted: #8b94a7;
  --cyan: #22d3ee;
  --fuchsia: #e879f9;
  --emerald: #34d399;
  --amber: #fbbf24;
  --glow-cyan: 0 0 24px rgba(34, 211, 238, 0.35);
  --glow-fuchsia: 0 0 24px rgba(232, 121, 249, 0.3);
  --radius: 14px;
}
[data-theme="light"] {
  --bg: #f4f6fb; --bg-2: #ffffff; --bg-3: #eef1f8;
  --card: rgba(15, 21, 36, 0.04); --border: rgba(15, 21, 36, 0.12);
  --text: #131a2a; --muted: #5a6478;
  --glow-cyan: 0 0 18px rgba(8, 145, 178, 0.25);
  --glow-fuchsia: 0 0 18px rgba(192, 38, 211, 0.18);
  color-scheme: light;
}
html[data-theme="light"] { color-scheme: light; }
html[data-theme="light"] body {
  background-image: radial-gradient(1100px 500px at 85% -10%, rgba(192, 38, 211, 0.05), transparent 60%),
                    radial-gradient(900px 420px at -10% 15%, rgba(8, 145, 178, 0.06), transparent 60%);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { color-scheme: dark; scroll-behavior: smooth; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.55;
  min-height: 100vh;
  display: flex; flex-direction: column;
  background-image: radial-gradient(1100px 500px at 85% -10%, rgba(232,121,249,0.08), transparent 60%),
                    radial-gradient(900px 420px at -10% 15%, rgba(34,211,238,0.09), transparent 60%);
}
main.wrap.main { flex: 1 0 auto; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.muted { color: var(--muted); font-size: 0.9em; }

/* ── Шапка ── */
.site-header { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 78%, transparent); border-bottom: 1px solid var(--border); }
.header-in { display: flex; align-items: center; gap: 18px; padding: 12px 20px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.06em; letter-spacing: 0.02em; }
.logo-mark { color: var(--cyan); text-shadow: var(--glow-cyan); }
.nav { display: flex; gap: 4px; }
.nav a { padding: 7px 12px; border-radius: 10px; color: var(--muted); font-size: 0.93em; transition: 0.18s; }
.nav a:hover { color: var(--text); background: var(--card); }
.nav a.act { color: var(--cyan); background: rgba(34, 211, 238, 0.08); }
.searchform { flex: 1; display: flex; min-width: 220px; max-width: 460px; }
.searchform input { flex: 1; background: var(--card); border: 1px solid var(--border); color: var(--text);
  border-radius: 12px 0 0 12px; padding: 9px 14px; outline: none; }
.searchform input:focus { border-color: var(--cyan); box-shadow: var(--glow-cyan); }
.searchform button { background: linear-gradient(135deg, var(--cyan), var(--emerald)); border: 0; color: #06121a;
  border-radius: 0 12px 12px 0; padding: 0 14px; cursor: pointer; font-size: 1em; }
.lang-switch { display: flex; gap: 4px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 3px; }
.lang-switch button { background: transparent; border: 0; color: var(--muted); padding: 5px 11px; border-radius: 9px; cursor: pointer; font-weight: 700; font-size: 0.85em; }
.lang-switch button.act { color: var(--fuchsia); background: rgba(232, 121, 249, 0.12); text-shadow: var(--glow-fuchsia); }
.lang-switch.big button { font-size: 1em; padding: 10px 22px; }

/* ── Hero ── */
.hero { position: relative; border-radius: 0 0 26px 26px; overflow: hidden; margin-bottom: 34px;
  background: linear-gradient(140deg, rgba(34,211,238,0.13), rgba(232,121,249,0.12) 45%, rgba(52,211,153,0.1)); border-bottom: 1px solid var(--border); }
.hero-bg { position: absolute; inset: 0;
  background: radial-gradient(600px 260px at 75% 20%, rgba(232,121,249,0.2), transparent 60%),
              radial-gradient(520px 240px at 20% 70%, rgba(34,211,238,0.2), transparent 60%); animation: pulse 7s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 0.85; } 50% { opacity: 1; } }
.hero-in { position: relative; padding: 64px 20px 54px; text-align: center; }
.badge { display: inline-block; border: 1px solid rgba(34,211,238,0.4); color: var(--cyan);
  border-radius: 999px; padding: 5px 14px; font-size: 0.82em; margin-bottom: 18px; background: rgba(34,211,238,0.06); }
.hero h1 { font-size: clamp(1.9em, 4.6vw, 3.3em); font-weight: 900; letter-spacing: -0.02em; margin-bottom: 10px; }
.hero p { color: var(--muted); max-width: 640px; margin: 0 auto 26px; }
.hero-search { display: flex; max-width: 560px; margin: 0 auto; }
.hero-search input { flex: 1; background: var(--bg-2); border: 1px solid var(--border); border-right: 0; color: var(--text);
  padding: 14px 18px; border-radius: 14px 0 0 14px; outline: none; font-size: 1em; }
.hero-search input:focus { border-color: var(--cyan); }
.hero-search button { background: linear-gradient(135deg, var(--cyan), var(--emerald)); color: #06121a; border: 0;
  padding: 14px 26px; border-radius: 0 14px 14px 0; font-weight: 800; cursor: pointer; }
.engine-chips { display: flex; gap: 8px; justify-content: center; margin-top: 22px; flex-wrap: wrap; }
.engine-chips span { border: 1px solid var(--border); background: var(--card); padding: 4px 12px; border-radius: 999px; font-size: 0.8em; color: var(--muted); }
.engine-chips .plus { color: var(--emerald); border-color: rgba(52,211,153,0.4); }
.engine-chips.inline { margin-top: 6px; justify-content: flex-start; }
.engine-chips.inline .blocked { color: var(--amber); border-color: rgba(251,191,36,0.4); }
.engine-chips.inline .live { color: var(--emerald); border-color: rgba(52,211,153,0.4); }

/* ── Подборки и сетка ── */
.collection { margin: 34px 0; }
.col-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.col-head h2 { font-size: 1.25em; font-weight: 800; }
.more { color: var(--cyan); font-size: 0.9em; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.card { position: relative; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: transform 0.22s, box-shadow 0.22s, border-color 0.22s; display: block; }
.card img { aspect-ratio: 2/3; object-fit: cover; width: 100%; }
.card:hover { transform: translateY(-4px); border-color: rgba(34,211,238,0.45); box-shadow: var(--glow-cyan); }
.card-in { padding: 10px 12px 14px; }
.card-in h3 { font-size: 0.95em; margin: 6px 0 3px; line-height: 1.3; }
.rating { position: absolute; top: 8px; left: 8px; background: rgba(6, 12, 22, 0.78); color: var(--amber);
  border: 1px solid rgba(251,191,36,0.35); backdrop-filter: blur(6px); border-radius: 9px; padding: 2px 8px;
  font-weight: 800; font-size: 0.82em; z-index: 2; }
.rating.big { position: static; display: inline-block; font-size: 1em; }

/* ── Фильтры ── */
.filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; margin: 18px 0 26px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.filters label { display: flex; flex-direction: column; gap: 5px; font-size: 0.82em; color: var(--muted); }
.filters select, .filters input { background: var(--bg-2); border: 1px solid var(--border); color: var(--text);
  border-radius: 9px; padding: 8px 10px; outline: none; min-width: 110px; }
.filters .pair { display: flex; gap: 6px; }
.filters .pair input { width: 86px; }
.btn-primary { background: linear-gradient(135deg, var(--cyan), var(--emerald)); border: 0; color: #06121a;
  font-weight: 800; padding: 9px 18px; border-radius: 10px; cursor: pointer; }
.btn-ghost { background: var(--card); border: 1px solid var(--border); color: var(--text);
  padding: 9px 18px; border-radius: 10px; cursor: pointer; transition: 0.18s; }
.btn-ghost:hover { border-color: var(--fuchsia); box-shadow: var(--glow-fuchsia); }
.pagination { display: flex; gap: 6px; margin: 26px 0; flex-wrap: wrap; align-items: center; }
.pagination a { border: 1px solid var(--border); background: var(--card); padding: 7px 13px; border-radius: 9px; font-size: 0.9em; }
.pagination a.act { color: var(--cyan); border-color: rgba(34,211,238,0.5); }
.pagination .pg-arrow { min-width: 38px; text-align: center; }

/* ── Страница фильма ── */
.movie-hero { display: grid; grid-template-columns: minmax(220px, 320px) 1fr; gap: 30px; margin: 28px 0; }
.poster { border-radius: var(--radius); border: 1px solid var(--border); box-shadow: 0 18px 50px rgba(0,0,0,0.5); }
.movie-info h1 { font-size: clamp(1.5em, 3vw, 2.3em); font-weight: 900; }
.orig { margin: 4px 0 12px; }
.meta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; color: var(--muted); margin-bottom: 12px; }
.genres { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 14px; }
.chip { border: 1px solid var(--border); background: var(--card); border-radius: 999px; padding: 3px 12px; font-size: 0.8em; }
.chip.ok { color: var(--emerald); border-color: rgba(52,211,153,0.4); }
.chip.warn { color: var(--amber); border-color: rgba(251,191,36,0.4); }
.overview { color: #c6cddc; margin-bottom: 16px; max-width: 720px; }
.people { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; font-size: 0.93em; }
.people div { display: flex; gap: 10px; }
.people dt { color: var(--muted); min-width: 110px; }
.movie-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.player-slot { margin-top: 18px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); aspect-ratio: 16/9; }
.player-slot iframe { width: 100%; height: 100%; border: 0; }
.sources-slot { margin-top: 18px; }
.alert-warn { border: 1px solid rgba(251,191,36,0.4); color: var(--amber); background: rgba(251,191,36,0.07);
  border-radius: var(--radius); padding: 12px 16px; margin: 14px 0; }
.strategy { color: var(--muted); margin: 10px 0 18px; font-size: 0.92em; display: flex; flex-direction: column; gap: 6px; }

/* ── Результаты веб-поиска ── */
.web-results { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.web-link { display: flex; gap: 12px; align-items: baseline; background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 11px 14px; transition: 0.18s; flex-wrap: wrap; }
.web-link:hover { border-color: rgba(34,211,238,0.4); }
.plat { background: rgba(34,211,238,0.1); color: var(--cyan); border-radius: 7px; padding: 2px 8px; font-size: 0.75em; font-weight: 800; }
.wt { font-weight: 600; flex: 1; min-width: 240px; }

/* ── Настройки/панели ── */
.page-head { margin: 26px 0 14px; }
.page-head h1 { font-size: 1.7em; font-weight: 900; }
.panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin: 18px 0; }
.panel h2 { font-size: 1.1em; margin-bottom: 12px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 0.92em; margin: 10px 0; }
.tbl th, .tbl td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.tbl th { color: var(--muted); font-weight: 600; font-size: 0.85em; }
.inline-form { margin-top: 8px; }

/* ── Футер ── */
.site-footer { border-top: 1px solid var(--border); margin-top: auto; padding: 26px 0 34px;
  padding-bottom: max(26px, env(safe-area-inset-bottom)); color: var(--muted); font-size: 0.9em; flex-shrink: 0; }
.footer-in p { margin: 4px 0; }

/* ── Адаптив ── */
@media (max-width: 860px) {
  .movie-hero { grid-template-columns: 1fr; }
  .header-in { gap: 10px; }
  .nav { order: 3; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ── Body / footer sticky ── */
html, body { height: 100%; }
body { display: flex; flex-direction: column; min-height: 100vh; }
.main { flex: 1 0 auto; }
.site-footer { flex-shrink: 0; }

/* ── Mobile nav (hamburger) ── */
.nav-toggle { display: none; background: var(--card); border: 1px solid var(--border); color: var(--text);
  border-radius: 10px; padding: 8px 12px; cursor: pointer; font-size: 1.05em; }
@media (max-width: 860px) {
  .nav-toggle { display: block; order: 2; }
  .nav { order: 4; width: 100%; flex-direction: column; display: none; gap: 2px; }
  .nav.open { display: flex; }
  .nav a { padding: 10px 14px; border-radius: 10px; }
  .searchform { order: 5; max-width: 100%; flex-basis: 100%; }
  .lang-switch { order: 6; }
  .notif-bell { order: 1; }
}

/* ── Notifications bell ── */
.notif-bell { position: relative; order: 2; }
.bell-btn { background: var(--card); border: 1px solid var(--border); color: var(--text);
  border-radius: 11px; padding: 8px 11px; cursor: pointer; font-size: 1em; position: relative; }
.bell-btn:hover { border-color: var(--fuchsia); }
.bell-badge { position: absolute; top: -4px; right: -4px; background: var(--fuchsia); color: #0a0e17;
  border-radius: 999px; padding: 1px 6px; font-size: 0.72em; font-weight: 800; box-shadow: var(--glow-fuchsia); }
.notif-panel { position: absolute; top: calc(100% + 8px); right: 0; width: 340px; max-width: 92vw;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px;
  z-index: 60; box-shadow: 0 18px 60px rgba(0,0,0,0.6); }
.np-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.np-actions { display: flex; gap: 6px; }
.np-actions button { background: transparent; border: 0; color: var(--muted); cursor: pointer; font-size: 0.85em; padding: 4px; }
.np-actions button:hover { color: var(--text); }
.np-list { display: flex; flex-direction: column; gap: 6px; max-height: 360px; overflow-y: auto; padding-right: 4px; }
.np-item { display: grid; grid-template-columns: 28px 1fr auto; gap: 8px; align-items: start;
  background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; }
.np-item.unread { border-color: rgba(232,121,249,0.4); background: rgba(232,121,249,0.05); }
.np-icon { font-size: 1.1em; }
.np-title { font-weight: 700; font-size: 0.92em; }
.np-text { font-size: 0.85em; }
.np-date { font-size: 0.75em; }
.np-del { background: transparent; border: 0; color: var(--muted); cursor: pointer; font-size: 0.85em; }
.np-del:hover { color: var(--fuchsia); }
.np-empty { text-align: center; padding: 16px 8px; }

/* ── Star rating component ── */
.star-rating { display: inline-flex; align-items: center; gap: 4px; padding: 8px 4px; }
.star-rating .star { background: transparent; border: 0; cursor: pointer; padding: 2px; line-height: 0; }
.star-rating .star svg { fill: transparent; transition: transform 0.12s; }
.star-rating .star:hover svg { transform: scale(1.18); }
.star-rating .star-fill { stroke: var(--amber); stroke-width: 1; }
.star-rating .star-value { margin-left: 10px; font-weight: 700; color: var(--amber); font-size: 0.95em; }

/* ── Rating breakdown ── */
.rb-title { font-size: 1em; margin-bottom: 10px; }
.rb-rows { display: flex; flex-direction: column; gap: 4px; }
.rb-row { display: grid; grid-template-columns: 32px 1fr 28px; align-items: center; gap: 8px; font-size: 0.85em; }
.rb-star { color: var(--amber); font-weight: 700; }
.rb-bar { height: 8px; background: var(--card); border-radius: 999px; overflow: hidden; border: 1px solid var(--border); }
.rb-bar-fill { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--emerald)); border-radius: 999px; }
.rb-count { text-align: right; color: var(--muted); font-size: 0.85em; }
.rb-summary { display: flex; justify-content: space-between; margin-top: 12px; font-size: 0.9em; }
.rb-avg { color: var(--amber); font-weight: 700; }

/* ── History page ── */
.history-empty { text-align: center; padding: 60px 20px; }
.he-icon { font-size: 3em; margin-bottom: 12px; }
.history-timeline { display: flex; flex-direction: column; gap: 26px; }
.hist-group { }
.hist-day { font-size: 1.05em; color: var(--cyan); margin-bottom: 12px; border-bottom: 1px solid var(--border); padding-bottom: 6px; }
.hist-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.hist-card { position: relative; display: grid; grid-template-columns: 60px 1fr; gap: 10px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; transition: 0.18s; }
.hist-card:hover { border-color: rgba(34,211,238,0.4); }
.hist-poster { width: 60px; height: 90px; object-fit: cover; border-radius: 8px; }
.hist-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.hist-info h4 { font-size: 0.95em; line-height: 1.3; }
.hist-progress { height: 4px; background: var(--card); border-radius: 999px; overflow: hidden; border: 1px solid var(--border); }
.hist-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--emerald)); }
.hist-rating { color: var(--amber); font-weight: 700; font-size: 0.85em; }
.hist-del { position: absolute; top: 6px; right: 6px; padding: 2px 6px; font-size: 0.8em; }

/* ── Ratings page ── */
.ratings-controls { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; }
.ratings-controls label { display: flex; flex-direction: column; gap: 4px; font-size: 0.82em; }
.ratings-controls select { background: var(--bg-2); border: 1px solid var(--border); color: var(--text);
  border-radius: 9px; padding: 8px 10px; min-width: 160px; }
.ratings-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 16px; }
@media (max-width: 860px) { .ratings-grid { grid-template-columns: 1fr; } }
.ratings-leaderboard { display: flex; flex-direction: column; gap: 10px; max-height: 540px; overflow-y: auto; padding-right: 4px; }
.rl-row { display: grid; grid-template-columns: 50px 1fr auto; gap: 12px; align-items: center;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px; }
.rl-poster img { width: 50px; height: 75px; object-fit: cover; border-radius: 6px; }
.rl-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.rl-title { font-weight: 700; font-size: 0.95em; }
.rl-right { display: flex; align-items: center; gap: 6px; }
.rl-rating { color: var(--amber); font-weight: 800; }
.rl-clear { padding: 4px 8px; font-size: 0.8em; }

/* ── Playlists page ── */
.playlists-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.pl-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; cursor: pointer; transition: 0.18s; }
.pl-card:hover { border-color: rgba(34,211,238,0.4); box-shadow: var(--glow-cyan); }
.pl-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.pl-collage { display: grid; grid-template-columns: 1fr 1fr; }
.pl-cover-empty { aspect-ratio: 16/9; background: linear-gradient(135deg, rgba(34,211,238,0.1), rgba(232,121,249,0.1)); }
.pl-card-in { padding: 12px 14px; }
.pl-card-in h3 { font-size: 1em; margin-bottom: 4px; }
.playlist-detail { display: flex; flex-direction: column; gap: 14px; }
.playlist-detail .grid { margin-top: 8px; }
.pl-movie-del { position: absolute; top: 6px; right: 6px; background: rgba(6,12,22,0.78); padding: 4px 8px; font-size: 0.8em; }
.pl-movie-del:hover { border-color: var(--fuchsia); }

/* ── Add to playlist dropdown ── */
.add-to-playlist { position: relative; display: inline-block; }
.atp-menu { position: absolute; top: calc(100% + 6px); left: 0; min-width: 220px; background: var(--bg-2);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 8px; z-index: 50;
  box-shadow: 0 14px 50px rgba(0,0,0,0.5); }
.atp-new { width: 100%; text-align: left; background: transparent; border: 0; color: var(--cyan);
  padding: 8px; cursor: pointer; border-bottom: 1px solid var(--border); margin-bottom: 6px; font-size: 0.9em; }
.atp-list { display: flex; flex-direction: column; gap: 2px; max-height: 240px; overflow-y: auto; }
.atp-item { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center;
  padding: 7px 8px; border-radius: 8px; cursor: pointer; font-size: 0.9em; }
.atp-item:hover { background: var(--card); }
.atp-item input { accent-color: var(--cyan); }

/* ── Compare toggle ── */
.compare-toggle { display: inline-flex; align-items: center; gap: 6px; background: var(--card);
  border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; cursor: pointer; font-size: 0.9em;
  transition: 0.18s; }
.compare-toggle:hover { border-color: var(--emerald); }
.compare-toggle.on { border-color: var(--emerald); background: rgba(52,211,153,0.08); color: var(--emerald); }
.compare-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.cmp-box { font-size: 1em; }
.movie-extra-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }

/* ── Compare page ── */
.compare-add-form { display: flex; gap: 8px; align-items: center; }
.compare-add-form select { background: var(--bg-2); border: 1px solid var(--border); color: var(--text);
  border-radius: 9px; padding: 8px 10px; min-width: 240px; }
.compare-empty { text-align: center; padding: 50px 20px; }
.cmp-grid { display: grid; gap: 1px; background: var(--border); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; }
.cmp-h-cell, .cmp-label, .cmp-cell { background: var(--bg-2); padding: 10px 12px; min-height: 40px;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cmp-h-cell { flex-direction: column; align-items: stretch; position: relative; }
.cmp-h-cell img { width: 70px; height: 105px; object-fit: cover; border-radius: 6px; margin: 0 auto; }
.cmp-name { font-size: 0.85em; text-align: center; font-weight: 700; }
.cmp-del { position: absolute; top: 4px; right: 4px; background: transparent; border: 0; color: var(--muted);
  cursor: pointer; padding: 2px 6px; }
.cmp-del:hover { color: var(--fuchsia); }
.cmp-label { font-weight: 700; color: var(--muted); font-size: 0.88em; background: var(--bg-3); }
.cmp-cell { font-size: 0.9em; }
.cmp-cell.best { background: rgba(52,211,153,0.14); color: var(--emerald); font-weight: 700; }
.cmp-cell.worst { background: rgba(232,121,249,0.1); color: var(--fuchsia); }
@media (max-width: 860px) {
  .cmp-grid { grid-template-columns: 1fr !important; }
  .cmp-label { display: none; }
  .cmp-h-cell::before, .cmp-cell::before { content: attr(data-label); display: block; font-size: 0.7em;
    color: var(--muted); width: 100%; }
}

/* ── Stats page ── */
.stats-kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin: 18px 0; }
.kpi-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; display: flex; flex-direction: column; gap: 4px; align-items: center; text-align: center; }
.kpi-icon { font-size: 1.6em; }
.kpi-value { font-size: 1.7em; font-weight: 900; color: var(--cyan); text-shadow: var(--glow-cyan); }
.kpi-label { color: var(--muted); font-size: 0.85em; }
.stats-heatmap { display: grid; grid-template-columns: repeat(15, 1fr); gap: 3px; }
@media (max-width: 600px) { .stats-heatmap { grid-template-columns: repeat(10, 1fr); } }
.hm-cell { aspect-ratio: 1; border-radius: 3px; background: var(--card); border: 1px solid var(--border); }
.hm-l0 { background: var(--card); }
.hm-l1 { background: rgba(34,211,238,0.25); border-color: rgba(34,211,238,0.4); }
.hm-l2 { background: rgba(34,211,238,0.45); border-color: rgba(34,211,238,0.6); }
.hm-l3 { background: rgba(52,211,153,0.65); border-color: rgba(52,211,153,0.8); }
.hm-l4 { background: var(--emerald); border-color: var(--emerald); }
.stats-bars { display: flex; flex-direction: column; gap: 6px; }
.bar-row { display: grid; grid-template-columns: 140px 1fr 36px; align-items: center; gap: 10px; font-size: 0.9em; }
.bar-label { color: var(--muted); }
.bar-track { height: 14px; background: var(--card); border-radius: 999px; overflow: hidden; border: 1px solid var(--border); }
.bar-fill { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--fuchsia)); border-radius: 999px; }
.bar-value { text-align: right; color: var(--cyan); font-weight: 700; }
.stats-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 700px) { .stats-cols { grid-template-columns: 1fr; } }
.stats-people { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.sp-row { display: flex; justify-content: space-between; padding: 6px 8px; background: var(--card);
  border: 1px solid var(--border); border-radius: 8px; }
.sp-count { color: var(--cyan); font-weight: 700; }
.stats-recent { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.sr-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 8px;
  background: var(--card); border: 1px solid var(--border); border-radius: 8px; font-size: 0.9em; }
.sr-title { font-weight: 600; }

/* ── Reviews section ── */
.reviews-section { margin: 26px 0; }
.reviews-section > h2 { margin-bottom: 12px; }
.review-form { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 18px; display: flex; flex-direction: column; gap: 10px; }
.rf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .rf-row { grid-template-columns: 1fr; } }
.rf-author, .rf-text, .rf-rating { display: flex; flex-direction: column; gap: 4px; }
.rf-author input, .rf-text textarea { background: var(--bg-2); border: 1px solid var(--border); color: var(--text);
  border-radius: 9px; padding: 8px 10px; outline: none; font-family: inherit; font-size: 0.95em; }
.rf-author input:focus, .rf-text textarea:focus { border-color: var(--cyan); }
.rf-stars { display: flex; gap: 2px; }
.rf-star { background: transparent; border: 0; color: var(--muted); cursor: pointer; font-size: 1.3em; padding: 2px; line-height: 1; }
.rf-star.on { color: var(--amber); text-shadow: 0 0 12px rgba(251,191,36,0.5); }
.rf-actions { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.rf-spoiler { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85em; cursor: pointer; }
.rf-spoiler input { accent-color: var(--fuchsia); }
.rf-btns { display: flex; gap: 8px; }
.reviews-list { display: flex; flex-direction: column; gap: 10px; max-height: 720px; overflow-y: auto; padding-right: 4px; }
.review-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; }
.rc-head { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; margin-bottom: 8px; }
.rc-avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--cyan), var(--fuchsia));
  color: #0a0e17; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.9em; }
.rc-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rc-author { font-weight: 700; font-size: 0.95em; }
.rc-date { font-size: 0.78em; }
.rc-rating { color: var(--amber); font-weight: 800; }
.rc-text { color: #c6cddc; line-height: 1.5; margin: 6px 0; }
.rc-spoiler summary { cursor: pointer; }
.rc-actions { display: flex; gap: 8px; margin-top: 8px; }
.rc-actions .btn-ghost { padding: 4px 10px; font-size: 0.82em; }
.rc-like.is-liked { border-color: var(--fuchsia); box-shadow: var(--glow-fuchsia); color: var(--fuchsia); }
.rc-like.is-liked .rc-like-n { font-weight: 700; }

/* ── Settings: data + danger zone ── */
.data-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.data-actions .btn-ghost, .data-actions .btn-primary { cursor: pointer; }
.danger-zone { border-color: rgba(251,191,36,0.4); }
.danger-zone h2 { color: var(--amber); }
.danger-zone .btn-ghost:hover { border-color: var(--fuchsia); box-shadow: var(--glow-fuchsia); }

/* ── Movie page extras ── */
.movie-rating-panel { margin-top: 24px; }

/* ── Custom scrollbar ── */
.reviews-list::-webkit-scrollbar, .ratings-leaderboard::-webkit-scrollbar,
.np-list::-webkit-scrollbar, .atp-list::-webkit-scrollbar { width: 6px; }
.reviews-list::-webkit-scrollbar-thumb, .ratings-leaderboard::-webkit-scrollbar-thumb,
.np-list::-webkit-scrollbar-thumb, .atp-list::-webkit-scrollbar-thumb {
  background: var(--border); border-radius: 999px;
}
.reviews-list::-webkit-scrollbar-thumb:hover, .ratings-leaderboard::-webkit-scrollbar-thumb:hover { background: var(--cyan); }

/* ─────────────────────────────────────────────────────────────────────
   PWA Install Prompt
   ──────────────────────────────────────────────────────────────────── */
.install-prompt {
  position: fixed; right: 18px; bottom: 18px; z-index: 100;
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(140deg, rgba(34,211,238,0.12), rgba(232,121,249,0.12));
  border: 1px solid rgba(34,211,238,0.4); backdrop-filter: blur(14px);
  border-radius: 14px; padding: 12px 14px; box-shadow: 0 18px 40px rgba(0,0,0,0.4), var(--glow-cyan);
  max-width: calc(100vw - 36px);
}
.install-prompt .install-icon { font-size: 1.4em; }
.install-prompt .install-text { font-weight: 700; flex: 1; }
.install-prompt #cv-install-btn { padding: 7px 14px; font-size: 0.9em; }
.install-prompt #cv-install-dismiss { padding: 4px 8px; font-size: 1.1em; line-height: 1; }

/* ─────────────────────────────────────────────────────────────────────
   Icon buttons (sound, shortcuts) в шапке
   ──────────────────────────────────────────────────────────────────── */
.icon-btn {
  background: var(--card); border: 1px solid var(--border); color: var(--text);
  border-radius: 12px; width: 38px; height: 38px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; transition: 0.18s; font-size: 1em;
}
.icon-btn:hover { border-color: var(--fuchsia); box-shadow: var(--glow-fuchsia); }
.icon-btn:active { transform: scale(0.95); }
.icon-btn[aria-pressed="true"] { border-color: var(--cyan); box-shadow: var(--glow-cyan); }

/* ─────────────────────────────────────────────────────────────────────
   Movie Modal
   ──────────────────────────────────────────────────────────────────── */
.modal-root {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  animation: modal-fade-in 0.22s ease-out;
}
.modal-root[hidden] { display: none; }
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(5, 8, 16, 0.78); backdrop-filter: blur(8px);
}
.modal-window {
  position: relative; z-index: 1;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 18px; width: 100%; max-width: 920px; max-height: calc(100vh - 32px);
  overflow: hidden; display: flex; flex-direction: column;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 0 60px rgba(34,211,238,0.18);
  animation: modal-slide-up 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-window-sm { max-width: 540px; }
@keyframes modal-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-slide-up { from { transform: translateY(24px) scale(0.98); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .modal-root, .modal-window { animation: none; }
}

.modal-close {
  position: absolute; top: 10px; right: 10px; z-index: 5;
  background: rgba(6,12,22,0.6); border: 1px solid var(--border);
  color: var(--text); width: 36px; height: 36px; border-radius: 10px;
  font-size: 1.4em; line-height: 1; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: 0.18s;
}
.modal-close:hover { border-color: var(--fuchsia); color: var(--fuchsia); box-shadow: var(--glow-fuchsia); }

.modal-header {
  display: grid; grid-template-columns: 110px 1fr; gap: 16px;
  padding: 18px 20px 14px; border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(34,211,238,0.06), rgba(232,121,249,0.05));
}
.modal-poster {
  width: 110px; height: 165px; object-fit: cover;
  border-radius: 10px; border: 1px solid var(--border); box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}
.modal-headtext { min-width: 0; }
.modal-title { font-size: clamp(1.15em, 2.4vw, 1.6em); font-weight: 800; line-height: 1.2;
  margin-bottom: 4px; word-wrap: break-word; }
.modal-subtitle { font-size: 0.88em; margin-bottom: 8px; }
.modal-badges { display: flex; gap: 6px; flex-wrap: wrap; }

.modal-tabs {
  display: flex; gap: 2px; padding: 0 12px;
  background: var(--bg-3); border-bottom: 1px solid var(--border);
  overflow-x: auto; scrollbar-width: thin;
}
.modal-tab {
  background: transparent; border: 0; border-bottom: 2px solid transparent;
  color: var(--muted); padding: 12px 14px; cursor: pointer;
  font-size: 0.93em; font-weight: 600; white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}
.modal-tab:hover { color: var(--text); }
.modal-tab.act { color: var(--cyan); border-bottom-color: var(--cyan); text-shadow: var(--glow-cyan); }
.modal-tab:focus-visible { outline: 2px solid var(--fuchsia); outline-offset: -2px; }

.modal-panel { padding: 18px 20px; overflow-y: auto; max-height: 50vh; }
.modal-panel-flat { max-height: none; }
.modal-panel[hidden] { display: none; }

.modal-overview .overview-text {
  color: #c6cddc; margin-bottom: 14px; line-height: 1.6;
}
.modal-overview .people { display: flex; flex-direction: column; gap: 8px; font-size: 0.93em; }
.modal-overview .people div { display: flex; gap: 10px; }
.modal-overview .people dt { color: var(--muted); min-width: 110px; flex-shrink: 0; }
.modal-overview .people dd { flex: 1; }

.modal-player-slot {
  position: relative; aspect-ratio: 16/9; width: 100%;
  background: #000; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--border); margin-bottom: 12px;
}
.modal-player-slot iframe { width: 100%; height: 100%; border: 0; display: block; }
.modal-player-loading {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 0.95em;
}

.modal-sources { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.modal-sources .web-link { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px;
  transition: 0.15s; }
.modal-sources .web-link:hover { border-color: rgba(34,211,238,0.4); }

.modal-actions {
  display: flex; gap: 8px; flex-wrap: wrap;
  padding: 12px 20px; border-top: 1px solid var(--border);
  background: var(--bg-3);
}
.modal-actions .btn-ghost { font-size: 0.9em; padding: 8px 14px; text-decoration: none; display: inline-flex; align-items: center; }

/* ─────────────────────────────────────────────────────────────────────
   Shortcuts help
   ──────────────────────────────────────────────────────────────────── */
.shortcuts-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.shortcut-row {
  display: grid; grid-template-columns: 110px 1fr; gap: 10px; align-items: center;
  padding: 8px 10px; background: var(--card); border: 1px solid var(--border); border-radius: 9px;
}
.shortcut-row dd { color: var(--text); font-size: 0.92em; }
.kbd {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-3); border: 1px solid var(--border); border-bottom-width: 2px;
  border-radius: 6px; padding: 4px 9px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82em; min-width: 26px; color: var(--cyan); font-weight: 700;
}
.small { font-size: 0.84em; }

/* ─────────────────────────────────────────────────────────────────────
   Адаптив модала
   ──────────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .modal-window { max-height: 100vh; border-radius: 0; max-width: none; }
  .modal-root { padding: 0; }
  .modal-header { grid-template-columns: 80px 1fr; padding: 14px; }
  .modal-poster { width: 80px; height: 120px; }
  .modal-panel { padding: 14px; max-height: calc(100vh - 280px); }
  .modal-actions { padding: 10px 14px; }
  .install-prompt { right: 8px; bottom: 8px; left: 8px; max-width: none; padding: 10px; }
  .install-prompt .install-text { font-size: 0.88em; }
}

/* Кастомный скроллбар внутри модала и панелей */
.modal-panel::-webkit-scrollbar, .modal-tabs::-webkit-scrollbar { width: 8px; height: 8px; }
.modal-panel::-webkit-scrollbar-track, .modal-tabs::-webkit-scrollbar-track { background: transparent; }
.modal-panel::-webkit-scrollbar-thumb, .modal-tabs::-webkit-scrollbar-thumb {
  background: rgba(34,211,238,0.25); border-radius: 4px;
}
.modal-panel::-webkit-scrollbar-thumb:hover, .modal-tabs::-webkit-scrollbar-thumb:hover {
  background: rgba(34,211,238,0.4);
}

/* ══════════════════════════════════════════════════════════════════════
   PHP-PORT-D: UI polish — HUD-постеры, hero carousel, 8 коллекций,
   trending, рекомендации (personalized + mood), filters, анимации.
   Палитра: cyan #22d3ee / fuchsia #d946ef / emerald #10b981 / amber #fbbf24.
   Без blue/indigo.
   ══════════════════════════════════════════════════════════════════════ */

/* ── Keyframes ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 12px hsla(var(--mc-hue, 200), 90%, 55%, 0.35); }
  50%      { box-shadow: 0 0 24px hsla(var(--mc-hue, 200), 90%, 55%, 0.65); }
}
@keyframes kenburns {
  0%   { transform: scale(1) translate(0, 0); }
  50%  { transform: scale(1.08) translate(-1.5%, -1%); }
  100% { transform: scale(1) translate(0, 0); }
}
@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Utility-классы ── */
.animate-fade-in-up { animation: fadeInUp 0.5s ease-out both; }
.animate-scale-in   { animation: scaleIn 0.4s ease-out both; }
.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.10s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.20s; }
.stagger-5 { animation-delay: 0.25s; }
.will-change-transform { will-change: transform; }
.will-change-opacity   { will-change: opacity; }

/* Скрытие скроллбара для горизонтальных скролл-контейнеров */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* ────────────────────────────────────────────────────────────────────
   Hero Carousel — Ken Burns + автопрокрутка
   ──────────────────────────────────────────────────────────────────── */
.hero-carousel {
  position: relative; width: 100%; height: clamp(380px, 60vh, 560px);
  margin: -8px 0 38px; border-radius: 18px; overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-3); isolation: isolate;
}
.hc-track { position: relative; width: 100%; height: 100%; }
.hc-slide {
  position: absolute; inset: 0; opacity: 0; pointer-events: none;
  transition: opacity 0.8s ease;
  display: flex; align-items: flex-end;
}
.hc-slide.is-active { opacity: 1; pointer-events: auto; z-index: 1; }
.hc-bg {
  position: absolute; inset: 0; z-index: 0;
  overflow: hidden;
}
.hc-bg img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(1.1) contrast(1.05);
  animation: kenburns 20s ease-in-out infinite;
}
.hc-slide.is-active .hc-bg img { animation-play-state: running; }
.hc-slide:not(.is-active) .hc-bg img { animation-play-state: paused; }
.hc-overlay {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(to top, rgba(10,14,23,0.96) 0%, rgba(10,14,23,0.7) 30%, rgba(10,14,23,0.2) 60%, transparent 100%),
    linear-gradient(to right, rgba(10,14,23,0.7) 0%, rgba(10,14,23,0.2) 50%, transparent 100%);
}
.hc-content {
  position: relative; z-index: 2;
  padding: clamp(20px, 4vw, 48px); max-width: 640px;
}
.hc-badge {
  display: inline-block; padding: 5px 12px; border-radius: 999px;
  background: rgba(232,121,249,0.14); border: 1px solid rgba(232,121,249,0.4);
  color: var(--fuchsia); font-size: 0.78em; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; margin-bottom: 14px;
  text-shadow: var(--glow-fuchsia);
}
.hc-title {
  font-size: clamp(2rem, 5vw, 4rem); font-weight: 900; line-height: 1.05;
  letter-spacing: -0.02em; margin-bottom: 12px; color: #fff;
  text-shadow: 0 2px 20px rgba(0,0,0,0.7);
}
.hc-meta {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px;
  font-size: 0.92em;
}
.hc-rating {
  color: var(--amber); font-weight: 700;
  background: rgba(6,12,22,0.6); padding: 3px 10px; border-radius: 8px;
  border: 1px solid rgba(251,191,36,0.35);
}
.hc-year { color: var(--cyan); font-weight: 700; }
.hc-genres { display: flex; gap: 6px; flex-wrap: wrap; }
.hc-genre {
  padding: 3px 10px; border-radius: 999px; font-size: 0.78em;
  background: rgba(34,211,238,0.1); border: 1px solid rgba(34,211,238,0.35);
  color: var(--cyan);
}
.hc-overview {
  color: #c6cddc; font-size: 0.95em; line-height: 1.5; margin-bottom: 18px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; max-width: 540px;
}
.hc-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hc-watch, .hc-details { padding: 11px 22px; font-size: 0.95em; font-weight: 700; border-radius: 12px; }
.hc-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(6,12,22,0.7); border: 1px solid var(--border);
  color: var(--text); cursor: pointer; z-index: 5;
  font-size: 1.6em; line-height: 1; opacity: 0;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.25s, background 0.18s, border-color 0.18s;
  backdrop-filter: blur(8px);
}
.hero-carousel:hover .hc-arrow { opacity: 1; }
.hc-arrow:hover { background: rgba(34,211,238,0.2); border-color: var(--cyan); }
.hc-prev { left: 14px; }
.hc-next { right: 14px; }
.hc-dots {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 8px; z-index: 5;
}
.hc-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,0.35); border: 0; cursor: pointer;
  transition: width 0.3s, background 0.25s;
}
.hc-dot.is-active { width: 28px; border-radius: 4px; background: var(--cyan); box-shadow: var(--glow-cyan); }
@media (max-width: 640px) {
  .hero-carousel { height: 70vh; min-height: 360px; border-radius: 0; }
  .hc-arrow { width: 38px; height: 38px; font-size: 1.3em; }
}

/* ────────────────────────────────────────────────────────────────────
   Collection Row — горизонтальный скролл со стрелками
   ──────────────────────────────────────────────────────────────────── */
.home-collections { display: flex; flex-direction: column; gap: 36px; margin: 30px 0; }
.collection-row-wrap { position: relative; }
.col-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 10px; margin-bottom: 14px; padding: 0 2px;
}
.col-head h2 {
  display: flex; align-items: baseline; gap: 10px;
  font-size: clamp(1.05em, 2vw, 1.35em); font-weight: 800; letter-spacing: -0.01em;
}
.col-num {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.7em; font-weight: 700; opacity: 0.45;
  color: var(--cyan); letter-spacing: 0.05em;
}
.col-icon { font-size: 1em; }
.col-title {
  background: linear-gradient(90deg, #fff, #c6cddc);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.col-count { font-size: 0.78em; font-weight: 500; padding: 2px 8px; border-radius: 8px;
  border: 1px solid rgba(232,121,249,0.35); background: rgba(232,121,249,0.08); color: var(--fuchsia); }
.col-sub { font-size: 0.82em; font-weight: 500; }
.more {
  color: var(--cyan); font-size: 0.86em; font-weight: 600;
  padding: 6px 12px; border-radius: 10px; border: 1px solid rgba(34,211,238,0.3);
  background: rgba(34,211,238,0.06); transition: 0.18s; white-space: nowrap;
}
.more:hover { background: rgba(34,211,238,0.16); border-color: var(--cyan); box-shadow: var(--glow-cyan); }

.collection-row { position: relative; }
.cr-scroll {
  display: flex; gap: 14px;
  overflow-x: auto; scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  padding: 4px 2px 12px;
  -ms-overflow-style: none; scrollbar-width: none;
}
.cr-scroll::-webkit-scrollbar { display: none; }
.cr-scroll > .movie-card {
  flex: 0 0 auto; width: clamp(150px, 38vw, 180px);
  scroll-snap-align: start;
}
.cr-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 38px; height: 60px; border-radius: 10px;
  background: rgba(6,12,22,0.75); border: 1px solid var(--border);
  color: var(--text); cursor: pointer; z-index: 10;
  font-size: 1.4em; line-height: 1; opacity: 0;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.22s, background 0.18s, border-color 0.18s;
  backdrop-filter: blur(8px);
}
.collection-row:hover .cr-arrow { opacity: 1; }
.cr-arrow:hover { background: rgba(34,211,238,0.18); border-color: var(--cyan); }
.cr-prev { left: -6px; }
.cr-next { right: -6px; }
@media (max-width: 640px) {
  .cr-arrow { display: none; }
  .cr-scroll > .movie-card { width: 130px; }
}

/* ────────────────────────────────────────────────────────────────────
   Movie Card — 3D tilt, HUD badges, glow, quick actions
   ──────────────────────────────────────────────────────────────────── */
.movie-card {
  position: relative; perspective: 1000px;
  transition: transform 0.25s ease;
  will-change: transform;
}
.movie-card.tilt { transform-style: preserve-3d; }
.mc-link { display: block; text-decoration: none; color: inherit; }
.mc-poster {
  position: relative; aspect-ratio: 2/3;
  border-radius: 12px; overflow: hidden;
  background: var(--bg-3);
  border: 1px solid hsla(var(--mc-hue, 200), 80%, 55%, 0.18);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  transform: rotateY(var(--tilt-x, 0deg)) rotateX(var(--tilt-y, 0deg));
  transform-style: preserve-3d;
}
.mc-poster img {
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 0.4s ease;
}
.mc-poster img[loading="lazy"]:not([src=""]) { opacity: 1; }
.mc-poster img.loaded, .mc-poster img.complete { opacity: 1; }
.movie-card:hover .mc-poster {
  border-color: hsla(var(--mc-hue, 200), 90%, 65%, 0.7);
  box-shadow: 0 0 28px hsla(var(--mc-hue, 200), 90%, 55%, 0.55),
              0 0 64px hsla(var(--mc-hue, 200), 90%, 55%, 0.22);
}
.movie-card:hover .mc-poster img { transform: scale(1.03); }
.mc-poster img { transition: opacity 0.4s, transform 0.4s; }

.mc-badge {
  position: absolute; padding: 3px 8px; border-radius: 6px;
  font-size: 0.72em; font-weight: 700; z-index: 4;
  backdrop-filter: blur(6px); pointer-events: none;
  letter-spacing: 0.02em;
}
.mc-type {
  top: 8px; left: 8px;
  background: rgba(6,12,22,0.78); border: 1px solid rgba(34,211,238,0.4);
  color: var(--cyan);
}
.mc-4k {
  top: 8px; right: 8px;
  background: rgba(6,12,22,0.78); border: 1px solid rgba(34,211,238,0.5);
  color: var(--cyan); font-weight: 800;
}
.mc-hdr {
  top: 8px; right: 8px;
  background: rgba(6,12,22,0.78); border: 1px solid rgba(217,70,239,0.5);
  color: var(--fuchsia); font-weight: 800;
}
.movie-card .mc-4k + .mc-hdr { top: 36px; right: 8px; }
.mc-rating {
  bottom: 8px; right: 8px;
  background: rgba(6,12,22,0.78); border: 1px solid rgba(251,191,36,0.4);
  color: var(--amber);
}
.mc-info {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 32px 10px 8px; z-index: 3; pointer-events: none;
  background: linear-gradient(to top, rgba(4,6,11,0.96) 0%, rgba(4,6,11,0.6) 60%, transparent 100%);
}
.mc-title {
  font-size: 0.9em; font-weight: 600; color: #fff;
  line-height: 1.25; margin-bottom: 2px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.mc-meta {
  font-size: 0.75em; color: var(--muted);
  display: flex; gap: 5px; align-items: center;
}
.mc-year { color: var(--cyan); font-weight: 600; }
.mc-dot { opacity: 0.6; }
.mc-genre { color: #c6cddc; }

.mc-actions {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  display: flex; gap: 6px; z-index: 5;
  opacity: 0; transition: opacity 0.25s;
  pointer-events: none;
}
.movie-card:hover .mc-actions { opacity: 1; pointer-events: auto; }
.mc-action {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(6,12,22,0.82); border: 1px solid var(--border);
  color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1em; line-height: 1; text-decoration: none;
  transition: transform 0.18s, background 0.18s, border-color 0.18s, color 0.18s;
  backdrop-filter: blur(8px);
}
.mc-action:hover { transform: scale(1.12); }
.mc-watchlist:hover { color: #ff5d8f; border-color: #ff5d8f; background: rgba(255,93,143,0.18); }
.mc-compare:hover   { color: var(--fuchsia); border-color: var(--fuchsia); background: rgba(217,70,239,0.18); }
.mc-info:hover      { color: var(--emerald); border-color: var(--emerald); background: rgba(16,185,129,0.18); }

.mc-progress {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 3px; background: rgba(255,255,255,0.05); z-index: 4;
  opacity: 0; transition: opacity 0.25s;
}
.mc-progress[data-watched="1"] { opacity: 1; }
.mc-progress > span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--emerald));
  width: var(--mc-progress, 0%);
  transition: width 0.4s ease;
  box-shadow: 0 0 8px rgba(34,211,238,0.6);
}

/* ────────────────────────────────────────────────────────────────────
   Trending — 3 period tabs + ranked rows (Netflix Top-10 style)
   ──────────────────────────────────────────────────────────────────── */
.trending {
  margin: 42px 0; padding: 22px;
  background: linear-gradient(135deg, rgba(232,121,249,0.04), rgba(34,211,238,0.04));
  border: 1px solid var(--border); border-radius: 18px;
}
.tr-head {
  display: flex; align-items: center; gap: 12px; margin-bottom: 18px;
}
.tr-icon {
  display: flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 12px;
  background: rgba(232,121,249,0.12); border: 1px solid rgba(232,121,249,0.4);
  font-size: 1.3em;
  box-shadow: var(--glow-fuchsia);
}
.tr-title {
  font-size: clamp(1.1em, 2.5vw, 1.5em); font-weight: 800; letter-spacing: -0.01em;
  background: linear-gradient(90deg, var(--fuchsia), var(--cyan), var(--emerald));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% auto; animation: gradientShift 6s ease infinite;
}
.tr-sub { font-size: 0.85em; margin-top: 2px; }

.tr-tabs {
  display: inline-flex; gap: 4px; padding: 4px;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  margin-bottom: 20px;
}
.tr-radio { position: absolute; opacity: 0; pointer-events: none; }
.tr-tab {
  padding: 7px 16px; border-radius: 9px; cursor: pointer;
  font-size: 0.88em; font-weight: 600; color: var(--muted);
  transition: 0.2s;
}
.tr-radio:checked + .tr-tab {
  background: linear-gradient(135deg, var(--cyan), var(--emerald));
  color: #06121a; font-weight: 700;
  box-shadow: var(--glow-cyan);
}
.tr-tab:hover { color: var(--text); }

.tr-list { display: none; flex-direction: column; gap: 10px; }
.tr-list[hidden] { display: none; }
/* CSS-only переключение вкладок через :checked */
#tr-today:checked    ~ .tr-list[data-period="today"]    { display: flex; }
#tr-week:checked     ~ .tr-list[data-period="week"]     { display: flex; }
#tr-month:checked    ~ .tr-list[data-period="month"]    { display: flex; }
#tr-today:checked    ~ .tr-list[data-period="week"],
#tr-today:checked    ~ .tr-list[data-period="month"],
#tr-week:checked     ~ .tr-list[data-period="today"],
#tr-week:checked     ~ .tr-list[data-period="month"],
#tr-month:checked    ~ .tr-list[data-period="today"],
#tr-month:checked    ~ .tr-list[data-period="week"] { display: none; }

.tr-row {
  display: grid; grid-template-columns: 56px 64px 1fr 28px;
  align-items: center; gap: 14px;
  padding: 10px 14px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--border);
  transition: 0.2s; text-decoration: none; color: inherit;
}
.tr-row:hover {
  border-color: rgba(34,211,238,0.5);
  background: rgba(34,211,238,0.06);
  transform: translateX(4px);
  box-shadow: var(--glow-cyan);
}
.tr-rank {
  font-size: 2.4em; font-weight: 900; line-height: 1;
  color: var(--cyan); text-shadow: 0 0 14px rgba(34,211,238,0.5);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  text-align: center;
}
.tr-poster {
  display: block; width: 64px; height: 96px; border-radius: 8px; overflow: hidden;
  background: var(--bg-3); flex-shrink: 0;
}
.tr-poster img { width: 100%; height: 100%; object-fit: cover; }
.tr-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tr-name {
  font-size: 1em; font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tr-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 0.85em; }
.tr-rating { color: var(--amber); font-weight: 700; }
.tr-cta { color: var(--cyan); font-size: 1.4em; opacity: 0; transition: 0.18s; }
.tr-row:hover .tr-cta { opacity: 1; }
@media (max-width: 640px) {
  .tr-row { grid-template-columns: 40px 50px 1fr 20px; gap: 10px; padding: 8px; }
  .tr-rank { font-size: 1.8em; }
  .tr-poster { width: 50px; height: 75px; }
  .tr-name { font-size: 0.92em; }
}

/* ────────────────────────────────────────────────────────────────────
   Recommendations — personalized + mood
   ──────────────────────────────────────────────────────────────────── */
.rec-block {
  margin: 42px 0; display: flex; flex-direction: column; gap: 32px;
}
.rec-personal[hidden] { display: none; }
.rec-personal .collection-row { display: block; }
.rec-personal .cr-scroll {
  display: flex; gap: 12px; overflow-x: auto;
  padding: 4px 2px 12px;
  -ms-overflow-style: none; scrollbar-width: none;
}
.rec-personal .cr-scroll::-webkit-scrollbar { display: none; }
.rec-personal .movie-card { flex: 0 0 auto; width: clamp(140px, 36vw, 168px); }

.rec-mood {
  padding: 22px;
  background: linear-gradient(135deg, rgba(34,211,238,0.04), rgba(217,70,239,0.04));
  border: 1px solid var(--border); border-radius: 18px;
}
.mood-chips {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px;
}
.mood-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--border);
  color: var(--muted); cursor: pointer;
  font-size: 0.9em; font-weight: 600;
  transition: 0.22s;
}
.mood-chip:hover {
  background: rgba(255,255,255,0.08); color: var(--text);
  transform: translateY(-2px);
  border-color: rgba(255,255,255,0.2);
}
.mood-chip[aria-selected="true"] {
  background: rgba(34,211,238,0.16); border-color: var(--cyan); color: var(--cyan);
  box-shadow: var(--glow-cyan);
}
.mood-emoji { font-size: 1.15em; line-height: 1; }

.mood-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px; min-height: 0;
}
.mood-grid:empty { display: none; }
.mood-grid .movie-card { width: 100%; }
.mood-empty {
  grid-column: 1 / -1; padding: 20px; text-align: center;
  color: var(--muted); font-size: 0.9em;
}

/* ────────────────────────────────────────────────────────────────────
   Filters Bar — расширенные фильтры каталога
   ──────────────────────────────────────────────────────────────────── */
.filters-bar {
  display: flex; flex-direction: column; gap: 14px;
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 18px 20px; margin: 18px 0 26px;
}
.fb-row { display: flex; flex-direction: column; gap: 8px; }
.fb-row.fb-inline {
  flex-direction: row; flex-wrap: wrap; gap: 12px; align-items: flex-end;
}
.fb-search .fb-input { width: 100%; max-width: 480px; }
.fb-label {
  font-size: 0.78em; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.fb-chips {
  display: flex; gap: 6px; flex-wrap: wrap;
  max-height: 96px; overflow-y: auto;
  padding: 2px;
}
.fb-chip {
  position: relative; display: inline-block; cursor: pointer;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 999px; padding: 6px 14px; font-size: 0.85em;
  color: var(--muted); transition: 0.18s;
}
.fb-chip input { position: absolute; opacity: 0; pointer-events: none; }
.fb-chip:hover { color: var(--text); border-color: rgba(255,255,255,0.2); }
.fb-chip.is-active {
  background: rgba(34,211,238,0.14); border-color: var(--cyan); color: var(--cyan);
  box-shadow: 0 0 10px rgba(34,211,238,0.25);
}
.fb-field {
  display: flex; flex-direction: column; gap: 5px; font-size: 0.78em; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700;
}
.fb-input {
  background: var(--bg-2); border: 1px solid var(--border); color: var(--text);
  border-radius: 9px; padding: 8px 12px; outline: none;
  font-size: 0.95em; min-width: 120px; text-transform: none; font-weight: 400; letter-spacing: 0;
}
.fb-input:focus { border-color: var(--cyan); box-shadow: var(--glow-cyan); }
.fb-apply, .fb-reset { padding: 8px 16px; font-size: 0.9em; }
.fb-reset { display: inline-flex; align-items: center; text-decoration: none; }
@media (max-width: 640px) {
  .filters-bar { padding: 14px; }
  .fb-row.fb-inline { flex-direction: column; align-items: stretch; }
  .fb-field { width: 100%; }
  .fb-input { width: 100%; }
}

/* ────────────────────────────────────────────────────────────────────
   Catalog grid
   ──────────────────────────────────────────────────────────────────── */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px; margin: 22px 0;
}
.catalog-grid .movie-card { width: 100%; }

/* ────────────────────────────────────────────────────────────────────
   Skeleton loader (shimmer)
   ──────────────────────────────────────────────────────────────────── */
.skeleton { pointer-events: none; }
.skeleton .mc-link { pointer-events: none; }
.sk-poster {
  width: 100%; aspect-ratio: 2/3; border-radius: 12px;
  background: linear-gradient(90deg, #1a1a2e 25%, #2a2a4e 50%, #1a1a2e 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite linear;
  border: 1px solid var(--border);
}
.sk-line {
  height: 10px; border-radius: 4px; margin-top: 10px;
  background: linear-gradient(90deg, #1a1a2e 25%, #2a2a4e 50%, #1a1a2e 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite linear;
}
.sk-w1 { width: 80%; }
.sk-w2 { width: 50%; }

/* ────────────────────────────────────────────────────────────────────
   Page-head tweak
   ──────────────────────────────────────────────────────────────────── */
.page-head { margin: 22px 0 14px; display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.page-head h1 { font-size: clamp(1.5em, 3vw, 2em); font-weight: 900; }

/* ────────────────────────────────────────────────────────────────────
   Generic hover lift utility
   ──────────────────────────────────────────────────────────────────── */
.hover-lift { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.hover-lift:hover { transform: translateY(-4px); }
.hover-glow { transition: box-shadow 0.2s ease; }
.hover-glow:hover { box-shadow: var(--glow-cyan); }

@media (prefers-reduced-motion: reduce) {
  .hc-bg img, .tr-title, .sk-poster, .sk-line { animation: none !important; }
  .movie-card, .mc-poster, .cr-arrow, .tr-row, .mood-chip { transition: none !important; }
}

/* ── Chatbot widget (КиноБот) ── */
.cv-chat-widget { position: fixed; right: 18px; bottom: 18px; z-index: 200; font-size: 14px; }
.cv-chat-fab {
  width: 56px; height: 56px; border-radius: 50%; border: 0; cursor: pointer;
  background: linear-gradient(135deg, var(--cyan), var(--emerald));
  color: #06121a; font-size: 24px; box-shadow: 0 8px 28px rgba(34,211,238,0.45), 0 0 0 1px rgba(34,211,238,0.3);
  position: relative; transition: transform 0.18s, box-shadow 0.18s;
}
.cv-chat-fab:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 12px 32px rgba(34,211,238,0.55); }
.cv-chat-fab-icon { position: relative; z-index: 2; }
.cv-chat-fab-pulse { position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 0 rgba(34,211,238,0.5);
  animation: cv-pulse 2.2s ease-out infinite; }
@keyframes cv-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(34,211,238,0.45); }
  70%  { box-shadow: 0 0 0 16px rgba(34,211,238,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,211,238,0); }
}

.cv-chat-panel {
  position: absolute; right: 0; bottom: 70px; width: 360px; max-width: calc(100vw - 36px);
  height: 540px; max-height: calc(100vh - 110px);
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(34,211,238,0.18);
  display: flex; flex-direction: column; overflow: hidden;
  animation: cv-slide-up 0.22s ease-out;
}
@keyframes cv-slide-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.cv-chat-header {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  background: linear-gradient(135deg, rgba(34,211,238,0.12), rgba(232,121,249,0.10));
  border-bottom: 1px solid var(--border);
}
.cv-chat-header h2 { font-size: 1em; font-weight: 800; flex: 1; color: var(--cyan); }
.cv-chat-status { font-size: 0.74em; color: var(--emerald); padding: 2px 8px; border-radius: 999px;
  border: 1px solid rgba(52,211,153,0.4); background: rgba(52,211,153,0.08); }
.cv-chat-close {
  background: transparent; border: 0; color: var(--muted); cursor: pointer;
  font-size: 22px; line-height: 1; padding: 0 4px; border-radius: 8px;
}
.cv-chat-close:hover { color: var(--text); background: var(--card); }

.cv-chat-messages { flex: 1; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px;
  scrollbar-width: thin; scrollbar-color: rgba(34,211,238,0.4) transparent; }
.cv-chat-messages::-webkit-scrollbar { width: 6px; }
.cv-chat-messages::-webkit-scrollbar-thumb { background: rgba(34,211,238,0.35); border-radius: 4px; }
.cv-chat-msg { display: flex; max-width: 88%; }
.cv-chat-msg-user { align-self: flex-end; }
.cv-chat-msg-bot { align-self: flex-start; }
.cv-chat-bubble {
  padding: 9px 13px; border-radius: 14px; font-size: 0.93em; line-height: 1.45;
  word-wrap: break-word; overflow-wrap: anywhere;
}
.cv-chat-msg-user .cv-chat-bubble {
  background: linear-gradient(135deg, var(--emerald), #16a34a);
  color: #06121a; border-bottom-right-radius: 4px; font-weight: 500;
}
.cv-chat-msg-bot .cv-chat-bubble {
  background: rgba(34,211,238,0.10); color: var(--text);
  border: 1px solid rgba(34,211,238,0.28); border-bottom-left-radius: 4px;
}

.cv-chat-typing .cv-chat-bubble { display: inline-flex; gap: 4px; align-items: center; padding: 12px 14px; }
.cv-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); opacity: 0.6;
  animation: cv-bounce 1.2s infinite ease-in-out; }
.cv-dot:nth-child(2) { animation-delay: 0.18s; }
.cv-dot:nth-child(3) { animation-delay: 0.36s; }
@keyframes cv-bounce { 0%,80%,100% { transform: translateY(0); opacity: 0.5; } 40% { transform: translateY(-4px); opacity: 1; } }

.cv-chat-suggestions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.cv-chat-sugg-item {
  display: flex; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 10px;
  background: var(--card); border: 1px solid var(--border); transition: 0.18s; font-size: 0.82em;
}
.cv-chat-sugg-item:hover { border-color: rgba(34,211,238,0.45); transform: translateX(2px); }
.cv-chat-sugg-poster {
  width: 30px; height: 42px; border-radius: 6px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800;
  font-size: 16px;
}
.cv-chat-sugg-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cv-chat-sugg-meta strong { font-weight: 600; font-size: 0.95em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cv-chat-sugg-meta .muted { font-size: 0.85em; }

.cv-chat-quick { display: flex; gap: 6px; padding: 8px 12px; flex-wrap: wrap; border-top: 1px solid var(--border); }
.cv-chip {
  background: rgba(34,211,238,0.08); border: 1px solid rgba(34,211,238,0.3); color: var(--cyan);
  padding: 4px 10px; border-radius: 999px; cursor: pointer; font-size: 0.8em; transition: 0.16s;
}
.cv-chip:hover { background: rgba(34,211,238,0.18); }

.cv-chat-input { display: flex; gap: 6px; padding: 10px 12px; border-top: 1px solid var(--border); }
.cv-chat-input input {
  flex: 1; background: var(--card); border: 1px solid var(--border); color: var(--text);
  border-radius: 12px; padding: 9px 13px; outline: none; font-size: 0.92em;
}
.cv-chat-input input:focus { border-color: var(--cyan); box-shadow: 0 0 0 2px rgba(34,211,238,0.18); }
.cv-chat-input button {
  background: linear-gradient(135deg, var(--cyan), var(--emerald)); color: #06121a;
  border: 0; border-radius: 12px; padding: 0 14px; cursor: pointer; font-weight: 800; font-size: 1.1em;
}

@media (max-width: 480px) {
  .cv-chat-panel { width: calc(100vw - 36px); height: 70vh; }
  .cv-chat-suggestions { grid-template-columns: 1fr; }
}

/* ═══════════════════ v3.2: СИСТЕМА ЖАЛОБ НА ВИДЕО ═══════════════════ */
.cv-report-btn {
  display: inline-flex; align-items: center; gap: 4px;
  background: transparent; border: 1px solid rgba(251,191,36,0.32);
  color: var(--amber); padding: 4px 10px; border-radius: 8px;
  cursor: pointer; font-size: 0.78em; font-weight: 600;
  transition: 0.18s; margin-left: 8px; flex-shrink: 0;
}
.cv-report-btn:hover { background: rgba(251,191,36,0.12); border-color: var(--amber); box-shadow: 0 0 12px rgba(251,191,36,0.3); }
.cv-report-btn .cv-report-ico { font-size: 1.05em; }
.modal-sources li { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.modal-sources li .web-link { flex: 1; min-width: 0; }

/* Кнопка жалобы на текущий проигрываемый ролик — поверх плеера */
.cv-report-current { position: absolute; top: 8px; right: 8px; z-index: 5; }
.cv-report-current .cv-report-btn {
  background: rgba(6,12,22,0.82); backdrop-filter: blur(8px);
  border-color: rgba(251,191,36,0.5); padding: 6px 12px; font-size: 0.82em;
}
.cv-report-current .cv-report-btn:hover { background: rgba(251,191,36,0.22); }

/* Диалог жалобы */
.cv-report-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(2,4,10,0.72); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: cvFadeIn 0.2s ease-out;
}
.cv-report-card {
  position: relative; width: 100%; max-width: 440px;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 18px;
  padding: 24px 22px 20px; box-shadow: 0 24px 60px rgba(0,0,0,0.6), 0 0 0 1px rgba(251,191,36,0.12);
  animation: cvPopIn 0.24s cubic-bezier(0.2,0.9,0.3,1.2);
}
.cv-report-x {
  position: absolute; top: 12px; right: 14px; background: transparent; border: 0;
  color: var(--muted); font-size: 1.6em; cursor: pointer; line-height: 1; padding: 4px;
}
.cv-report-x:hover { color: var(--text); }
.cv-report-title { font-size: 1.15em; font-weight: 800; margin-bottom: 6px; color: var(--amber); }
.cv-report-src { margin-bottom: 16px; font-size: 0.85em; word-break: break-all; }
.cv-report-lbl { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; font-size: 0.88em; color: var(--muted); font-weight: 600; }
.cv-report-sel, .cv-report-txt {
  background: var(--card); border: 1px solid var(--border); color: var(--text);
  border-radius: 10px; padding: 10px 12px; outline: none; font-size: 0.95em; font-family: inherit;
}
.cv-report-sel:focus, .cv-report-txt:focus { border-color: var(--cyan); box-shadow: var(--glow-cyan); }
.cv-report-txt { resize: vertical; min-height: 72px; }
.cv-report-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.cv-report-cancel {
  background: transparent; border: 1px solid var(--border); color: var(--muted);
  padding: 9px 18px; border-radius: 10px; cursor: pointer; font-weight: 600; transition: 0.16s;
}
.cv-report-cancel:hover { color: var(--text); border-color: var(--text); }
.cv-report-submit {
  background: linear-gradient(135deg, var(--amber), #f97316); border: 0; color: #1a0f00;
  padding: 9px 22px; border-radius: 10px; cursor: pointer; font-weight: 800; transition: 0.16s;
}
.cv-report-submit:hover { box-shadow: 0 0 18px rgba(251,191,36,0.5); transform: translateY(-1px); }
.cv-report-submit:disabled { opacity: 0.6; cursor: wait; transform: none; }
.cv-report-msg { margin-top: 12px; padding: 10px 12px; border-radius: 10px; font-size: 0.9em; text-align: center; }
.cv-report-msg.ok { background: rgba(52,211,153,0.12); color: var(--emerald); border: 1px solid rgba(52,211,153,0.3); }
.cv-report-msg.err { background: rgba(244,63,94,0.12); color: #fb7185; border: 1px solid rgba(244,63,94,0.3); }

@keyframes cvFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes cvPopIn { from { opacity: 0; transform: scale(0.92) translateY(8px); } to { opacity: 1; transform: scale(1) translateY(0); } }

@media (max-width: 480px) {
  .cv-report-card { padding: 20px 16px 16px; }
  .cv-report-current { top: 6px; right: 6px; }
}

/* ═══════════════════ v3.2: PROGRESSIVE LOADER ═══════════════════
   Used by assets/js/progressive-loader.js on the catalog page.
   Sentinel = 1px marker; footer = spinner / end / error UI.        */

/* Sentinel: invisible 1px marker placed after the grid. IO observes it. */
.cv-load-more-sentinel {
  height: 1px; width: 100%; clear: both;
  /* No margin/padding so it sits flush at the end of the grid. */
}

/* Footer stack: spinner OR end-message OR error box (only one visible at a time). */
.cv-load-more-footer {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 18px 0 28px; min-height: 32px;
  text-align: center;
}

/* CSS-only spinner (cyan, matches dark theme — uses var(--cyan) like app.js). */
.cv-load-more-spinner {
  width: 26px; height: 26px; border-radius: 50%;
  border: 3px solid rgba(34,211,238,0.18);
  border-top-color: var(--cyan);
  animation: cv-spin 0.8s linear infinite;
}
@keyframes cv-spin { to { transform: rotate(360deg); } }

/* Fade-in + slight translate-up for newly arrived cards. */
.cv-card-enter {
  animation: cvCardEnter 0.3s ease-out;
  will-change: opacity, transform;
}
@keyframes cvCardEnter {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Skeleton cards — reuses existing .sk-poster/.sk-line shimmer; the
   .cv-skeleton-card class is just a stable hook for the loader to find
   and remove its own placeholders without touching server-rendered
   .skeleton cards (should any exist). */
.cv-skeleton-card { pointer-events: none; }
.cv-skeleton-card .mc-link { pointer-events: none; }

/* "End of catalog" muted centered message. */
.cv-end-of-catalog {
  color: var(--muted); text-align: center; font-size: 0.92em;
  padding: 10px 14px; opacity: 0.85; letter-spacing: 0.02em;
}

/* Error state: red-bordered box with a Retry button. */
.cv-load-error {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 14px 18px;
  border: 1px solid rgba(244,63,94,0.4);
  border-radius: 12px;
  background: rgba(244,63,94,0.08);
  max-width: 480px; margin: 0 auto;
}
.cv-load-error-msg {
  color: #fb7185; font-size: 0.9em; text-align: center; margin: 0;
}
.cv-load-retry {
  background: transparent;
  border: 1px solid rgba(244,63,94,0.5);
  color: #fb7185;
  padding: 7px 18px; border-radius: 10px;
  cursor: pointer; font-weight: 600; font-size: 0.88em;
  transition: 0.18s;
  font-family: inherit;
}
.cv-load-retry:hover {
  background: rgba(244,63,94,0.15);
  border-color: #fb7185;
  box-shadow: 0 0 14px rgba(244,63,94,0.32);
}
.cv-load-retry:focus-visible {
  outline: 2px solid #fb7185; outline-offset: 2px;
}

/* Force [hidden] to win over display:flex/etc. on loader UI elements. */
.cv-load-more-spinner[hidden],
.cv-end-of-catalog[hidden],
.cv-load-error[hidden] { display: none !important; }

/* Respect reduced-motion: kill spinner + card-enter animations. */
@media (prefers-reduced-motion: reduce) {
  .cv-load-more-spinner { animation: none; }
  .cv-card-enter { animation: none; }
}

/* Mobile tweak: tighter footer padding. */
@media (max-width: 480px) {
  .cv-load-more-footer { padding: 14px 0 22px; }
  .cv-load-error { padding: 12px 14px; }
}


/* ───────────────────────────────────────────────────────────────────────
 * FIND-VIDEOS BUTTONS — ручной запуск поиска видео для фильма
 * ─────────────────────────────────────────────────────────────────────── */

/* Маленькая кнопка 🔍 в карточке фильма (каталог) */
.mc-action.mc-find-videos {
  background: rgba(34, 211, 238, 0.16);
  border-color: rgba(34, 211, 238, 0.55);
  color: #22d3ee;
}
.mc-action.mc-find-videos:hover {
  background: rgba(34, 211, 238, 0.32);
  border-color: #22d3ee;
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.55);
  transform: translateY(-1px);
}
.mc-action.mc-find-videos:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* Мини-тост для карточки */
.cv-find-videos-toast {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72em;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  z-index: 5;
  animation: cvToastIn 0.25s ease-out;
}
.cv-find-videos-toast.ok {
  background: rgba(52, 211, 153, 0.85);
  color: #02110a;
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.55);
}
.cv-find-videos-toast.err {
  background: rgba(244, 63, 94, 0.85);
  color: #fff;
  box-shadow: 0 0 12px rgba(244, 63, 94, 0.55);
}
@keyframes cvToastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Большая кнопка на странице фильма */
.cv-find-videos-btn {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(167, 139, 250, 0.18));
  border: 1px solid rgba(34, 211, 238, 0.45);
  color: #22d3ee;
}
.cv-find-videos-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.32), rgba(167, 139, 250, 0.32));
  border-color: #22d3ee;
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.45);
  transform: translateY(-1px);
}
.cv-find-videos-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* Результат поиска видео на странице фильма */
.cv-find-videos-result {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.92em;
  border: 1px solid transparent;
  animation: cvResultIn 0.3s ease-out;
}
.cv-find-videos-result.cv-find-videos-success {
  background: rgba(52, 211, 153, 0.12);
  border-color: rgba(52, 211, 153, 0.45);
  color: #34d399;
}
.cv-find-videos-result.cv-find-videos-error {
  background: rgba(244, 63, 94, 0.12);
  border-color: rgba(244, 63, 94, 0.45);
  color: #fb7185;
}
@keyframes cvResultIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Sentinel для progressive-loader */
.cv-load-more-sentinel {
  height: 1px;
  width: 100%;
  clear: both;
  margin: 0;
  padding: 0;
}
.cv-load-more-status {
  text-align: center;
  padding: 12px;
  color: var(--muted, #6b7280);
  font-size: 0.88em;
  min-height: 20px;
}

/* ───────────────────────────────────────────────────────────────────────
 * YANDEX METRICA — noscript fallback image styling
 * ─────────────────────────────────────────────────────────────────────── */
noscript > div { display: inline; }
