/* VIPerClub Vault + Player (pages: /vault, /player). Builds on cyber-styles.css.
 * Precompiled tailwind.css has a limited class set, so layout for these pages lives here. */

/* ---- Login gate: nothing protected renders until checkLogin() resolves ---- */
.gate-loader { display: none; }
body.gate-pending .gated { display: none !important; }
body.gate-pending .gate-loader {
  display: flex !important; position: fixed; inset: 0; z-index: 99999; flex-direction: column;
  align-items: center; justify-content: center; gap: 1rem; background: #050505;
}
html.tv-mode body.gate-pending .gate-loader,
html.tv-mode .gate-loader,
html.tv-mode .nav-app .nav-actions > a[data-home-nav],
html.tv-mode .nav-app .nav-actions > a[data-nav="dashboard"],
html.tv-mode .nav-app .nav-actions > a[data-nav="requests"] {
  display: none !important;
}
.gate-loader .gate-text { color: var(--cyber-cyan); font-family: 'Orbitron', sans-serif; font-weight: 700; letter-spacing: .3em; text-transform: uppercase; font-size: .9rem; }
.gate-loader .gate-bar { width: 16rem; height: 6px; border: 1px solid var(--cyber-cyan); overflow: hidden; background: #111; }
.gate-loader .gate-bar span { display: block; height: 100%; width: 50%; background: var(--cyber-cyan); animation: gateLoad 1.4s ease-in-out infinite alternate; }
@keyframes gateLoad { 0% { transform: translateX(-100%); } 100% { transform: translateX(200%); } }

/* ---- High-Performance Mode for Vault & Player Pages ---- */
/* Keep the iconic 3D perspective cyber grid and scanlines completely STATIC on these media-heavy pages
   to eliminate GPU rasterization overhead and memory pressure during browsing and streaming */
.bg-grid,
.bg-grid-red {
  animation: none !important;
}
.scanlines {
  animation: none !important;
}
.text-glow-cyan {
  animation: none !important;
}

/* ---- Shared ---- */
/* Same wide layout as dashboard / admin: full width with 2rem side padding (no centred 80rem column).
   Phones/tablets were already full width, so only desktop widths above 1280px change. */
.vault-wrap { width: 100%; max-width: none; margin: 0 auto; padding: 8rem 2rem 2rem; box-sizing: border-box; }
.vault-sub { color: #9ca3af; letter-spacing: .2em; text-transform: uppercase; font-size: .85rem; font-weight: 700; }
.nav-link-cyan {
  font-size: .75rem; font-weight: 700; color: var(--cyber-cyan); border: 1px solid var(--cyber-cyan);
  padding: .5rem 1rem; letter-spacing: .1em; text-transform: uppercase; transition: all .2s;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}
.nav-link-cyan:hover, .nav-link-cyan.active { background: var(--cyber-cyan); color: #000; }
.chip {
  border: 1px solid var(--cyber-cyan); color: var(--cyber-cyan); background: #000; padding: .4rem .9rem;
  font-size: .75rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; white-space: nowrap; cursor: pointer;
}
.chip.active { background: var(--cyber-cyan); color: #000; }
.chip:hover:not(.active) { border-color: var(--cyber-yellow); color: var(--cyber-yellow); }
.cyber-select {
  background: rgba(0,0,0,.7); border: 1px solid var(--cyber-cyan); color: #fff; padding: .75rem 1rem;
  font-family: 'Rajdhani', sans-serif; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}
.cyber-select:focus { outline: none; border-color: var(--cyber-yellow); }
.cyber-select option { background: #050505; color: #fff; }
.vault-label { display: block; color: var(--cyber-yellow); font-size: .75rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; margin-bottom: .4rem; }

/* ---- Vault (library) ---- */
.vault-controls { display: flex; flex-wrap: wrap; gap: 1rem; align-items: stretch; margin-bottom: 1rem; }
.vault-search { position: relative; flex: 1 1 18rem; min-width: 0; }
.vault-search input { width: 100%; padding: .9rem 3rem .9rem 3rem; font-size: 1.1rem; letter-spacing: .05em; box-sizing: border-box; }
.vault-search .ico-magnifying-glass { position: absolute; left: 1.1rem; top: 50%; transform: translateY(-50%); color: var(--cyber-cyan); pointer-events: none; }
.vault-search .clear-btn { position: absolute; right: .9rem; top: 50%; transform: translateY(-50%); color: #9ca3af; background: none; padding: .25rem .4rem; cursor: pointer; }
.vault-search .clear-btn:hover { color: var(--cyber-yellow); }
.vault-chips { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .35rem; margin-bottom: 1.5rem; }
.vault-count { color: var(--cyber-yellow); font-size: .75rem; font-weight: 700; letter-spacing: .25em; text-transform: uppercase; margin-bottom: 1rem; }
.vault-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1.25rem; }
@media (min-width: 1280px) { .vault-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); } } /* wide screens: one more column */
.vault-card, .vault-card-sk {
  display: flex; flex-direction: column; background: rgba(0,0,0,.85); border: 1px solid rgba(0,240,255,.35);
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
  transition: border-color .2s, transform .2s; color: inherit; text-decoration: none;
}
.vault-card:hover, .vault-card:focus-visible { border-color: var(--cyber-yellow); transform: translateY(-3px); outline: none; }
.vault-poster-wrap { position: relative; aspect-ratio: 2/3; overflow: hidden; background: #111; }
.vault-poster-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.vault-card:hover .vault-poster-wrap img { transform: scale(1.05); }
.vault-tag { position: absolute; top: .5rem; font-size: .65rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; padding: .15rem .45rem; background: rgba(0,0,0,.85); border: 1px solid; }
.vault-tag.type { left: .5rem; color: var(--cyber-cyan); border-color: var(--cyber-cyan); }
.vault-tag.type.movie { color: var(--cyber-yellow); border-color: var(--cyber-yellow); }
.vault-tag.rating { right: .5rem; color: var(--cyber-yellow); border-color: rgba(252,238,9,.5); }
.vault-tag.anime-badge { left: 3.8rem; color: #ff0055; border-color: #ff0055; background: rgba(20, 0, 10, 0.9); }
.vault-body { padding: .7rem; display: flex; flex-direction: column; gap: .3rem; flex: 1; }
.vault-title { color: #fff; font-weight: 700; font-size: 1rem; line-height: 1.2; overflow-wrap: anywhere; }
.vault-meta { color: var(--cyber-yellow); font-size: .7rem; letter-spacing: .15em; text-transform: uppercase; font-weight: 700; }
.vault-syn { color: #d1d5db; font-size: .8rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vault-cta { margin-top: auto; padding-top: .5rem; border-top: 1px solid rgba(0,240,255,.2); display: flex; justify-content: space-between; align-items: center; font-size: .7rem; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; }
.vault-cta .go { color: var(--cyber-cyan); }
.vault-card:hover .vault-cta .go { color: var(--cyber-yellow); }
.vault-empty { grid-column: 1 / -1; text-align: center; padding: 3rem 1rem; border: 1px dashed rgba(0,240,255,.4); background: rgba(0,0,0,.6); color: #9ca3af; letter-spacing: .15em; text-transform: uppercase; font-weight: 700; }
.vault-empty .actions { margin-top: 1rem; display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }

/* ---- Player ---- */
.player-layout { display: grid; grid-template-columns: minmax(0, 1fr) clamp(20rem, 24vw, 28rem); gap: 1.5rem; align-items: start; }
/* Desktop: the 16:9 stage grows with the width but stays inside the first screen (header, title and player bar
   take ~25rem above/around it), never smaller than 45rem wide. */
@media (min-width: 1024px) {
  .player-stage { max-width: max(45rem, calc((100vh - 25rem) * 16 / 9)); max-width: max(45rem, calc((100dvh - 25rem) * 16 / 9)); margin-inline: auto; }
}
.player-stage:fullscreen { max-width: none; margin: 0; }
.player-layout.theater { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 1023px) { .player-layout { grid-template-columns: minmax(0, 1fr); } }
.player-stage { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border: 2px solid rgba(0,240,255,.8); box-shadow: 0 0 20px rgba(0,240,255,.3); overflow: hidden; }
.player-stage iframe { position: absolute; inset: 0; width: 100%; height: 100% !important; border: 0; }
.player-idle { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .75rem; text-align: center; padding: 1.5rem; background: rgba(5,5,5,.95); }
.player-idle.hidden, .player-idle .hidden { display: none; } /* tailwind's .hidden loses to the display above (same specificity, later file) */
.player-stage::before { content: 'Connecting to stream…'; position: absolute; inset: 0; display: grid; place-items: center; color: #6b7280; font-size: .8rem; letter-spacing: .2em; text-transform: uppercase; }
.player-idle h3 { color: #fff; font-size: 1.1rem; text-transform: uppercase; }
.player-idle p { color: #9ca3af; max-width: 28rem; font-size: .9rem; }
.player-bar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: space-between; margin-bottom: .75rem; }
.player-status { color: var(--cyber-cyan); font-size: .8rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
.player-status .dot { display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; background: var(--cyber-yellow); margin-right: .5rem; box-shadow: 0 0 8px var(--cyber-yellow); }
.icon-btn { background: #000; border: 1px solid rgba(0,240,255,.6); color: var(--cyber-cyan); padding: .4rem .7rem; font-size: .75rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; cursor: pointer; transition: all .2s; }
.icon-btn:hover { border-color: var(--cyber-yellow); color: var(--cyber-yellow); }
.icon-btn[disabled] { opacity: .4; cursor: not-allowed; }
.remote-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; }
@media (max-width: 639px) { .remote-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.remote-grid .icon-btn { padding: .65rem .5rem; }
.ctrl-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.player-info-poster { width: 96px; aspect-ratio: 2/3; object-fit: cover; background: #111; flex: 0 0 auto; border: 1px solid rgba(0,240,255,.4); }
input[type=range].cyber-range { width: 100%; accent-color: #00f0ff; }
.space-y > * + * { margin-top: 1.25rem; }

@media (max-width: 639px) {
  .vault-wrap { padding: 6.5rem 1rem 2rem; }
  .vault-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
}

/* Utilities used here that aren't in precompiled tailwind.css */
.mt-1 { margin-top: .25rem; }
@media (min-width: 768px) { .md\:p-8 { padding: 2rem; } }
@media (max-width: 639px) {
  .vault-wrap .cyber-card { padding: 1.25rem 1rem !important; }
  .vault-controls .cyber-select { width: 100%; }
  .ctrl-row { grid-template-columns: minmax(0, 1fr); }
}

/* ---- Access lock screen + grace banner ---- */
.lock-card { max-width: 40rem; margin: 2rem auto; padding: 2.5rem 2rem; text-align: center; border-top: 6px solid var(--cyber-red); }
.lock-icon { font-size: 2.75rem; color: var(--cyber-yellow); margin-bottom: 1rem; display: block; }
.lock-title { color: #fff; font-size: clamp(1.4rem, 4vw, 2.2rem); font-weight: 900; text-transform: uppercase; margin-bottom: 1rem; }
.lock-body p { color: #d1d5db; font-size: 1.05rem; margin-bottom: .6rem; }
.lock-body strong { color: var(--cyber-yellow); }
.lock-actions { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; margin-top: 1.5rem; }
.lock-btn { display: inline-block; padding: .7rem 1.4rem; font-size: .85rem; letter-spacing: .15em; text-transform: uppercase; }
.grace-banner { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; padding: .9rem 1.1rem; margin-bottom: 1.5rem;
  background: rgba(252,238,9,.08); border: 1px solid var(--cyber-yellow); color: #f3f4f6; font-weight: 600;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); }
.grace-banner i { color: var(--cyber-yellow); }
.grace-banner strong { color: var(--cyber-yellow); }
.grace-banner span { flex: 1 1 16rem; }
.admin-bypass-banner { padding: .6rem 1rem; margin-bottom: 1.25rem; border: 1px dashed var(--cyber-red); color: var(--cyber-red); font-weight: 700; letter-spacing: .15em; text-transform: uppercase; font-size: .8rem; }

/* ---- Full catalogue: rows, type chips, load more ---- */
.vault-types { margin-bottom: .75rem; }
.vault-types .chip { border-color: var(--cyber-yellow); color: var(--cyber-yellow); }
.vault-types .chip.active { background: var(--cyber-yellow); color: #000; }
.catalog-notice { padding: .6rem 1rem; margin-bottom: 1rem; border: 1px dashed var(--cyber-yellow); color: var(--cyber-yellow); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-size: .75rem; }
.vault-rows { display: flex; flex-direction: column; gap: 2rem; }
.vault-row-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .75rem; }
.vault-row-title { color: #fff; font-family: 'Orbitron', sans-serif; font-weight: 800; font-size: 1.05rem; letter-spacing: .12em; text-transform: uppercase; }
.vault-row-all { color: var(--cyber-yellow); font-size: .7rem; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; background: none; cursor: pointer; white-space: nowrap; transition: color .15s ease; }
.vault-row-all:hover { color: #fff; }
.vault-row-track { display: grid; grid-auto-flow: column; grid-auto-columns: 170px; gap: 1rem; overflow-x: auto; padding-bottom: .6rem; scroll-snap-type: x proximity; }
.vault-row-track > .vault-item { scroll-snap-align: start; }
.vault-row-loading { color: #6b7280; font-size: .8rem; letter-spacing: .2em; text-transform: uppercase; padding: 2rem 0; }
.vault-more { display: flex; justify-content: center; margin-top: 1.5rem; }
.vault-more .icon-btn { padding: .7rem 1.6rem; min-height: 44px; }
/* tailwind's .hidden loses to .vault-more { display:flex } (same specificity, later file) */
.vault-more.hidden, .vault-end.hidden { display: none; }
/* Rows: fixed card height so skeleton shells and loaded cards are the same size (no layout shift when a
   row's data arrives). Titles clamp to 2 lines in rows; the grid keeps natural heights. */
.vault-row-track .vault-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vault-row-track .vault-body { min-height: var(--row-body-h, 10rem); }
/* Sideways paging tile at the end of a Home row (shimmers while the next page loads) */
.row-more .vault-poster-wrap { background: linear-gradient(90deg, #0d0d0d 0%, #16232a 50%, #0d0d0d 100%); background-size: 200% 100%; animation: skShine 1.3s linear infinite; }
.row-more .vault-card-sk { border-color: rgba(0,240,255,.15); }
.row-more-fail { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem; text-align: center; font-size: .8rem; color: rgba(255,255,255,.65); border: 1px dashed rgba(0,240,255,.25); padding: 1rem; }
.row-more-fail .catalog-retry { min-height: 44px; padding: 0 1rem; margin-left: 0; }
@media (prefers-reduced-motion: reduce) { .row-more .vault-poster-wrap { animation: none; } }
.vault-end { text-align: center; margin-top: 1.5rem; font-size: .8rem; letter-spacing: .04em; color: rgba(255,255,255,.55); }
@media (max-width: 639px) { .vault-row-track { grid-auto-columns: 42vw; gap: .75rem; } }

/* ---- Player: real season / episode list ---- */
.episode-list { display: flex; flex-direction: column; gap: .4rem; max-height: 22rem; overflow-y: auto; margin-top: .75rem; padding-right: .25rem; }
.episode-item { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: .6rem; align-items: center; text-align: left; background: rgba(0,0,0,.7); border: 1px solid rgba(0,240,255,.25); padding: .35rem; color: #d1d5db; cursor: pointer; }
.episode-item:hover { border-color: var(--cyber-yellow); }
.episode-item.current { border-color: var(--cyber-yellow); background: rgba(252,238,9,.08); }
.episode-item img { width: 88px; aspect-ratio: 16/9; object-fit: cover; background: #111; }
.episode-item .ep-num { color: var(--cyber-yellow); font-size: .65rem; font-weight: 800; letter-spacing: .15em; }
.episode-item .ep-name { color: #fff; font-size: .85rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.vault-chips .chip[hidden] { display: none; }
.catalog-retry { margin-left: .75rem; padding: .25rem .7rem; border: 1px solid var(--cyber-yellow); color: var(--cyber-yellow); background: transparent; font: inherit; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; }
.catalog-retry:hover, .catalog-retry:focus-visible { background: var(--cyber-yellow); color: #000; outline: none; }

/* ===================== Quality-of-life additions ===================== */
/* ---- Cards: wrapper with My List / details buttons over the poster ---- */
.vault-item { position: relative; display: flex; min-width: 0; }
.vault-item > .vault-card, .vault-item > .vault-card-sk { flex: 1; min-width: 0; }
.card-acts { position: absolute; z-index: 3; top: 0; left: 0; right: 0; aspect-ratio: 2 / 3; display: flex; align-items: flex-end; justify-content: flex-end; gap: .35rem; padding: .45rem; pointer-events: none; }
.card-act { pointer-events: auto; touch-action: manipulation; -webkit-tap-highlight-color: transparent; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(0,0,0,.78); border: 1px solid rgba(0,240,255,.6); color: var(--cyber-cyan); cursor: pointer; font-size: .95rem; transition: border-color .15s, color .15s, transform .2s; }
.card-act { position: relative; }
.card-act[data-act="forget"] { position: absolute; top: .45rem; right: .45rem; } /* keeps the poster's middle free for the stream link */
.card-act::before { content: ''; position: absolute; inset: -3px; border-radius: 50%; } /* 44px hit area on desktop too */
@media (hover: none) { .vault-item:hover .card-acts, .vault-card:hover, .vault-card:hover .vault-poster-wrap img { transform: none; } }
.card-act:hover, .card-act:focus-visible { border-color: var(--cyber-yellow); color: var(--cyber-yellow); }
.card-act.on { background: var(--cyber-yellow); border-color: var(--cyber-yellow); color: #000; }
.vault-item:hover .card-acts { transform: translateY(-3px); }
.vault-item:focus-within > .vault-card { border-color: var(--cyber-yellow); }
.vault-resume { align-self: flex-start; font-size: .72rem; font-weight: 800; letter-spacing: .12em; padding: .15rem .45rem; background: var(--cyber-yellow); color: #000; text-transform: uppercase; }
.vault-poster-wrap img { opacity: 0; transition: opacity .25s, transform .3s; }
.vault-poster-wrap img.ok { opacity: 1; }
@media (scripting: none) { .vault-poster-wrap img { opacity: 1; } }

/* ---- Skeletons ---- */
@keyframes skShine { from { background-position: 150% 0; } to { background-position: -50% 0; } }
.sk, .skeleton .vault-poster-wrap { background: linear-gradient(90deg, #0d0d0d 0%, #16232a 50%, #0d0d0d 100%); background-size: 200% 100%; animation: skShine 1.3s linear infinite; }
.sk-line { display: block; height: .8rem; margin: .25rem 0; width: 85%; }
.sk-line.short { width: 50%; }
.skeleton .vault-card-sk { border-color: rgba(0,240,255,.15); }
.skeleton-ep { cursor: default; }
.skeleton-ep .sk-still { width: 88px; aspect-ratio: 16/9; display: block; }
@media (prefers-reduced-motion: reduce) { .sk, .skeleton .vault-poster-wrap { animation: none; } }

/* ---- Search: recent searches ---- */
.vault-recent { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; background: #050505; border: 1px solid var(--cyber-cyan); box-shadow: 0 10px 30px rgba(0,0,0,.6); padding: .4rem; }
.vr-head { display: flex; justify-content: space-between; align-items: center; color: var(--cyber-yellow); font-size: .7rem; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; padding: .25rem .4rem .4rem; }
.vr-clear { background: none; color: #9ca3af; font: inherit; letter-spacing: .15em; cursor: pointer; padding: .3rem .5rem; }
.vr-clear:hover { color: var(--cyber-yellow); }
.vr-item { display: flex; gap: .6rem; align-items: center; width: 100%; text-align: left; background: none; color: #e5e7eb; font-size: 1rem; padding: .6rem .5rem; cursor: pointer; min-height: 44px; }
.vr-item i { color: var(--cyber-cyan); }
.vr-item:hover, .vr-item:focus-visible { background: rgba(0,240,255,.08); color: #fff; }

/* ---- Back to top ---- */
.back-to-top { position: fixed; right: max(14px, env(safe-area-inset-right)); bottom: calc(max(14px, env(safe-area-inset-bottom)) + 50px); z-index: 60; width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(5,5,5,.88); border: 1px solid var(--cyber-yellow); color: var(--cyber-yellow); cursor: pointer; }
.back-to-top[hidden] { display: none; }
.back-to-top:hover { background: var(--cyber-yellow); color: #000; }

/* ---- Title details modal ---- */
.title-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}
.title-modal.hidden { display: none; }
body.modal-open { overflow: hidden; }
.tm-box {
  position: relative;
  width: 100%;
  max-width: 36rem;
  max-height: calc(100vh - 3rem);
  max-height: calc(100dvh - 3rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1.5rem 1.75rem;
  border-left: 5px solid var(--cyber-cyan);
  background: #09090b;
  margin: auto;
  box-sizing: border-box;
}
.tm-overview .sk-line { height: .9rem; margin: .45rem 0; }
.tm-overview { white-space: pre-line; }
.tm-close { position: absolute; top: .6rem; right: .6rem; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; background: none; color: #9ca3af; font-size: 1.2rem; cursor: pointer; z-index: 2; }
.tm-close:hover { color: var(--cyber-yellow); }
.tm-body { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: 1.25rem; position: relative; z-index: 1; align-items: start; }
.tm-poster { width: 100%; aspect-ratio: 2/3; object-fit: cover; background: #111; border: 1px solid rgba(0,240,255,.4); }
.tm-title { color: #fff; font-size: 1.25rem; font-weight: 900; text-transform: uppercase; padding-right: 2rem; overflow-wrap: anywhere; }
.tm-overview { color: #e5e7eb; font-size: 0.92rem; line-height: 1.5; margin-top: .75rem; }
.tm-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.15rem; }
.tm-play { display: inline-flex; align-items: center; gap: .5rem; padding: .6rem 1.2rem; letter-spacing: .15em; min-height: 40px; }
@media (max-width: 539px) { .tm-body { grid-template-columns: minmax(0, 1fr); } .tm-poster { width: 7.5rem; } .tm-box { padding: 1.25rem 1rem; } }

/* ---- Player: header, My List, pickers, next episode ---- */
.player-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.back-btn { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: .5rem 1rem; border: 1px solid var(--cyber-cyan); color: var(--cyber-cyan); font-size: .85rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; background: rgba(0,0,0,.6); }
.back-btn:hover { background: var(--cyber-cyan); color: #000; }
.mylist-btn { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: .5rem 1rem; border: 1px solid var(--cyber-yellow); color: var(--cyber-yellow); background: rgba(0,0,0,.6); font-size: .85rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; cursor: pointer; }
.mylist-btn.on, .mylist-btn:hover { background: var(--cyber-yellow); color: #000; }
.player-head-meta { display: flex; flex-wrap: wrap; gap: .4rem .5rem; margin-bottom: 1.75rem; }
.player-head-meta span { font-size: .75rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #d1d5db; padding: .2rem .55rem; border: 1px solid rgba(255,255,255,.18); background: rgba(0,0,0,.5); }
.player-head-meta .rt { color: var(--cyber-yellow); border-color: rgba(252,238,9,.5); }
.player-head-meta .g { color: var(--cyber-cyan); border-color: rgba(0,240,255,.4); }
.tm-text .player-head-meta { margin: .6rem 0 0; }
.ep-pickers { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: .75rem; }
.ep-pickers .cyber-select { text-transform: none; letter-spacing: .02em; text-overflow: ellipsis; }
.ep-nav { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.ep-nav .icon-btn { padding: .65rem .5rem; }
.next-ep-btn { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; align-items: center; column-gap: .75rem; width: 100%; margin-top: .75rem; padding: .8rem 1rem; text-align: left; background: var(--cyber-yellow); color: #000; border: 0; cursor: pointer; clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); }
.next-ep-btn.hidden { display: none; }
.next-ep-btn .lbl { font-family: 'Orbitron', sans-serif; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; font-size: .85rem; }
.next-ep-btn .nm { grid-row: 2; font-weight: 700; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.next-ep-btn i { grid-row: 1 / 3; grid-column: 2; font-size: 1.3rem; }
.next-ep-btn:hover { filter: brightness(1.1); }
.kbd-hint { display: none; margin-top: .6rem; color: #6b7280; font-size: .75rem; letter-spacing: .08em; }
.kbd-hint kbd { display: inline-block; min-width: 1.5em; padding: 0 .35em; border: 1px solid #4b5563; color: #d1d5db; font: 700 .7rem/1.5 monospace; text-align: center; }
@media (hover: hover) and (pointer: fine) { .kbd-hint { display: block; } }
.episode-item[aria-current="true"] .ep-name::after { content: ' • now'; color: var(--cyber-yellow); font-size: .7rem; }

/* ---- Accessibility: visible focus, comfortable tap targets ---- */
.vault-wrap a:focus-visible, .vault-wrap button:focus-visible, .vault-wrap select:focus-visible, .vault-wrap input:focus-visible,
.title-modal a:focus-visible, .title-modal button:focus-visible, .back-to-top:focus-visible, nav a:focus-visible, nav button:focus-visible {
  outline: 2px solid var(--cyber-yellow); outline-offset: 2px;
}
.vault-card:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--cyber-yellow); }
.cyber-select:focus-visible { border-color: var(--cyber-yellow); }
.chip { min-height: 36px; }
@media (pointer: coarse) {
  .icon-btn, .chip, .vault-row-all, .catalog-retry { min-height: 44px; }
  .icon-btn { min-width: 44px; }
  .vault-search .clear-btn { min-width: 44px; min-height: 44px; right: .3rem; }
  .card-act { width: 44px; height: 44px; }
  .episode-item { min-height: 56px; }
}
/* keyboard shortcuts help (desktop pointers only, like the hint) */
.kbd-help-btn { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; margin-left: .4rem; border: 1px solid #4b5563; color: #d1d5db; font: 700 .8rem/1 monospace; background: #000; border-radius: 50%; vertical-align: middle; }
.kbd-help-btn:hover, .kbd-help-btn:focus-visible { border-color: var(--cyber-cyan); color: var(--cyber-cyan); outline: none; }
.kbd-help { margin-top: .6rem; padding: .9rem 1rem; border: 1px solid #374151; background: #050505; max-width: 34rem; }
.kbd-help.hidden { display: none; }
.kbd-help-head { display: flex; align-items: center; justify-content: space-between; color: #fff; text-transform: uppercase; letter-spacing: .1em; font-size: .8rem; margin-bottom: .5rem; }
.kbd-help dl { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; font-size: .8rem; color: #d1d5db; }
.kbd-help dt { white-space: nowrap; }
.kbd-help kbd { display: inline-block; min-width: 1.5em; padding: 0 .35em; border: 1px solid #4b5563; color: #d1d5db; font: 700 .7rem/1.5 monospace; text-align: center; }
.kbd-help-note { margin-top: .6rem; color: #6b7280; font-size: .72rem; }
@media not all and (hover: hover) and (pointer: fine) { .kbd-help { display: none !important; } }
.player-stage:focus { outline: none; }

/* ---- Theatre Mode: Darkened Background & Cinema Focus ---- */
body.theater-mode {
  background-color: #000000 !important;
}
body.theater-mode .bg-clip,
body.theater-mode .bg-grid {
  opacity: 0.02 !important;
  filter: brightness(0.05) contrast(1.5) !important;
  transition: opacity 0.3s ease, filter 0.3s ease;
}
body.theater-mode .bg-radial {
  opacity: 0.02 !important;
  transition: opacity 0.3s ease;
}
body.theater-mode .scanlines {
  opacity: 0.03 !important;
  transition: opacity 0.3s ease;
}
body.theater-mode nav.nav-app {
  background: rgba(0, 0, 0, 0.98) !important;
  border-bottom-color: rgba(255, 255, 255, 0.04) !important;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.95) !important;
}
body.theater-mode .vault-wrap {
  max-width: min(92vw, 1280px) !important;
  padding-top: 5rem !important;
  padding-left: 1rem !important;
  padding-right: 1rem !important;
  transition: max-width 0.3s ease, padding 0.3s ease;
}
body.theater-mode .player-top {
  margin-bottom: 0.5rem !important;
}
body.theater-mode #playerTitle {
  font-size: 1.5rem !important;
  margin-bottom: 0.25rem !important;
}
body.theater-mode .player-head-meta {
  margin-bottom: 0.75rem !important;
}
body.theater-mode .player-layout.theater > section.cyber-card {
  background: rgba(0, 0, 0, 0.98) !important;
  border-color: rgba(0, 240, 255, 0.2) !important;
  box-shadow: 0 0 40px rgba(0, 0, 0, 1) !important;
  padding: 1rem !important;
  transition: background 0.3s ease, border-color 0.3s ease;
}
body.theater-mode .player-layout.theater > section.cyber-card::before {
  opacity: 0 !important;
}
body.theater-mode .player-stage:not(:fullscreen) {
  width: 100% !important;
  max-width: min(100%, calc((75vh - 40px) * 16 / 9)) !important;
  aspect-ratio: 16 / 9 !important;
  margin-left: auto !important;
  margin-right: auto !important;
  border: 1px solid rgba(0, 240, 255, 0.25) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.9) !important;
  background: #000 !important;
  transition: max-width 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* ---- Cinema Fullscreen: Bypass iframe fullscreen on low-end devices ---- */
/* Stops 3D gridMove, scanlineGlitch, and CSS shadows entirely so GPU resources go 100% to video decoding */
body.cinema-fullscreen {
  overflow: hidden !important;
  background-color: #000000 !important;
}
body.cinema-fullscreen .bg-clip,
body.cinema-fullscreen .bg-grid,
body.cinema-fullscreen .bg-radial,
body.cinema-fullscreen .scanlines {
  display: none !important;
  animation: none !important;
}
body.cinema-fullscreen nav.nav-app,
body.cinema-fullscreen .player-top,
body.cinema-fullscreen #playerTitle,
body.cinema-fullscreen .player-head-meta,
body.cinema-fullscreen .player-layout > aside,
body.cinema-fullscreen .kbd-hint,
body.cinema-fullscreen .kbd-help,
body.cinema-fullscreen .mt-6 {
  display: none !important;
}
body.cinema-fullscreen .vault-wrap {
  padding: 0 !important;
  margin: 0 !important;
  max-width: 100vw !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
}
body.cinema-fullscreen .player-layout {
  display: block !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  margin: 0 !important;
  padding: 0 !important;
}
body.cinema-fullscreen .player-layout > section.cyber-card {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  background: #000000 !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  z-index: 99999 !important;
  clip-path: none !important;
}
body.cinema-fullscreen .player-layout > section.cyber-card::before {
  display: none !important;
}
body.cinema-fullscreen .player-bar {
  position: absolute !important;
  top: 0.5rem !important;
  right: 0.5rem !important;
  left: 0.5rem !important;
  z-index: 100000 !important;
  background: rgba(0,0,0,0.65) !important;
  padding: 0.25rem 0.75rem !important;
  border-radius: 4px !important;
  margin: 0 !important;
  opacity: 0.2 !important;
  transition: opacity 0.2s ease !important;
}
body.cinema-fullscreen .player-bar:hover,
body.cinema-fullscreen .player-bar:focus-within {
  opacity: 1 !important;
}
body.cinema-fullscreen .player-stage {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-width: none !important;
  aspect-ratio: auto !important;
  margin: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  background: #000000 !important;
  z-index: 99999 !important;
}
body.cinema-fullscreen .player-stage iframe {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
  background: #000000 !important;
}
/* WAB-43: iPhone / iPad portrait, Backup / Backup 2 in cinema full screen. Same lift and 1.18 scale as ViperFlix. */
@media (orientation: portrait) {
  html.ios-web body.cinema-fullscreen.backup-active .player-stage {
    overflow: hidden !important;
  }
  html.ios-web body.cinema-fullscreen.backup-active .player-stage iframe {
    top: auto !important;
    left: 50% !important;
    right: auto !important;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 52px) !important;
    width: calc(100% / 1.18) !important;
    height: calc((100% - (env(safe-area-inset-bottom, 0px) + 52px)) / 1.18) !important;
    transform: translateX(-50%) scale(1.18) !important;
    transform-origin: bottom center !important;
  }
}

/* ==========================================================================
   Compact Continue Watching Shelf (#row-continue on /vault)
   - Limited to 3 small horizontal cards (48x68 poster, 84px total card height)
   - Includes ON/OFF toggle button + per-card remove (×) and info (i) buttons
   ========================================================================== */
#row-continue.vault-row--cw-compact {
  margin-bottom: 1.35rem;
}
#row-continue.vault-row--cw-compact .vault-cw-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 36px;
  padding: 0.35rem 0.75rem;
  border: 1px solid rgba(0, 240, 255, 0.45);
  background: rgba(0, 240, 255, 0.1);
  color: var(--cyber-cyan);
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}
#row-continue.vault-row--cw-compact .vault-cw-toggle[aria-pressed="false"] {
  border-color: rgba(252, 238, 9, 0.45);
  background: rgba(252, 238, 9, 0.08);
  color: var(--cyber-yellow);
}
#row-continue .vault-cw-off-msg {
  padding: 0.55rem 0.85rem;
  background: rgba(10, 14, 22, 0.82);
  border: 1px dashed rgba(252, 238, 9, 0.35);
  border-radius: 6px;
  font-size: 0.78rem;
  color: #cbd5e1;
}
#row-continue.vault-row--cw-compact .vault-row-track {
  grid-auto-columns: minmax(270px, 340px);
  gap: 0.65rem;
  padding-bottom: 0.25rem;
}
#row-continue.vault-row--cw-compact .vault-item {
  min-height: 84px;
}
#row-continue.vault-row--cw-compact a.vault-card {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 0.65rem !important;
  padding: 0.42rem 8.8rem 0.42rem 0.5rem !important;
  height: 84px !important;
  min-height: 84px !important;
  max-height: 84px !important;
  border-radius: 6px;
}
#row-continue.vault-row--cw-compact .vault-poster-wrap {
  width: 48px !important;
  height: 68px !important;
  min-width: 48px !important;
  max-width: 48px !important;
  aspect-ratio: auto !important;
  flex: 0 0 48px !important;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(0, 240, 255, 0.3);
}
#row-continue.vault-row--cw-compact .vault-tag,
#row-continue.vault-row--cw-compact .vault-meta,
#row-continue.vault-row--cw-compact .vault-syn,
#row-continue.vault-row--cw-compact .vault-cta {
  display: none !important;
}
#row-continue.vault-row--cw-compact .vault-body {
  min-height: 0 !important;
  padding: 0 !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  gap: 0.2rem !important;
}
#row-continue.vault-row--cw-compact .vault-title {
  font-size: 0.82rem !important;
  -webkit-line-clamp: 1 !important;
  line-clamp: 1 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
#row-continue.vault-row--cw-compact .vault-resume {
  position: static !important;
  display: inline-block;
  padding: 0.1rem 0.35rem !important;
  font-size: 0.62rem !important;
  border-radius: 3px;
  border: 1px solid rgba(0, 240, 255, 0.35);
  margin-top: 0.05rem;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#row-continue.vault-row--cw-compact .card-acts {
  position: absolute !important;
  top: 0 !important;
  bottom: 0 !important;
  right: 0.35rem !important;
  left: auto !important;
  aspect-ratio: auto !important;
  height: 100% !important;
  width: auto !important;
  transform: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 0.25rem !important;
  padding: 0 !important;
}
#row-continue.vault-row--cw-compact .card-act[data-act="forget"] {
  position: relative !important;
  top: auto !important;
  right: auto !important;
}

/* ==========================================================================
   Enlarged In-Player Buttons, Timeline Scrubber, PiP & Fullscreen Controls
   - Minimum 48px-52px touch targets & large crisp icons (1.15rem-1.3rem)
   - Thumb-friendly Timeline scrubber bar with 26px grab handle
   ========================================================================== */
.player-bar {
  gap: 0.65rem;
}
.player-bar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}
.player-bar .icon-btn,
.player-bar .player-top-btn {
  min-height: 48px !important;
  min-width: 48px !important;
  padding: 0.55rem 0.9rem !important;
  font-size: 0.85rem !important;
  font-weight: 800 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.42rem !important;
  border-width: 1.5px !important;
  border-radius: 6px !important;
}
.player-bar .icon-btn i,
.player-bar .player-top-btn i {
  font-size: 1.18rem !important;
  line-height: 1 !important;
}
.player-timeline-box {
  background: rgba(5, 8, 15, 0.88);
  border: 1px solid rgba(0, 240, 255, 0.32);
  border-radius: 8px;
  padding: 0.75rem 0.85rem;
}
.player-timeline-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.timeline-step-btn {
  min-height: 48px !important;
  min-width: 68px !important;
  padding: 0.5rem 0.7rem !important;
  font-size: 0.82rem !important;
  font-weight: 800 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.35rem !important;
  border-radius: 6px !important;
  flex-shrink: 0;
}
.timeline-step-btn i {
  font-size: 1.1rem !important;
}
.cyber-range.timeline-range,
#volRange.cyber-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 38px;
  background: transparent;
  cursor: pointer;
}
.cyber-range.timeline-range::-webkit-slider-runnable-track,
#volRange.cyber-range::-webkit-slider-runnable-track {
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(0, 240, 255, 0.45), rgba(252, 238, 9, 0.45));
  border: 1px solid rgba(0, 240, 255, 0.65);
}
.cyber-range.timeline-range::-webkit-slider-thumb,
#volRange.cyber-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--cyber-yellow, #fcee09);
  border: 2px solid #000;
  box-shadow: 0 0 10px rgba(252, 238, 9, 0.9);
  margin-top: -8px;
}
.cyber-range.timeline-range::-moz-range-track,
#volRange.cyber-range::-moz-range-track {
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(0, 240, 255, 0.45), rgba(252, 238, 9, 0.45));
  border: 1px solid rgba(0, 240, 255, 0.65);
}
.cyber-range.timeline-range::-moz-range-thumb,
#volRange.cyber-range::-moz-range-thumb {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--cyber-yellow, #fcee09);
  border: 2px solid #000;
  box-shadow: 0 0 10px rgba(252, 238, 9, 0.9);
}
.remote-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}
@media (min-width: 640px) {
  .remote-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}
.remote-grid .icon-btn,
#btnMute.icon-btn,
.ep-nav .icon-btn {
  min-height: 52px !important;
  padding: 0.65rem 0.75rem !important;
  font-size: 0.88rem !important;
  font-weight: 800 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.45rem !important;
  border-width: 1.5px !important;
  border-radius: 6px !important;
}
.remote-grid .icon-btn i,
#btnMute.icon-btn i,
.ep-nav .icon-btn i {
  font-size: 1.22rem !important;
  line-height: 1 !important;
}
/* Floating Picture-in-Picture mini-stage mode */
body.pip-floating #playerStageSection,
body.pip-floating #playerStageSection::before,
body.pip-floating #playerStageSection::after {
  clip-path: none !important;
  -webkit-clip-path: none !important;
  contain: none !important;
  overflow: visible !important;
}
body.pip-floating #playerStageSection,
body.pip-floating #playerStageSection > .relative.z-10 {
  position: static !important;
  z-index: auto !important;
  transform: none !important;
  filter: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
body.pip-floating #playerStagePlaceholder {
  display: flex !important;
}
body.pip-floating:not(.cinema-fullscreen) #playerStage {
  position: fixed !important;
  right: max(1.25rem, env(safe-area-inset-right));
  bottom: max(1.25rem, env(safe-area-inset-bottom));
  width: min(420px, 92vw) !important;
  max-width: min(420px, 92vw) !important;
  min-width: 240px !important;
  height: auto !important;
  margin: 0 !important;
  aspect-ratio: 16 / 9 !important;
  z-index: 999999 !important;
  border: 2px solid var(--cyber-cyan, #00f0ff) !important;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.95), 0 0 24px rgba(0, 240, 255, 0.55) !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  background: #000 !important;
  pointer-events: auto !important;
  touch-action: none;
  animation: pipFadeIn 0.2s ease-out;
}
.player-pip-overlay {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 36px;
  background: linear-gradient(180deg, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.4) 80%, rgba(0,0,0,0) 100%);
  z-index: 100;
  padding: 0.25rem 0.6rem;
  align-items: center;
  justify-content: space-between;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  touch-action: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
body.pip-floating #playerPipOverlay {
  display: flex !important;
  opacity: 0.92 !important;
  pointer-events: auto !important;
}
#playerStage:hover .player-pip-overlay,
#playerStage:focus-within .player-pip-overlay {
  opacity: 1 !important;
  pointer-events: auto !important;
}
@media (pointer: coarse), (max-width: 900px) {
  body.pip-floating #playerPipOverlay {
    opacity: 1 !important;
    pointer-events: auto !important;
  }
}
.pip-overlay-badge {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--cyber-cyan, #00f0ff);
  text-transform: uppercase;
  background: rgba(0,0,0,0.75);
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  border: 1px solid rgba(0,240,255,0.4);
}
.pip-overlay-actions {
  display: flex;
  gap: 0.35rem;
  pointer-events: auto;
}
.pip-overlay-actions button {
  width: 26px;
  height: 26px;
  border-radius: 4px;
  background: rgba(0,0,0,0.8);
  border: 1px solid rgba(0,240,255,0.6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.pip-overlay-actions button:hover {
  background: var(--cyber-cyan, #00f0ff);
  color: #000;
}

/* Player mini (PiP) v2: solid drag bar above the video (no longer covering the embed's own top bar),
   chamfered plate, corner snap via vault-lib pipDock. Overrides the block above. */
body.pip-floating:not(.cinema-fullscreen) #playerStage {
  --pipw: min(420px, 92vw);
  --pipbar: 40px;
  width: var(--pipw) !important;
  max-width: var(--pipw) !important;
  min-width: 0 !important;
  aspect-ratio: auto !important;
  height: calc(var(--pipw) * 9 / 16 + var(--pipbar)) !important;
  right: max(16px, calc(env(safe-area-inset-right) + 12px));
  bottom: max(16px, calc(env(safe-area-inset-bottom) + 12px));
  border: 1px solid rgba(0, 240, 255, 0.55) !important;
  border-left: 3px solid var(--cyber-yellow, #fcee0a) !important;
  border-radius: 0 !important;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  box-shadow: none !important;
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.85));
  touch-action: auto;
}
body.pip-floating:not(.cinema-fullscreen) #playerStage iframe,
body.pip-floating:not(.cinema-fullscreen) #playerStage .player-idle {
  top: var(--pipbar) !important;
  height: calc(100% - var(--pipbar)) !important;
}
body.pip-floating:not(.cinema-fullscreen) #playerStage.is-dragging { opacity: 0.92; }
body.pip-floating #playerPipOverlay {
  height: var(--pipbar, 40px);
  padding: 4px 6px 4px 10px;
  background: #05080f;
  border-bottom: 1px solid rgba(0, 240, 255, 0.28);
  opacity: 1 !important;
  transition: none;
  touch-action: none;
  -webkit-touch-callout: none;
  outline: none;
}
body.pip-floating #playerPipOverlay:focus-visible { box-shadow: inset 0 0 0 3px #3b82f6; }
.player-pip-overlay .pip-drag-handle { display: inline-flex; color: rgba(0, 240, 255, 0.7); }
.player-pip-overlay .pip-overlay-badge {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: #dffaff;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.player-pip-overlay .pip-overlay-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  background: var(--cyber-yellow, #fcee0a);
  animation: pipDotPulse 1.5s steps(2, jump-none) infinite;
}
.player-pip-overlay .pip-overlay-actions { gap: 4px; }
.player-pip-overlay .pip-overlay-actions button {
  width: 32px;
  height: 30px;
  border-radius: 0;
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 6px 100%, 0 calc(100% - 6px));
  background: #0a111d;
  border: 1px solid rgba(0, 240, 255, 0.4);
  color: #dffaff;
}
.player-pip-overlay .pip-overlay-actions button:hover,
.player-pip-overlay .pip-overlay-actions button:focus-visible {
  background: var(--cyber-cyan, #00f0ff);
  color: #05080f;
  outline: none;
}
.player-pip-overlay .pip-overlay-actions button:focus-visible { box-shadow: inset 0 0 0 3px #3b82f6; }
.player-pip-overlay .pip-overlay-actions #btnPipClose:hover { background: var(--cyber-red, #ff2a6d); color: #fff; }
@media (pointer: coarse) {
  body.pip-floating:not(.cinema-fullscreen) #playerStage { --pipbar: 46px; }
  .player-pip-overlay .pip-overlay-actions button { width: 42px; height: 38px; }
}
@media (max-width: 600px) {
  body.pip-floating:not(.cinema-fullscreen) #playerStage { --pipw: min(300px, 78vw); }
}
@media (max-height: 500px) and (orientation: landscape) {
  body.pip-floating:not(.cinema-fullscreen) #playerStage { --pipw: min(260px, 36vw); }
}
@media (prefers-reduced-motion: reduce) {
  body.pip-floating:not(.cinema-fullscreen) #playerStage { animation: none; }
  .player-pip-overlay .pip-overlay-badge::before { animation: none; }
}

/* Vault mini player (PiP): chamfered 2077 plate, drag bar on top, snaps to a corner (vault-lib pipDock) */
.vault-pip-container {
  position: fixed !important;
  right: max(16px, calc(env(safe-area-inset-right) + 12px));
  bottom: max(16px, calc(env(safe-area-inset-bottom) + 12px));
  width: min(420px, 92vw) !important;
  background: #05080f !important;
  border: 1px solid rgba(0, 240, 255, 0.55) !important;
  border-left: 3px solid var(--cyber-yellow, #fcee0a) !important;
  border-radius: 0 !important;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  box-shadow: none !important;
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.85));
  overflow: hidden !important;
  z-index: 999999 !important;
  display: flex !important;
  flex-direction: column !important;
  animation: pipFadeIn 0.22s ease-out;
}
.vault-pip-container.hidden {
  display: none !important;
}
.vault-pip-container.is-dragging { opacity: 0.92; }
@keyframes pipDotPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes pipFadeIn {
  from { opacity: 0; transform: translateY(16px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.vault-pip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 40px;
  padding: 4px 6px 4px 10px;
  background: #05080f;
  border-bottom: 1px solid rgba(0, 240, 255, 0.28);
  touch-action: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  outline: none;
}
.vault-pip-head:focus-visible { box-shadow: inset 0 0 0 3px #3b82f6; }
body.pip-is-dragging,
body.pip-is-dragging * {
  user-select: none !important;
  -webkit-user-select: none !important;
}
body.pip-is-dragging iframe,
body.pip-is-dragging #playerFrame,
body.pip-is-dragging #vaultPipFrame {
  pointer-events: none !important;
}
.player-pip-overlay:active,
.vault-pip-head:active,
body.pip-is-dragging .player-pip-overlay,
body.pip-is-dragging .vault-pip-head {
  cursor: grabbing !important;
}
.vault-pip-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 700;
}
.pip-grip { color: rgba(0, 240, 255, 0.7); flex-shrink: 0; }
.vault-pip-dot {
  width: 7px;
  height: 7px;
  background: var(--cyber-yellow, #fcee0a);
  flex-shrink: 0;
  animation: pipDotPulse 1.5s steps(2, jump-none) infinite;
}
.vault-pip-title {
  color: #dffaff;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.vault-pip-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #05080f;
  background: var(--cyber-yellow, #fcee0a);
  padding: 2px 5px;
  border-radius: 0;
  flex-shrink: 0;
}
.vault-pip-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.vault-pip-btn {
  width: 32px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 6px 100%, 0 calc(100% - 6px));
  background: #0a111d;
  border: 1px solid rgba(0, 240, 255, 0.4);
  color: #dffaff;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.vault-pip-btn:hover,
.vault-pip-btn:focus-visible {
  background: var(--cyber-cyan, #00f0ff);
  color: #05080f;
  border-color: var(--cyber-cyan, #00f0ff);
  outline: none;
}
.vault-pip-btn:focus-visible { box-shadow: inset 0 0 0 3px #3b82f6; }
.vault-pip-btn--close:hover { background: var(--cyber-red, #ff2a6d); border-color: var(--cyber-red, #ff2a6d); color: #fff; }
.vault-pip-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}
.vault-pip-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}
/* touch: bigger taps, no pop-out (phones have no separate PiP window), smaller plate */
@media (pointer: coarse) {
  .vault-pip-head { min-height: 46px; }
  .vault-pip-btn { width: 42px; height: 38px; }
  .vault-pip-btn--popout { display: none !important; }
}
@media (max-width: 600px) {
  .vault-pip-container { width: min(300px, 78vw) !important; }
}
@media (max-height: 500px) and (orientation: landscape) {
  .vault-pip-container { width: min(260px, 36vw) !important; }
}
@media (prefers-reduced-motion: reduce) {
  .vault-pip-container { animation: none; }
  .vault-pip-dot { animation: none; }
}
.tm-actions .tm-pip {
  background: rgba(0, 240, 255, 0.15) !important;
  color: var(--cyber-cyan, #00f0ff) !important;
  border: 1px solid var(--cyber-cyan, #00f0ff) !important;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.25) !important;
}
.tm-actions .tm-pip:hover {
  background: var(--cyber-cyan, #00f0ff) !important;
  color: #000 !important;
}
/* Keep fullscreen top bar clearly visible & easy to tap on touch / mobile / PWA */
@media (pointer: coarse), (max-width: 900px) {
  body.cinema-fullscreen .player-bar {
    opacity: 0.92 !important;
    padding: 0.4rem 0.6rem !important;
  }
  .player-bar .icon-btn,
  .player-bar .player-top-btn {
    min-height: 50px !important;
    min-width: 50px !important;
    padding: 0.55rem 0.75rem !important;
  }
  .player-bar .icon-btn i,
  .player-bar .player-top-btn i {
    font-size: 1.25rem !important;
  }
}

/* Single-instance opaque Cyberpunk HUD toast pill */
.bg-viper,
.viper-toast,
#viperGlobalToast {
  background: rgba(5, 9, 16, 0.97) !important;
  border: 1px solid rgba(0, 240, 255, 0.65) !important;
  border-left: 4px solid #fcee09 !important;
  color: #f8fafc !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.9), 0 0 18px rgba(0, 240, 255, 0.22) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  pointer-events: none !important;
  z-index: 10050 !important;
}
.viper-toast.viper-toast-error,
#viperGlobalToast.viper-toast-error {
  background: rgba(42, 8, 16, 0.97) !important;
  border-color: rgba(255, 0, 60, 0.85) !important;
  border-left-color: #ff003c !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.9), 0 0 18px rgba(255, 0, 60, 0.25) !important;
}

/* ==========================================================================
   Audio Track (SUB / DUB) High-Contrast Cyberpunk Controls & Metadata Polish
   - 2-column grid (min-height: 56px) for #btnAudioSub / #btnAudioDub on /player,
     #sideBtnSub / #sideBtnDub in #playerInfoAside, and #tmAudioSub / #tmAudioDub in /vault modal
   - Solid pitch-black hardware button fill (matching PLAY / PAUSE) with glowing
     Cyan active state for SUB and glowing Cyber-Yellow active state for DUB
   - Unclipped metadata card (#playerInfoAside / #infoBlock / #infoTitle)
   ========================================================================== */
@media (min-width: 640px) {
  #deckAudioWrap {
    grid-column: 1 / -1;
    margin-top: 0.35rem;
  }
}

#deckAudioWrap > div,
#audioToggleGroup,
#deckAudioWrap > div,
#audioToggleGroup,
.audio-track-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 0.6rem !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.audio-pill,
.audio-toggle-btn,
.audio-track-btn,
#btnAudioSub,
#btnAudioDub,
#sideBtnSub,
#sideBtnDub,
#tmAudioSub,
#tmAudioDub {
  min-height: 54px !important;
  padding: 0.45rem 0.4rem !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 2px !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  background: #000000 !important;
  border: 2px solid rgba(0, 240, 255, 0.75) !important;
  border-radius: 6px !important;
  color: #f8fafc !important;
  font-family: 'Orbitron', 'Rajdhani', sans-serif !important;
  font-size: 0.88rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.08em !important;
  line-height: 1.1 !important;
  text-transform: uppercase !important;
  text-align: center !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(0, 240, 255, 0.18) !important;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease !important;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.audio-btn-main {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.35rem !important;
  font-family: 'Orbitron', 'Rajdhani', sans-serif !important;
  font-size: 0.9rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.08em !important;
  line-height: 1.1 !important;
  white-space: nowrap !important;
  max-width: 100% !important;
}

.audio-btn-sub {
  display: block !important;
  font-family: 'Rajdhani', sans-serif !important;
  font-size: 0.62rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  line-height: 1.05 !important;
  opacity: 0.86;
  white-space: nowrap !important;
  max-width: 100% !important;
}

.audio-pill i,
.audio-toggle-btn i,
.audio-track-btn i,
#btnAudioSub i,
#btnAudioDub i,
#sideBtnSub i,
#sideBtnDub i,
#tmAudioSub i,
#tmAudioDub i {
  font-size: 0.95rem !important;
  line-height: 1 !important;
  margin: 0 !important;
  flex-shrink: 0;
}

.audio-pill:hover,
.audio-toggle-btn:hover,
.audio-track-btn:hover {
  border-color: #00f0ff !important;
  color: #ffffff !important;
}

/* Active SUB state: solid dark-cyan fill + glowing neon cyan border & text */
#btnAudioSub.active,
#btnAudioSub[aria-pressed="true"],
#sideBtnSub.active,
#sideBtnSub[aria-pressed="true"],
#tmAudioSub.active,
#tmAudioSub[aria-pressed="true"],
.audio-pill[data-sub="sub"].active,
.audio-toggle-btn[data-sub="sub"].active,
.audio-pill[data-tmaudio="sub"].active {
  border-color: #00f0ff !important;
  background: linear-gradient(180deg, #063842 0%, #021d24 100%) !important;
  background-color: #042932 !important;
  color: #00f0ff !important;
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.55) !important;
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.42), inset 0 0 12px rgba(0, 240, 255, 0.24) !important;
}

/* Active DUB state: solid dark-gold fill + glowing cyber-yellow border & text */
#btnAudioDub.active,
#btnAudioDub[aria-pressed="true"],
#sideBtnDub.active,
#sideBtnDub[aria-pressed="true"],
#tmAudioDub.active,
#tmAudioDub[aria-pressed="true"],
.audio-pill[data-sub="dub"].active,
.audio-toggle-btn[data-sub="dub"].active,
.audio-pill[data-tmaudio="dub"].active {
  border-color: #fcee09 !important;
  background: linear-gradient(180deg, #3b3604 0%, #1d1a02 100%) !important;
  background-color: #2b2703 !important;
  color: #fcee09 !important;
  text-shadow: 0 0 10px rgba(252, 238, 9, 0.55) !important;
  box-shadow: 0 0 18px rgba(252, 238, 9, 0.44), inset 0 0 12px rgba(252, 238, 9, 0.24) !important;
}

/* Vault Title Modal Audio Track wrapper */
.tm-audio-wrap {
  margin-top: 0.9rem;
  margin-bottom: 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.tm-audio-wrap.hidden {
  display: none !important;
}

/* Full-width MUTE button & crisp Subtitles/Season/Episode/Server selects on /player */
#btnMute.icon-btn {
  width: 100%;
  min-height: 52px !important;
}

.player-controls-deck .cyber-select,
#playerInfoAside .cyber-select {
  min-height: 52px;
  border-width: 1.5px;
  border-radius: 6px;
  font-size: 16px;
  padding: 0.75rem 0.95rem;
}

/* Metadata card (#playerInfoAside / #infoBlock / #infoTitle): generous top breathing room, never clipped */
#playerInfoAside {
  padding: 1.85rem 1.25rem 1.65rem !important;
  border-left: 6px solid var(--cyber-cyan, #00f0ff) !important;
  overflow: visible;
}
@media (min-width: 768px) {
  #playerInfoAside {
    padding: 2.15rem 1.85rem 1.85rem !important;
  }
}
#playerInfoAside #infoBlock {
  align-items: flex-start;
  padding-top: 0.25rem;
}
#playerInfoAside #infoTitle {
  color: #ffffff;
  font-size: clamp(1.18rem, 3.6vw, 1.38rem);
  line-height: 1.32 !important;
  padding-top: 0.15rem;
  margin: 0;
  overflow-wrap: anywhere;
}
#playerInfoAside #infoMeta {
  margin-top: 0.4rem;
  line-height: 1.4;
}
#playerInfoAside #infoSyn {
  color: #e2e8f0;
  line-height: 1.55;
  margin-top: 0.55rem;
}

/* Missing utility classes not in precompiled tailwind.css */
.border-l-\[6px\] { border-left-width: 6px !important; }
.border-t-\[6px\] { border-top-width: 6px !important; }
.border-l-cybercyan { border-left-color: var(--cyber-cyan, #00f0ff) !important; }
.border-l-cyberyellow { border-left-color: var(--cyber-yellow, #fcee09) !important; }
.border-l-cyberred { border-left-color: var(--cyber-red, #ff003c) !important; }
.border-t-cybercyan { border-top-color: var(--cyber-cyan, #00f0ff) !important; }
.border-t-cyberyellow { border-top-color: var(--cyber-yellow, #fcee09) !important; }
.border-t-cyberred { border-top-color: var(--cyber-red, #ff003c) !important; }
.inline-flex { display: inline-flex; }
.min-w-0 { min-width: 0; }
.flex-shrink-0 { flex-shrink: 0; }
.text-gray-200 { color: #e5e7eb; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1\.5 { margin-bottom: 0.375rem; }
.mr-1\.5 { margin-right: 0.375rem; }
.text-\[10px\] { font-size: 0.65rem; }
.bg-cybercyan\/10 { background-color: rgba(0, 240, 255, 0.12); }
.border-cybercyan\/30 { border-color: rgba(0, 240, 255, 0.35); }
.bg-cyberyellow\/10 { background-color: rgba(252, 238, 9, 0.12); }
.space-y-3 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.75rem; }

/* --------------------------------------------------------------------------
   PR #39 Upgrades:
   A) Mobile / Compact Quick Episode Bar (#mobileQuickEpBar)
   B) DUB / SUB Audio Badges on Cards (.vault-tag.audio-mode-badge)
   C) Auto-Advance "Next Episode in 10s" Countdown Bar (#upNextCountdownBar)
   D) One-Tap "Signal Glitch? Switch Relay Server" Button (.try-next-server-btn)
   -------------------------------------------------------------------------- */

/* Upgrade A: Quick Episode Strip directly under the video stage */
.quick-ep-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.55rem;
  padding: 0.45rem 0.6rem;
  background: linear-gradient(180deg, rgba(8, 12, 22, 0.96) 0%, rgba(3, 6, 12, 0.98) 100%);
  border: 1.5px solid rgba(0, 240, 255, 0.42);
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.72), inset 0 1px 0 rgba(0, 240, 255, 0.14);
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}
.quick-ep-bar.hidden {
  display: none !important;
}
.quick-season-pill {
  flex-shrink: 0;
  min-height: 36px;
  padding: 0.3rem 0.65rem;
  background: rgba(252, 238, 9, 0.14);
  border: 1.5px solid rgba(252, 238, 9, 0.75);
  border-radius: 4px;
  color: #fcee09;
  font-family: 'Orbitron', 'Rajdhani', sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.16s ease, box-shadow 0.16s ease;
}
.quick-season-pill:hover {
  background: rgba(252, 238, 9, 0.25);
  box-shadow: 0 0 10px rgba(252, 238, 9, 0.35);
}
.quick-ep-track {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.38rem;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 2px 0;
}
.quick-ep-track::-webkit-scrollbar {
  display: none;
}
.quick-ep-pill {
  flex-shrink: 0;
  min-width: 42px;
  min-height: 36px;
  padding: 0.25rem 0.55rem;
  background: rgba(15, 23, 42, 0.9);
  border: 1.5px solid rgba(148, 163, 184, 0.35);
  border-radius: 4px;
  color: #cbd5e1;
  font-family: 'Orbitron', 'Rajdhani', sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.15s ease;
}
.quick-ep-pill:hover {
  border-color: #00f0ff;
  color: #ffffff;
}
.quick-ep-pill.active {
  background: linear-gradient(180deg, #063842 0%, #021d24 100%);
  border-color: #00f0ff;
  color: #00f0ff;
  font-weight: 800;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.42), inset 0 0 8px rgba(0, 240, 255, 0.2);
}
.quick-next-ep-btn {
  flex-shrink: 0;
  min-height: 36px;
  padding: 0.3rem 0.65rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: linear-gradient(180deg, #fcee09 0%, #d4c500 100%);
  border: 1.5px solid #fcee09;
  border-radius: 4px;
  color: #050505;
  font-family: 'Orbitron', 'Rajdhani', sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: filter 0.16s ease, box-shadow 0.16s ease;
}
.quick-next-ep-btn:hover:not(:disabled) {
  filter: brightness(1.08);
  box-shadow: 0 0 12px rgba(252, 238, 9, 0.5);
}
.quick-next-ep-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Upgrade B: DUB / SUB Badge on Vault Cards */
.vault-tag.audio-mode-badge {
  left: 0.5rem;
  bottom: 0.5rem;
  top: auto;
  right: auto;
  font-family: 'Orbitron', 'Rajdhani', sans-serif;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0.15rem 0.42rem;
  border-radius: 3px;
  z-index: 3;
}
.vault-tag.audio-mode-badge.is-dub {
  background: rgba(252, 238, 9, 0.94);
  border: 1px solid #fcee09;
  color: #050505;
  box-shadow: 0 0 10px rgba(252, 238, 9, 0.45);
}
.vault-tag.audio-mode-badge.is-sub {
  background: rgba(4, 41, 50, 0.94);
  border: 1px solid #00f0ff;
  color: #00f0ff;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.35);
}

/* Upgrade C: Auto-Advance "Next Episode in 10s" Countdown Bar */
.up-next-countdown-bar {
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.75rem;
  z-index: 35;
  background: rgba(5, 8, 15, 0.95);
  border: 2px solid #fcee09;
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.92), 0 0 22px rgba(252, 238, 9, 0.32);
  padding: 0.65rem 0.85rem 0.55rem;
  backdrop-filter: blur(10px);
}
.up-next-countdown-bar.hidden {
  display: none !important;
}
.up-next-countdown-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}
.up-next-countdown-copy {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}
.up-next-kicker {
  font-family: 'Orbitron', 'Rajdhani', sans-serif;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #00f0ff;
  text-transform: uppercase;
}
.up-next-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #ffffff;
}
.up-next-title strong {
  color: #fcee09;
  font-family: 'Orbitron', monospace;
  font-size: 1.05rem;
}
.up-next-countdown-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.up-next-play-btn {
  min-height: 38px;
  padding: 0.35rem 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #fcee09;
  border: 1.5px solid #fcee09;
  border-radius: 4px;
  color: #050505;
  font-family: 'Orbitron', 'Rajdhani', sans-serif;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 0 14px rgba(252, 238, 9, 0.45);
}
.up-next-play-btn:hover {
  filter: brightness(1.08);
}
.up-next-cancel-btn {
  min-height: 38px;
  padding: 0.35rem 0.7rem;
  background: rgba(15, 23, 42, 0.9);
  border: 1.5px solid rgba(148, 163, 184, 0.45);
  border-radius: 4px;
  color: #e2e8f0;
  font-family: 'Orbitron', 'Rajdhani', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}
.up-next-cancel-btn:hover {
  border-color: #ff003c;
  color: #ff003c;
}
.up-next-progress-track {
  margin-top: 0.5rem;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  overflow: hidden;
}
.up-next-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #00f0ff 0%, #fcee09 100%);
  transition: width 0.35s linear;
}

/* Upgrade D: One-Tap "Signal Glitch? Switch Relay Server" Button */
.try-next-server-btn {
  width: 100%;
  min-height: 46px;
  padding: 0.55rem 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-sizing: border-box;
  background: linear-gradient(180deg, rgba(252, 238, 9, 0.16) 0%, rgba(252, 238, 9, 0.06) 100%);
  border: 1.5px solid rgba(252, 238, 9, 0.75);
  border-radius: 6px;
  color: #fcee09;
  font-family: 'Orbitron', 'Rajdhani', sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  cursor: pointer;
  transition: all 0.18s ease;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.65);
}
.try-next-server-btn:hover {
  background: rgba(252, 238, 9, 0.24);
  border-color: #fcee09;
  color: #ffffff;
  box-shadow: 0 0 14px rgba(252, 238, 9, 0.38);
}
.try-next-server-btn--compact {
  min-height: 42px;
  font-size: 0.7rem;
  padding: 0.45rem 0.6rem;
  letter-spacing: 0.06em;
}


/* ==========================================================================
   ANIME NETWORK HUB (Anime Discovery + Anime Stream Configurator & Player)
   ========================================================================== */
.anime-network-hub {
  margin-top: 1.15rem;
  margin-bottom: 1.75rem;
  border: 1px solid rgba(168, 85, 247, 0.45);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(16, 10, 32, 0.56) 0%, rgba(8, 6, 18, 0.68) 100%);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.anime-net-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  background: rgba(12, 9, 22, 0.92);
  border-bottom: 1px solid rgba(168, 85, 247, 0.28);
}

.anime-net-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.anime-net-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.32rem 0.75rem;
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.24) 0%, rgba(236, 72, 153, 0.2) 100%);
  border: 1px solid rgba(192, 132, 252, 0.6);
  color: #e9d5ff;
  font-family: "Orbitron", "Rajdhani", sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.28);
}

.anime-net-sub {
  font-family: "Share Tech Mono", monospace;
  font-size: 0.74rem;
  color: #9ca3af;
}

.anime-net-tabs {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.anime-net-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.48rem 0.95rem;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: #cbd5e1;
  font-family: "Rajdhani", sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.18s ease;
}

.anime-net-tab:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.anime-net-tab.active {
  background: linear-gradient(135deg, #9333ea 0%, #7e22ce 100%);
  border-color: rgba(216, 180, 254, 0.65);
  color: #ffffff;
  box-shadow: 0 0 16px rgba(147, 51, 234, 0.45);
}

.anime-net-body {
  padding: 1.25rem;
}

/* Featured Anime Hero Card */
.anime-hero-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(168, 85, 247, 0.35);
  background: #090812;
  min-height: 290px;
  display: flex;
  align-items: flex-end;
  margin-bottom: 1.25rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.65);
}

.anime-hero-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 20%;
  opacity: 0.42;
  filter: saturate(1.18) contrast(1.05);
  transition: background-image 0.35s ease;
}

.anime-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 7, 16, 0.96) 0%, rgba(8, 7, 16, 0.82) 52%, rgba(8, 7, 16, 0.35) 100%),
    linear-gradient(180deg, rgba(8, 7, 16, 0.2) 0%, rgba(8, 7, 16, 0.96) 100%);
}

.anime-hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 1.5rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.anime-hero-copy {
  max-width: 680px;
  flex: 1 1 320px;
}

.anime-hero-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.anime-hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(168, 85, 247, 0.24);
  border: 1px solid rgba(192, 132, 252, 0.65);
  color: #f3e8ff;
}

.anime-hero-rating {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  background: rgba(250, 204, 21, 0.16);
  border: 1px solid rgba(250, 204, 21, 0.55);
  color: #fde047;
}

.anime-hero-title {
  font-family: "Orbitron", "Rajdhani", sans-serif;
  font-size: clamp(1.45rem, 3vw, 2.25rem);
  font-weight: 900;
  color: #ffffff;
  line-height: 1.12;
  margin: 0 0 0.45rem 0;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.85);
}

.anime-hero-meta {
  font-family: "Share Tech Mono", monospace;
  font-size: 0.8rem;
  color: #cbd5e1;
  margin-bottom: 0.65rem;
}

.anime-hero-synopsis {
  font-size: 0.9rem;
  line-height: 1.5;
  color: #d1d5db;
  margin: 0 0 1rem 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.anime-hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.anime-hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.6rem 1.15rem;
  border-radius: 8px;
  font-family: "Rajdhani", sans-serif;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.18s ease;
}

.anime-hero-btn--primary {
  background: linear-gradient(135deg, #9333ea 0%, #ec4899 100%);
  border: 1px solid rgba(244, 114, 182, 0.75);
  color: #ffffff;
  box-shadow: 0 0 18px rgba(168, 85, 247, 0.48);
}

.anime-hero-btn--primary:hover {
  filter: brightness(1.12);
  box-shadow: 0 0 24px rgba(236, 72, 153, 0.65);
}

.anime-hero-btn--secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #f8fafc;
}

.anime-hero-btn--secondary:hover {
  background: rgba(168, 85, 247, 0.22);
  border-color: #c084fc;
  color: #f3e8ff;
}

.anime-hero-dots {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.anime-hero-dot {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(15, 23, 42, 0.75);
  color: #cbd5e1;
  font-family: "Share Tech Mono", monospace;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.anime-hero-dot.active,
.anime-hero-dot:hover {
  background: rgba(168, 85, 247, 0.35);
  border-color: #c084fc;
  color: #ffffff;
}

/* Discovery Search & Genre Pills */
.anime-discovery-search-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}

.anime-discovery-input-wrap {
  position: relative;
  flex: 1 1 260px;
  display: flex;
  align-items: center;
}

.anime-discovery-input-wrap i {
  position: absolute;
  left: 0.9rem;
  color: #a855f7;
  pointer-events: none;
}

.anime-discovery-input {
  width: 100%;
  padding: 0.68rem 2.4rem 0.68rem 2.5rem;
  border-radius: 8px;
  border: 1px solid rgba(168, 85, 247, 0.38);
  background: rgba(10, 12, 22, 0.9);
  color: #ffffff;
  font-size: max(16px, 1rem) !important;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.anime-discovery-input:focus {
  border-color: #c084fc;
  box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.25);
}

.anime-discovery-submit {
  padding: 0.68rem 1.35rem;
  border-radius: 8px;
  border: 1px solid rgba(192, 132, 252, 0.65);
  background: linear-gradient(135deg, #9333ea 0%, #7e22ce 100%);
  color: #ffffff;
  font-family: "Rajdhani", sans-serif;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.anime-genre-bar {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  overflow-x: auto;
  padding-bottom: 0.45rem;
  margin-bottom: 1rem;
  scrollbar-width: thin;
}

.anime-genre-pill {
  flex: 0 0 auto;
  padding: 0.36rem 0.82rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
  font-family: "Rajdhani", sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.16s ease;
}

.anime-genre-pill:hover {
  border-color: rgba(192, 132, 252, 0.55);
  color: #ffffff;
}

.anime-genre-pill.active {
  background: linear-gradient(135deg, #9333ea 0%, #ec4899 100%);
  border-color: rgba(244, 114, 182, 0.8);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.4);
}

/* Stream Configurator + Live Player Grid */
.anime-configurator-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  max-width: 860px;
  gap: 1.25rem;
  align-items: start;
}

@media (max-width: 1023px) {
  .anime-configurator-layout {
    grid-template-columns: 1fr;
  }
}

.anime-cfg-card {
  background: rgba(13, 12, 24, 0.92);
  border: 1px solid rgba(168, 85, 247, 0.32);
  border-radius: 10px;
  padding: 1.1rem;
}

.anime-cfg-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-bottom: 0.75rem;
  margin-bottom: 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.anime-cfg-title {
  font-family: "Orbitron", "Rajdhani", sans-serif;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e9d5ff;
}

.anime-cfg-tag {
  font-family: "Share Tech Mono", monospace;
  font-size: 0.66rem;
  padding: 0.15rem 0.48rem;
  border-radius: 4px;
  background: rgba(168, 85, 247, 0.18);
  border: 1px solid rgba(192, 132, 252, 0.45);
  color: #d8b4fe;
}

.anime-cfg-section-label {
  display: block;
  font-family: "Share Tech Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9ca3af;
  margin-bottom: 0.45rem;
}

.anime-preset-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.95rem;
}

.anime-preset-btn {
  padding: 0.34rem 0.68rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
  font-family: "Rajdhani", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.anime-preset-btn:hover {
  border-color: rgba(192, 132, 252, 0.6);
  color: #ffffff;
  background: rgba(168, 85, 247, 0.16);
}

.anime-preset-btn.active {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.35) 0%, rgba(236, 72, 153, 0.28) 100%);
  border-color: #c084fc;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.35);
}

.anime-cfg-toggle-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 0.95rem;
}

.anime-cfg-toggle-btn {
  min-height: 40px;
  padding: 0.45rem 0.65rem;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
  font-family: "Rajdhani", sans-serif;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: all 0.16s ease;
}

.anime-cfg-toggle-btn.active {
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.34) 0%, rgba(79, 70, 229, 0.3) 100%);
  border-color: #c084fc;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(147, 51, 234, 0.35);
}

.anime-cfg-toggle-btn[data-cfg-sub="dub"].active,
.anime-cfg-toggle-btn[data-p-cfg-sub="dub"].active {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.32) 0%, rgba(168, 85, 247, 0.32) 100%);
  border-color: #f472b6;
  color: #ffffff;
}

.anime-cfg-inputs-row {
  display: grid;
  grid-template-columns: 1.3fr 0.85fr 0.85fr;
  gap: 0.55rem;
  margin-bottom: 0.85rem;
}

.anime-cfg-field label {
  display: block;
  font-family: "Share Tech Mono", monospace;
  font-size: 0.66rem;
  text-transform: uppercase;
  color: #9ca3af;
  margin-bottom: 0.3rem;
}

.anime-cfg-input {
  width: 100%;
  padding: 0.5rem 0.6rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(7, 9, 16, 0.92);
  color: #ffffff;
  font-family: "Share Tech Mono", monospace;
  font-size: max(16px, 1rem) !important;
  outline: none;
}

.anime-cfg-input:focus {
  border-color: #c084fc;
  box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.25);
}

.anime-cfg-resolved {
  padding: 0.55rem 0.75rem;
  border-radius: 6px;
  background: rgba(168, 85, 247, 0.14);
  border: 1px solid rgba(192, 132, 252, 0.48);
  color: #e9d5ff;
  font-family: "Share Tech Mono", monospace;
  font-size: 0.72rem;
  margin-bottom: 0.85rem;
  line-height: 1.4;
}

.anime-cfg-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
}

.anime-player-preview-card {
  background: rgba(10, 10, 20, 0.95);
  border: 1px solid rgba(168, 85, 247, 0.32);
  border-radius: 10px;
  overflow: hidden;
}

.anime-player-preview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(15, 12, 28, 0.95);
  border-bottom: 1px solid rgba(168, 85, 247, 0.25);
  flex-wrap: wrap;
}

.anime-player-preview-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #04050a;
}

.anime-player-preview-stage iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* ==========================================================================
   ANIME MODE PURPLE THEME (Matches Desktop Big Screen Dark Obsidian/Purple)
   Eliminates all cyan across /vault and /player when Anime mode is active
   ========================================================================== */
html {
  background-color: #050505;
  color-scheme: dark;
}

body {
  position: relative;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  color-scheme: dark;
}

.bg-radial {
  z-index: -3 !important;
}

.bg-clip {
  z-index: -2 !important;
}

.scanlines {
  z-index: -1 !important;
}

/* Hide horizontal scrollbars on mobile/WebKit pill strips so no white scrollbar track ever renders */
.vault-chips,
.anime-genre-bar,
.anime-net-tabs {
  scrollbar-width: none;
  -ms-overflow-style: none;
  max-width: 100%;
  min-width: 0;
}
.vault-chips::-webkit-scrollbar,
.anime-genre-bar::-webkit-scrollbar,
.anime-net-tabs::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.cyber-card,
#animeNetworkHub,
#animeDiscoveryPanel,
#animeConfiguratorPanel,
.anime-hero-card,
.anime-hero-inner,
.anime-hero-copy,
.anime-discovery-search-row {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

html.anime-mode-purple {
  --cyber-cyan: #c084fc;
  --bg-dark: #070510;
  background-color: #070510 !important;
  color-scheme: dark !important;
}

html.anime-mode-purple body,
body.anime-mode-purple {
  --cyber-cyan: #c084fc;
  --bg-dark: #070510;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  color: #e9d5ff !important;
  color-scheme: dark !important;
}

html.anime-mode-purple .bg-grid,
body.anime-mode-purple .bg-grid {
  background-color: transparent !important;
  background-size: 50px 50px, 50px 50px, 250px 250px, 250px 250px !important;
  background-image:
    linear-gradient(to right, rgba(168, 85, 247, 0.36) 1px, transparent 2px),
    linear-gradient(to bottom, rgba(168, 85, 247, 0.36) 1px, transparent 2px),
    linear-gradient(to right, rgba(236, 72, 153, 0.16) 2px, transparent 3px),
    linear-gradient(to bottom, rgba(236, 72, 153, 0.16) 2px, transparent 3px) !important;
  box-shadow: inset 0 0 100px rgba(168, 85, 247, 0.2) !important;
}

html.anime-mode-purple .bg-grid::after,
body.anime-mode-purple .bg-grid::after {
  background: radial-gradient(circle at 50% 0%, rgba(168, 85, 247, 0.25) 0%, rgba(236, 72, 153, 0.08) 40%, transparent 75%) !important;
}

html.anime-mode-purple .bg-radial,
body.anime-mode-purple .bg-radial {
  background: radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0) 0%, rgba(7, 5, 16, 0.85) 80%) !important;
}

html.anime-mode-purple .scanlines,
body.anime-mode-purple .scanlines {
  background: linear-gradient(rgba(10, 6, 18, 0) 50%, rgba(168, 85, 247, 0.05) 50%) !important;
  background-size: 100% 4px !important;
}

html.anime-mode-purple .nav-hud,
body.anime-mode-purple .nav-hud {
  background: rgba(9, 6, 20, 0.94) !important;
  border-bottom: 1px solid rgba(168, 85, 247, 0.45) !important;
  box-shadow: 0 2px 14px rgba(147, 51, 234, 0.24) !important;
}

html.anime-mode-purple .nav-tab,
body.anime-mode-purple .nav-tab {
  color: #e9d5ff !important;
  border-color: rgba(168, 85, 247, 0.55) !important;
  background: rgba(16, 10, 32, 0.78) !important;
}

html.anime-mode-purple .nav-tab:hover,
body.anime-mode-purple .nav-tab:hover {
  background: rgba(168, 85, 247, 0.24) !important;
  border-color: #d8b4fe !important;
  color: #ffffff !important;
}

html.anime-mode-purple .nav-tab[aria-current="page"],
body.anime-mode-purple .nav-tab[aria-current="page"] {
  background-color: #9333ea !important;
  background-image: linear-gradient(135deg, #9333ea 0%, #db2777 100%) !important;
  color: #ffffff !important;
  border-color: #f472b6 !important;
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.48), inset 0 -3px 0 #f472b6 !important;
  transition: none !important;
}

html.anime-mode-purple .cyber-card:not(.tm-box),
body.anime-mode-purple .cyber-card:not(.tm-box),
html.anime-mode-purple #playerStageSection,
body.anime-mode-purple #playerStageSection,
html.anime-mode-purple #playerInfoAside,
body.anime-mode-purple #playerInfoAside {
  background: rgba(168, 85, 247, 0.12) !important;
  border: 1.5px solid rgba(192, 132, 252, 0.65) !important;
  border-left: 6px solid #a855f7 !important;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.65), 0 0 22px rgba(147, 51, 234, 0.28), inset 0 0 16px rgba(168, 85, 247, 0.12) !important;
}

html.anime-mode-purple .tm-box.cyber-card,
body.anime-mode-purple .tm-box.cyber-card {
  background: linear-gradient(180deg, rgba(16, 11, 30, 0.95) 0%, rgba(10, 7, 20, 0.98) 100%) !important;
  border: 1.5px solid rgba(192, 132, 252, 0.65) !important;
  border-left: 6px solid #a855f7 !important;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.85), 0 0 22px rgba(147, 51, 234, 0.28), inset 0 0 16px rgba(168, 85, 247, 0.12) !important;
}

html.anime-mode-purple .vault-empty,
body.anime-mode-purple .vault-empty {
  background: rgba(8, 4, 18, 0.45) !important;
  border-color: rgba(192, 132, 252, 0.5) !important;
  color: #e9d5ff !important;
}

html.anime-mode-purple .cyber-card::before,
body.anime-mode-purple .cyber-card::before {
  border-color: rgba(192, 132, 252, 0.4) !important;
}

html.anime-mode-purple .text-cybercyan,
body.anime-mode-purple .text-cybercyan,
html.anime-mode-purple .text-glow-cyan,
body.anime-mode-purple .text-glow-cyan {
  color: #c084fc !important;
  text-shadow: 0 0 14px rgba(168, 85, 247, 0.65) !important;
}

html.anime-mode-purple .border-cybercyan,
body.anime-mode-purple .border-cybercyan,
html.anime-mode-purple .border-cybercyan\/30,
body.anime-mode-purple .border-cybercyan\/30,
html.anime-mode-purple .border-l-cybercyan,
body.anime-mode-purple .border-l-cybercyan,
html.anime-mode-purple .border-t-cybercyan,
body.anime-mode-purple .border-t-cybercyan {
  border-color: rgba(192, 132, 252, 0.55) !important;
}

html.anime-mode-purple .bg-cybercyan,
body.anime-mode-purple .bg-cybercyan,
html.anime-mode-purple .bg-cybercyan\/10,
body.anime-mode-purple .bg-cybercyan\/10,
html.anime-mode-purple .bg-cybercyan\/20,
body.anime-mode-purple .bg-cybercyan\/20 {
  background-color: rgba(168, 85, 247, 0.18) !important;
}

html.anime-mode-purple .cyber-input,
body.anime-mode-purple .cyber-input,
html.anime-mode-purple .cyber-select,
body.anime-mode-purple .cyber-select {
  background: rgba(10, 7, 20, 0.9) !important;
  border-color: rgba(168, 85, 247, 0.52) !important;
  color: #f3e8ff !important;
}

html.anime-mode-purple .cyber-input:focus,
body.anime-mode-purple .cyber-input:focus,
html.anime-mode-purple .cyber-select:focus,
body.anime-mode-purple .cyber-select:focus {
  border-color: #c084fc !important;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.42) !important;
}

html.anime-mode-purple .vault-search .ico-magnifying-glass,
body.anime-mode-purple .vault-search .ico-magnifying-glass {
  color: #c084fc !important;
}

html.anime-mode-purple .chip,
body.anime-mode-purple .chip,
html.anime-mode-purple .vault-types .chip,
body.anime-mode-purple .vault-types .chip {
  background: rgba(14, 9, 28, 0.88) !important;
  border: 1px solid rgba(168, 85, 247, 0.48) !important;
  color: #d8b4fe !important;
}

html.anime-mode-purple .chip:hover:not(.active),
body.anime-mode-purple .chip:hover:not(.active),
html.anime-mode-purple .vault-types .chip:hover:not(.active),
body.anime-mode-purple .vault-types .chip:hover:not(.active) {
  border-color: #e879f9 !important;
  color: #ffffff !important;
  background: rgba(168, 85, 247, 0.2) !important;
}

html.anime-mode-purple .chip.active,
body.anime-mode-purple .chip.active,
html.anime-mode-purple .vault-types .chip.active,
body.anime-mode-purple .vault-types .chip.active {
  background: linear-gradient(135deg, #9333ea 0%, #db2777 100%) !important;
  border-color: #f472b6 !important;
  color: #ffffff !important;
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.45) !important;
}

html.anime-mode-purple .vault-count,
body.anime-mode-purple .vault-count,
html.anime-mode-purple .vault-label,
body.anime-mode-purple .vault-label,
html.anime-mode-purple .vault-meta,
body.anime-mode-purple .vault-meta,
html.anime-mode-purple .vault-row-all,
body.anime-mode-purple .vault-row-all,
html.anime-mode-purple .vault-cta .go,
body.anime-mode-purple .vault-cta .go,
html.anime-mode-purple .ep-num,
body.anime-mode-purple .ep-num,
html.anime-mode-purple .player-head-meta .g,
body.anime-mode-purple .player-head-meta .g {
  color: #c084fc !important;
  border-color: rgba(168, 85, 247, 0.45) !important;
}

html.anime-mode-purple .vault-card,
body.anime-mode-purple .vault-card,
html.anime-mode-purple .vault-card-sk,
body.anime-mode-purple .vault-card-sk {
  background: rgba(11, 8, 22, 0.92) !important;
  border-color: rgba(168, 85, 247, 0.38) !important;
}

html.anime-mode-purple .vault-card:hover,
body.anime-mode-purple .vault-card:hover,
html.anime-mode-purple .vault-card:focus-visible,
body.anime-mode-purple .vault-card:focus-visible {
  border-color: #c084fc !important;
  box-shadow: 0 8px 24px rgba(147, 51, 234, 0.28) !important;
}

html.anime-mode-purple .vault-tag.type,
body.anime-mode-purple .vault-tag.type {
  color: #e9d5ff !important;
  border-color: #c084fc !important;
  background: rgba(18, 10, 34, 0.92) !important;
}

html.anime-mode-purple .vault-tag.audio-mode-badge.is-sub,
body.anime-mode-purple .vault-tag.audio-mode-badge.is-sub {
  background: rgba(59, 20, 94, 0.94) !important;
  border-color: #c084fc !important;
  color: #f3e8ff !important;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.4) !important;
}

html.anime-mode-purple .vault-cta,
body.anime-mode-purple .vault-cta {
  border-top-color: rgba(168, 85, 247, 0.25) !important;
}

html.anime-mode-purple .card-act,
body.anime-mode-purple .card-act {
  border-color: rgba(192, 132, 252, 0.6) !important;
  color: #e9d5ff !important;
  background: rgba(15, 10, 28, 0.85) !important;
}

html.anime-mode-purple .player-stage,
body.anime-mode-purple .player-stage {
  border-color: rgba(168, 85, 247, 0.78) !important;
  box-shadow: 0 0 24px rgba(147, 51, 234, 0.32) !important;
}

html.anime-mode-purple .player-status,
body.anime-mode-purple .player-status {
  color: #d8b4fe !important;
}

html.anime-mode-purple .player-status .dot,
body.anime-mode-purple .player-status .dot {
  background: #c084fc !important;
  box-shadow: 0 0 8px #a855f7 !important;
}

html.anime-mode-purple .icon-btn,
body.anime-mode-purple .icon-btn,
html.anime-mode-purple .back-btn,
body.anime-mode-purple .back-btn,
html.anime-mode-purple .mylist-btn,
body.anime-mode-purple .mylist-btn {
  background: rgba(12, 8, 24, 0.9) !important;
  border-color: rgba(168, 85, 247, 0.55) !important;
  color: #e9d5ff !important;
}

html.anime-mode-purple .icon-btn:hover,
body.anime-mode-purple .icon-btn:hover,
html.anime-mode-purple .back-btn:hover,
body.anime-mode-purple .back-btn:hover,
html.anime-mode-purple .mylist-btn:hover,
body.anime-mode-purple .mylist-btn:hover {
  border-color: #f472b6 !important;
  color: #ffffff !important;
  background: rgba(147, 51, 234, 0.28) !important;
}

html.anime-mode-purple #btnAudioSub,
body.anime-mode-purple #btnAudioSub,
html.anime-mode-purple #btnAudioDub,
body.anime-mode-purple #btnAudioDub,
html.anime-mode-purple #sideBtnSub,
body.anime-mode-purple #sideBtnSub,
html.anime-mode-purple #sideBtnDub,
body.anime-mode-purple #sideBtnDub,
html.anime-mode-purple #tmAudioSub,
body.anime-mode-purple #tmAudioSub,
html.anime-mode-purple #tmAudioDub,
body.anime-mode-purple #tmAudioDub {
  border-color: rgba(168, 85, 247, 0.42) !important;
  background: linear-gradient(180deg, rgba(16, 11, 30, 0.94) 0%, rgba(9, 6, 18, 0.98) 100%) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(168, 85, 247, 0.18) !important;
}

html.anime-mode-purple #btnAudioSub.active,
body.anime-mode-purple #btnAudioSub.active,
html.anime-mode-purple #sideBtnSub.active,
body.anime-mode-purple #sideBtnSub.active,
html.anime-mode-purple #tmAudioSub.active,
body.anime-mode-purple #tmAudioSub.active {
  border-color: #c084fc !important;
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.42) 0%, rgba(79, 70, 229, 0.36) 100%) !important;
  color: #f3e8ff !important;
  text-shadow: 0 0 10px rgba(192, 132, 252, 0.55) !important;
  box-shadow: 0 0 18px rgba(147, 51, 234, 0.42), inset 0 0 12px rgba(168, 85, 247, 0.24) !important;
}

