/* ============================================================================
   MUNO — "Night Cinema"
   Visual language derived from the official MunoWatch mark:
     · the field   #00002f  (their brand navy)   → deep space canvas
     · the "W"     #009900  (their green)        → primary action / liveness
     · the "M"     #b9bfd4  (their light grey)   → quiet text & structure
     · the selected tint #fed776 (their gold)    → attention, active, featured
   Everything else is geometry: hairline borders, 18px radii, generous air,
   one accent per view, motion only where it explains something.
   ========================================================================== */

:root {
  --void: #04041c;
  --navy: #00002f;
  --navy-2: #07073a;
  --panel: rgba(255, 255, 255, .045);
  --panel-2: rgba(255, 255, 255, .075);
  --line: rgba(255, 255, 255, .085);
  --line-soft: rgba(255, 255, 255, .05);
  --txt: #f4f6ff;
  --txt-2: #c2c8e2;
  --muted: #99a1c4;
  --green: #00a300;
  --green-2: #22d322;
  --green-dim: rgba(0, 163, 0, .14);
  --gold: #fed776;
  --gold-dim: rgba(254, 215, 118, .12);
  --alert: #ff6b62;
  --r: 18px;
  --r-sm: 12px;
  --rail: 84px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  color: var(--txt);
  font: 15px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(1100px 620px at -10% -15%, rgba(0, 163, 0, .16), transparent 62%),
    radial-gradient(900px 520px at 108% 4%, rgba(254, 215, 118, .09), transparent 60%),
    radial-gradient(700px 700px at 50% 120%, rgba(0, 0, 120, .55), transparent 70%),
    linear-gradient(180deg, var(--void), var(--navy) 70%, #000018);
  background-attachment: fixed;
  overflow-x: hidden;
}

a { color: inherit; }
img { display: block; max-width: 100%; }
button { font: inherit; }
::selection { background: var(--green); color: #fff; }

/* scrollbar */
* { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-thumb { background: rgba(255,255,255,.16); border-radius: 99px; }
*::-webkit-scrollbar-track { background: transparent; }

/* ============================== shell ==================================== */
.app { display: flex; min-height: 100%; }

.rail {
  position: fixed; inset: 0 auto 0 0; width: var(--rail); z-index: 60;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 18px 0 14px;
  background: linear-gradient(180deg, rgba(0, 0, 47, .92), rgba(0, 0, 24, .92));
  border-right: 1px solid var(--line-soft);
  backdrop-filter: blur(10px);
}
.rail-logo {
  width: 44px; height: 44px; border-radius: 13px; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .14), 0 8px 24px rgba(0, 163, 0, .22);
  margin-bottom: 10px; flex: 0 0 auto;
}
.rail-logo img { width: 100%; height: 100%; object-fit: cover; }
.rail-nav { display: flex; flex-direction: column; gap: 4px; width: 100%; padding: 0 12px; }
.rail-link {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 0 8px; border-radius: 12px; text-decoration: none;
  color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  transition: color .16s var(--ease), background .16s var(--ease);
}
.rail-link i { font-style: normal; font-size: 19px; line-height: 1; }
.rail-link:hover { color: var(--txt); background: var(--panel); }
.rail-link.on { color: var(--gold); background: var(--gold-dim); }
.rail-link.on::before {
  content: ""; position: absolute; left: -12px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 20px; border-radius: 0 4px 4px 0; background: var(--gold);
}
.rail-foot { margin-top: auto; color: var(--muted); font-size: 10px; text-align: center; line-height: 1.5; }
.rail-foot a { color: var(--gold); text-decoration: none; }

.content { flex: 1; min-width: 0; margin-left: var(--rail); }

/* top bar */
.bar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 14px;
  padding: 14px clamp(16px, 3vw, 40px);
  background: linear-gradient(180deg, rgba(4, 4, 28, .92), rgba(4, 4, 28, .55) 70%, transparent);
  backdrop-filter: blur(6px);
}
.bar-title { margin: 0; font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.bar-title b { color: var(--txt); letter-spacing: .02em; text-transform: none; font-size: 17px; font-weight: 800; margin-left: 10px; }
.bar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.searchbtn {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--panel); border: 1px solid var(--line);
  color: var(--muted); border-radius: 999px; padding: 9px 14px 9px 12px;
  cursor: pointer; font-size: 13px; transition: border-color .16s, color .16s, background .16s;
}
.searchbtn:hover { border-color: rgba(0, 163, 0, .55); color: var(--txt); background: var(--green-dim); }
.searchbtn kbd {
  font: 600 10.5px/1 ui-monospace, monospace; color: var(--muted);
  border: 1px solid var(--line); border-radius: 5px; padding: 3px 5px;
}

.view { padding: 0 clamp(16px, 3vw, 40px) 90px; max-width: 1560px; margin: 0 auto; }

/* ============================== hero ===================================== */
.hero {
  position: relative; margin: 6px 0 26px; border-radius: 22px; overflow: hidden;
  min-height: clamp(300px, 38vw, 460px); display: flex; align-items: flex-end;
  border: 1px solid var(--line-soft);
  isolation: isolate;
  background: #01011c;
}
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; opacity: .55; transform: scale(1.02); }
.hero-scrim {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(0, 0, 30, .96) 0%, rgba(0, 0, 30, .72) 42%, rgba(0, 0, 30, .12) 78%),
    linear-gradient(0deg, rgba(0, 0, 24, .95), transparent 62%);
}
.hero-mark {
  position: absolute; right: 4%; bottom: -6%; z-index: -1;
  font-size: clamp(160px, 26vw, 380px); font-weight: 900; letter-spacing: -.06em;
  color: rgba(255, 255, 255, .035); line-height: .8; pointer-events: none; user-select: none;
}
.hero-inner { position: relative; padding: clamp(18px, 3vw, 40px); max-width: 720px; }
.hero-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
  color: var(--green-2);
}
.hero-kicker::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green-2);
  box-shadow: 0 0 0 4px rgba(34, 211, 34, .18);
}
.hero-title {
  margin: 12px 0 10px; font-size: clamp(28px, 4.2vw, 54px); line-height: 1.03;
  letter-spacing: -.03em; font-weight: 900; text-wrap: balance;
}
.hero-desc {
  margin: 0 0 20px; color: var(--txt-2); font-size: 14.5px; max-width: 58ch;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.hero-dots { display: flex; gap: 6px; margin-top: 14px; }
.hero-dot {
  width: 22px; height: 4px; border-radius: 99px; border: 0; padding: 0; cursor: pointer;
  background: rgba(255, 255, 255, .22); transition: background .2s;
}
.hero-dot.on { background: var(--gold); width: 34px; }

/* ============================== buttons ================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  border-radius: 999px; padding: 11px 20px; border: 1px solid transparent;
  font-weight: 750; font-size: 13.5px; letter-spacing: .01em;
  text-decoration: none; cursor: pointer; color: #fff;
  background: var(--panel); border-color: var(--line);
  transition: transform .14s var(--ease), background .16s, border-color .16s, color .16s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--green); border-color: var(--green); box-shadow: 0 10px 26px rgba(0, 163, 0, .28); }
.btn-primary:hover { background: var(--green-2); border-color: var(--green-2); }
.btn-gold { background: transparent; border-color: rgba(254, 215, 118, .4); color: var(--gold); }
.btn-gold:hover { background: var(--gold-dim); }
.btn-ghost:hover { border-color: rgba(255, 255, 255, .28); background: var(--panel-2); }

/* ============================== shelves ================================== */
.shelf { margin: 0 0 30px; }
.shelf-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.shelf-title {
  margin: 0; font-size: 17px; font-weight: 800; letter-spacing: -.015em;
  display: flex; align-items: center; gap: 10px;
}
.shelf-title::before {
  content: ""; width: 4px; height: 15px; border-radius: 3px;
  background: linear-gradient(180deg, var(--gold), var(--green));
}
.shelf-count { color: var(--muted); font-size: 11.5px; letter-spacing: .04em; }
.shelf-more {
  margin-left: auto; color: var(--gold); text-decoration: none; font-size: 12px;
  font-weight: 700; letter-spacing: .04em; display: inline-flex; align-items: center; gap: 5px;
}
.shelf-more:hover { text-decoration: underline; }

.row { mask-image: linear-gradient(90deg, #000 92%, transparent 99.5%); -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent 99.5%);
  display: grid; grid-auto-flow: column; grid-auto-columns: clamp(132px, 14vw, 186px);
  gap: 14px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x proximity; padding: 4px 4px 12px; margin: -4px -4px 0;
}
.row .card { scroll-snap-align: start; }

.pad { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); padding: 2px 0 16px; }

/* ============================== cards ==================================== */
.card { text-decoration: none; display: flex; flex-direction: column; gap: 8px; }
.card-media {
  position: relative; aspect-ratio: 2 / 3; border-radius: 16px; overflow: hidden;
  background: linear-gradient(150deg, #080840, #030324);
  border: 1px solid var(--line-soft);
  transition: transform .2s var(--ease), border-color .2s, box-shadow .2s;
}
.card:hover .card-media {
  transform: translateY(-4px) scale(1.012);
  border-color: rgba(0, 163, 0, .6);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .5), 0 0 0 1px rgba(0, 163, 0, .25);
}
.card-img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .4s var(--ease); }
.card-img.loaded { opacity: 1; }
.card-ph {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 26px; font-weight: 900; letter-spacing: .04em; color: rgba(255, 255, 255, .09);
}
.card-badge {
  position: absolute; left: 9px; top: 9px;
  padding: 3px 8px; border-radius: 999px; font-size: 10px; font-weight: 800;
  letter-spacing: .05em; text-transform: uppercase;
  background: rgba(0, 0, 25, .78); color: var(--gold);
  border: 1px solid rgba(254, 215, 118, .3); backdrop-filter: blur(6px);
}
.card-play {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 55%, rgba(0, 163, 0, .42), rgba(0, 0, 20, .55));
  opacity: 0; transition: opacity .18s var(--ease);
}
.card:hover .card-play { opacity: 1; }
.card-play span {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(0, 0, 0, .55); border: 1px solid rgba(255, 255, 255, .5);
  font-size: 16px; color: #fff; padding-left: 3px;
}
.card-progress {
  position: absolute; left: 9px; right: 9px; bottom: 9px; height: 3px; border-radius: 99px;
  background: rgba(255, 255, 255, .24); overflow: hidden;
}
.card-progress i { display: block; height: 100%; background: var(--green-2); }
.card-body { padding: 0 2px; }
.card-title {
  font-size: 13.5px; font-weight: 650; line-height: 1.32; letter-spacing: -.005em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.64em;
}
.card-sub { min-height: 1.2em; }
.card-sub { color: var(--muted); font-size: 11.5px; margin-top: 3px; display: flex; gap: 5px; flex-wrap: wrap; }

