/* video.hyzmat.tm — тёмная тема по макету home-v2 */
:root {
  --bg: #0f1115;
  --panel: #1c1f26;
  --fg: #e8e8ea;
  --fg2: #bbb;
  --muted: #888;
  --accent: #2fbf71;
  --accent-bg: #1f3a2c;
  --accent-fg: #7ee2a8;
  --ad: #e5b84a;
  --thumb: linear-gradient(135deg, #2a3140, #3b4558);
  --thumb-rec: linear-gradient(135deg, #29443a, #3f6150);
  --radius: 8px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 15px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent-fg); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2 { font-size: 18px; margin: 4px 0 12px; font-weight: 650; }

/* шапка */
.top {
  display: flex; align-items: center; gap: 16px;
  padding: 12px 20px; position: sticky; top: 0; z-index: 10;
  background: var(--bg); border-bottom: 1px solid #1b1e25;
}
.logo { font-weight: 800; color: var(--accent); width: 200px; flex: 0 0 auto; font-size: 18px; }
.logo:hover { color: var(--accent); }
.search { flex: 1; max-width: 480px; }
.search input {
  width: 100%; border: 0; border-radius: 18px; padding: 8px 14px;
  background: var(--panel); color: var(--fg); font: inherit;
}
.search input::placeholder { color: var(--muted); }
.langs { margin-left: auto; display: flex; gap: 4px; }
.langs a { padding: 4px 8px; border-radius: 6px; color: var(--muted); font-size: 13px; font-weight: 600; }
.langs a.on { background: var(--accent-bg); color: var(--accent-fg); }

/* раскладка: сайдбар + содержимое */
.lay { display: flex; gap: 20px; padding: 16px 20px; align-items: flex-start; }
.side {
  width: 200px; flex: 0 0 200px; position: sticky; top: 70px;
  max-height: calc(100vh - 86px); overflow-y: auto;
}
.side .h { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: #777; margin: 14px 10px 6px; }
.side a.c {
  display: block; padding: 7px 10px; border-radius: 6px; margin-bottom: 2px;
  color: var(--fg2); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.side a.c:hover { background: #181b21; }
.side a.c.on { background: var(--accent-bg); color: var(--accent-fg); }
.side a.home::before { content: "\2302\00a0"; }
.main { flex: 1; min-width: 0; }

/* сетки карточек */
.sec { margin-bottom: 24px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px 14px; }
.card { min-width: 0; }
.card .th {
  display: block; position: relative; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden;
  background: var(--thumb);
}
.rec .card .th { background: var(--thumb-rec); }
.card .th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .dur {
  position: absolute; right: 5px; bottom: 5px; background: #000c; color: #fff;
  font-size: 12px; font-weight: 600; padding: 1px 5px; border-radius: 3px;
}
.card .t {
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  margin-top: 6px; font-size: 14px; color: #ddd;
}
.card .ch { font-size: 12px; color: var(--muted); margin-top: 2px; }
.rec h2::before { content: "\2B50\00a0"; }
#latest h2::before { content: "\1F195\00a0"; }

/* баннер владельца */
.banner {
  margin: 4px 0 26px; border-radius: var(--radius); overflow: hidden;
  border: 1px dashed var(--ad); background: #3a2f12; text-align: center;
}
.banner a, .banner img { display: block; }
.banner img { width: 100%; height: auto; max-height: 240px; object-fit: contain; margin: 0 auto; }

.more {
  display: block; margin: 18px auto 0; padding: 8px 18px; border-radius: 18px;
  background: transparent; border: 1px solid #2a3a31; color: var(--accent);
  font: inherit; font-size: 14px; cursor: pointer;
}
.more::after { content: " \2193"; }
.more:hover { background: var(--accent-bg); }
.more:disabled { opacity: .5; cursor: progress; }
.empty { color: var(--muted); }

/* страница ролика */
.watch { max-width: 1100px; margin-bottom: 28px; }
.player {
  position: relative; background: #000; border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 16 / 9;
}
.player video { width: 100%; height: 100%; display: block; background: #000; object-fit: contain; }

/* свой плеер (player.js); без JS остаются нативные controls */
.player:fullscreen { aspect-ratio: auto; width: 100%; height: 100%; border-radius: 0; }
.player:-webkit-full-screen { aspect-ratio: auto; width: 100%; height: 100%; border-radius: 0; }
.pl-ui { position: absolute; inset: 0; color: #fff; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
.pl-surface { position: absolute; inset: 0; cursor: pointer; }
.pl-ui [hidden] { display: none !important; }
.pl-on.pl-idle .pl-ui, .pl-on.pl-idle .pl-surface { cursor: none; }
.pl-b {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; padding: 0 6px; border: 0; border-radius: 6px;
  background: transparent; color: #fff; font: 600 13px/1 system-ui, sans-serif; cursor: pointer;
  flex: 0 0 auto; touch-action: manipulation;
}
.pl-b svg { width: 24px; height: 24px; fill: currentColor; }
.pl-b svg text { fill: currentColor; font-family: system-ui, sans-serif; }
.pl-b:hover { background: #ffffff1f; }
.pl-big {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 64px; height: 64px; border-radius: 50%; background: #000a; border: 2px solid #ffffffcc;
}
.pl-big svg { width: 34px; height: 34px; margin-left: 3px; }
.pl-big:hover { background: var(--accent); border-color: var(--accent); }
.pl-ctl {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 2px;
  background: linear-gradient(transparent, #000d 55%);
  transition: opacity .2s, visibility .2s;
}
.pl-idle .pl-ctl { opacity: 0; visibility: hidden; }
.pl-bar { position: relative; height: 40px; display: flex; align-items: center; cursor: pointer; touch-action: none; margin: -8px 6px; }
.pl-track { position: relative; flex: 1; height: 4px; background: #ffffff40; border-radius: 2px; transition: height .1s; }
.pl-bar:hover .pl-track, .pl-scrub .pl-track, .pl-bar:focus-visible .pl-track { height: 6px; }
.pl-track > * { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 2px; text-decoration: none; }
.pl-buf { background: #ffffff59; }
.pl-track .pl-ad { background: var(--ad); border-radius: 0; }
.pl-played { background: var(--accent); }
.pl-thumb {
  top: 50%; bottom: auto; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 2px #0006; transform: scale(0); transition: transform .1s;
}
.pl-bar:hover .pl-thumb, .pl-scrub .pl-thumb, .pl-bar:focus-visible .pl-thumb { transform: scale(1); }
.pl-bar:focus-visible { outline: none; }
.pl-bar:focus-visible .pl-track { outline: 2px solid var(--accent); outline-offset: 4px; }
.pl-row { display: flex; align-items: center; gap: 2px; min-width: 0; }
.pl-sp { flex: 1 1 auto; min-width: 0; }
.pl-time { font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; padding: 0 6px; overflow: hidden; flex: 0 1 auto; min-width: 0; }
.pl-vol { width: 70px; accent-color: var(--accent); cursor: pointer; }
.pl-pill { border: 1.5px solid #fff; border-radius: 3px; padding: 2px 4px; font-size: 11px; font-weight: 700; line-height: 1; }
.pl-cc.on .pl-pill { background: #fff; color: #000; }
.pl-speed { font-variant-numeric: tabular-nums; min-width: 48px; }
.pl-skip {
  position: absolute; right: 12px; bottom: 92px; z-index: 2;
  min-height: 40px; padding: 8px 16px; border: 1px solid var(--ad); border-radius: 6px;
  background: #000c; color: #fff; font: 600 14px/1.2 system-ui, sans-serif; cursor: pointer;
}
.pl-skip:hover { background: var(--ad); color: #000; }
.pl-spin {
  position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px;
  border: 4px solid #ffffff40; border-top-color: var(--accent); border-radius: 50%;
  display: none; animation: pl-rot .8s linear infinite; pointer-events: none;
}
.pl-wait .pl-spin { display: block; }
.pl-wait:not(.pl-paused) .pl-big { display: none; }
@keyframes pl-rot { to { transform: rotate(360deg); } }
.pl-msg {
  position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; gap: 12px;
  align-items: center; justify-content: center; padding: 16px; text-align: center; background: #000c;
}
.pl-msg[hidden] { display: none; }
.pl-msg p { margin: 0; font-size: 15px; max-width: 32em; }
.pl-retry {
  min-height: 40px; padding: 8px 18px; border: 0; border-radius: 20px;
  background: var(--accent); color: #04140b; font: 600 14px/1 system-ui, sans-serif; cursor: pointer;
}
.pl-has-msg .pl-spin { display: none; }
@media (hover: none), (max-width: 599px) { .pl-vol { display: none; } }
@media (max-width: 439px) {
  /* семь кнопок по 40px не оставляют места времени — оно уходит над полосой */
  .pl-ctl { padding: 24px 4px 0; }
  .pl-b { padding: 0 2px; }
  .pl-row { gap: 0; }
  .pl-time { position: absolute; left: 10px; top: 2px; font-size: 12px; padding: 0; text-shadow: 0 1px 2px #000; pointer-events: none; }
  .pl-speed { min-width: 44px; }
  .pl-skip { bottom: auto; top: 8px; right: 8px; }   /* по центру — большая кнопка play */
}
video::cue { background: #000b; color: #fff; font-family: system-ui, sans-serif; }
.vt { font-size: 20px; margin: 12px 0 4px; }
.meta { margin: 0 0 10px; color: var(--muted); font-size: 14px; }
.meta .cn { color: var(--fg2); }
.desc { background: var(--panel); border-radius: var(--radius); padding: 10px 14px; }
.desc summary { cursor: pointer; color: var(--fg2); }
.desc p { margin: 10px 0 2px; color: #ccc; font-size: 14px; overflow-wrap: anywhere; }

.foot { padding: 20px; color: #666; font-size: 12px; text-align: center; border-top: 1px solid #1b1e25; }
.foot p { margin: 0 0 4px; }
.foot a { color: var(--accent); }
.beta { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 4px; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em; vertical-align: middle; color: #0f1115; background: var(--accent); }

/* телефон: каналы — горизонтальная лента кнопок */
@media (max-width: 759px) {
  .top { flex-wrap: wrap; gap: 8px 12px; padding: 10px 16px; position: static; }
  .logo { width: auto; }
  .search { order: 3; flex: 1 0 100%; max-width: none; }
  .lay { display: block; padding: 10px 16px; }
  .side {
    width: auto; position: static; max-height: none; overflow-x: auto; overflow-y: hidden;
    display: flex; gap: 8px; padding-bottom: 8px; margin-bottom: 12px; scrollbar-width: none;
  }
  .side::-webkit-scrollbar { display: none; }
  .side .h { display: none; }
  .side a.c { flex: 0 0 auto; margin: 0; background: var(--panel); border-radius: 16px; padding: 6px 12px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px 10px; }
  .vt { font-size: 17px; }
}
