:root {
  color-scheme: dark;
  --bg: #101012;
  --panel: #19191d;
  --line: #303036;
  --white: #f6f4f2;
  --muted: #b2adb1;
  --red: #ff5c43;
  --black: #171211;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--white);
  background: var(--bg);
  font-synthesis: none;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 300px; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--red); outline-offset: 4px; }
[hidden] { display: none !important; }
.symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 20px; height: 20px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.shell { width: min(1280px, calc(100% - 88px)); margin-inline: auto; }
.topbar { border-bottom: 1px solid #28282d; background: #111114; }
.header-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 26px; }
.brand { display: inline-flex; gap: 12px; align-items: center; font-size: 18px; font-weight: 900; line-height: .98; letter-spacing: -.04em; }
.brand img { width: 38px; height: 38px; }
.brand-sub { display: block; margin-top: 3px; color: var(--red); font-size: 10px; letter-spacing: .2em; }
.main-nav, .top-actions { display: flex; gap: 25px; align-items: center; }
.main-nav a { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: #cbc7cb; white-space: nowrap; }
.main-nav a:hover { color: var(--white); }
.main-nav .icon { width: 16px; height: 16px; }
.preview-chip { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.preview-chip i, .section-label i { width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 46px; padding: 0 16px; border-radius: 8px; border: 1px solid transparent; font-size: 14px; font-weight: 750; white-space: nowrap; transition: background .18s, border-color .18s, color .18s; }
.telegram-link { background: #222226; border-color: #33333a; min-height: 39px; padding-inline: 12px; }
.telegram-link .icon:first-child { color: var(--red); }
.arrow-small { width: 15px; height: 15px; color: var(--muted); }
.primary { background: var(--red); color: var(--black); }
.primary:hover { background: #ff806a; }
.secondary { background: #18181de3; color: var(--white); border-color: #454148; }
.secondary:hover, .telegram-link:hover { background: #323037; border-color: #5b535a; }
.hero { position: relative; isolation: isolate; min-height: 431px; margin-top: 28px; border: 1px solid #3b2627; border-radius: 19px; overflow: hidden; display: flex; align-items: center; background: #211418; }
.hero-image, .hero::after { position: absolute; inset: 0; z-index: -1; }
.hero-image { background: radial-gradient(ellipse at 77% 45%, #ab312a, transparent 57%), linear-gradient(111deg, #0d0b0d 34%, #502125); background-image: url('assets/hero.jpg'), radial-gradient(ellipse at 77% 45%, #ab312a, transparent 57%); background-position: center 52%; background-size: cover; }
.hero::after { content: ''; background: linear-gradient(90deg, #0d0b0e 1%, #0d0b0ee8 20%, #0d0b0e35 65%, transparent), linear-gradient(0deg, #100b109c, transparent 38%); }
.hero-copy { padding: 39px 0 43px clamp(25px, 5.5vw, 84px); }
.eyebrow { display: flex; gap: 9px; align-items: center; margin: 0; font: 750 11px/1.3 ui-monospace, 'Cascadia Code', Consolas, monospace; letter-spacing: .16em; }
.hero .eyebrow { color: #fcd7d1; }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px #ff5c4333; }
h1, h2, h3, p { margin-block: 0; }
.hero h1 { margin: 20px 0 17px; font-family: 'Arial Black', system-ui, sans-serif; font-size: clamp(55px, 7.2vw, 115px); font-weight: 950; letter-spacing: -.079em; line-height: .84; }
.hero h1 span { display: block; color: var(--red); margin-top: .09em; }
.hero-description { font-size: 15px; color: #e1d7d8; line-height: 1.55; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.hero-index { position: absolute; right: 24px; bottom: 19px; font: 700 11px/1.5 Consolas, monospace; letter-spacing: .14em; color: #ffcbc8; }
.hero-index span { color: white; }
.catalog { padding-top: 37px; scroll-margin-top: 18px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 14px; }
.section-label { color: var(--red); }
h2 { font-size: clamp(28px, 4.1vw, 42px); font-weight: 830; line-height: 1.05; letter-spacing: -.055em; }
.section-heading h2, .series h2 { margin-top: 8px; }
.search { display: flex; align-items: center; gap: 9px; width: min(100%, 270px); padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: #18181c; }
.search input { height: 42px; width: 100%; min-width: 0; border: 0; background: transparent; color: var(--white); font-size: 13px; }
.search:focus-within { border-color: var(--red); }
.search input:focus-visible { outline: none; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-block: 18px 15px; }
.filter { min-height: 34px; padding-inline: 12px; border-radius: 7px; border: 1px solid var(--line); background: #1a1a1e; color: #c9c4c8; font-size: 13px; font-weight: 650; }
.filter:hover { border-color: #666067; color: white; }
.filter[aria-pressed='true'] { border-color: #9e4538; background: #38201e; color: #ffa491; }
.catalog-status { margin-left: auto; font: 650 11px/1.3 Consolas, monospace; letter-spacing: .07em; color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; width: 100%; min-width: 0; padding: 0; color: inherit; text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; transition: border-color .2s, transform .2s; }
.card:hover { transform: translateY(-3px); border-color: #9e4538; }
.thumb { position: relative; width: 100%; aspect-ratio: 16 / 8.7; overflow: hidden; background: #271b22; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .26s; }
.card:hover img { transform: scale(1.045); }
.thumb::after { position: absolute; inset: 0; content: ''; background: linear-gradient(0deg, #07060872, transparent 70%); }
.thumb-tag, .play-circle { position: absolute; z-index: 1; bottom: 10px; }
.thumb-tag { right: 10px; padding: 4px 6px; border-radius: 4px; background: #111016de; font: 700 10px/1.25 Consolas, monospace; letter-spacing: .08em; }
.play-circle { left: 11px; display: grid; place-items: center; width: 37px; height: 37px; border-radius: 50%; border: 1px solid #ffffff55; background: #111014b0; }
.play-circle .icon { width: 19px; height: 19px; }
.card:hover .play-circle { color: var(--black); background: var(--red); border-color: var(--red); }
.card-copy { display: flex; flex-direction: column; gap: 5px; width: 100%; padding: 13px 14px 15px; }
.card-copy small { color: var(--red); font-size: 10px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.card-copy strong { display: block; font-size: 16px; line-height: 1.25; overflow-wrap: anywhere; }
.card-copy span { color: var(--muted); font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; }
.empty { border: 1px dashed var(--line); padding: 28px 16px; border-radius: 12px; text-align: center; }
.empty p { margin-block: 7px 15px; color: var(--muted); }
.series { display: grid; grid-template-columns: minmax(155px, .29fr) 1fr; gap: clamp(20px, 3vw, 42px); align-items: stretch; margin-top: 30px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); scroll-margin-top: 18px; }
.series-art { min-height: 198px; display: grid; place-items: center; isolation: isolate; position: relative; overflow: hidden; border-radius: 9px; background: repeating-linear-gradient(146deg, #222915 0 2px, #202619 2px 7px); color: #e2ffad; }
.series-art::before, .series-art i { position: absolute; content: ''; inset: 5% 17%; z-index: -1; border: 1px solid #d2ff8575; border-radius: 50%; transform: rotate(-36deg); box-shadow: 0 0 43px #92db4552, inset 0 0 43px #92db4540; }
.series-art i { inset: 15% 24%; transform: rotate(36deg); }
.series-art span { font: 950 clamp(28px, 4.3vw, 54px)/1 system-ui, sans-serif; letter-spacing: -.1em; transform: skew(-8deg); }
.series-content { min-width: 0; padding-block: 9px; }
.series-content .muted { margin-top: 7px; }
.series-heading { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.season-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-block: 12px; }
.season-tabs button { min-height: 31px; font-size: 12px; padding-inline: 9px; }
.season-results p { color: var(--muted); font-size: 13px; line-height: 1.5; }
.season-results a { color: #ff9d8d; text-decoration: underline; }
.season-results .queue-item { width: min(100%, 560px); }
.support { display: flex; align-items: center; gap: 17px; margin-top: 24px; padding: 21px; border: 1px solid #4d312e; border-radius: 13px; background: linear-gradient(108deg, #301d1d, #1d191d 65%); scroll-margin-top: 18px; }
.support-icon { display: grid; place-items: center; width: 51px; height: 51px; border-radius: 11px; background: #ff5c432b; color: var(--red); flex: none; }
.support .eyebrow { color: var(--red); font-size: 9px; }
.support h2 { margin-block: 4px 5px; font-size: 22px; }
.support-copy > p:last-child, .muted { font-size: 13px; color: var(--muted); }
.support-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 27px; padding-block: 18px 23px; border-top: 1px solid #2c2b30; color: var(--muted); font-size: 12px; }
.footer span:first-child { color: var(--white); font-weight: 850; letter-spacing: .04em; }
.share-section { margin-top: 20px; padding: 24px; border: 1px solid var(--line); border-radius: 13px; background: #17171c; }
.share-section h2 { font-size: clamp(20px, 3vw, 26px); margin-block: 8px; }
.share-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; }
.share-status:empty { display: none; }
.share-status { margin-top: 12px; overflow-wrap: anywhere; }
.watch-share-status { padding: 0 3px 8px; }
.share-fallback { display: block; width: 100%; margin-top: 8px; padding: 9px; border: 1px solid #47434b; border-radius: 6px; background: #222227; color: var(--white); }
.advertiser-note { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.advertiser-note a { color: #ffc2b7; text-decoration: underline; text-underline-offset: 3px; }

.dialog { width: min(calc(100% - 28px), 1110px); max-height: calc(100dvh - 28px); padding: 0; border: 1px solid #4b4249; border-radius: 15px; color: var(--white); background: #16161a; }
.dialog::backdrop { background: #08070adb; backdrop-filter: blur(5px); }
body:has(dialog[open]) { overflow: hidden; }
.dialog-bar { display: flex; align-items: center; justify-content: space-between; padding: 11px 15px; border-bottom: 1px solid var(--line); color: var(--red); }
.close { display: grid; place-items: center; width: 35px; height: 35px; border: 1px solid var(--line); border-radius: 7px; background: #212126; color: var(--white); }
.close:hover { background: #39343c; }
.watch {
  width: min(calc(100% - 40px), 1700px);
  border-radius: 17px;
  background: radial-gradient(ellipse at 14% 38%, #2d1b21, transparent 72%), #141418;
}
.watch .dialog-bar { background: #141418; }
.watch-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(255px, 26%, 380px);
  align-items: start;
  gap: clamp(12px, 1.7vw, 26px);
  padding: clamp(12px, 1.7vw, 26px);
}
.watch-main { min-width: 0; }
.screen { display: grid; place-items: center; min-height: 128px; border-radius: 12px; border: 1px solid #313036; background: #0a0a0c; overflow: hidden; }
.screen-frame { position: relative; width: 100%; container-type: inline-size; }
.screen-frame > video, .screen > iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; background: #0a0a0c; }
.screen-frame > video { object-fit: contain; }
.screen-frame.is-upscaled > video { opacity: 0; pointer-events: none; }
.upscale-frame { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; cursor: pointer; }
.upscale-controls {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  align-items: center;
  gap: clamp(4px, 1.4cqw, 14px);
  padding: 14px 8px 5px;
  background: linear-gradient(transparent, #000b);
  opacity: 0;
  color: #fff;
}
.screen-frame:hover .upscale-controls, .screen-frame:focus-within .upscale-controls { opacity: 1; }
@media (hover: none) { .upscale-controls { opacity: 1; } }
.upscale-controls button { border: 0; background: transparent; color: inherit; padding: 4px; min-width: 26px; min-height: 26px; }
.upscale-controls input { margin: 0; accent-color: var(--red); }
.upscale-seek { flex: 1; min-width: 0; }
.upscale-time { flex: none; white-space: nowrap; font-size: clamp(10px, 2.7cqw, 13px); font-variant-numeric: tabular-nums; }
.upscale-volume { width: clamp(26px, 10cqw, 88px); }
.screen:fullscreen { border: 0; border-radius: 0; background: #000; }
.screen:fullscreen .screen-frame { width: min(100vw, calc(100dvh * 16 / 9)); }
.exit-fullscreen { display: none; position: absolute; top: 8px; right: 8px; transition: opacity .2s; }
.screen:fullscreen .exit-fullscreen { display: inline-flex; }
.screen:fullscreen.fullscreen-idle .exit-fullscreen:not(:focus-visible) { opacity: 0; pointer-events: none; }
.player-channel {
  position: absolute;
  top: 0;
  left: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17cqw;
  min-height: 4.4cqw;
  padding: 0 7px;
  border-radius: 0 0 7px 0;
  isolation: isolate;
  color: var(--white);
  font-size: clamp(10px, 1.5cqw, 16px);
  line-height: 1;
  font-weight: 750;
  text-shadow: 0 1px 3px #000;
}
.player-channel::before {
  content: '';
  position: absolute;
  inset: 0.7cqw auto 0.2cqw 0.7cqw;
  z-index: -1;
  width: 14.8cqw;
  border-radius: 3px;
  background: linear-gradient(90deg, #16161a calc(100% - 2px), transparent);
  mask-image: linear-gradient(#000 calc(100% - 1px), transparent);
}
.player-channel:hover { color: var(--red); }
.screen-message { padding: 14px; color: #c3bdc1; font-size: 13px; text-align: center; }
.telegram-embed { width: 100%; display: grid; justify-items: center; padding: 12px; }
.telegram-embed iframe { max-width: 100%; }
.watch-meta { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 14px; padding-block: 14px 3px; }
.watch-meta h2 { margin-block: 5px 6px; font-size: clamp(24px, 3vw, 32px); overflow-wrap: anywhere; }
.watch-meta p:not(.eyebrow) { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.video-actions, .profile-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-top: 10px; }
.profile-recent { margin-top: 8px; }
.profile-actions button:disabled { opacity: .58; cursor: default; }
.video-actions label { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.video-actions select { min-height: 40px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--white); padding: 0 8px; }
.video-actions button[aria-pressed='true'] { border-color: var(--red); color: var(--red); }
.top-actions { gap: 9px; }
.watch-next { display: flex; flex-direction: column; min-width: 0; max-height: clamp(290px, 72dvh, 810px); border: 1px solid var(--line); border-radius: 12px; background: #1e1e23; }
.watch-playlist-header { padding: 14px 14px 10px; border-bottom: 1px solid var(--line); }
.watch-playlist-top { display: flex; align-items: start; justify-content: space-between; gap: 8px; }
.watch-playlist-top .icon { width: 16px; height: 16px; }
#watch-playlist-title { margin-top: 5px; font-size: 18px; line-height: 1.22; overflow-wrap: anywhere; }
.watch-position { margin-top: 3px; color: var(--muted); font-size: 12px; }
.watch-steps { display: flex; gap: 5px; }
.watch-steps .close:disabled { color: #827b83; cursor: default; background: transparent; }
.watch-autonext { display: flex; align-items: center; gap: 7px; margin-top: 12px; font-size: 12px; line-height: 1.25; }
.watch-autonext input { flex: 0 0 auto; margin: 0; width: 16px; height: 16px; accent-color: var(--red); }
.watch-queue { min-height: 0; padding: 9px; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.queue-group + .queue-group { margin-top: 15px; }
.queue-heading { margin: 5px 5px 7px; color: #ffa491; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.queue-item { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 54px; margin-bottom: 6px; padding: 6px; text-align: left; color: inherit; border: 1px solid var(--line); border-radius: 7px; background: #212126; }
.queue-item img { display: block; flex: 0 0 auto; width: 70px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 4px; }
.queue-item span { font-size: 12px; line-height: 1.3; overflow-wrap: anywhere; }
.queue-item:hover { border-color: #a25247; background: #2b242a; }
.queue-item[aria-current='true'] { border-color: #a25247; box-shadow: inset 3px 0 var(--red); background: #382529; }
.queue-item .queue-copy { display: grid; gap: 3px; min-width: 0; }
.queue-item .queue-title { font-size: 13px; font-weight: 730; }
.queue-item .queue-description { color: var(--muted); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.queue-item .queue-index { flex: 0 0 1.1em; text-align: center; color: var(--muted); font-variant-numeric: tabular-nums; }
.queue-item[aria-current='true'] .queue-index { color: #ffa491; }
.queue-thumb { position: relative; flex: 0 0 auto; }
.watch-queue .queue-item img { width: clamp(62px, 6vw, 100px); }
.queue-item .queue-duration { color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.queue-thumb .queue-duration { position: absolute; right: 3px; bottom: 3px; padding: 2px 4px; border-radius: 3px; color: #fff; background: #0a0a0de6; }
.settings { width: min(calc(100% - 28px), 550px); }
.settings-content { padding: 19px; }
.settings-content h2 { margin-bottom: 7px; font-size: 30px; }
.settings form { display: grid; gap: 10px; margin-top: 15px; padding-top: 15px; border-top: 1px solid var(--line); }
.settings h3 { font-size: 16px; }
.settings label { display: grid; gap: 5px; color: #e3dce0; font-size: 13px; }
.settings input, .settings select, .settings textarea { width: 100%; border: 1px solid #47434b; border-radius: 7px; padding: 8px; color: var(--white); background: #222227; }
.settings textarea { resize: vertical; }
.settings .button { justify-self: start; }

@media (max-width: 960px) {
  .shell { width: calc(100% - 44px); }
  .preview-chip { display: none; }
  .header-inner { gap: 12px; }
  .main-nav { gap: 15px; }
  .hero { min-height: 391px; }
}
@media (max-width: 760px) {
  .watch { width: calc(100% - 20px); max-height: calc(100dvh - 20px); }
  .watch-layout { grid-template-columns: 1fr; gap: 12px; padding: 10px; }
  .watch-next { max-height: min(440px, 65dvh); }
  .watch-queue .queue-item img { width: 82px; }
}
@media (max-width: 680px) {
  .shell { width: calc(100% - 28px); }
  .header-inner { min-height: 60px; flex-wrap: wrap; padding-top: 9px; gap: 6px; }
  .top-actions { margin-left: auto; }
  .main-nav { order: 3; width: 100%; gap: 17px; padding: 6px 0 9px; }
  .main-nav a { font-size: 12px; }
  .hero { min-height: 367px; margin-top: 15px; border-radius: 13px; }
  .hero-copy { padding-right: 13px; }
  .hero-image { background-position: 63% 50%; }
  .hero::after { background: linear-gradient(90deg, #0d0b0ef2, #0d0b0e90 60%, #0d0b0e1f); }
  .hero h1 { font-size: clamp(49px, 12vw, 73px); }
  .hero-description { font-size: 13px; }
  .hero-index { bottom: 10px; right: 11px; }
  .catalog { padding-top: 27px; }
  .section-heading { flex-direction: column; align-items: stretch; }
  .search { width: 100%; }
  .filters { margin-top: 12px; gap: 5px; }
  .filter { font-size: 12px; padding-inline: 8px; }
  .catalog-status { width: 100%; margin-left: 0; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .card-copy { padding: 10px 9px 12px; }
  .card-copy strong { font-size: 14px; }
  .card-copy span { font-size: 11px; }
  .series { grid-template-columns: 1fr; gap: 9px; padding: 12px; }
  .series-art { min-height: 88px; }
  .series-art::before { inset: 10% 29%; }
  .series-art i { inset: 20% 34%; }
  .support { flex-wrap: wrap; gap: 11px; padding: 13px; }
  .support-copy { flex: 1; min-width: 170px; }
  .support-actions { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