html.anime-mode-purple #btnAudioDub.active,
body.anime-mode-purple #btnAudioDub.active,
html.anime-mode-purple #sideBtnDub.active,
body.anime-mode-purple #sideBtnDub.active,
html.anime-mode-purple #tmAudioDub.active,
body.anime-mode-purple #tmAudioDub.active {
  border-color: #f472b6 !important;
  background: linear-gradient(135deg, rgba(219, 39, 119, 0.42) 0%, rgba(147, 51, 234, 0.42) 100%) !important;
  color: #fdf2f8 !important;
  text-shadow: 0 0 10px rgba(244, 114, 182, 0.55) !important;
  box-shadow: 0 0 18px rgba(219, 39, 119, 0.42), inset 0 0 12px rgba(236, 72, 153, 0.24) !important;
}

html.anime-mode-purple .quick-ep-bar,
body.anime-mode-purple .quick-ep-bar {
  background: linear-gradient(180deg, rgba(16, 11, 30, 0.96) 0%, rgba(9, 6, 18, 0.98) 100%) !important;
  border-color: rgba(168, 85, 247, 0.48) !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.72), inset 0 1px 0 rgba(168, 85, 247, 0.16) !important;
}

html.anime-mode-purple .quick-season-pill,
body.anime-mode-purple .quick-season-pill {
  background: rgba(168, 85, 247, 0.18) !important;
  border-color: rgba(192, 132, 252, 0.75) !important;
  color: #e9d5ff !important;
}

