/* onyxbot.live: „Jeden wieczór na kanale”. Rozdziały po lewej, ekran streama przyklejony po prawej,
   pod nim oś streama z zegarem. Warstwy na ekranie są w układzie 1920×1080 (stream.js je skaluje).
   Dalej: lista wszystkich funkcji, 3 kroki, cennik z jednym planem i okna (lista gier, panel). */

/* ------------------------------------------------------------- sekcja */
.show { margin-top: 18px; padding: 40px 40px 8px; }
.show-head { max-width: 640px; }
.show-head h2 { font: 500 clamp(26px, 2.8vw, 38px)/1.12 var(--f); color: #fff; text-wrap: balance; }
.show-head p { margin: 12px 0 0; color: var(--dim); font-size: 15px; }

.show-body {
  display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.6fr);
  gap: 56px; margin-top: 12px;
}
.chapters { grid-column: 1; grid-row: 1; }
.tv-col { grid-column: 2; grid-row: 1; padding-bottom: 40px; }
.tv-stick { position: sticky; top: 24px; }

/* --------------------------------------------------------------- ekran */
.tv {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden; isolation: isolate; border-radius: 22px;
  background: #100d0d url(oprawa/przejscia/scena-minecraft.webp) center / cover no-repeat;
  box-shadow: 0 0 0 1px rgba(255, 240, 230, .14), 0 40px 90px rgba(0, 0, 0, .5), 0 0 140px rgba(214, 112, 58, .14);
}
.tv-in { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; transform-origin: 0 0; background: #100d0d; }
@media (max-width: 760px) { .tv-in { transition: transform .6s cubic-bezier(.23, 1, .32, 1); } }
.tv-bg { position: absolute; inset: 0; background: center / cover no-repeat; opacity: 0; transition: opacity .7s ease; }
.tv-bg.on { opacity: 1; }
.tv-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12, 9, 9, .4), rgba(12, 9, 9, .12) 35%, rgba(12, 9, 9, .5)); }
/* cięcie między scenami: krótki „oddech” obrazu, jak przejście w OBS */
.tv.cut .tv-in { animation: cut .55s cubic-bezier(.23, 1, .32, 1); }
@keyframes cut { from { filter: brightness(1.35) saturate(.7); } }

