/* ======================================================================================
   APPS.CSS
   ====================================================================================== */

/* ======================================================================================
   GLOBAL ROOT TOKENS
   ====================================================================================== */

/* ======================================================================================
   GLOBAL ROOT TOKENS (organized only)
   ====================================================================================== */

:root {
  --white: #ffffff;
  --clear: #0000;
  --red: #dc3545;
  --green: #00ff38;
  --pink: #ff00c1;
  --link: #1875ff;
  --ok: #00ff38;
  --warn: #ffdd57;
  --fail: #dc3545;
  --info: #1875ff;
  --window-dark: #0e1111;
  --window-darker: #020202;
  --window-border: #353839;
  --window-border2: #0e1111;
  --panel-border: #22272e;
  --panel-head: #0d0f12;
  --boot-bg: #000;
  --boot-fg: #cfd3d7;
  --boot-dim: #343a40;
  --login-bg-dark: #050505;
  --login-bg-mid: #0b0b0b;
  --login-bg-light: #111;
  --neon-cyan: #00ccff;
  --neon-cyan-soft: rgba(0,204,255,.45);
  --neon-green-soft: rgba(0,255,69,.45);
  --neon-blue-soft: rgba(0,170,255,.45);
  --panel-glow: rgba(0,204,255,.18);
  --panel-glow-strong: rgba(0,204,255,.35);
  --side-w: 460px;
  --w-time: 12ch;
  --w-val: 18ch;
  --breakpoint-xs: 0;
  --breakpoint-sm: 576px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 1440px;
  --breakpoint-xl: 1600px;
  --breakpoint-xxl: 1920px;
}

/* ======================================================================================
   UTILITIES
   ====================================================================================== */

.hidden {
  display: none !important;
}

.csb {
  scrollbar-width: thin;
  scrollbar-color: var(--window-border) transparent;
}

.csb::-webkit-scrollbar, .wb-body::-webkit-scrollbar {
  width: 12px;
}

.csb::-webkit-scrollbar-track, .wb-body::-webkit-scrollbar-track {
  background: transparent;
}

.csb::-webkit-scrollbar-thumb, .wb-body::-webkit-scrollbar-thumb {
  background: var(--window-border);
}

/* RM ANIM */

/* ===============================
   rmfunc.js animation keyframes
   Move here so Brave cannot block them
   =============================== */

