/* Player demo styles. Dark, TV-style layout that also works on narrow screens. */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

:root {
  --bg: #131826;
  --surface: #1A1F2E;
  --border: #2A3441;
  --text: #fff;
  --text-2: #E8EAED;
  --muted: #9CA3AF;
  --primary: #6BA3FF;
  --cyan: #00d4ff;
  --nav: #0066FF;
  --red: #DC2626;
  --heart: #ff4444;
  --gold: #FFD700;
  --seek: #FF0000;
  --play-grad: linear-gradient(90deg, #E81E63, #FF8C00, #FFCC00);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.4 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  text-align: inherit;
  -webkit-tap-highlight-color: transparent;
}
button:disabled { cursor: default; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
img { display: block; }
.ic { width: 24px; height: 24px; fill: currentColor; flex: none; display: block; }

* { scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- app frame ---------- */

.app { position: fixed; inset: 0; overflow: hidden; background: var(--bg); }
.app::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(232, 30, 99, .07), transparent 50%, rgba(0, 212, 255, .07));
  pointer-events: none;
}
.shell { position: absolute; inset: 0; display: flex; flex-direction: column; }

.topbar {
  position: relative;
  z-index: 2;
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 56px;
  padding: 0 16px;
}
.brand { width: 112px; flex: none; display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.nav { flex: 1; min-width: 0; display: flex; justify-content: center; gap: 16px; }
.nav-btn { padding: 4px 12px; border-radius: 6px; font-size: 16px; font-weight: 500; line-height: 1.5; white-space: nowrap; transition: background-color .15s; }
.nav-btn.is-active { background: var(--nav); font-weight: 700; }
.top-right { width: 112px; flex: none; display: flex; justify-content: flex-end; }
.top-clock { font-size: 15px; font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }

@media (hover: hover) {
  .nav-btn:not(.is-active):hover { background: rgba(255, 255, 255, .08); }
}
@media (max-width: 560px) {
  .topbar { gap: 8px; padding: 0 12px; }
  .brand, .top-right { width: auto; }
  .brand-name { display: none; }
  .nav { gap: 6px; }
  .nav-btn { font-size: 15px; padding: 5px 12px; }
}

.main { position: relative; flex: 1; min-height: 0; }
.view { position: absolute; inset: 0; }

/* ---------- live TV: categories | channels | player + guide ---------- */

.live {
  display: grid;
  grid-template-columns: minmax(140px, 24%) minmax(0, 1fr) minmax(240px, 36%);
  grid-template-rows: minmax(0, 1fr);
  padding-top: 4px;
}

.cats { overflow-y: auto; padding: 0 8px 48px; display: flex; flex-direction: column; gap: 2px; }
.cat-item { display: block; width: 100%; padding: 11px 12px; border-radius: 8px; text-align: left; transition: background-color .15s; }
.cat-name { display: block; font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-count { display: block; margin-top: 3px; font-size: 12px; color: var(--muted); }
.cat-item.is-active { background: rgba(0, 212, 255, .07); }
.cat-item.is-active .cat-name { color: var(--cyan); font-weight: 700; }

.channels { overflow-y: auto; padding: 0 4px 48px; overscroll-behavior: contain; }
.ch-row { display: flex; align-items: center; gap: 4px; margin: 2px 4px; padding-right: 8px; border-radius: 8px; transition: background-color .15s; }
.ch-row.is-playing { background: rgba(0, 212, 255, .08); }
.ch-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px; text-align: left; }
.ch-logo {
  position: relative;
  overflow: hidden;
  width: 48px;
  height: 48px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
  background: linear-gradient(135deg, hsl(var(--h) 68% 46%), hsl(calc(var(--h) + 35) 70% 26%));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
}
.ch-logo::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, .28), transparent 55%); }
.ch-text { flex: 1; min-width: 0; }
.ch-name { display: block; font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-row.is-playing .ch-name { color: var(--cyan); font-weight: 700; }
.ch-now { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 11px; margin-right: 6px; vertical-align: -1px; }
.eq i { width: 3px; height: 3px; border-radius: 1px; background: var(--cyan); animation: eq 1s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.4s; }
.eq i:nth-child(3) { animation-delay: -.7s; }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 11px; } }
.fav-btn { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 50%; color: var(--muted); transition: color .15s, transform .15s, background-color .15s; }
.fav-btn .ic { width: 20px; height: 20px; }
.fav-btn.is-fav { color: var(--heart); }
.fav-btn:active { transform: scale(.88); }
.uhd { flex: none; padding: 4px 8px; border-radius: 4px; background: var(--primary); font-size: 10px; font-weight: 700; }