html.anime-mode-purple .quick-ep-pill.active,
body.anime-mode-purple .quick-ep-pill.active {
  background: linear-gradient(135deg, #9333ea 0%, #db2777 100%) !important;
  border-color: #f472b6 !important;
  color: #ffffff !important;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.45) !important;
}

html.anime-mode-purple .quick-next-ep-btn,
body.anime-mode-purple .quick-next-ep-btn,
html.anime-mode-purple .cyber-btn,
body.anime-mode-purple .cyber-btn,
html.anime-mode-purple .try-next-server-btn,
body.anime-mode-purple .try-next-server-btn {
  background: linear-gradient(135deg, #9333ea 0%, #db2777 100%) !important;
  border-color: #f472b6 !important;
  color: #ffffff !important;
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.4) !important;
}

html.anime-mode-purple .episode-item,
body.anime-mode-purple .episode-item {
  border-color: rgba(168, 85, 247, 0.28) !important;
  background: rgba(12, 8, 24, 0.78) !important;
}

html.anime-mode-purple .episode-item.current,
body.anime-mode-purple .episode-item.current {
  border-color: #c084fc !important;
  background: rgba(147, 51, 234, 0.24) !important;
}

.firebase-emulator-warning, #firebase-emulator-warning { display: none !important; }


/* ==========================================================================
   FULL-PAGE MOVIES MODE THEME (Cyberpunk Cyan Cinema Theme)
   ========================================================================== */
html.movies-mode-theme {
  --cyber-cyan: #00f0ff;
  --bg-dark: #03090d;
  background-color: #03090d !important;
  color-scheme: dark !important;
}

html.movies-mode-theme body,
body.movies-mode-theme {
  --cyber-cyan: #00f0ff;
  --bg-dark: #050505;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  color: #e0faff !important;
  color-scheme: dark !important;
}

html.movies-mode-theme .bg-grid,
body.movies-mode-theme .bg-grid {
  background-color: transparent !important;
  background-size: 50px 50px, 50px 50px, 250px 250px, 250px 250px !important;
  background-image:
    linear-gradient(to right, rgba(0, 240, 255, 0.34) 1px, transparent 2px),
    linear-gradient(to bottom, rgba(0, 240, 255, 0.34) 1px, transparent 2px),
    linear-gradient(to right, rgba(255, 0, 60, 0.14) 2px, transparent 3px),
    linear-gradient(to bottom, rgba(255, 0, 60, 0.14) 2px, transparent 3px) !important;
  box-shadow: inset 0 0 100px rgba(0, 240, 255, 0.18) !important;
}

html.movies-mode-theme .bg-grid::after,
body.movies-mode-theme .bg-grid::after {
  background: radial-gradient(circle at 50% 0%, rgba(0, 240, 255, 0.25) 0%, rgba(255, 0, 60, 0.08) 40%, transparent 75%) !important;
}

html.movies-mode-theme .bg-radial,
body.movies-mode-theme .bg-radial {
  background: radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0) 0%, rgba(5, 5, 5, 0.85) 80%) !important;
}

