:root {
  --bg: #121214; --panel: #1b1b20; --panel2: #202027; --fg: #ECEAE4; --muted: #9a978f;
  --royal: #00338D; --green: #69BE28; --focus: #69BE28;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--fg);
  font-family: "Segoe UI", system-ui, sans-serif; overflow: hidden; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.f { outline: none; }
.f:focus, .f.kfocus { box-shadow: 0 0 0 5px var(--focus); border-radius: 12px; }

/* ---- top bar */
#top { height: 104px; display: flex; align-items: center; gap: 40px; padding: 0 56px;
  background: var(--royal); }
.brand { font-size: 44px; font-weight: 800; letter-spacing: -1px; }
.brand .c { color: #fff; }
.brand .tv { background: var(--green); color: #fff; padding: 0 10px; border-radius: 8px; margin-left: 4px; }
#tabs { display: flex; gap: 6px; background: rgba(0,0,0,.25); padding: 6px; border-radius: 14px; }
.tab { font-size: 30px; padding: 10px 28px; border-radius: 10px; color: #dfe6f5; }
.tab.on { background: rgba(255,255,255,.16); color: #fff; font-weight: 700; }
.tab.luke { background: var(--green); color: #fff; font-weight: 700; }
#clock { margin-left: auto; font-size: 30px; color: #dce6fa; }

/* ---- page */
#view { position: absolute; top: 104px; left: 0; right: 0; bottom: 0; overflow-y: auto; padding: 28px 56px 60px;
  scroll-behavior: smooth; }
h2 { font-size: 34px; margin: 22px 0 14px; font-weight: 700; }
.muted { color: var(--muted); }
.row { display: flex; gap: 22px; overflow-x: auto; padding: 8px 6px 14px; scroll-behavior: smooth; }
.row::-webkit-scrollbar, #view::-webkit-scrollbar { display: none; }
.grid { display: flex; flex-wrap: wrap; gap: 26px; padding: 8px 6px; }
.card { width: 210px; flex: 0 0 auto; text-align: left; }
.card .pic { width: 210px; height: 315px; border-radius: 12px; background: var(--panel2) center/cover no-repeat;
  display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 700; text-align: center;
  padding: 10px; position: relative; overflow: hidden; }
.card .pic .prog { position: absolute; left: 0; bottom: 0; height: 8px; background: var(--green); }
.card .cap { font-size: 22px; margin-top: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .sub { font-size: 18px; color: var(--muted); }
.card.wide { width: 340px; }
.card.wide .pic { width: 340px; height: 191px; }
.more { width: 210px; height: 315px; border-radius: 12px; background: var(--panel); font-size: 26px; }

/* ---- show page (season covers left, episodes right) */
.show { display: flex; gap: 34px; height: calc(100vh - 104px - 88px); }
.show .left { flex: 1; overflow-y: auto; }
.show .left::-webkit-scrollbar, .eps::-webkit-scrollbar { display: none; }
.show .right { width: 40%; display: flex; flex-direction: column; }
.showtabs { display: flex; gap: 6px; margin-bottom: 16px; align-items: center; }
.showtabs .tab { background: var(--panel); }
.showtabs .tab.on { background: var(--green); }
.showtabs .surprise { margin-left: auto; font-size: 24px; padding: 8px 20px; background: var(--panel); border-radius: 10px; }
.seasons { display: flex; flex-wrap: wrap; gap: 22px; padding: 6px; }
.season { width: 190px; background: var(--panel); border-radius: 14px; padding: 10px 10px 8px; text-align: center; }
.season .pic { width: 170px; height: 255px; border-radius: 10px; background: var(--panel2) center/cover no-repeat;
  display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 700; }
.season .cap { font-size: 22px; font-weight: 700; margin-top: 8px; }
.season .sub { font-size: 17px; color: var(--muted); }
.season.on { box-shadow: 0 0 0 4px var(--green); }
.ephead { font-size: 34px; font-weight: 700; margin: 4px 0 12px; }
.eps { flex: 1; overflow-y: auto; padding: 6px; }
.ep { display: flex; width: 100%; gap: 18px; align-items: center; text-align: left; font-size: 24px; padding: 16px 18px;
  border-radius: 12px; background: var(--panel); margin-bottom: 10px; }
.ep:nth-child(even) { background: var(--panel2); }
.ep .n { width: 54px; color: var(--muted); font-weight: 700; }
.ep .t { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep .d { color: var(--muted); font-size: 20px; }
.ep .seen { color: var(--green); font-size: 20px; }

/* ---- player */
#player { position: fixed; inset: 0; background: #000; z-index: 10; }
#video { width: 100%; height: 100%; background: #000; }
#osd { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 60px 34px;
  background: linear-gradient(transparent, rgba(0,0,0,.85) 40%); transition: opacity .3s; }
#osd.hide { opacity: 0; pointer-events: none; }
#osd-title { font-size: 34px; font-weight: 700; margin-bottom: 18px; }
#bar { height: 10px; background: rgba(255,255,255,.25); border-radius: 5px; overflow: hidden; }
#bar-fill { height: 100%; width: 0; background: var(--green); }
#osd-row { display: flex; align-items: center; gap: 30px; margin-top: 18px; font-size: 26px; }
.osd-btns { flex: 1; display: flex; justify-content: center; gap: 18px; }
.pbtn { font-size: 28px; padding: 12px 26px; background: rgba(255,255,255,.12); border-radius: 12px; }
.pbtn.big { font-size: 34px; padding: 12px 38px; background: var(--royal); }
#pmsg { position: absolute; top: 40%; width: 100%; text-align: center; font-size: 40px; text-shadow: 0 2px 8px #000; }

#toast { position: fixed; top: 130px; left: 50%; transform: translateX(-50%); background: var(--royal);
  border: 2px solid var(--green); padding: 16px 30px; border-radius: 14px; font-size: 26px; display: none; z-index: 20; }

/* ---- PIN page */
.pinwrap { height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px; }
.pinwrap h1 { font-size: 48px; margin: 0; }
.dots { font-size: 60px; letter-spacing: 18px; min-height: 80px; }
.pad { display: grid; grid-template-columns: repeat(3, 130px); gap: 18px; }
.pad button { height: 110px; font-size: 44px; background: var(--panel); border-radius: 18px; }