@media (hover: hover) {
  .cat-item:not(.is-active):hover, .ch-row:not(.is-playing):hover { background: rgba(255, 255, 255, .045); }
  .fav-btn:hover { background: rgba(255, 255, 255, .08); }
}

.side { min-height: 0; display: flex; flex-direction: column; padding: 0 10px 0 4px; }

.mini {
  position: relative;
  flex: none;
  aspect-ratio: 16 / 9;
  max-height: 46%;
  margin: 4px 0 6px;
  overflow: hidden;
  border-radius: 12px;
  background: #000;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
  transition: transform .2s, box-shadow .2s;
}
@media (hover: hover) {
  .mini:not(.is-empty):hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0, 0, 0, .45), 0 0 0 1px rgba(0, 212, 255, .35); }
}
.mini-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.mini-empty {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(19, 24, 38, .6);
  font-size: 14px;
}
.mini-empty .ic { width: 48px; height: 48px; }
.mini.is-empty { cursor: default; background: transparent; box-shadow: none; }
.mini.is-empty .mini-empty { display: flex; }
.mini.is-empty .mini-ui, .mini.is-empty .mini-canvas { display: none; }
.mini-ui { position: absolute; inset: 0; pointer-events: none; }
.mini-btn {
  position: absolute;
  top: 8px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, .6);
  color: #fff;
  pointer-events: auto;
}
.mini-btn .ic { width: 20px; height: 20px; }
.mini-close { right: 8px; }
.mini-full { right: 46px; }
.live-badge {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
}
.live-badge i { width: 6px; height: 6px; border-radius: 50%; background: #ff3b3b; animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: .35; } }
.mini-title {
  position: absolute;
  left: 8px;
  bottom: 8px;
  max-width: calc(100% - 16px);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(0, 0, 0, .7);
  font-size: 12px;
  font-weight: 500;
}
.mini-name { min-width: 0; white-space: pre; overflow: hidden; text-overflow: ellipsis; }
.mini-hint {
  position: absolute;
  left: 50%;
  top: 50%;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .7);
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, -40%);
  transition: opacity .3s, transform .3s;
}
.mini-hint.show { opacity: 1; transform: translate(-50%, -50%); }