html.movies-mode-theme .scanlines,
body.movies-mode-theme .scanlines {
  background: linear-gradient(rgba(4, 14, 20, 0) 50%, rgba(0, 240, 255, 0.05) 50%) !important;
  background-size: 100% 4px !important;
}

html.movies-mode-theme .nav-hud,
body.movies-mode-theme .nav-hud {
  background: rgba(4, 14, 20, 0.94) !important;
  border-bottom: 1px solid rgba(0, 240, 255, 0.45) !important;
  box-shadow: 0 2px 14px rgba(8, 145, 178, 0.24) !important;
}

html.movies-mode-theme .nav-tab,
body.movies-mode-theme .nav-tab {
  color: #cffafe !important;
  border-color: rgba(0, 240, 255, 0.55) !important;
  background: rgba(5, 20, 28, 0.78) !important;
}

html.movies-mode-theme .nav-tab:hover,
body.movies-mode-theme .nav-tab:hover {
  background: rgba(0, 240, 255, 0.22) !important;
  border-color: #67e8f9 !important;
  color: #ffffff !important;
}

html.movies-mode-theme .nav-tab[aria-current="page"],
body.movies-mode-theme .nav-tab[aria-current="page"] {
  background-color: #0891b2 !important;
  background-image: linear-gradient(135deg, #0891b2 0%, #00f0ff 100%) !important;
  color: #021017 !important;
  border-color: #00f0ff !important;
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.48), inset 0 -3px 0 #67e8f9 !important;
  transition: none !important;
}