.ly { position: absolute; opacity: 0; transition: opacity .5s ease; }
.ly.on { opacity: 1; }
.ly-full { left: 0; top: 0; border: 0; background: transparent; }
.ly-crop { overflow: hidden; transform-origin: 0 0; }
.ly-crop iframe { position: absolute; border: 0; background: transparent; }
.ly[data-ly="ludziki"] { z-index: 1; }
.ly[data-ly="cel"] { z-index: 1; }
.ly[data-ly="chat"], .ly[data-ly="pchat"], .ly[data-ly="game"] { z-index: 2; }
.ly[data-ly="emotki"], .ly[data-ly="alert"] { z-index: 3; }
.ly[data-ly="panel"] { z-index: 4; background: #141312; }

/* napisy na ekranie (poza skalowaną warstwą, żeby były ostre) */
.tv-hud { position: absolute; z-index: 5; left: 14px; top: 14px; display: flex; gap: 6px; transition: opacity .3s ease; }
.tv-live, .tv-clock {
  display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 10px; border-radius: 8px;
  font: 500 11px/1 var(--mono); letter-spacing: .06em;
}
.tv-live { text-transform: uppercase; color: #fff; background: #e5323f; }
.tv-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: blink 1.6s ease-in-out infinite; }
.tv-clock { color: #fff; background: rgba(12, 10, 10, .66); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); font-variant-numeric: tabular-nums; }
@keyframes blink { 50% { opacity: .25; } }
.tv[data-scene="panel"] .tv-hud { opacity: 0; }

.tv-cmd {
  position: absolute; z-index: 5; left: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 8px;
  height: 32px; padding: 0 12px; border-radius: 10px; background: rgba(12, 10, 10, .72);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font: 500 13px/1 var(--mono); color: var(--cream);
  opacity: 0; translate: 0 6px; transition: opacity .3s ease, translate .3s ease;
}
.tv-cmd.on { opacity: 1; translate: 0 0; }
.tv-cmd b { font: 500 12px/1 var(--f); color: var(--orange); }
.tv-cmd span::after { content: ""; display: inline-block; width: 7px; height: 14px; margin-left: 2px; vertical-align: -2px; background: var(--kick); animation: blink 1s steps(1) infinite; }

/* czat ze scenariuszem (scena „punkty”), w pikselach ekranu 1920×1080 */
.pc {
  left: 1080px; top: 190px; width: 780px; height: 720px; display: flex; flex-direction: column; overflow: hidden;
  border-radius: 40px; background: rgba(16, 13, 13, .84); color: #f6f1ee;
  box-shadow: inset 0 0 0 2px rgba(255, 240, 230, .12), 0 30px 80px rgba(0, 0, 0, .5);
  font: 400 30px/1.45 var(--f);
}
.pc-bar { display: flex; align-items: center; gap: 16px; padding: 30px 38px; border-bottom: 2px solid rgba(255, 240, 230, .1); font-size: 28px; }
.pc-bar i { width: 16px; height: 16px; border-radius: 50%; background: var(--kick); box-shadow: 0 0 16px var(--kick); }
.pc-bar code { margin-left: auto; padding: 8px 18px; border-radius: 14px; background: rgba(255, 255, 255, .07); font: 500 26px var(--mono); color: var(--cream); }
.pc ul { flex: 1; list-style: none; margin: 0; padding: 30px 38px; display: flex; flex-direction: column; justify-content: flex-end; gap: 16px; overflow: hidden; }
.pc li { animation: in .35s ease-out; overflow-wrap: anywhere; }
.pc li b { font-weight: 500; }
.pc li.bot { padding: 16px 22px; border-radius: 22px; background: rgba(83, 252, 24, .09); box-shadow: inset 0 0 0 2px rgba(83, 252, 24, .22); }
.pc li.bot b { color: var(--kick); }
.pc img { display: inline-block; height: 46px; width: auto; vertical-align: -12px; }

/* ---------------------------------------------------------- oś streama */
.tl { position: relative; height: 58px; margin: 18px 6px 0; }
.tl-track { position: absolute; left: 0; right: 0; top: 8px; height: 4px; border-radius: 4px; background: rgba(255, 240, 230, .1); }
.tl-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: inherit; background: linear-gradient(90deg, rgba(83, 252, 24, .2), var(--kick)); }
.tl-head {
  position: absolute; top: 50%; left: 0; width: 12px; height: 12px; translate: -50% -50%; border-radius: 50%;
  background: #fff; box-shadow: 0 0 0 4px rgba(83, 252, 24, .22), 0 0 16px rgba(83, 252, 24, .55);
}
.tl-marks { list-style: none; margin: 0; padding: 0; }
.tl-marks li { position: absolute; top: 0; left: var(--at); translate: -50% 0; }
.tl-marks li:first-child { translate: -7px 0; }
.tl-marks li:last-child { translate: calc(-100% + 7px) 0; }
.tl-marks a {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 0 2px; text-decoration: none; color: var(--faint);
  transition: color .2s ease;
}
.tl-marks li:first-child a { align-items: flex-start; }
.tl-marks li:last-child a { align-items: flex-end; }
.tl-marks a::before {
  content: ""; width: 10px; height: 10px; margin: 5px 2px 8px; border-radius: 50%;
  background: #2b2625; box-shadow: inset 0 0 0 2px rgba(255, 240, 230, .28); transition: background-color .2s ease, box-shadow .2s ease;
}
.tl-marks a.past::before { background: var(--kick); box-shadow: none; }
.tl-marks time { font: 500 11px/1.2 var(--mono); font-variant-numeric: tabular-nums; }
.tl-marks span { font-size: 12px; line-height: 1.2; white-space: nowrap; }
.tl-marks a:hover, .tl-marks a[aria-current] { color: #fff; }
.tl-marks a[aria-current] time { color: var(--kick); }

/* ------------------------------------------------------------ rozdziały */
.ch {
  min-height: 88vh; display: flex; flex-direction: column; justify-content: center; padding: 48px 0;
  opacity: .3; transition: opacity .45s ease; scroll-margin-top: 6vh;
}
.ch.on { opacity: 1; }
.ch:first-child { min-height: 76vh; justify-content: flex-start; padding-top: 18vh; }
.ch-when { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; font-size: 13px; color: var(--dim); }
.ch-when time {
  padding: 6px 9px; border-radius: 8px; font: 500 12px/1 var(--mono); color: var(--kick); font-variant-numeric: tabular-nums;
  background: rgba(83, 252, 24, .08); box-shadow: inset 0 0 0 1px rgba(83, 252, 24, .28);
}
.ch-when code { font-size: 12.5px; }
.ch h3 { font: 500 clamp(24px, 2.3vw, 32px)/1.16 var(--f); color: #fff; text-wrap: balance; }
.ch h3 + p { margin: 14px 0 0; max-width: 430px; color: var(--dim); font-size: 15.5px; }
.ch-ctrl { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.ch-ctrl button {
  display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border-radius: 12px; cursor: pointer;
  background: var(--glass-2); border: 1px solid var(--line); color: var(--dim); font: 400 13.5px var(--f);
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.ch-ctrl button:hover { color: #fff; background: rgba(255, 246, 240, .14); }
.ch-ctrl button[aria-pressed="true"] { color: #fff; background: rgba(83, 252, 24, .1); border-color: rgba(83, 252, 24, .5); }
.ch-cmds button { font: 500 13px var(--mono); color: var(--cream); }
.ch-more { margin: 18px 0 0; max-width: 430px; font-size: 13px; color: var(--faint); }
.ch-more a { color: var(--dim); text-underline-offset: 3px; }
.ch-more a:hover { color: #fff; }
.ch-all {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; padding: 6px 0; cursor: pointer;
  background: none; border: 0; color: var(--ink); font: 400 14px var(--f);
  text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(255, 255, 255, .3);
}
.ch-all:hover { text-decoration-color: #fff; }
.ch-all svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: translate .2s ease; }
.ch-all:hover svg { translate: 3px 0; }
/* motyw gier: podpis grupy i kropki kolorów na przyciskach */
.ch-label { margin: 28px 0 0; font: 500 12px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.ch-label + .ch-ctrl { margin-top: 12px; }
.sw { display: inline-flex; flex: none; margin-right: 9px; }
.sw i { width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22), 0 0 0 1.5px #2b2524; }
.sw i + i { margin-left: -4px; }
.ch-themes button[aria-pressed="true"] .sw i { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22), 0 0 0 1.5px #2f3a22; }
.ch-acts { display: flex; align-items: center; flex-wrap: wrap; gap: 22px; margin-top: 24px; }

/* ---------------------------------------------------- wszystkie funkcje */
.all { margin-top: 18px; padding: 34px 40px 38px; }
.all-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 44px; margin-top: 6px; }
.all-col h3 {
  padding-bottom: 14px; border-bottom: 1px solid var(--line-2);
  font: 500 11.5px/1 var(--f); letter-spacing: .12em; text-transform: uppercase; color: var(--faint);
}
.all-col ul { list-style: none; margin: 0; padding: 0; }
.all-col li { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.all-col li b { font-weight: 400; font-size: 14.5px; color: var(--ink); }
.all-col li span { font-size: 12.5px; color: var(--faint); text-align: right; }
.all-col li code { font-size: 12px; white-space: nowrap; }

/* ---------------------------------------------------------------- kroki */
.steps { margin-top: 18px; padding: 34px 40px 38px; }
.steps-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; counter-reset: k; }
.steps-list li { counter-increment: k; padding: 22px 22px 24px; border-radius: 22px; background: var(--glass-2); border: 1px solid var(--line); }
.steps-list li::before {
  content: counter(k); display: grid; place-items: center; width: 32px; height: 32px; margin-bottom: 18px; border-radius: 50%;
  font: 500 13px/1 var(--mono); color: #0b1408; background: var(--kick);
}
.steps-list b { display: block; font-weight: 500; font-size: 17px; color: #fff; }
.steps-list span { display: block; margin-top: 6px; font-size: 14px; color: var(--dim); }

/* ---------------------------------------------------- cennik: jeden plan */
.pricing .plan-one {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); align-items: center; gap: 40px; padding: 34px 40px;
  background: radial-gradient(60% 100% at 0% 0%, rgba(236, 120, 62, .24), transparent 70%), var(--glass);
}
.plan-l { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.plan-l .btn { margin-top: 18px; }
.plan-one .plan-ticks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 30px; margin: 0; font-size: 14.5px; }

/* ------------------------------------------------------------------ okna */
.dlg {
  width: min(980px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 48px); padding: 0; border: 0; border-radius: 28px;
  background: #231f1e; color: var(--ink); overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255, 240, 230, .12), 0 50px 120px rgba(0, 0, 0, .6);
}
.dlg[open] { display: flex; flex-direction: column; }
.dlg::backdrop { background: rgba(10, 8, 8, .62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.dlg[open] { animation: dlg-in .28s cubic-bezier(.23, 1, .32, 1); }
@keyframes dlg-in { from { opacity: 0; transform: translateY(12px) scale(.985); } }
.dlg-bar { display: flex; align-items: center; gap: 12px; padding: 22px 22px 0 28px; }
.dlg-bar h2 { font: 500 22px/1.2 var(--f); color: #fff; }
.dlg-x {
  display: grid; place-items: center; flex: none; width: 40px; height: 40px; margin-left: auto; border-radius: 12px; cursor: pointer;
  background: var(--glass-2); border: 1px solid var(--line); color: var(--ink);
}
.dlg-x:hover { background: rgba(255, 246, 240, .16); }
.dlg-x svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.dlg-sub { margin: 6px 28px 0; color: var(--dim); font-size: 14px; }
.dlg-foot { margin: 0 28px; padding: 14px 0 20px; border-top: 1px solid var(--line); color: var(--faint); font-size: 13px; }
.gd-list:has(+ .dlg-foot) { padding-bottom: 14px; }
.gd-list {
  list-style: none; margin: 18px 0 0; padding: 0 22px 24px; overflow: auto; min-height: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px;
}
.gd-list button {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 4px 12px; width: 100%; height: 100%;
  padding: 14px 16px; border-radius: 16px; text-align: left; cursor: pointer;
  background: var(--glass); border: 1px solid var(--line); color: var(--ink); font: 400 14.5px/1.3 var(--f);
  transition: background-color .15s ease, border-color .15s ease;
}
.gd-list button b { font-weight: 400; }
.gd-list button code { font-size: 11.5px; }
.gd-list button span { font-size: 11.5px; color: var(--kick); white-space: nowrap; }
.gd-list button small { grid-column: 1 / -1; font-size: 12.5px; color: var(--dim); }
.gd-list button:hover { background: rgba(255, 246, 240, .1); }
.gd-list button[aria-current] { border-color: rgba(83, 252, 24, .5); background: rgba(83, 252, 24, .08); }
.td-body { overflow: auto; min-height: 0; padding: 0 0 24px; }
.td-h { margin: 22px 28px 0; font: 500 15px/1.2 var(--f); color: #fff; }
.td-sub { margin: 4px 28px 0; font-size: 13px; color: var(--faint); }
.td-list { margin-top: 12px; padding-bottom: 0; overflow: visible; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.td-list button { grid-template-columns: auto minmax(0, 1fr); align-items: center; }
.td-list button .sw { grid-row: span 2; margin-right: 4px; }
.td-list button .sw i { width: 16px; height: 16px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22), 0 0 0 2px #2b2524; }
.td-list button .sw i + i { margin-left: -6px; }
.td-list button small { grid-column: 2; }
.al-list { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.al-list button { grid-template-columns: minmax(0, 1fr); align-content: start; }
.al-list button img {
  display: block; width: 100%; height: auto; aspect-ratio: 560 / 202; object-fit: contain; margin-bottom: 8px; padding: 8px;
  border-radius: 10px; background: rgba(0, 0, 0, .28);
}
.al-list button small { grid-column: 1; }

.dlg-panel { width: min(1480px, calc(100vw - 32px)); height: calc(100dvh - 48px); }
.dlg-panel h2 { font: 500 14px/1 var(--mono); color: #fff; }
.pd-host { color: var(--faint); }
.pd-note { padding: 5px 10px; border-radius: 999px; font-size: 12px; color: #ffe98a; background: rgba(230, 204, 46, .12); }
.pd-page { position: relative; flex: 1; min-height: 0; margin: 0 16px 16px; overflow: hidden; border-radius: 22px; background: #2a2524; box-shadow: inset 0 0 0 1px rgba(255, 240, 230, .07); }
.pd-page iframe { position: absolute; left: 0; top: 0; border: 0; transform-origin: 0 0; }

/* ------------------------------------------------------ mniejsze ekrany */
@media (max-width: 1100px) {
  .show { padding: 30px 26px 4px; }
  .show-body { grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 20px; }
  .tv-col, .chapters { grid-column: 1; grid-row: auto; }
  /* ekran przykleja się u góry, rozdziały przewijają się pod nim */
  .tv-col {
    position: sticky; top: 0; z-index: 3; padding: 10px 0 12px; margin: 0 -14px; padding-inline: 14px;
    background: rgba(40, 35, 34, .94); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border-radius: 0 0 22px 22px;
  }
  .tv-stick { position: static; }
  .tl { height: 40px; margin-top: 12px; }
  .tl-marks span { display: none; }
  .ch, .ch:first-child { min-height: 64vh; justify-content: center; padding: 40px 0; scroll-margin-top: 42vw; }
  .all-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .all-col:last-child { grid-column: 1 / -1; }
  .pricing .plan-one { grid-template-columns: minmax(0, 1fr); gap: 26px; }
}
@media (max-width: 760px) {
  .show, .all, .steps { padding: 22px 18px; }
  .tv { border-radius: 14px; }
  .tv-hud { left: 8px; top: 8px; }
  .tv-live, .tv-clock { height: 22px; padding: 0 7px; font-size: 10px; }
  .tv-cmd { left: 8px; bottom: 8px; height: 26px; font-size: 11.5px; }
  .tv-col { margin: 0 -18px; padding: 8px 18px 10px; }
  .tl { margin-inline: 2px; }
  .ch, .ch:first-child { min-height: 58vh; scroll-margin-top: calc(56vw + 70px); }
  .ch h3 { font-size: 24px; }
  .ch h3 + p { font-size: 15px; }
  .all-cols { grid-template-columns: minmax(0, 1fr); }
  .all-col + .all-col { margin-top: 26px; }
  .steps-list { grid-template-columns: minmax(0, 1fr); }
  .pricing .plan-one { padding: 24px 20px; }
  .plan-one .plan-ticks { grid-template-columns: minmax(0, 1fr); }
  .dlg { border-radius: 22px; }
  .dlg-panel { width: calc(100vw - 16px); height: calc(100dvh - 16px); max-height: none; }
  .pd-page { margin: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .ch { opacity: 1; }
}