@keyframes rmFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes rmFadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes rmSlideL {
  from {
    opacity: 0;
    transform: translateX(-18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes rmSlideR {
  from {
    opacity: 0;
    transform: translateX(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes rmSlideT {
  from {
    opacity: 0;
    transform: translateY(-14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes rmSlideB {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.rm-title-wrap {
  display: inline-flex;
  gap: 6px;
  align-items: baseline;
}

.rm-title-beam {
  animation: rmBlink .95s steps(1,end) infinite;
  transform: translateY(1px);
}

/* ===============================
   Readme / Creator App (rm-*)
   =============================== */

.rm-app {
  --rm-fg: var(--boot-fg,#cfd3d7);
  --rm-dim: #96a1aa;
  --rm-accent: var(--info,#64c7ff);
  --rm-border: var(--panel-border,#2a2f36);
  --rm-pane: rgba(14,18,24,.88);
  --rm-pane2: rgba(11,15,20,.92);
  --rm-bg: #020202;
  position: relative;
  inset: 0;
  display: grid;
  grid-template-columns: 380px minmax(0,1fr);
  gap: 16px;
  padding: 16px;
  height: 100%;
  min-height: 0;
  color: var(--rm-fg);
  font-family: Oxanium,ui-sans-serif,system-ui;
  background: radial-gradient(900px 900px at 100% 0%, rgba(167, 100, 255, 0.08), transparent 60%), radial-gradient(900px 900px at 0% 100%, rgba(255, 69, 69, 0.06), transparent 60%), var(--rm-bg);
  margin-top: 10px;
}

.rm-col {
  border: 1px solid var(--rm-border);
  background: var(--window-dark);
  backdrop-filter: blur(6px) saturate(120%);
  -webkit-backdrop-filter: blur(6px) saturate(120%);
  box-shadow: 0 12px 24px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.03) inset;
  min-height: 0;
}

.rm-left {
  overflow: auto;
  background: linear-gradient(var(--window-border),var(--window-border2));
}

/* Right column never scrolls; the active panel inside will */

.rm-right {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.rm-info-head {
  padding: 8px;
  background: linear-gradient(var(--window-border),var(--window-border2));
}

.rm-title {
  margin: 0;
  font: 800 18px/1.2 Oxanium,system-ui;
}

.rm-tabs {
  display: flex;
  gap: 6px;
  padding: 10px 12px 0;
  flex-wrap: wrap;
  background: var(--window-dark);
}

.rm-tab {
  appearance: none;
  border: 1px solid var(--rm-border);
  background: linear-gradient(var(--window-border),var(--window-border2));
  color: var(--rm-fg);
  font: 700 12px/1 Oxanium;
  padding: 8px 10px;
  cursor: pointer;
}

.rm-tab.is-active {
  background: linear-gradient(var(--zp-border),var(--boot-dim));
  border-bottom-color: transparent;
}

/* Panels container fills leftover space */

.rm-panels {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  border-top: 1px solid var(--rm-border);
  padding: 12px;
  box-sizing: border-box;
  background: var(--window-dark);
}

/* Panels: only active shows and takes full height */

.rm-panel {
  display: none;
  height: 100%;
  min-height: 0;
}

.rm-panel.is-active {
  display: block;
}

/* The scrollable panel */

.rm-panel--scroll {
  height: 100%;
  min-height: 0;
  overflow: auto;
  scrollbar-gutter: stable both-edges;
}

/* Stacked changelog */

.rm-timeline--stacked {
  list-style: none;
  margin: 0;
  padding: 0;
  padding-right: 10px;
}

.rm-timeline--stacked > li {
  padding: 12px 0;
  border-bottom: 1px solid var(--window-border,#2b2f32);
}

.rm-timeline--stacked > li:last-child {
  border-bottom: 0;
}

.rm-version {
  display: flex;
  gap: 10px;
  align-items: baseline;
  font-family: Oxanium,system-ui;
}

.rm-version .rm-time {
  margin-left: auto;
  opacity: .7;
  font-size: 12px;
}

.rm-changes {
  margin: 6px 0 0;
  padding-left: 18px;
}

.rm-changes li {
  margin: 4px 0;
}

.rm-bullets {
  margin: 8px 0 0;
  padding-left: 18px;
  opacity: .95;
}

.rm-bullets li {
  margin: 4px 0;
}

.rm-todo {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rm-todo li {
  padding: 6px 0;
}

.rm-time {
  color: var(--rm-dim);
  font: 700 11px/1 Oxanium;
  margin-left: 6px;
}

/* Creator bits */

.rm-card {
  border: 1px solid var(--rm-border);
  background: var(--window-dark);
  margin: 12px;
  padding: 12px;
}

.rm-creator {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  align-items: center;
}

.rm-avatar {
  width: 64px;
  height: 64px;
  border: 1px solid var(--rm-border);
  background: #0d1117;
  object-fit: cover;
}

.rm-head {
  min-width: 0;
}

.rm-creator-name {
  margin: 0;
  font: 800 22px/1.2 Oxanium;
  letter-spacing: .35px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rm-cursor {
  display: inline-block;
  margin-left: 3px;
  font: 700 20px/1 Oxanium;
  transform: translateY(2px);
  animation: rmBlink .95s steps(1,end) infinite;
}

@keyframes rmBlink {
  50% {
    opacity: 0;
  }
}

.rm-roles {
  margin: 2px 0 0;
  color: var(--rm-dim);
  font: 700 12px/1.3 Oxanium;
}

.rm-bio {
  grid-column: 1 / -1;
  margin: 6px 0 0;
  color: var(--rm-fg);
  opacity: .9;
  line-height: 1.55;
  font-size: 13px;
}

.rm-sub {
  margin: 0 0 8px;
  font: 800 13px/1 Oxanium;
  letter-spacing: .3px;
  text-transform: uppercase;
  color: var(--rm-accent);
}

.rm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.rm-btn {
  appearance: none;
  cursor: pointer;
  padding: 10px 12px;
  border: 1px solid var(--rm-border);
  background: linear-gradient(var(--window-border),var(--window-border2));
  color: var(--rm-fg);
  font: 700 12px/1 Oxanium;
  text-align: center;
  transition: transform .08s ease, background .16s ease, border-color .16s ease;
}

.rm-btn:hover {
  background: linear-gradient(var(--zp-border),var(--boot-dim));
  border-color: rgba(255,255,255,.15);
}

.rm-btn:active {
  background: linear-gradient(var(--window-border),var(--window-border2));
}

.rm-btn.rm-primary {
  background: linear-gradient(#13311f,#10281a);
  border-color: color-mix(in srgb, var(--ok,#00ff38) 35%, var(--rm-border) 65%);
}

.rm-btn.rm-ghost {
  background: linear-gradient(var(--window-border),var(--window-border2));
}

.rm-btn.rm-ghost:hover {
  background: linear-gradient(var(--zp-border),var(--boot-dim));
  border-color: rgba(255,255,255,.15);
}

.rm-btn[data-tip] {
  position: relative;
}

.rm-btn.is-copied::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 6px);
  transform: translateX(-50%);
  background: #0f141b;
  color: var(--rm-fg);
  border: 1px solid var(--rm-border);
  padding: 4px 6px;
  font: 700 11px/1 Oxanium;
  white-space: nowrap;
  box-shadow: 0 6px 14px rgba(0,0,0,.35);
}

.rm-fingerprint {
  display: block;
  margin: 6px 0 2px;
  padding: 8px 10px;
  border: 1px solid var(--rm-border);
  background: linear-gradient(var(--window-border),var(--window-border2));
  font: 700 12px/1 Oxanium,ui-monospace,monospace;
  letter-spacing: .4px;
  user-select: all;
}

.rm-note {
  color: var(--rm-dim);
  font: 12px/1.3 Oxanium;
  margin-top: 10px;
}

.rm-links {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(140px,1fr));
  gap: 8px;
}

.rm-link {
  text-decoration: none;
}

/* Use your themed scrollbar class inside the panel */

/* Responsive */

@media (max-width:1020px) {
  .rm-app {
    grid-template-columns: 1fr;
  }
}

/* ======================================================================================
   GAME SERVER CARDS - GLASS TERMINAL STYLE (MAINT + API DOWN PARITY)
   ====================================================================================== */

:root {
  --gs-fg: var(--boot-fg, #cfd3d7);
  --gs-dim: #9aa4ad;
  --gs-accent: var(--info, #64c7ff);
  --gs-border: var(--panel-border, #2a2f36);
  --gs-ok: var(--ok, #00ff38);
  --gs-warn: var(--warn, #ffdd57);
  --gs-fail: var(--fail, #ff3860);
}

.gs-wrap {
  padding: 16px 20px 24px;
  color: var(--gs-fg);
  font-family: Oxanium, ui-sans-serif, system-ui;
  background: transparent;
}

.gs-title {
  margin-top: 20px;
  margin-bottom: 20px;
  color: var(--gs-fg);
  letter-spacing: .4px;
  font-size: 1.5rem;
  position: relative;
}

.gs-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 18px;
  width: 100%;
  box-sizing: border-box;
}

.gs-card {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1 1 400px;
  min-width: 400px;
  max-width: 520px;
  border-radius: 3px;
  border: 1px solid var(--gs-border);
  background: linear-gradient(135deg, rgba(9,12,17,0.98), rgba(3,5,8,0.98));
  backdrop-filter: blur(8px) saturate(130%);
  -webkit-backdrop-filter: blur(8px) saturate(130%);
  box-shadow: 0 14px 26px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.04) inset;
  overflow: hidden;
  isolation: isolate;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .18s ease;
  z-index: 20;
}

.gs-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--gs-border) 70%, #c9f0ff 18%);
  box-shadow: 0 18px 32px rgba(0,0,0,.65), 0 0 0 1px rgba(255,255,255,.06) inset;
  background: linear-gradient(145deg, rgba(12,17,24,1), rgba(5,8,13,1));
  z-index: 50;
}

/* -------- Maintenance / API Down border parity (like render.js intent) -------- */

.gs-card.is-maint-warn {
  border-color: color-mix(in srgb, var(--gs-warn) 55%, var(--gs-border) 45%);
  box-shadow: 0 14px 26px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.04) inset, 0 0 0 1px rgba(255,221,87,.18);
}

.gs-card.is-maint-down {
  border-color: color-mix(in srgb, var(--gs-fail) 60%, var(--gs-border) 40%);
  box-shadow: 0 14px 26px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.04) inset, 0 0 0 1px rgba(220,53,69,.22);
}

.gs-card.is-global-maint {
  border-color: color-mix(in srgb, var(--gs-warn) 50%, var(--gs-border) 50%);
}

.gs-card.is-api-down {
  border-color: color-mix(in srgb, var(--gs-warn) 55%, var(--gs-border) 45%);
  box-shadow: 0 14px 26px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.04) inset, 0 0 0 1px rgba(255,221,87,.18);
}

/* Do not let hover override these borders */

.gs-card.is-maint-warn:hover, .gs-card.is-maint-down:hover, .gs-card.is-global-maint:hover, .gs-card.is-api-down:hover {
  border-color: inherit;
}

/* Header bar */

.gs-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: linear-gradient(120deg, #05070a 0%, #0d1117 32%, #151c23 55%, rgb(16,21,28) 70%, #070a0f 100%);
  border-bottom: 1px solid var(--gs-border);
  border-radius: 3px 3px 0 0;
}

.gs-main-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.gs-game {
  padding: 6px 8px;
  margin-bottom: 4px;
  border-radius: 3px;
  font: 700 11px/1 Oxanium, system-ui;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--gs-accent);
  background: radial-gradient(circle at top left, rgba(100,199,255,.25) 0, rgba(4,8,12,.9) 40%);
  border: 1px solid rgba(100,199,255,.35);
  max-width: 170px;
}

.gs-name {
  font: 600 17px/1.25 Oxanium, system-ui;
  color: var(--gs-fg);
  margin: 0;
}

.gs-desc {
  margin: 0;
  padding: 10px 14px 4px;
  color: var(--gs-dim);
  font: 12px/1.45 Oxanium, system-ui;
}

.gs-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 14px 12px;
  flex-wrap: nowrap;
}

.gs-meta-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
}

.gs-endpoint {
  position: relative;
  cursor: pointer;
  padding: 8px 10px;
  border-radius: 3px;
  border: 1px solid var(--gs-border);
  background: linear-gradient(135deg, rgba(13,18,25,0.96), rgba(6,9,14,0.96));
  color: var(--gs-fg);
  font: 600 12px/1 Oxanium, system-ui;
  letter-spacing: .2px;
  flex-shrink: 0;
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: border-color .16s ease, background .16s ease, transform .08s ease, box-shadow .16s ease;
}

.gs-endpoint:hover {
  border-color: rgba(255,255,255,.18);
  background: #131a22;
  box-shadow: 0 0 0 1px rgba(0,204,255,.28);
}

.gs-endpoint:active {
  transform: translateY(1px);
}

/* Tooltip node (used by copy + online hover) */

#gs-tooltip {
  position: fixed;
  left: 0;
  top: 0;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid var(--gs-border);
  background: rgba(15,20,27,0.96);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--gs-accent);
  font: 700 11px/1 Oxanium, system-ui;
  letter-spacing: .2px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -125%);
  z-index: 2147483602;
  transition: opacity .12s ease;
}

/* Status pill */

.gs-status {
  flex: 0 0 auto;
  white-space: nowrap;
  padding: 7px 11px;
  border-radius: 3px;
  border: 1px solid var(--gs-border);
  background: #10141a;
  text-transform: uppercase;
  color: var(--gs-fg);
  letter-spacing: .8px;
  font: 700 11px/1 "Linear Beam", ui-monospace, monospace;
  position: relative;
  z-index: 5;
}

.gs-status::before {
  content: "[ ";
  opacity: .9;
}

.gs-status::after {
  content: " ]";
  opacity: .9;
}

.gs-status.ok {
  color: var(--gs-ok);
  border-color: color-mix(in srgb, var(--gs-ok) 38%, var(--gs-border) 62%);
  cursor: help;
}

.gs-status.fail {
  color: var(--gs-fail);
  border-color: color-mix(in srgb, var(--gs-fail) 38%, var(--gs-border) 62%);
}

.gs-status.warn {
  color: var(--gs-warn);
  border-color: color-mix(in srgb, var(--gs-warn) 38%, var(--gs-border) 62%);
}

.gs-status.ok:hover {
  box-shadow: 0 0 0 1px rgba(0,204,255,.28);
}

.gs-players {
  font: 600 12px/1 Oxanium, system-ui;
  color: var(--gs-accent);
  letter-spacing: 0.3px;
  max-width: 80px;
}

.gs-map {
  font: 500 11px/1 Oxanium, system-ui;
  color: var(--gs-dim);
  opacity: 0.9;
  max-width: 180px;
}

.gs-scroll {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gs-marquee {
  text-overflow: clip;
  animation: gsMarquee 8s linear infinite alternate;
}

@keyframes gsMarquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(-1 * var(--scroll-distance, 0px)));
  }
}

.gs-link {
  padding: 6px 10px;
  border-radius: 3px;
  border: 1px solid var(--gs-border);
  background: #0f141b;
  color: var(--gs-accent);
  font: 600 12px/1 Oxanium, system-ui;
  text-decoration: none;
  flex-shrink: 0;
  transition: border-color .16s ease, background .16s ease, transform .08s ease;
}

.gs-link:hover {
  border-color: rgba(255,255,255,.16);
  background: var(--boot-dim, #1f2730);
}

.gs-link:active {
  transform: translateY(1px);
}

@media (max-width: 980px) {
  .gs-card {
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  .gs-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

@media (max-width: 640px) {
  .gs-meta-right {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

/* ============================
   zPlayer — unique CSS vars
   ============================ */

:root {
  --zp-bg: #0b0f14;
  --zp-pane: #0f141b;
  --zp-pane-2: #0c1117;
  --zp-fg: #cfd3d7;
  --zp-dim: #95a1aa;
  --zp-accent: #353839;
  --zp-border: #27303a;
  --zp-ok: #00ff38;
  --zp-warn: #ff9800;
  /*NEW: warning/orange note color;*/
  --zp-radius: 6px;
  --zp-gap: 14px;
  --zp-shadow: 0 10px 22px rgba(0,0,0,.45),0 0 0 1px rgba(255,255,255,.03) inset;
}

/* App shell */

.zp-app {
  min-height: 100%;
  height: 100dvh;
  display: grid;
  grid-template-rows: 1fr auto;
  background: linear-gradient(var(--window-darker), var(--window-dark));
  color: var(--zp-fg);
  font-family: Oxanium,Arial,sans-serif;
}

/* Views */

#zp-views {
  position: relative;
  min-height: 0;
  overflow: hidden;
  display: grid;
}

.zp-view {
  display: none;
  min-height: 0;
}

.zp-view.is-active {
  display: block;
}

/* ---------- HOME: Carousel + Current playlist ---------- */

.zp-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--window-darker, #000);
  color: var(--fg-main, #cfd3d7);
  font-family: inherit;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  z-index: 10;
}

.zp-home {
  min-height: 0;
  overflow: auto;
  padding: 16px;
  display: grid;
  grid-auto-rows: min-content;
  gap: 16px;
}

/* Carousel shell with arrows */

.zp-carousel-wrap {
  position: relative;
  background: linear-gradient(var(--zp-bg), var(--window-darker));
  border: 2px solid var(--window-border);
  box-shadow: var(--zp-shadow);
  padding: 8px 36px;
}

.zp-carousel {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(240px,28vw,360px);
  gap: var(--zp-gap);
  overflow-x: hidden;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 8px;
  -webkit-overflow-scrolling: touch;
  margin: 10px;
}

.zp-carousel::-webkit-scrollbar {
  height: 10px;
}

.zp-carousel::-webkit-scrollbar-thumb {
  background: var(--window-border);
}

.zp-car-btn {
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  width: 34px;
  height: 60px;
  border: 2px solid var(--window-border);
  background: var(--window-darker);
  color: var(--zp-fg);
  font: 800 14px/1 Oxanium,system-ui;
  cursor: pointer;
  box-shadow: var(--zp-shadow);
  display: grid;
  place-items: center;
  opacity: .9;
}

.zp-car-btn:hover {
  background: var(--window-border);
}

.zp-car-btn.left {
  left: 8px;
}

.zp-car-btn.right {
  right: 8px;
}

/* Playlist cards (slides) */

.zp-card {
  scroll-snap-align: start;
  border: 2px solid var(--window-border);
  background: transparent;
  overflow: hidden;
  cursor: pointer;
  transition: transform .15s ease,border-color .15s ease,background .15s ease;
}

.zp-card:hover {
  background: linear-gradient(var(--window-darker), var(--window-dark));
}

.zp-card-cover {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  background: var(--fx-pane);
}

.zp-card-body {
  padding: 10px;
}

.zp-card-title {
  margin: 0 0 2px;
  font: 800 14px/1.2 Oxanium,system-ui;
}

.zp-card-meta {
  margin: 0;
  color: var(--zp-dim);
  font: 600 11px/1.3 Oxanium,system-ui;
}

/* Current playlist block */

.zp-current.is-hidden {
  display: none;
}

.zp-current {
  border: 2px solid var(--window-border);
  background: linear-gradient(var(--zp-bg), var(--window-darker));
  box-shadow: var(--zp-shadow);
  margin-top: 15px;
}

.zp-current-head {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 2px solid var(--window-border);
}

.zp-current-title {
  margin: 0;
  font: 800 15px/1.2 Oxanium,system-ui;
}

.zp-current-meta {
  color: var(--zp-dim);
  font: 700 11px/1 Oxanium,system-ui;
}

/* Songs list */

.zp-songs {
  min-height: 0;
  overflow: auto;
  padding: 8px;
}

.zp-song {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--window-border);
  background: linear-gradient(var(--zp-bg), var(--window-darker));
  transition: border-color .15s ease,background .15s ease;
}

.zp-song + .zp-song {
  margin-top: 8px;
}

.zp-song:hover {
  background: linear-gradient(var(--window-border), var(--window-darker));
  border-color: rgba(255,255,255,.1);
}

.zp-art {
  width: 48px;
  height: 48px;
  object-fit: cover;
  display: block;
  background: #0d141b;
  border: 1px solid var(--window-border);
}

.zp-song.artless .zp-art {
  background: linear-gradient(135deg,#131b26,#0e141c);
}

.zp-song-info {
  min-width: 0;
}

.zp-title-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.zp-song-title {
  margin: 0;
  font: 800 14px/1.2 Oxanium,system-ui;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.zp-song-artist {
  margin: 0;
  color: var(--zp-dim);
  font: 700 11px/1.2 Oxanium,system-ui;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.zp-song-right {
  display: grid;
  gap: 4px;
  justify-items: end;
}

.zp-mini {
  display: none;
  color: var(--zp-dim);
  font: 700 10px/1 Oxanium,system-ui;
}

.zp-playbtn {
  appearance: none;
  border: 1px solid var(--window-border);
  background: var(--window-darker);
  color: var(--zp-fg);
  font: 700 11px/1 Oxanium,system-ui;
  padding: 6px 8px;
  cursor: pointer;
}

.zp-playbtn:hover {
  background: linear-gradient(var(--zp-bg), var(--window-border));
  border-color: rgba(255,255,255,.12);
}

/* ---------- Controls (sticky) ---------- */

.zp-controls {
  display: grid;
  grid-template-columns: minmax(220px,320px) 1fr minmax(320px,36vw);
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-top: 2px solid var(--window-border);
  background: linear-gradient(var(--window-border2), var(--window-darker));
  box-shadow: var(--zp-shadow);
}

/* ZP seek styling */

#zp-seek {
  --zp-fill: #00ff38;
  --zp-track: #cfd3d7;
  --zp-pct: 0%;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border: 0;
  padding: 0;
  border-radius: 999px;
  background-color: var(--zp-track);
  background-image: linear-gradient(var(--zp-fill), var(--zp-fill));
  background-size: var(--zp-pct) 100%;
  background-repeat: no-repeat;
  outline: none;
  cursor: pointer;
  touch-action: none;
}

/* Track (Chrome/Edge/Safari) */

#zp-seek::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: transparent;
}

/* Thumb (Chrome/Edge/Safari) */

#zp-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid rgba(0,0,0,0.35);
  cursor: pointer;
  margin-top: -4px;
}

#zp-seek:focus-visible::-webkit-slider-thumb {
  outline: 2px solid rgba(255,255,255,0.35);
  outline-offset: 2px;
}

/* Firefox */

#zp-seek::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: var(--zp-track);
}

#zp-seek::-moz-range-progress {
  height: 6px;
  border-radius: 999px;
  background: var(--zp-fill);
}

#zp-seek::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid rgba(0,0,0,0.35);
  cursor: pointer;
}

#zp-seek::-moz-focus-outer {
  border: 0;
}

/* allow columns to shrink without clipping */

.zp-controls > * {
  min-width: 0;
}

@media (max-width:900px) {
  .zp-controls {
    grid-template-columns: 1fr;
    grid-auto-rows: min-content;
    gap: 8px;
  }
}

.zp-now {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 10px;
  align-items: center;
}

.zp-now .zp-art {
  width: 54px;
  height: 54px;
}

.zp-now-title {
  margin: 0 0 2px;
  font: 800 14px/1.2 Oxanium,system-ui;
}

.zp-now-artist {
  margin: 0;
  color: var(--zp-dim);
  font: 700 11px/1.2 Oxanium,system-ui;
}

.zp-center-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
}

.zp-ctrl {
  appearance: none;
  border: 2px solid var(--window-border);
  background: var(--window-darker);
  color: var(--zp-fg);
  padding: 8px 10px;
  font: 800 12px/1 Oxanium,system-ui;
  cursor: pointer;
  transition: background .16s ease,border-color .16s ease,transform .08s ease;
}

.zp-ctrl:hover {
  background: #131a22;
  border-color: rgba(255,255,255,.15);
}

.zp-ctrl:active {
  transform: translateY(1px);
}

.zp-ctrl[data-active="1"] {
  outline: 2px solid rgba(100,199,255,.35);
}

.zp-right {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.zp-time {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.zp-time small {
  color: var(--zp-dim);
  font: 700 10px/1 Oxanium,system-ui;
}

.zp-volume {
  display: grid;
  grid-template-columns: auto minmax(0,1fr);
  gap: 8px;
  align-items: center;
}

/* ranges */

.zp-range {
  appearance: none;
  height: 10px;
  background: #121821;
  border: 2px solid var(--window-border);
  outline: none;
  width: 100%;
}

.zp-range::-webkit-slider-thumb {
  appearance: none;
  width: 14px;
  height: 14px;
  background: var(--zp-accent);
  border: 2px solid rgba(255,255,255,.25);
  margin-top: -5px;
}

.zp-range::-moz-range-thumb {
  width: 14px;
  height: 14px;
  background: var(--zp-accent);
  border: 2px solid rgba(255,255,255,.25);
}

/* ============================
   zPlayer scrollbars (scoped)
   ============================ */

.zp-app {
  --zp-scrollbar: var(--window-border,#27303a);
}

.zp-home, .zp-songs, .zp-carousel, .zp-lyrics-scroll {
  scrollbar-width: thin;
  scrollbar-color: var(--window-border) transparent;
}

.zp-home::-webkit-scrollbar, .zp-songs::-webkit-scrollbar, .zp-carousel::-webkit-scrollbar, .zp-lyrics-scroll::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

.zp-home::-webkit-scrollbar-track, .zp-songs::-webkit-scrollbar-track, .zp-carousel::-webkit-scrollbar-track, .zp-lyrics-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.zp-home::-webkit-scrollbar-thumb, .zp-songs::-webkit-scrollbar-thumb, .zp-carousel::-webkit-scrollbar-thumb, .zp-lyrics-scroll::-webkit-scrollbar-thumb {
  background: var(--window-border);
}

.zp-home::-webkit-scrollbar-thumb:hover, .zp-songs::-webkit-scrollbar-thumb:hover, .zp-carousel::-webkit-scrollbar-thumb:hover, .zp-lyrics-scroll::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb,var(--window-border) 85%,white 15%);
}

/* ============================
   Lyrics overlay
   ============================ */

.zp-lyrics {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8,10,14,.9), rgba(10,14,18,.92));
  box-shadow: var(--zp-shadow);
  display: grid;
  grid-template-rows: auto 1fr;
  z-index: 2;
}

.zp-lyrics.is-hidden {
  display: none;
}

.zp-lyrics-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  background: linear-gradient(var(--window-border2), var(--window-darker));
  margin-top: 10px;
}

.zp-lyrics-now {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 10px;
  align-items: center;
}

.zp-lyrics-art {
  width: 56px;
  height: 56px;
  border: 1px solid var(--window-border);
  object-fit: cover;
  background: #0e141b;
}

.zp-lyrics-meta h4 {
  margin: 0 0 2px;
  font: 800 14px/1.2 Oxanium,system-ui;
}

.zp-lyrics-meta p {
  margin: 0;
  color: var(--zp-dim);
  font: 700 11px/1.2 Oxanium,system-ui;
}

.zp-lyrics-close {
  appearance: none;
  border: 2px solid var(--window-border);
  background: var(--window-dark);
  color: var(--zp-fg);
  padding: 8px 10px;
  font: 800 12px/1 Oxanium,system-ui;
  cursor: pointer;
}

.zp-lyrics-scroll {
  min-height: 0;
  overflow: auto;
  padding: 18px 16px 24px;
}

.zp-lyrics-lines {
  max-width: 880px;
  margin: 0 auto;
  display: grid;
  gap: 8px;
}

/* NEW: synced-lyrics rows */

.zp-lyr-row {
  padding: 6px 8px;
  border-left: 3px solid transparent;
  color: var(--zp-fg);
  font: 700 14px/1.45 Oxanium,system-ui;
  opacity: .7;
  transition: opacity .18s ease, border-color .18s ease, background .18s ease, text-decoration-color .18s ease;
}

.zp-lyr-row.is-active {
  opacity: 1;
  border-color: var(--zp-accent);
  background: rgba(255,255,255,0.06);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* NEW: unsynced note + plain block */

.zp-lyrics-note {
  color: var(--zp-warn);
  font: 800 12px/1.3 Oxanium,system-ui;
  margin-bottom: 6px;
}

pre.zp-lyr-plain {
  margin: 0;
  padding: 8px 10px;
  white-space: pre-wrap;
  background: #0e131a;
  border: 1px solid var(--window-border);
  font: 700 13px/1.5 Oxanium,ui-monospace,Consolas,monospace;
  color: var(--zp-fg);
}