html.movies-mode-theme .cyber-card:not(.tm-box),
body.movies-mode-theme .cyber-card:not(.tm-box),
html.movies-mode-theme #playerStageSection,
body.movies-mode-theme #playerStageSection,
html.movies-mode-theme #playerInfoAside,
body.movies-mode-theme #playerInfoAside {
  background: rgba(0, 240, 255, 0.12) !important;
  border: 1.5px solid rgba(0, 240, 255, 0.65) !important;
  border-left: 6px solid #00f0ff !important;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.65), 0 0 22px rgba(0, 240, 255, 0.28), inset 0 0 16px rgba(0, 240, 255, 0.12) !important;
}

html.movies-mode-theme .tm-box.cyber-card,
body.movies-mode-theme .tm-box.cyber-card {
  background: linear-gradient(180deg, rgba(6, 20, 28, 0.95) 0%, rgba(4, 12, 18, 0.98) 100%) !important;
  border: 1.5px solid rgba(0, 240, 255, 0.65) !important;
  border-left: 6px solid #00f0ff !important;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.85), 0 0 22px rgba(8, 145, 178, 0.28), inset 0 0 16px rgba(0, 240, 255, 0.12) !important;
}

html.movies-mode-theme .vault-empty,
body.movies-mode-theme .vault-empty {
  background: rgba(2, 10, 16, 0.45) !important;
  border-color: rgba(0, 240, 255, 0.5) !important;
  color: #cffafe !important;
}