/* skeleton */
.skel { border-radius: 16px; overflow: hidden; background: var(--panel); border: 1px solid var(--line-soft); }
.skel-media { aspect-ratio: 2 / 3; background: linear-gradient(100deg, #07073a 30%, #101055 45%, #07073a 60%); background-size: 300% 100%; animation: shimmer 1.5s infinite; }
.skel-line { height: 9px; margin: 9px; border-radius: 6px; background: rgba(255, 255, 255, .06); }
.skel-line.short { width: 55%; }
@keyframes shimmer { 0% { background-position: 130% 0; } 100% { background-position: -30% 0; } }

/* ============================== chips =================================== */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 18px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; padding: 7px 14px; border-radius: 999px; cursor: pointer;
  background: transparent; border: 1px solid var(--line); color: var(--muted);
  font-size: 12.5px; font-weight: 650; white-space: nowrap;
  transition: color .15s, border-color .15s, background .15s;
}
.chip:hover { color: var(--txt); border-color: rgba(255, 255, 255, .3); }
.chip.on { background: var(--gold); border-color: var(--gold); color: #1a1400; }

/* ============================== genres ================================== */
.genres { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.genre-card {
  position: relative; display: flex; align-items: center; gap: 13px;
  padding: 16px; border-radius: var(--r); text-decoration: none;
  background: var(--panel); border: 1px solid var(--line-soft); overflow: hidden;
  transition: transform .16s var(--ease), border-color .16s, background .16s;
}
.genre-card::after {
  content: ""; position: absolute; inset: auto -20% -60% auto; width: 120px; height: 120px;
  border-radius: 50%; background: radial-gradient(circle, rgba(0, 163, 0, .3), transparent 70%);
  opacity: 0; transition: opacity .2s;
}
.genre-card:hover { transform: translateY(-3px); border-color: rgba(0, 163, 0, .55); background: var(--panel-2); }
.genre-card:hover::after { opacity: 1; }
.genre-ico {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(145deg, rgba(0, 163, 0, .22), rgba(0, 0, 40, .4));
  border: 1px solid rgba(0, 163, 0, .3); flex: 0 0 auto;
}
.genre-ico img { width: 20px; height: 20px; filter: brightness(0) invert(1); opacity: .85; }
.genre-name { font-weight: 800; font-size: 14.5px; letter-spacing: -.01em; }
.genre-count { color: var(--muted); font-size: 11.5px; margin-top: 2px; }

/* ============================== vjs ===================================== */
.vjs { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.vj-card {
  display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--r);
  background: var(--panel); border: 1px solid var(--line-soft); text-decoration: none;
  transition: transform .16s var(--ease), border-color .16s;
}
.vj-card:hover { transform: translateY(-3px); border-color: rgba(254, 215, 118, .45); }
.vj-avatar {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(145deg, var(--gold-dim), rgba(0, 0, 40, .5));
  border: 1px solid rgba(254, 215, 118, .35);
  color: var(--gold); font-weight: 900; font-size: 13px; letter-spacing: .02em;
}
.vj-name { font-weight: 750; font-size: 14px; }
.vj-count { color: var(--muted); font-size: 11.5px; }

/* ============================== detail ================================== */
.detail { position: relative; margin: -14px calc(-1 * clamp(16px, 3vw, 40px)) 0; padding: 0 clamp(16px, 3vw, 40px) 20px; }
.detail-bg { position: absolute; inset: 0 0 auto 0; height: 420px; z-index: -1; overflow: hidden; }
.detail-bg img { width: 100%; height: 100%; object-fit: cover; filter: blur(22px) saturate(1.1); opacity: .24; transform: scale(1.1); }
.detail-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(4, 4, 28, .35), var(--void) 88%);
}
.detail-inner { display: flex; gap: clamp(16px, 3vw, 34px); align-items: flex-start; padding-top: 10px; flex-wrap: wrap; }
.poster {
  width: clamp(150px, 19vw, 240px); aspect-ratio: 2 / 3; border-radius: 20px; overflow: hidden;
  border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(0, 0, 0, .55); flex: 0 0 auto;
  background: #05052a;
}
.poster img { width: 100%; height: 100%; object-fit: cover; }
.detail-body { flex: 1; min-width: 260px; }
.detail-kicker { color: var(--green-2); font-size: 11px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.detail-title { margin: 8px 0 12px; font-size: clamp(24px, 3.3vw, 40px); line-height: 1.06; letter-spacing: -.028em; font-weight: 900; text-wrap: balance; }
.meta-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
  background: var(--panel); border: 1px solid var(--line-soft); color: var(--txt-2);
}
.pill.green { color: #58ea58; background: var(--green-dim); border-color: rgba(0, 163, 0, .38); }
.pill.gold { color: var(--gold); background: var(--gold-dim); border-color: rgba(254, 215, 118, .3); }
.detail-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.detail-note { color: var(--muted); font-size: 12.5px; max-width: 64ch; }

.eps { display: grid; gap: 10px; margin-top: 26px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.ep {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px;
  background: var(--panel); border: 1px solid var(--line-soft); text-decoration: none;
  transition: border-color .16s, background .16s, transform .16s;
}
.ep:hover { border-color: rgba(0, 163, 0, .55); background: var(--panel-2); transform: translateX(2px); }
.ep.locked { opacity: .42; pointer-events: none; }
.ep-no {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: rgba(0, 163, 0, .14); border: 1px solid rgba(0, 163, 0, .3);
  color: #58ea58; font-weight: 900; font-size: 12.5px; flex: 0 0 auto;
}
.ep-no.dead { background: rgba(255, 255, 255, .05); border-color: var(--line); color: var(--muted); }
.ep-main { flex: 1; min-width: 0; }
.ep-title { font-size: 13.5px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep-sub { color: var(--muted); font-size: 11.5px; margin-top: 2px; }

/* ============================== player ================================== */
.player {
  position: fixed; inset: 0; z-index: 200; display: none;
  background: #000; color: #fff;
}
.player.on { display: block; }
.player-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  background: #000; object-fit: contain;
}
.player-ui {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between;
  background: linear-gradient(180deg, rgba(0, 0, 0, .72), transparent 22%, transparent 62%, rgba(0, 0, 0, .88));
  opacity: 1; transition: opacity .2s var(--ease); pointer-events: none;
}
.player.idle .player-ui { opacity: 0; }
.player-ui > * { pointer-events: auto; }
.player.idle { cursor: none; }

.pu-top { display: flex; align-items: center; gap: 14px; padding: 18px clamp(14px, 3vw, 34px); }
.pu-title { margin: 0; font-size: 15px; font-weight: 700; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pu-sub { color: rgba(255, 255, 255, .62); font-size: 12px; margin-top: 2px; }
.pu-top-actions { margin-left: auto; display: flex; gap: 8px; }
.pu-icon {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .14);
  color: #fff; cursor: pointer; font-size: 15px; transition: background .16s, transform .16s;
}
.pu-icon:hover { background: rgba(0, 163, 0, .5); transform: scale(1.05); }

.pu-center { display: grid; place-items: center; }
.bigplay {
  width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(0, 0, 0, .45); border: 2px solid rgba(255, 255, 255, .65);
  color: #fff; font-size: 30px; cursor: pointer; padding-left: 5px;
  backdrop-filter: blur(6px); transition: transform .16s, background .16s, opacity .2s;
}
.bigplay:hover { transform: scale(1.06); background: rgba(0, 163, 0, .55); border-color: transparent; }
.player.playing .bigplay { opacity: 0; pointer-events: none; }

.pu-bottom { padding: 0 clamp(14px, 3vw, 34px) clamp(14px, 2vw, 22px); }

.seek { position: relative; height: 22px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.seek-track { position: relative; width: 100%; height: 5px; border-radius: 99px; background: rgba(255, 255, 255, .22); overflow: hidden; }
.seek-buf { position: absolute; inset: 0 auto 0 0; width: 0; background: rgba(255, 255, 255, .18); }
.seek-played { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, var(--green), var(--green-2)); }
.seek:hover .seek-track { height: 7px; }
.seek-tip {
  position: absolute; bottom: 22px; transform: translateX(-50%);
  background: rgba(0, 0, 0, .85); border: 1px solid var(--line); border-radius: 6px;
  font-size: 11px; padding: 2px 6px; pointer-events: none; opacity: 0; transition: opacity .12s;
}
.seek:hover .seek-tip { opacity: 1; }

.pu-controls { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.ctrl {
  height: 34px; min-width: 34px; padding: 0 10px; border-radius: 9px; cursor: pointer;
  background: transparent; border: 1px solid transparent; color: rgba(255, 255, 255, .85);
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px;
  transition: background .14s, color .14s;
}
.ctrl:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.ctrl.on { color: var(--gold); }
.ctrl-main { background: rgba(255, 255, 255, .12); }
.time { font: 600 12px/1 ui-monospace, "SF Mono", monospace; color: rgba(255, 255, 255, .8); padding: 0 4px; }
.spacer { flex: 1; }

.vol { display: flex; align-items: center; gap: 6px; }
.vol input { width: 78px; accent-color: var(--green-2); }

.menu {
  position: absolute; bottom: 74px; right: clamp(14px, 3vw, 34px);
  background: rgba(10, 10, 40, .96); border: 1px solid var(--line); border-radius: 12px;
  padding: 6px; display: none; min-width: 140px; backdrop-filter: blur(10px);
}
.menu.on { display: block; }
.menu button {
  display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 10px;
  background: transparent; border: 0; color: var(--txt); border-radius: 8px;
  padding: 8px 10px; cursor: pointer; font-size: 12.5px;
}
.menu button:hover { background: rgba(255, 255, 255, .1); }
.menu button.on { color: var(--gold); }

.resume-toast {
  position: absolute; left: clamp(14px, 3vw, 34px); bottom: 96px;
  display: none; align-items: center; gap: 12px;
  background: rgba(0, 0, 20, .9); border: 1px solid var(--line);
  border-radius: 12px; padding: 10px 14px; font-size: 12.5px; backdrop-filter: blur(8px);
}
.resume-toast.on { display: flex; }
.resume-toast button { background: transparent; border: 0; color: var(--gold); font-weight: 750; cursor: pointer; font-size: 12.5px; }

.next-overlay {
  position: absolute; right: clamp(14px, 3vw, 34px); bottom: 100px;
  background: rgba(0, 0, 20, .92); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 16px; display: none; min-width: 260px; backdrop-filter: blur(10px);
}
.next-overlay.on { display: block; }
.next-overlay h4 { margin: 0 0 4px; font-size: 12px; color: var(--muted); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.next-overlay p { margin: 0 0 12px; font-size: 14px; font-weight: 700; }
.next-overlay .row-btns { display: flex; gap: 8px; }
.next-count { color: var(--gold); font-variant-numeric: tabular-nums; }

/* mini player */
.mini {
  position: fixed; z-index: 150; right: 22px; bottom: 22px; width: 330px;
  border-radius: 14px; overflow: hidden; background: #000;
  border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(0, 0, 0, .7);
  display: none;
}
.mini.on { display: block; }
.mini video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: #000; }
.mini-bar {
  display: flex; align-items: center; gap: 6px; padding: 6px 8px;
  background: rgba(0, 0, 20, .95);
}
.mini-bar .t { flex: 1; min-width: 0; font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--txt-2); }
.mini-btn { background: transparent; border: 0; color: var(--txt); cursor: pointer; font-size: 14px; padding: 3px 6px; border-radius: 6px; }
.mini-btn:hover { background: rgba(255, 255, 255, .12); }

/* ============================== overlays ================================= */
.overlay {
  position: fixed; inset: 0; z-index: 180; display: none;
  background: rgba(2, 2, 20, .82); backdrop-filter: blur(10px);
  padding: clamp(14px, 8vh, 90px) clamp(14px, 6vw, 80px);
}
.overlay.on { display: block; }
.overlay-panel { max-width: 760px; margin: 0 auto; }
.search-input {
  width: 100%; padding: 16px 18px; border-radius: 14px; font-size: 17px;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--txt); outline: 0;
}
.search-input:focus { border-color: rgba(0, 163, 0, .6); box-shadow: 0 0 0 4px rgba(0, 163, 0, .12); }
.search-results { margin-top: 14px; display: grid; gap: 8px; max-height: 62vh; overflow-y: auto; }
.sres {
  display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 12px;
  text-decoration: none; border: 1px solid transparent;
}
.sres:hover, .sres.on { background: var(--panel); border-color: var(--line); }
.sres img, .sres .sph { width: 44px; height: 62px; border-radius: 8px; object-fit: cover; background: #0a0a3a; flex: 0 0 auto; }
.sres .st { font-size: 13.5px; font-weight: 650; }
.sres .ss { color: var(--muted); font-size: 11.5px; }
.search-hint { color: var(--muted); font-size: 12px; margin-top: 10px; }

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 16px);
  background: rgba(10, 10, 40, .96); border: 1px solid var(--line); color: var(--txt);
  border-radius: 12px; padding: 11px 18px; font-size: 13px; z-index: 300;
  opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ============================== mobile dock ============================== */
.dock {
  position: fixed; z-index: 70; left: 0; right: 0; bottom: 0;
  display: none; align-items: center; justify-content: space-around;
  padding: 7px 6px calc(7px + env(safe-area-inset-bottom));
  background: rgba(0, 0, 26, .95); border-top: 1px solid var(--line-soft);
  backdrop-filter: blur(14px);
}
.dock-link {
  display: flex; flex-direction: column; align-items: center; gap: 3px; flex: 1;
  color: var(--muted); text-decoration: none; font-size: 10px; font-weight: 700;
  letter-spacing: .04em; padding: 4px 0; border-radius: 10px;
}
.dock-link i { font-style: normal; font-size: 19px; line-height: 1; }
.dock-link.on { color: var(--gold); }

/* ============================== responsive =============================== */
@media (max-width: 1023px) {
  .rail { display: none; }
  .content { margin-left: 0; }
  .dock { display: flex; }
  .view { padding-bottom: 96px; }
  .bar { padding: 12px 16px; }
  .bar-title b { font-size: 15px; }
  .searchbtn span.lbl { display: none; }
  .searchbtn kbd { display: none; }
  .mini { left: 12px; right: 12px; bottom: 74px; width: auto; }
  .player-ui { opacity: 1; }
}
@media (max-width: 640px) {
  .row { grid-auto-columns: 128px; gap: 10px; }
  .pad { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px; }
  .genres { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .vjs { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .hero { min-height: 280px; border-radius: 16px; }
  .hero-inner { padding: 18px 16px; }
  .hero-mark { display: none; }
  .detail-inner { gap: 14px; }
  .poster { width: 118px; border-radius: 14px; }
  .eps { grid-template-columns: 1fr; }
  .pu-controls { gap: 4px; }
  .ctrl span.lbl { display: none; }
  .vol input { width: 56px; }
  .bigplay { width: 68px; height: 68px; font-size: 24px; }
  .next-overlay { left: 12px; right: 12px; bottom: 88px; min-width: 0; }
}
@media (min-width: 1024px) {
  .dock { display: none; }
}

/* a11y / motion */
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* [hidden] must win over component display rules */
[hidden] { display: none !important; }

/* series episode row: lift the "not uploaded" row so it stays readable */
.ep.locked { opacity: .58; }
.ep.locked .ep-sub { color: #9aa2c4; }
