/* ===== EPISODES / VIDEOS ===== */

/* Hero + featured */
.vid-hero { position: relative; overflow: hidden; padding-block: clamp(2.4rem, 6vw, 4.5rem) clamp(2rem, 4vw, 3rem); }
.vid-hero__head { max-width: 760px; margin-bottom: 2rem; }
.vid-hero__title { font-size: clamp(2.4rem, 7vw, 5rem); text-transform: uppercase; line-height: .92; margin-top: 1rem; }

.featured-player { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 1.6rem; align-items: stretch; }
.fp-frame {
  position: relative; aspect-ratio: 16/9; width: 100%; align-self: start;
  border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--line-strong); background: #000; cursor: pointer;
}
.fp-frame img, .fp-frame iframe { width: 100%; height: 100%; object-fit: cover; border: 0; display: block; }
.fp-demo { position: absolute; inset: 0; display: grid; place-items: center; background: var(--grad-heat); }
.fp-demo .wave { height: 54px; } .fp-demo .wave i { background: rgba(27,15,8,.85); width: 6px; }
.fp-play {
  position: absolute; inset: 0; margin: auto; width: 78px; height: 78px; border-radius: 50%;
  background: rgba(0,0,0,.55); backdrop-filter: blur(4px); border: 1px solid rgba(255,255,255,.3);
  display: grid; place-items: center; transition: transform .3s var(--ease), background .3s; pointer-events: none;
}
.fp-frame:hover .fp-play { transform: scale(1.1); background: var(--grad-flame); }
.fp-play svg { width: 30px; height: 30px; fill: #fff; margin-left: 4px; }
.fp-frame:hover .fp-play svg { fill: #1b0f08; }
.fp-badge { position: absolute; top: 14px; left: 14px; z-index: 2; }

.fp-side { min-width: 0; background: linear-gradient(180deg, var(--surface), var(--bg-2)); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.5rem; display: flex; flex-direction: column; }
.fp-side .chip { align-self: flex-start; margin-bottom: 1rem; }
.fp-side h2 { font-family: var(--display); font-weight: 700; font-size: 1.4rem; line-height: 1.1; }
.fp-side .fp-meta { font-family: var(--mono); font-size: .78rem; color: var(--muted); margin: .6rem 0 1rem; }
.fp-side p { color: var(--muted); font-size: .92rem; flex: 1; margin-bottom: 1.2rem; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 1024px) {
  .featured-player { grid-template-columns: 1fr; }
  .fp-frame { align-self: stretch; }
}

/* Toolbar */
.vid-tools { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: color-mix(in oklab, var(--bg) 92%, transparent); position: sticky; top: var(--nav-h); z-index: 40; backdrop-filter: blur(12px); }
.vid-tools__bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .9rem; flex-wrap: wrap; }
.chips { display: flex; gap: .5rem; flex-wrap: wrap; }
.chip-btn { font-size: .84rem; font-weight: 500; padding: .5rem .95rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; transition: .2s; }
.chip-btn:hover { color: var(--text); border-color: var(--line-strong); }
.chip-btn.is-active { background: var(--text); color: var(--ink); border-color: var(--text); font-weight: 700; }
.vid-search { display: flex; align-items: center; gap: .5rem; padding: .55rem .9rem; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--muted); min-width: 240px; }
.vid-search:focus-within { border-color: var(--flame-2); color: var(--text); }
.vid-search input { background: none; border: 0; outline: none; width: 100%; color: var(--text); font-size: .9rem; }
.vid-status { font-family: var(--mono); font-size: .78rem; color: var(--flame-2); padding: .2rem 0 1rem; min-height: 1em; }
.vid-status a { color: var(--text); text-decoration: underline; }