html.movies-mode-theme .cyber-card::before,
body.movies-mode-theme .cyber-card::before {
  border-color: rgba(0, 240, 255, 0.4) !important;
}

html.movies-mode-theme .text-cybercyan,
body.movies-mode-theme .text-cybercyan,
html.movies-mode-theme .text-glow-cyan,
body.movies-mode-theme .text-glow-cyan {
  color: #00f0ff !important;
  text-shadow: 0 0 14px rgba(0, 240, 255, 0.65) !important;
}

html.movies-mode-theme .border-cybercyan,
body.movies-mode-theme .border-cybercyan,
html.movies-mode-theme .border-cybercyan\/30,
body.movies-mode-theme .border-cybercyan\/30,
html.movies-mode-theme .border-l-cybercyan,
body.movies-mode-theme .border-l-cybercyan,
html.movies-mode-theme .border-t-cybercyan,
body.movies-mode-theme .border-t-cybercyan {
  border-color: rgba(0, 240, 255, 0.55) !important;
}

html.movies-mode-theme .bg-cybercyan,
body.movies-mode-theme .bg-cybercyan,
html.movies-mode-theme .bg-cybercyan\/10,
body.movies-mode-theme .bg-cybercyan\/10,
html.movies-mode-theme .bg-cybercyan\/20,
body.movies-mode-theme .bg-cybercyan\/20 {
  background-color: rgba(0, 240, 255, 0.18) !important;
}