.epg { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 12px 48px; }
.epg-empty { margin: 8px 0; font-size: 12px; color: #888; }
.epg-head { display: flex; align-items: center; gap: 4px; margin-bottom: 4px; color: var(--primary); }
.epg-head .ic { width: 16px; height: 16px; }
.epg-head.is-muted { color: var(--muted); }
.epg-label { flex: 1; font-size: 12px; font-weight: 600; }
.epg-left { font-size: 11px; color: var(--muted); }
.epg-now { margin-bottom: 12px; }
.epg-title { margin-bottom: 4px; font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.epg-desc { margin-bottom: 6px; font-size: 12px; line-height: 16px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.epg-time { margin-bottom: 6px; font-size: 12px; color: var(--muted); }
.bar { height: 3px; overflow: hidden; border-radius: 2px; background: var(--border); }
.bar i { display: block; height: 100%; border-radius: 2px; background: var(--primary); transition: width .6s ease; }
.epg-next { padding-top: 12px; border-top: 1px solid var(--border); }
.epg-up { display: flex; align-items: center; margin-bottom: 6px; }
.epg-up .t { width: 45px; flex: none; margin-right: 8px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.epg-up .n { flex: 1; min-width: 0; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Narrow screens: category chips on top, then player, a guide row and the channel list. */
@media (max-width: 719px) {
  .live { display: flex; flex-direction: column; padding-top: 0; }
  .cats {
    order: 0;
    flex: none;
    flex-direction: row;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 12px 10px;
    border-bottom: 1px solid var(--border);
    scrollbar-width: none;
  }
  .cats::-webkit-scrollbar { display: none; }
  .cat-item { flex: none; width: auto; display: inline-flex; align-items: baseline; gap: 5px; padding: 8px 14px; border-radius: 20px; background: var(--surface); }
  .cat-name { font-weight: 600; color: var(--muted); }
  .cat-count { margin: 0; font-size: 11px; }
  .cat-item.is-active { background: rgba(107, 163, 255, .15); }
  .cat-item.is-active .cat-name { color: var(--primary); }
  .side { display: contents; }
  .mini { order: 1; margin: 10px 12px 0; max-height: 34vh; }
  .epg { order: 2; flex: none; overflow: visible; padding: 8px 0 4px; }
  .epg-inner { display: flex; gap: 8px; overflow-x: auto; padding: 0 12px 4px; scroll-padding: 0 12px; scroll-snap-type: x proximity; scrollbar-width: none; }
  .epg-inner::-webkit-scrollbar { display: none; }
  .epg-now, .epg-up { flex: none; margin: 0; padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px; background: rgba(26, 31, 46, .7); scroll-snap-align: start; }
  .epg-now { width: min(72%, 290px); }
  .epg-desc { display: none; }
  .epg-time { margin-bottom: 4px; }
  .epg-next, .epg-next-list { display: contents; }
  .epg-next .epg-head { display: none; }
  .epg-up { width: 132px; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; }
  .epg-up .t { width: auto; margin: 0; }
  .epg-up .n { width: 100%; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .channels { order: 3; flex: 1; min-height: 0; padding-top: 4px; }
}
@media (max-width: 719px) and (max-height: 600px) {
  .live { overflow-y: auto; }
  .channels { flex: none; overflow: visible; }
}

/* ---------- movies: horizontal rows ---------- */

.movies { overflow-y: auto; padding: 4px 0 56px; overscroll-behavior: contain; }
.section { margin-bottom: 28px; }
.section-title { margin: 0 16px 12px; font-size: 20px; font-weight: 700; line-height: 1.3; }
.section-title span { font-weight: 600; color: var(--muted); }
.row-wrap { position: relative; --img-h: clamp(156px, 21vw, 225px); }
.row-wrap.is-feat { --img-h: clamp(124px, 15.75vw, 191px); }
.row-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 0 16px 4px;
  scroll-padding: 0 16px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.row-scroll::-webkit-scrollbar { display: none; }
.row-scroll > * { scroll-snap-align: start; }
.row-arrow { display: none; }

.feat-card, .poster-card { flex: none; text-align: left; }
.feat-card { width: clamp(220px, 28vw, 340px); border-radius: 12px; }
.feat-img, .poster-img { position: relative; display: block; overflow: hidden; background: rgba(26, 31, 46, .8); }
.feat-img { aspect-ratio: 16 / 9; border-radius: 12px; }
.poster-card { width: clamp(104px, 14vw, 150px); border-radius: 6px; }
.poster-img { aspect-ratio: 2 / 3; margin-bottom: 6px; border-radius: 6px; }
.feat-img::before, .poster-img::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .06) 50%, transparent 70%) 0 0 / 200% 100%;
  animation: shimmer 1.4s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }
.feat-img img, .poster-img img { position: relative; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .35s, transform .35s; }
img.is-ready { opacity: 1; }
.badge { position: absolute; min-width: 40px; padding: 3px 6px; text-align: center; font-size: 10px; font-weight: 700; color: #fff; text-shadow: 0 1px 1px rgba(0, 0, 0, .3); }
.feat-rating { top: 6px; left: 6px; border-radius: 4px; background: rgba(0, 212, 255, .9); }
.poster-rating { bottom: 6px; left: 6px; border-radius: 8px; background: var(--cyan); }
.feat-title { display: block; padding: 8px 4px 0; margin-bottom: 6px; font-size: 16px; font-weight: 700; line-height: 20px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.feat-desc { padding: 0 4px; font-size: 11px; line-height: 15px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.poster-title { font-size: 12px; font-weight: 500; line-height: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

@media (hover: hover) {
  .feat-card:hover img, .poster-card:hover img { transform: scale(1.05); }
  .feat-card:hover .feat-title, .poster-card:hover .poster-title { color: var(--cyan); }
}
@media (hover: hover) and (pointer: fine) {
  .row-arrow {
    position: absolute;
    top: 0;
    z-index: 2;
    width: 44px;
    height: var(--img-h);
    display: grid;
    place-items: center;
    color: #fff;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s;
  }
  .row-arrow .ic { width: 32px; height: 32px; }
  .row-arrow.is-left { left: 0; background: linear-gradient(90deg, rgba(19, 24, 38, .95), rgba(19, 24, 38, 0)); }
  .row-arrow.is-right { right: 0; background: linear-gradient(270deg, rgba(19, 24, 38, .95), rgba(19, 24, 38, 0)); }
  .row-wrap.can-left:hover .row-arrow.is-left,
  .row-wrap.can-right:hover .row-arrow.is-right { opacity: 1; pointer-events: auto; }
}

/* ---------- movie detail (slides in from the right) ---------- */

.detail { position: absolute; inset: 0; z-index: 40; overflow: hidden; background: var(--bg); transform: translateX(100%); transition: transform .3s ease; }
.detail.open { transform: none; }
.detail-bg { position: absolute; inset: -40px; background-size: cover; background-position: center; filter: blur(20px); }
.detail-overlay { position: absolute; inset: 0; background: rgba(19, 24, 38, .85); }
.back-btn {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, .5);
  color: #fff;
  transition: background-color .15s;
}
.detail-scroll { position: absolute; inset: 0; overflow-y: auto; }
.detail-main {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  grid-template-areas: "poster head" "poster body";
  align-content: start;
  align-items: start;
  column-gap: 24px;
  max-width: 1000px;
  padding: 80px 24px 48px;
}
.detail-poster { grid-area: poster; }
.detail-poster img { width: 200px; height: 300px; object-fit: cover; border-radius: 12px; background: var(--surface); box-shadow: 0 12px 32px rgba(0, 0, 0, .45); }
.detail-head { grid-area: head; }
.detail-body { grid-area: body; }
.detail-title { margin: 0 0 12px; font-size: 24px; font-weight: 700; line-height: 32px; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; font-size: 14px; color: var(--muted); }
.detail-line { margin-bottom: 8px; font-size: 14px; }
.detail-line.is-muted { margin-bottom: 12px; color: var(--muted); }
.stars { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-bottom: 16px; }
.stars .ic { width: 16px; height: 16px; color: var(--gold); }
.stars .ic.off { color: var(--muted); }
.stars b { margin-left: 8px; font-size: 16px; font-weight: 600; }
.detail-actions { display: flex; gap: 12px; margin-bottom: 20px; }
.play-btn {
  width: 160px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-radius: 10px;
  background: var(--play-grad);
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(255, 140, 0, .4);
  transition: transform .15s, box-shadow .15s;
}
.play-btn .ic { width: 28px; height: 28px; }
.like-btn { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 8px; background: var(--red); color: #fff; transition: transform .15s; }
.play-btn:active, .like-btn:active { transform: scale(.96); }
.detail-plot { max-width: 640px; margin: 0; font-size: 14px; line-height: 20px; color: var(--text-2); }
@media (hover: hover) {
  .back-btn:hover { background: rgba(0, 0, 0, .75); }
  .play-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(255, 140, 0, .5); }
}
@media (max-width: 560px) {
  .detail-main { grid-template-columns: 112px minmax(0, 1fr); grid-template-areas: "poster head" "body body"; column-gap: 16px; padding: 76px 16px 48px; }
  .detail-poster img { width: 112px; height: 168px; }
  .detail-title { font-size: 20px; line-height: 26px; }
  .detail-body { margin-top: 18px; }
}

/* ---------- full-screen player ---------- */

.player { position: absolute; inset: 0; z-index: 60; overflow: hidden; background: #000; user-select: none; -webkit-user-select: none; }
.stage { position: absolute; inset: 0; display: grid; place-items: center; }
.player-canvas {
  display: block;
  width: min(100vw, 177.78vh);
  height: min(56.25vw, 100vh);
  width: min(100vw, 177.78dvh);
  height: min(56.25vw, 100dvh);
}
.player.ui-hidden { cursor: none; }
.controls {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: rgba(0, 0, 0, .35);
  transition: opacity .25s;
}
.player.ui-hidden .controls { opacity: 0; pointer-events: none; }
.pc-top { display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: rgba(0, 0, 0, .5); }
.pc-icon { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 50%; color: #fff; transition: background-color .15s; }
.pc-icon .ic { width: 28px; height: 28px; }
.pc-small .ic { width: 24px; height: 24px; }
.pc-titles { flex: 1; min-width: 0; text-align: center; }
.pc-title { display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; font-size: 16px; font-weight: 600; }
.pc-title-text { white-space: pre; overflow: hidden; text-overflow: ellipsis; }
.pc-live { display: none; flex: none; padding: 2px 6px; border-radius: 3px; background: #e11d2e; font-size: 10px; font-weight: 800; letter-spacing: .06em; }
.player.is-live .pc-live { display: inline-block; }
.pc-sub { margin-top: 2px; font-size: 12px; color: rgba(255, 255, 255, .7); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-spacer { width: 44px; flex: none; }
.pc-center { flex: 1; display: flex; align-items: center; justify-content: center; gap: clamp(24px, 8vw, 80px); }
.pc-seek { display: grid; place-items: center; padding: 10px; border-radius: 30px; background: rgba(0, 0, 0, .3); color: #fff; transition: background-color .15s, transform .15s; }
.pc-seek .ic { width: 36px; height: 36px; }
.pc-seek:disabled { color: rgba(255, 255, 255, .4); }
.pc-play {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, .4);
  border-radius: 50%;
  background: rgba(255, 255, 255, .25);
  color: #fff;
  transition: background-color .15s, transform .15s;
}
.pc-play .ic { width: 42px; height: 42px; }
.pc-seek:not(:disabled):active, .pc-play:active { transform: scale(.92); }
.player.is-loading .pc-center { visibility: hidden; }
.pc-bottom { padding: 2px 16px 10px; background: rgba(0, 0, 0, .5); }
.pc-progress { display: flex; align-items: center; }
.pc-time { min-width: 50px; text-align: center; font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; }
.seek { position: relative; flex: 1; height: 40px; margin: 0 10px; cursor: pointer; touch-action: none; }
.seek[aria-disabled="true"] { cursor: default; }
.seek-track { position: absolute; left: 0; right: 0; top: 50%; height: 4px; margin-top: -2px; overflow: hidden; border-radius: 2px; background: rgba(255, 255, 255, .3); transition: height .15s, margin .15s; }
.seek-fill { width: 0; height: 100%; background: var(--seek); }
.seek-thumb { position: absolute; top: 50%; left: 0; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--seek); box-shadow: 0 0 0 4px rgba(255, 0, 0, .18); }
.player.is-live .seek-thumb { display: none; }
.pc-buttons { display: flex; align-items: center; }
@media (hover: hover) {
  .pc-icon:hover, .pc-seek:not(:disabled):hover { background: rgba(255, 255, 255, .14); }
  .pc-play:hover { background: rgba(255, 255, 255, .35); }
  .seek:not([aria-disabled="true"]):hover .seek-track { height: 6px; margin-top: -3px; }
}
@media (max-width: 560px) {
  .pc-top { padding: 8px 10px; }
  .pc-seek .ic { width: 30px; height: 30px; }
  .pc-play { width: 60px; height: 60px; }
  .pc-play .ic { width: 36px; height: 36px; }
  .pc-bottom { padding: 0 8px 8px; }
  .pc-time { min-width: 42px; font-size: 12px; }
}

.loading {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 14px;
  pointer-events: none;
}
.spinner { width: 36px; height: 36px; border: 3px solid rgba(255, 255, 255, .25); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- small overlays ---------- */

.toast {
  position: absolute;
  left: 50%;
  bottom: 44px;
  z-index: 95;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(26, 31, 46, .96);
  font-size: 13px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.demo-tag {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 100;
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 999px;
  background: rgba(10, 13, 22, .6);
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .02em;
  color: rgba(255, 255, 255, .62);
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .detail, .toast, .mini-hint, img, .bar i { transition: none; }
  .eq i, .live-badge i, .feat-img::before, .poster-img::before { animation-duration: 3s; }
}