/* YouTube-style grid */
.vid-list { padding-block: 1rem clamp(60px, 9vw, 120px); }
.yt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 1.4rem 1.2rem; }
.yt-card { cursor: pointer; }
.yt-thumb { position: relative; aspect-ratio: 16/9; border-radius: var(--r); overflow: hidden; background: var(--surface); }
.yt-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.yt-card:hover .yt-thumb img { transform: scale(1.06); }
.yt-thumb--demo { display: grid; place-items: center; }
.yt-thumb--demo .wave { height: 34px; } .yt-thumb--demo .wave i { width: 4px; background: rgba(27,15,8,.8); }
.yt-thumb__play { position: absolute; inset: 0; margin: auto; width: 54px; height: 54px; border-radius: 50%; background: rgba(0,0,0,.55); display: grid; place-items: center; opacity: 0; transition: opacity .3s; }
.yt-card:hover .yt-thumb__play { opacity: 1; }
.yt-thumb__play svg { width: 22px; height: 22px; fill: #fff; margin-left: 3px; }
.yt-dur { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.82); color: #fff; font-family: var(--mono); font-size: .72rem; padding: .12rem .38rem; border-radius: 6px; }
.yt-info { display: flex; gap: .8rem; padding-top: .8rem; }
.yt-avatar { width: 38px; height: 38px; flex: none; border-radius: 50%; background: var(--grad-flame); color: #1b0f08; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: .8rem; }
.yt-title { font-weight: 600; font-size: .98rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.yt-meta { color: var(--muted); font-size: .82rem; margin-top: .25rem; }
.yt-meta b { color: var(--muted); font-weight: 400; }

.yt-skel .yt-thumb { background: linear-gradient(100deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
.yt-skel .yt-title-sk { height: 12px; border-radius: 6px; background: var(--surface-2); margin-top: 1rem; }
.yt-skel .yt-title-sk.short { width: 60%; margin-top: .5rem; }
@keyframes shimmer { to { background-position: -200% 0; } }

.vid-more { text-align: center; margin-top: 3rem; }

/* ============================================================
   WATCH VIEW — full-screen, YouTube-style (opens on video click)
   ============================================================ */
.watch { position: fixed; inset: 0; z-index: 700; display: none; background: var(--bg); overflow-y: auto; overscroll-behavior: contain; }
.watch.open { display: block; }

.watch__bar {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .7rem clamp(1rem, 3vw, 2rem);
  background: color-mix(in oklab, var(--bg) 92%, transparent); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.watch__back { display: inline-flex; align-items: center; gap: .5rem; color: var(--text); font-weight: 600; font-size: .95rem; padding: .5rem .85rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); transition: .2s; }
.watch__back:hover { border-color: var(--line-strong); background: var(--surface-2); }
.watch__brand { font-family: var(--display); font-weight: 800; letter-spacing: .02em; font-size: 1.05rem; }
.watch__brand em { color: var(--flame-2); font-style: normal; }
.watch__brand .brand__tag { color: var(--flame-2); margin-left: .12rem; }

.watch__body { max-width: 1600px; margin: 0 auto; padding: clamp(1rem, 2.5vw, 2rem); display: grid; grid-template-columns: minmax(0, 1fr) 402px; gap: 1.6rem; align-items: start; }
.watch__main { min-width: 0; }
.watch__player { aspect-ratio: 16/9; background: #000; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line-strong); }
.watch__player iframe { width: 100%; height: 100%; border: 0; display: block; }
.watch__player .fp-demo { position: relative; height: 100%; }

.watch__title { font-family: var(--display); font-weight: 700; font-size: clamp(1.15rem, 2vw, 1.55rem); line-height: 1.2; margin-top: 1.1rem; }
.watch__chan { display: flex; align-items: center; gap: .7rem; margin-top: .95rem; }
.watch__avatar { width: 42px; height: 42px; flex: none; border-radius: 50%; overflow: hidden; background: var(--grad-flame); color: #1b0f08; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: .82rem; }
.watch__avatar img, .yt-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.watch__chan b { font-weight: 700; font-size: .98rem; }
.watch__chan b + span { display: block; font-family: var(--mono); font-size: .74rem; color: var(--muted); margin-top: .1rem; }

.watch__desc { margin-top: 1.1rem; padding: 1rem 1.1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.watch__stats { font-family: var(--mono); font-size: .8rem; color: var(--text); font-weight: 700; }
.watch__body-text { color: var(--muted); font-size: .9rem; line-height: 1.6; margin-top: .55rem; white-space: pre-wrap; word-break: break-word; }
.watch__body-text.is-clamped { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.watch__more { margin-top: .5rem; padding: 0; background: none; border: 0; color: var(--text); font-family: var(--mono); font-size: .82rem; font-weight: 700; cursor: pointer; }
.watch__more:hover { color: var(--flame-2); }
.watch__note { color: var(--flame-2); font-size: .85rem; margin-top: .6rem; }

/* Suggestions column */
.watch__side-head { font-family: var(--display); font-weight: 700; font-size: 1.05rem; margin-bottom: .9rem; }
.watch__suggest { display: flex; flex-direction: column; gap: .8rem; }
.sug { display: grid; grid-template-columns: 168px 1fr; gap: .7rem; cursor: pointer; border-radius: var(--r); padding: .3rem; transition: background .2s; }
.sug:hover { background: var(--surface); }
.sug:focus-visible { outline: 2px solid var(--flame-2); outline-offset: 2px; }
.sug__thumb { position: relative; aspect-ratio: 16/9; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.sug__thumb img { width: 100%; height: 100%; object-fit: cover; }
.sug__thumb--demo { display: grid; place-items: center; }
.sug__thumb--demo .wave { height: 26px; } .sug__thumb--demo .wave i { width: 3px; background: rgba(27,15,8,.8); }
.sug__dur { position: absolute; right: 6px; bottom: 6px; background: rgba(0,0,0,.82); color: #fff; font-family: var(--mono); font-size: .68rem; padding: .1rem .32rem; border-radius: 5px; }
.sug__info { min-width: 0; }
.sug__title { font-weight: 600; font-size: .9rem; line-height: 1.28; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sug__meta { color: var(--muted); font-size: .78rem; margin-top: .25rem; }

@media (max-width: 1040px) {
  .watch__body { grid-template-columns: 1fr; }
  .watch__side { border-top: 1px solid var(--line); padding-top: 1.3rem; }
}
@media (max-width: 560px) {
  .sug { grid-template-columns: 148px 1fr; }
}