html.movies-mode-theme .cyber-input,
body.movies-mode-theme .cyber-input,
html.movies-mode-theme .cyber-select,
body.movies-mode-theme .cyber-select {
  background: rgba(4, 14, 20, 0.9) !important;
  border-color: rgba(0, 240, 255, 0.52) !important;
  color: #ecfeff !important;
}

html.movies-mode-theme .cyber-input:focus,
body.movies-mode-theme .cyber-input:focus,
html.movies-mode-theme .cyber-select:focus,
body.movies-mode-theme .cyber-select:focus {
  border-color: #00f0ff !important;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.42) !important;
}

html.movies-mode-theme .vault-search .ico-magnifying-glass,
body.movies-mode-theme .vault-search .ico-magnifying-glass {
  color: #00f0ff !important;
}

html.movies-mode-theme .chip,
body.movies-mode-theme .chip,
html.movies-mode-theme .vault-types .chip,
body.movies-mode-theme .vault-types .chip {
  background: rgba(5, 18, 26, 0.88) !important;
  border: 1px solid rgba(0, 240, 255, 0.48) !important;
  color: #a5f3fc !important;
}

html.movies-mode-theme .chip:hover:not(.active),
body.movies-mode-theme .chip:hover:not(.active),
html.movies-mode-theme .vault-types .chip:hover:not(.active),
body.movies-mode-theme .vault-types .chip:hover:not(.active) {
  border-color: #00f0ff !important;
  color: #ffffff !important;
  background: rgba(0, 240, 255, 0.2) !important;
}

html.movies-mode-theme .chip.active,
body.movies-mode-theme .chip.active,
html.movies-mode-theme .vault-types .chip.active,
body.movies-mode-theme .vault-types .chip.active {
  background: linear-gradient(135deg, #0891b2 0%, #00f0ff 100%) !important;
  border-color: #00f0ff !important;
  color: #021017 !important;
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.45) !important;
}

html.movies-mode-theme .vault-count,
body.movies-mode-theme .vault-count,
html.movies-mode-theme .vault-label,
body.movies-mode-theme .vault-label,
html.movies-mode-theme .vault-meta,
body.movies-mode-theme .vault-meta,
html.movies-mode-theme .vault-row-all,
body.movies-mode-theme .vault-row-all,
html.movies-mode-theme .vault-cta .go,
body.movies-mode-theme .vault-cta .go,
html.movies-mode-theme .ep-num,
body.movies-mode-theme .ep-num,
html.movies-mode-theme .player-head-meta .g,
body.movies-mode-theme .player-head-meta .g {
  color: #00f0ff !important;
  border-color: rgba(0, 240, 255, 0.45) !important;
}

html.movies-mode-theme .vault-card,
body.movies-mode-theme .vault-card,
html.movies-mode-theme .vault-card-sk,
body.movies-mode-theme .vault-card-sk {
  background: rgba(5, 16, 24, 0.92) !important;
  border-color: rgba(0, 240, 255, 0.38) !important;
}

html.movies-mode-theme .vault-card:hover,
body.movies-mode-theme .vault-card:hover,
html.movies-mode-theme .vault-card:focus-visible,
body.movies-mode-theme .vault-card:focus-visible {
  border-color: #00f0ff !important;
  box-shadow: 0 8px 24px rgba(0, 240, 255, 0.28) !important;
}

html.movies-mode-theme .vault-tag.type,
body.movies-mode-theme .vault-tag.type {
  color: #cffafe !important;
  border-color: #00f0ff !important;
  background: rgba(6, 22, 32, 0.92) !important;
}

html.movies-mode-theme .vault-cta,
body.movies-mode-theme .vault-cta {
  border-top-color: rgba(0, 240, 255, 0.25) !important;
}

html.movies-mode-theme .card-act,
body.movies-mode-theme .card-act {
  border-color: rgba(0, 240, 255, 0.6) !important;
  color: #cffafe !important;
  background: rgba(6, 18, 26, 0.85) !important;
}

html.movies-mode-theme .player-stage,
body.movies-mode-theme .player-stage {
  border-color: rgba(0, 240, 255, 0.78) !important;
  box-shadow: 0 0 24px rgba(0, 240, 255, 0.32) !important;
}

html.movies-mode-theme .player-status,
body.movies-mode-theme .player-status {
  color: #a5f3fc !important;
}

html.movies-mode-theme .player-status .dot,
body.movies-mode-theme .player-status .dot {
  background: #00f0ff !important;
  box-shadow: 0 0 8px #06b6d4 !important;
}

html.movies-mode-theme .icon-btn,
body.movies-mode-theme .icon-btn,
html.movies-mode-theme .back-btn,
body.movies-mode-theme .back-btn,
html.movies-mode-theme .mylist-btn,
body.movies-mode-theme .mylist-btn {
  background: rgba(5, 16, 24, 0.9) !important;
  border-color: rgba(0, 240, 255, 0.55) !important;
  color: #cffafe !important;
}

html.movies-mode-theme .icon-btn:hover,
body.movies-mode-theme .icon-btn:hover,
html.movies-mode-theme .back-btn:hover,
body.movies-mode-theme .back-btn:hover,
html.movies-mode-theme .mylist-btn:hover,
body.movies-mode-theme .mylist-btn:hover {
  border-color: #00f0ff !important;
  color: #ffffff !important;
  background: rgba(8, 145, 178, 0.28) !important;
}

html.movies-mode-theme .quick-next-ep-btn,
body.movies-mode-theme .quick-next-ep-btn,
html.movies-mode-theme .cyber-btn,
body.movies-mode-theme .cyber-btn,
html.movies-mode-theme .try-next-server-btn,
body.movies-mode-theme .try-next-server-btn {
  background: linear-gradient(135deg, #0891b2 0%, #00f0ff 100%) !important;
  border-color: #00f0ff !important;
  color: #021017 !important;
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.4) !important;
}


/* ==========================================================================
   FULL-PAGE TV SERIES MODE THEME (Neon Emerald / Cyber-Green Series Theme)
   ========================================================================== */
html.tvseries-mode-theme {
  --cyber-cyan: #34d399;
  --bg-dark: #030a07;
  background-color: #030a07 !important;
  color-scheme: dark !important;
}

html.tvseries-mode-theme body,
body.tvseries-mode-theme {
  --cyber-cyan: #34d399;
  --bg-dark: #030a07;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  color: #d1fae5 !important;
  color-scheme: dark !important;
}

html.tvseries-mode-theme .bg-grid,
body.tvseries-mode-theme .bg-grid {
  background-color: transparent !important;
  background-size: 50px 50px, 50px 50px, 250px 250px, 250px 250px !important;
  background-image:
    linear-gradient(to right, rgba(16, 185, 129, 0.36) 1px, transparent 2px),
    linear-gradient(to bottom, rgba(16, 185, 129, 0.36) 1px, transparent 2px),
    linear-gradient(to right, rgba(52, 211, 153, 0.16) 2px, transparent 3px),
    linear-gradient(to bottom, rgba(52, 211, 153, 0.16) 2px, transparent 3px) !important;
  box-shadow: inset 0 0 100px rgba(16, 185, 129, 0.2) !important;
}

html.tvseries-mode-theme .bg-grid::after,
body.tvseries-mode-theme .bg-grid::after {
  background: radial-gradient(circle at 50% 0%, rgba(16, 185, 129, 0.25) 0%, rgba(52, 211, 153, 0.08) 40%, transparent 75%) !important;
}

html.tvseries-mode-theme .bg-radial,
body.tvseries-mode-theme .bg-radial {
  background: radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0) 0%, rgba(3, 10, 7, 0.85) 80%) !important;
}

html.tvseries-mode-theme .scanlines,
body.tvseries-mode-theme .scanlines {
  background: linear-gradient(rgba(4, 16, 11, 0) 50%, rgba(16, 185, 129, 0.05) 50%) !important;
  background-size: 100% 4px !important;
}

html.tvseries-mode-theme .nav-hud,
body.tvseries-mode-theme .nav-hud {
  background: rgba(4, 15, 11, 0.94) !important;
  border-bottom: 1px solid rgba(16, 185, 129, 0.45) !important;
  box-shadow: 0 2px 14px rgba(5, 150, 105, 0.24) !important;
}

html.tvseries-mode-theme .nav-tab,
body.tvseries-mode-theme .nav-tab {
  color: #d1fae5 !important;
  border-color: rgba(16, 185, 129, 0.55) !important;
  background: rgba(5, 22, 16, 0.78) !important;
}

html.tvseries-mode-theme .nav-tab:hover,
body.tvseries-mode-theme .nav-tab:hover {
  background: rgba(16, 185, 129, 0.24) !important;
  border-color: #6ee7b7 !important;
  color: #ffffff !important;
}

html.tvseries-mode-theme .nav-tab[aria-current="page"],
body.tvseries-mode-theme .nav-tab[aria-current="page"] {
  background-color: #059669 !important;
  background-image: linear-gradient(135deg, #059669 0%, #10b981 100%) !important;
  color: #ffffff !important;
  border-color: #34d399 !important;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.48), inset 0 -3px 0 #6ee7b7 !important;
  transition: none !important;
}

html.tvseries-mode-theme .cyber-card:not(.tm-box),
body.tvseries-mode-theme .cyber-card:not(.tm-box),
html.tvseries-mode-theme #playerStageSection,
body.tvseries-mode-theme #playerStageSection,
html.tvseries-mode-theme #playerInfoAside,
body.tvseries-mode-theme #playerInfoAside {
  background: rgba(16, 185, 129, 0.12) !important;
  border: 1.5px solid rgba(52, 211, 153, 0.65) !important;
  border-left: 6px solid #10b981 !important;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.65), 0 0 22px rgba(16, 185, 129, 0.28), inset 0 0 16px rgba(16, 185, 129, 0.12) !important;
}

html.tvseries-mode-theme .tm-box.cyber-card,
body.tvseries-mode-theme .tm-box.cyber-card {
  background: linear-gradient(180deg, rgba(6, 22, 16, 0.95) 0%, rgba(4, 14, 10, 0.98) 100%) !important;
  border: 1.5px solid rgba(52, 211, 153, 0.65) !important;
  border-left: 6px solid #10b981 !important;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.85), 0 0 22px rgba(5, 150, 105, 0.28), inset 0 0 16px rgba(16, 185, 129, 0.12) !important;
}

html.tvseries-mode-theme .vault-empty,
body.tvseries-mode-theme .vault-empty {
  background: rgba(2, 12, 8, 0.45) !important;
  border-color: rgba(52, 211, 153, 0.5) !important;
  color: #d1fae5 !important;
}

html.tvseries-mode-theme .cyber-card::before,
body.tvseries-mode-theme .cyber-card::before {
  border-color: rgba(52, 211, 153, 0.4) !important;
}

html.tvseries-mode-theme .text-cybercyan,
body.tvseries-mode-theme .text-cybercyan,
html.tvseries-mode-theme .text-glow-cyan,
body.tvseries-mode-theme .text-glow-cyan {
  color: #34d399 !important;
  text-shadow: 0 0 14px rgba(16, 185, 129, 0.65) !important;
}

html.tvseries-mode-theme .border-cybercyan,
body.tvseries-mode-theme .border-cybercyan,
html.tvseries-mode-theme .border-cybercyan\/30,
body.tvseries-mode-theme .border-cybercyan\/30,
html.tvseries-mode-theme .border-l-cybercyan,
body.tvseries-mode-theme .border-l-cybercyan,
html.tvseries-mode-theme .border-t-cybercyan,
body.tvseries-mode-theme .border-t-cybercyan {
  border-color: rgba(52, 211, 153, 0.55) !important;
}

html.tvseries-mode-theme .bg-cybercyan,
body.tvseries-mode-theme .bg-cybercyan,
html.tvseries-mode-theme .bg-cybercyan\/10,
body.tvseries-mode-theme .bg-cybercyan\/10,
html.tvseries-mode-theme .bg-cybercyan\/20,
body.tvseries-mode-theme .bg-cybercyan\/20 {
  background-color: rgba(16, 185, 129, 0.18) !important;
}

html.tvseries-mode-theme .cyber-input,
body.tvseries-mode-theme .cyber-input,
html.tvseries-mode-theme .cyber-select,
body.tvseries-mode-theme .cyber-select {
  background: rgba(4, 15, 11, 0.9) !important;
  border-color: rgba(16, 185, 129, 0.52) !important;
  color: #ecfdf5 !important;
}

html.tvseries-mode-theme .cyber-input:focus,
body.tvseries-mode-theme .cyber-input:focus,
html.tvseries-mode-theme .cyber-select:focus,
body.tvseries-mode-theme .cyber-select:focus {
  border-color: #34d399 !important;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.42) !important;
}

html.tvseries-mode-theme .vault-search .ico-magnifying-glass,
body.tvseries-mode-theme .vault-search .ico-magnifying-glass {
  color: #34d399 !important;
}

html.tvseries-mode-theme .chip,
body.tvseries-mode-theme .chip,
html.tvseries-mode-theme .vault-types .chip,
body.tvseries-mode-theme .vault-types .chip {
  background: rgba(5, 20, 14, 0.88) !important;
  border: 1px solid rgba(16, 185, 129, 0.48) !important;
  color: #a7f3d0 !important;
}

html.tvseries-mode-theme .chip:hover:not(.active),
body.tvseries-mode-theme .chip:hover:not(.active),
html.tvseries-mode-theme .vault-types .chip:hover:not(.active),
body.tvseries-mode-theme .vault-types .chip:hover:not(.active) {
  border-color: #34d399 !important;
  color: #ffffff !important;
  background: rgba(16, 185, 129, 0.2) !important;
}

html.tvseries-mode-theme .chip.active,
body.tvseries-mode-theme .chip.active,
html.tvseries-mode-theme .vault-types .chip.active,
body.tvseries-mode-theme .vault-types .chip.active {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%) !important;
  border-color: #34d399 !important;
  color: #ffffff !important;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.45) !important;
}

html.tvseries-mode-theme .vault-count,
body.tvseries-mode-theme .vault-count,
html.tvseries-mode-theme .vault-label,
body.tvseries-mode-theme .vault-label,
html.tvseries-mode-theme .vault-meta,
body.tvseries-mode-theme .vault-meta,
html.tvseries-mode-theme .vault-row-all,
body.tvseries-mode-theme .vault-row-all,
html.tvseries-mode-theme .vault-cta .go,
body.tvseries-mode-theme .vault-cta .go,
html.tvseries-mode-theme .ep-num,
body.tvseries-mode-theme .ep-num,
html.tvseries-mode-theme .player-head-meta .g,
body.tvseries-mode-theme .player-head-meta .g {
  color: #34d399 !important;
  border-color: rgba(16, 185, 129, 0.45) !important;
}

html.tvseries-mode-theme .vault-card,
body.tvseries-mode-theme .vault-card,
html.tvseries-mode-theme .vault-card-sk,
body.tvseries-mode-theme .vault-card-sk {
  background: rgba(5, 18, 13, 0.92) !important;
  border-color: rgba(16, 185, 129, 0.38) !important;
}

html.tvseries-mode-theme .vault-card:hover,
body.tvseries-mode-theme .vault-card:hover,
html.tvseries-mode-theme .vault-card:focus-visible,
body.tvseries-mode-theme .vault-card:focus-visible {
  border-color: #34d399 !important;
  box-shadow: 0 8px 24px rgba(5, 150, 105, 0.28) !important;
}

html.tvseries-mode-theme .vault-tag.type,
body.tvseries-mode-theme .vault-tag.type {
  color: #d1fae5 !important;
  border-color: #34d399 !important;
  background: rgba(6, 24, 18, 0.92) !important;
}

html.tvseries-mode-theme .vault-cta,
body.tvseries-mode-theme .vault-cta {
  border-top-color: rgba(16, 185, 129, 0.25) !important;
}

html.tvseries-mode-theme .card-act,
body.tvseries-mode-theme .card-act {
  border-color: rgba(52, 211, 153, 0.6) !important;
  color: #d1fae5 !important;
  background: rgba(6, 20, 15, 0.85) !important;
}

html.tvseries-mode-theme .player-stage,
body.tvseries-mode-theme .player-stage {
  border-color: rgba(16, 185, 129, 0.78) !important;
  box-shadow: 0 0 24px rgba(5, 150, 105, 0.32) !important;
}

html.tvseries-mode-theme .player-status,
body.tvseries-mode-theme .player-status {
  color: #a7f3d0 !important;
}

html.tvseries-mode-theme .player-status .dot,
body.tvseries-mode-theme .player-status .dot {
  background: #34d399 !important;
  box-shadow: 0 0 8px #10b981 !important;
}

html.tvseries-mode-theme .icon-btn,
body.tvseries-mode-theme .icon-btn,
html.tvseries-mode-theme .back-btn,
body.tvseries-mode-theme .back-btn,
html.tvseries-mode-theme .mylist-btn,
body.tvseries-mode-theme .mylist-btn {
  background: rgba(5, 18, 13, 0.9) !important;
  border-color: rgba(16, 185, 129, 0.55) !important;
  color: #d1fae5 !important;
}

html.tvseries-mode-theme .icon-btn:hover,
body.tvseries-mode-theme .icon-btn:hover,
html.tvseries-mode-theme .back-btn:hover,
body.tvseries-mode-theme .back-btn:hover,
html.tvseries-mode-theme .mylist-btn:hover,
body.tvseries-mode-theme .mylist-btn:hover {
  border-color: #34d399 !important;
  color: #ffffff !important;
  background: rgba(5, 150, 105, 0.28) !important;
}

html.tvseries-mode-theme .quick-ep-bar,
body.tvseries-mode-theme .quick-ep-bar {
  background: linear-gradient(180deg, rgba(6, 22, 16, 0.96) 0%, rgba(4, 12, 9, 0.98) 100%) !important;
  border-color: rgba(16, 185, 129, 0.48) !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.72), inset 0 1px 0 rgba(16, 185, 129, 0.16) !important;
}

html.tvseries-mode-theme .quick-season-pill,
body.tvseries-mode-theme .quick-season-pill {
  background: rgba(16, 185, 129, 0.18) !important;
  border-color: rgba(52, 211, 153, 0.75) !important;
  color: #d1fae5 !important;
}

html.tvseries-mode-theme .quick-ep-pill.active,
body.tvseries-mode-theme .quick-ep-pill.active {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%) !important;
  border-color: #34d399 !important;
  color: #ffffff !important;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.45) !important;
}

html.tvseries-mode-theme .quick-next-ep-btn,
body.tvseries-mode-theme .quick-next-ep-btn,
html.tvseries-mode-theme .cyber-btn,
body.tvseries-mode-theme .cyber-btn,
html.tvseries-mode-theme .try-next-server-btn,
body.tvseries-mode-theme .try-next-server-btn {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%) !important;
  border-color: #34d399 !important;
  color: #ffffff !important;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.4) !important;
}

html.tvseries-mode-theme .episode-item,
body.tvseries-mode-theme .episode-item {
  border-color: rgba(16, 185, 129, 0.28) !important;
  background: rgba(5, 18, 13, 0.78) !important;
}

html.tvseries-mode-theme .episode-item.current,
body.tvseries-mode-theme .episode-item.current {
  border-color: #34d399 !important;
  background: rgba(5, 150, 105, 0.24) !important;
}

/* Hide PWA install button whenever player page, title modal, or stream configurator is active (portrait & landscape) */
body.cinema-fullscreen #pwaInstall,
body.pip-floating #pwaInstall,
body:has(#playerMain) #pwaInstall,
body:has(#titleModal:not(.hidden)) #pwaInstall,
body:has(#animeConfiguratorPanel:not(.hidden)) #pwaInstall {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ---- v77 skeletons (v3.6.5): chamfered open2077 placeholders, one cyan sweep, yellow edge tick ---- */
@keyframes skSweep77 { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.sk, .skeleton .vault-poster-wrap {
  position: relative; overflow: hidden; animation: none; background: #0c131f;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}
.skeleton .vault-poster-wrap { border-left: 2px solid rgba(252, 238, 10, .5); }
.sk::after, .skeleton .vault-poster-wrap::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(0, 240, 255, .13) 45%, rgba(0, 240, 255, .24) 50%, rgba(0, 240, 255, .13) 55%, transparent);
  animation: skSweep77 1.35s cubic-bezier(.4, 0, .2, 1) infinite;
}
.sk-line { clip-path: polygon(0 0, calc(100% - 5px) 0, 100% 5px, 100% 100%, 0 100%); }
.sk-row-title { width: 11rem; height: 1.05rem; }
.vault-row-boot .vault-row-head { min-height: 2rem; align-items: center; }
@media (prefers-reduced-motion: reduce) { .sk::after, .skeleton .vault-poster-wrap::after { animation: none; transform: none; background: rgba(0, 240, 255, .05); } }
#vaultPending .vault-pending-title { display: block; width: min(22rem, 70%); height: 2.6rem; margin: 0 0 2rem; }
#vaultPending.hidden { display: none !important; }

/* v3.6.6: pending-skeleton stall panel */
.vault-pending-retry { display: flex; flex-direction: column; align-items: flex-start; gap: .6rem; margin: 0 0 1.5rem; padding: 1rem 1.2rem; max-width: 30rem;
  background: #0a111c; border: 1px solid rgba(0, 240, 255, .3); border-left: 3px solid #fcee0a; clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%); }
.vault-pending-retry .vpr-title { font: 700 .75rem/1 'JetBrains Mono', ui-monospace, monospace; letter-spacing: .28em; color: #fcee0a; }
.vault-pending-retry .vpr-sub { color: rgba(226, 240, 255, .8); font-size: .9rem; }
.vault-pending-retry .vpr-btn { display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; margin: 0; }

/* ==========================================================================
   Player overlay fix (Jake, Nov 2026; same fix as ViperFlix): in full screen the top bar no longer lays a dark
   band over the picture for any movie, show or anime, on any server. The bar itself is clear; its buttons keep
   their own small backgrounds and the status line a text shadow. The picture still fills the screen (contain).
   ========================================================================== */
body.cinema-fullscreen .player-bar {
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
body.cinema-fullscreen .player-bar .player-status {
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9), 0 0 10px rgba(0, 0, 0, 0.6);
}
body.cinema-fullscreen .player-bar .icon-btn,
body.cinema-fullscreen .player-bar .player-top-btn {
  background: rgba(0, 0, 0, 0.55) !important;
}
.player-stage .viper-anime-video { object-fit: contain; background: #000; }
body.cinema-fullscreen .player-stage .viper-anime-video { position: absolute !important; inset: 0 !important; width: 100% !important; height: 100% !important; }
html.tv-mode .v3v-o77-footer, html.apk-mode .v3v-o77-footer { display: none !important; }
