:root {
  --bg: #0a0d0a;
  --panel: #14181a;
  --panel-2: #1b2024;
  --line: #232a2e;
  --green: #00ff66;
  --green-dim: #00b34a;
  --amber: #ffb000;
  --text: #c8e6d0;
  --text-dim: #6e8a78;
  --row-hover: #1f2a23;
  --danger: #ff3b3b;
  --font-lcd: "SF Mono", "Menlo", "Consolas", monospace;
  --font-ui: -apple-system, BlinkMacSystemFont, "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 14px;
  overflow: hidden;
}

#app {
  display: grid;
  grid-template-rows: auto 1fr;
  height: 100vh;
  height: 100dvh;   /* mobile browsers: track the real visible viewport */
}

/* ---------- player header ---------- */

.player {
  background: linear-gradient(180deg, #1a2120 0%, #0d1212 100%);
  border-bottom: 1px solid var(--line);
  padding: 14px 18px;
  display: grid;
  grid-template-columns: 200px 1fr;
  grid-template-rows: auto auto auto;
  grid-template-areas:
    "brand lcd"
    "seek  seek"
    "ctrl  ctrl"
    "rack  rack";
  gap: 12px 16px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.brand {
  grid-area: brand;
  font-family: var(--font-lcd);
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--green);
  font-size: 22px;
  text-shadow: 0 0 12px rgba(0,255,102,0.6);
  align-self: center;
}
.brand span {
  color: var(--text-dim);
  margin-left: 8px;
  text-shadow: none;
  font-weight: 500;
}

/* LCD bezel */
.lcd {
  grid-area: lcd;
  background: #03100a;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 14px;
  box-shadow: inset 0 0 18px rgba(0,255,102,0.10);
  position: relative;
  overflow: hidden;
}
.lcd-row {
  display: flex;
  gap: 22px;
  font-family: var(--font-lcd);
  font-size: 12px;
  color: var(--green-dim);
  letter-spacing: 1px;
}
.lcd-row span { text-shadow: 0 0 6px rgba(0,255,102,0.5); }
.lcd-marquee {
  margin-top: 6px;
  font-family: var(--font-lcd);
  font-size: 15px;
  color: var(--green);
  text-shadow: 0 0 8px rgba(0,255,102,0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* mini EQ bars */
.eq {
  position: absolute;
  bottom: 8px;
  right: 12px;
  display: flex;
  gap: 2px;
  height: 18px;
  align-items: flex-end;
}
.eq span {
  display: block;
  width: 3px;
  background: var(--green);
  height: 6px;
  opacity: 0.7;
  box-shadow: 0 0 4px rgba(0,255,102,0.6);
}
.eq.live span { animation: eq 0.9s ease-in-out infinite; }
.eq.live span:nth-child(2n)  { animation-duration: 0.7s; animation-delay: 0.1s; }
.eq.live span:nth-child(3n)  { animation-duration: 1.1s; animation-delay: 0.2s; }
.eq.live span:nth-child(5n)  { animation-duration: 0.6s; animation-delay: 0.05s; }
.eq.live span:nth-child(7n)  { animation-duration: 1.3s; animation-delay: 0.15s; }
@keyframes eq {
  0%, 100% { height: 4px;  }
  50%      { height: 16px; }
}

/* seek bar */
.seek { grid-area: seek; }
.seek input[type=range],
.vol input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: #0c1a14;
  border: 1px solid var(--line);
  border-radius: 3px;
  outline: none;
}
.seek input[type=range]::-webkit-slider-thumb,
.vol input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 16px;
  border-radius: 2px;
  background: var(--green);
  box-shadow: 0 0 8px rgba(0,255,102,0.7);
  cursor: pointer;
}

/* controls */
.controls {
  grid-area: ctrl;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.controls button {
  background: var(--panel-2);
  color: var(--green);
  border: 1px solid var(--line);
  padding: 6px 12px;
  font-family: var(--font-lcd);
  font-size: 14px;
  border-radius: 4px;
  cursor: pointer;
  text-shadow: 0 0 4px rgba(0,255,102,0.4);
  transition: background 80ms ease, color 80ms ease;
}
.controls button:hover { background: #243029; }
.controls button.toggle.on {
  background: var(--green);
  color: #051a0d;
  text-shadow: none;
  box-shadow: 0 0 10px rgba(0,255,102,0.7);
}
.vol {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  min-width: 220px;
}
.vol span {
  font-family: var(--font-lcd);
  font-size: 11px;
  color: var(--text-dim);
}

/* ---------- control rack (snapshot / crate / skin) ---------- */

.rack {
  grid-area: rack;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.rack-group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.rack-group.rack-right { margin-left: auto; }
.rack-label,
.snap-opt {
  font-family: var(--font-lcd);
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 5px;
}
.rack button {
  background: var(--panel-2);
  color: var(--green);
  border: 1px solid var(--line);
  padding: 6px 12px;
  font-family: var(--font-lcd);
  font-size: 13px;
  border-radius: 4px;
  cursor: pointer;
  text-shadow: 0 0 4px rgba(0,255,102,0.4);
  transition: background 80ms ease, color 80ms ease;
}
.rack button:hover { background: #243029; }
.rack button.toggle.on {
  background: var(--green);
  color: #051a0d;
  text-shadow: none;
  box-shadow: 0 0 10px rgba(0,255,102,0.7);
}
.rack select,
#crate-name {
  background: #0d1413;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 4px 6px;
  font-family: var(--font-lcd);
  font-size: 12px;
  outline: none;
}
#crate-name { width: 190px; }
#crate-name:focus,
.rack select:focus { border-color: var(--green-dim); box-shadow: 0 0 0 1px var(--green-dim); }
/* snapshot option controls dim until SNAP is on */
.rack-group .snap-opt { opacity: 0.4; transition: opacity 120ms ease; }
.rack-group.snap-on .snap-opt { opacity: 1; }
#btn-keep { color: var(--danger); text-shadow: 0 0 4px rgba(255,59,59,0.4); }
#btn-keep:hover { background: rgba(255,59,59,0.12); }
#btn-keep.flash {
  background: var(--green); color: #051a0d; text-shadow: none;
  box-shadow: 0 0 12px rgba(0,255,102,0.8);
}
.snap-readout {
  color: var(--amber);
  text-shadow: 0 0 6px rgba(255,176,0,0.6);
  margin-left: auto;
}

/* keep (♥) button in rows + kept flash */
.c-act .keep-btn { color: var(--text-dim); border-color: var(--line); margin-right: 4px; }
.c-act .keep-btn:hover { color: var(--danger); border-color: var(--danger); }
.row.is-kept .keep-btn { color: var(--danger); border-color: var(--danger); }
.row.kept { animation: keptflash 0.7s ease; }
@keyframes keptflash {
  0%   { background: rgba(0,255,102,0.35); }
  100% { background: transparent; }
}

.active-crate {
  font-family: var(--font-lcd);
  font-size: 12px;
  color: var(--green);
  text-shadow: 0 0 4px rgba(0,255,102,0.4);
  max-width: 240px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#btn-reveal { color: var(--amber); text-shadow: 0 0 4px rgba(255,176,0,0.4); }
#btn-reveal:hover { background: rgba(255,176,0,0.12); }
#btn-reveal.flash { background: var(--amber); color: #1a1205; text-shadow: none; box-shadow: 0 0 12px rgba(255,176,0,0.8); }

/* big ol' PURGE button */
.rack button.btn-purge {
  background: linear-gradient(180deg, #ff4a4a, #c81e1e);
  color: #fff;
  border: 1px solid #7a0e0e;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 1.5px;
  padding: 9px 20px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
  box-shadow: 0 0 14px rgba(255,59,59,0.45), inset 0 1px 0 rgba(255,255,255,0.25);
}
.rack button.btn-purge:hover { background: linear-gradient(180deg, #ff6060, #e02424); box-shadow: 0 0 20px rgba(255,59,59,0.7); }
.rack button.btn-purge:active { transform: translateY(1px); }
.rack button.btn-purge.flash { animation: purgeflash 0.5s ease; }
@keyframes purgeflash { 0% { box-shadow: 0 0 26px rgba(255,59,59,0.95); } 100% { box-shadow: 0 0 14px rgba(255,59,59,0.45); } }

/* VDJ database purge-queue status chip */
.vdj-status {
  font-family: var(--font-lcd);
  font-size: 11px;
  letter-spacing: 0.5px;
  color: #1a1205;
  background: var(--amber);
  padding: 4px 9px;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
}
.vdj-status:hover { filter: brightness(1.08); }
.vdj-status.hidden { display: none; }
.vdj-status.ready { background: var(--green); }

/* ---------- main split: library + crates sidebar ---------- */

.main {
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 270px;
}

.crates {
  background: var(--panel);
  border-left: 1px solid var(--line);
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  min-height: 0;
}
.crates-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 12px;
  font-family: var(--font-lcd); font-size: 12px; letter-spacing: 1px;
  color: var(--green); border-bottom: 1px solid var(--line);
}
.crates-head button {
  background: var(--panel-2); color: var(--green);
  border: 1px solid var(--line); border-radius: 4px; cursor: pointer;
  padding: 2px 8px; font-family: var(--font-lcd);
}
.crates-head-btns { display: flex; gap: 6px; }
.crates-close { display: none; }          /* drawer close — mobile only */
.btn-crates {                              /* drawer opener — mobile only */
  display: none;
  background: var(--panel-2); color: var(--green);
  border: 1px solid var(--line); border-radius: 4px; cursor: pointer;
  padding: 7px 12px; font-family: var(--font-lcd); font-size: 12px;
  white-space: nowrap;
}
.crates-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 140;
}
.crates-backdrop.hidden { display: none; }
.crates-hint { padding: 7px 12px 3px; font-size: 10px; color: var(--text-dim); font-family: var(--font-lcd); letter-spacing: 0.5px; }
.crate-list { overflow-y: auto; min-height: 0; padding: 4px 8px 8px; display: flex; flex-direction: column; gap: 6px; }
.crate-item {
  border: 1px solid var(--line); border-radius: 5px; padding: 9px 10px; cursor: pointer;
  background: var(--panel-2); display: flex; justify-content: space-between; align-items: center; gap: 8px;
  transition: background 80ms ease, border-color 80ms ease, box-shadow 80ms ease;
}
.crate-item .cname { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.crate-item .ccount { font-family: var(--font-lcd); font-size: 11px; color: var(--text-dim); flex: 0 0 auto; }
.crate-item:hover { background: var(--row-hover); }
.crate-item.active { border-color: var(--green-dim); box-shadow: inset 0 0 0 1px var(--green-dim); }
.crate-item.active .cname { color: var(--green); }
.crates.drag-active .crate-item { border-color: var(--green-dim); border-style: dashed; }
.crate-item.drop-hover {
  background: var(--green); color: #051a0d; border-color: var(--green);
  box-shadow: 0 0 14px rgba(0,255,102,0.75); border-style: solid;
}
.crate-item.drop-hover .ccount { color: #051a0d; }
.crate-item.added { animation: keptflash 0.7s ease; }
.crates-new { display: flex; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--line); }
.crates-new input {
  flex: 1; background: #0d1413; color: var(--text); border: 1px solid var(--line);
  border-radius: 4px; padding: 6px 8px; font-size: 12px; outline: none;
}
.crates-new input:focus { border-color: var(--green-dim); box-shadow: 0 0 0 1px var(--green-dim); }
.crates-new button {
  background: var(--panel-2); color: var(--green); border: 1px solid var(--line);
  border-radius: 4px; cursor: pointer; padding: 0 12px; font-size: 16px;
}

/* draggable rows */
.row[draggable=true] { cursor: grab; }
.row.dragging { opacity: 0.45; }

/* ---------- right-click context menu ---------- */
.ctx {
  position: fixed;
  z-index: 100;
  min-width: 190px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 12px 36px rgba(0,0,0,0.6);
  padding: 4px;
  display: flex;
  flex-direction: column;
}
.ctx.hidden { display: none; }
.ctx button {
  background: transparent;
  color: var(--text);
  border: 0;
  text-align: left;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 13px;
}
.ctx button:hover { background: var(--row-hover); color: var(--green); }
.ctx button.danger:hover { background: rgba(255,59,59,0.15); color: var(--danger); }

/* ---------- toasts ---------- */
.toast-host {
  position: fixed;
  bottom: 18px;
  right: 18px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  pointer-events: none;
}
.toast {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--green);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 5px;
  font-size: 13px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  max-width: 360px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  animation: toastin 140ms ease;
}
.toast.out { animation: toastout 280ms ease forwards; }
.toast.ok   { border-left-color: var(--green); }
.toast.warn { border-left-color: var(--amber); }
.toast.err  { border-left-color: var(--danger); }
@keyframes toastin  { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes toastout { to { opacity: 0; transform: translateX(12px); } }

/* context menu + toast — classic skin */
body.skin-classic .ctx {
  background: linear-gradient(180deg,#3b3b45,#2c2c34);
  border: 2px solid #0a0a0e; border-radius: 0;
  box-shadow: inset 1px 1px 0 #6a6a7e, 0 12px 36px rgba(0,0,0,0.7);
}
body.skin-classic .ctx button { color: #d6dccb; border-radius: 0; }
body.skin-classic .ctx button:hover { background: #06231a; color: #1ef04a; }
body.skin-classic .toast {
  background: linear-gradient(180deg,#3b3b45,#2c2c34);
  border: 2px solid #0a0a0e; border-radius: 0;
  box-shadow: inset 1px 1px 0 #55556a, 0 8px 24px rgba(0,0,0,0.6);
}
body.skin-classic .toast.ok { border-left: 3px solid #1ef04a; }

/* ---------- library ---------- */

.library {
  display: grid;
  /* three rows: source tabs, search head, then the list takes the rest */
  grid-template-rows: auto auto 1fr;
  min-height: 0;
}

.lib-head {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 18px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
#search {
  flex: 1;
  background: #0d1413;
  border: 1px solid var(--line);
  color: var(--text);
  padding: 8px 12px;
  font-family: var(--font-ui);
  font-size: 13px;
  border-radius: 4px;
  outline: none;
}
#search:focus { border-color: var(--green-dim); box-shadow: 0 0 0 1px var(--green-dim); }
.lib-stats {
  font-family: var(--font-lcd);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 1px;
}
.lib-stats .dot { margin: 0 6px; }
.lib-stats #count, .lib-stats #filtered { color: var(--green); }
.scan-status {
  margin-left: 10px;
  padding: 1px 7px;
  border-radius: 3px;
  color: var(--bg, #111);
  background: var(--amber, #e0a030);
  animation: scanpulse 1.1s ease-in-out infinite;
}
.scan-status.hidden { display: none; }
@keyframes scanpulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }

.lib-list {
  overflow-y: auto;
  background: var(--bg);
}

.row {
  display: grid;
  grid-template-columns: 46px 1fr 200px 64px 112px;
  align-items: center;
  padding: 6px 18px;
  border-bottom: 1px solid #161c1a;
  font-size: 13px;
  cursor: pointer;
  gap: 12px;
}
.row.head {
  position: sticky;
  top: 0;
  background: var(--panel);
  color: var(--text-dim);
  font-family: var(--font-lcd);
  font-size: 11px;
  letter-spacing: 1px;
  cursor: default;
  border-bottom: 1px solid var(--line);
}
.row:not(.head):hover { background: var(--row-hover); }
.row.playing { background: rgba(0,255,102,0.07); }
.row.playing .c-title, .row.playing .c-idx { color: var(--green); }
.c-idx { color: var(--text-dim); font-family: var(--font-lcd); }
.c-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-artist { color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-dur { font-family: var(--font-lcd); color: var(--text-dim); text-align: right; }
.c-act { text-align: right; }
.c-act button {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 2px 6px;
  font-size: 11px;
  cursor: pointer;
  font-family: var(--font-lcd);
}
.c-act button:hover { color: var(--danger); border-color: var(--danger); }

/* ---------- modal ---------- */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}
.modal.hidden { display: none; }
.modal-box {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 20px 22px;
  width: min(440px, 90%);
  box-shadow: 0 12px 40px rgba(0,0,0,0.6);
}
.modal-title {
  font-family: var(--font-lcd);
  color: var(--green);
  font-size: 14px;
  letter-spacing: 1px;
  margin-bottom: 10px;
}
.modal-body { color: var(--text); font-size: 13px; line-height: 1.4; word-break: break-word; }
.modal-body small { color: var(--text-dim); display: block; margin-top: 6px; font-family: var(--font-lcd); font-size: 11px; word-break: break-all; }
.modal-note { margin-top: 12px; font-size: 12px; line-height: 1.45; color: var(--text-dim); }
.modal-note b { color: var(--text); }
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}
.modal-actions button {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  padding: 8px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-family: var(--font-lcd);
  font-size: 12px;
}
.modal-actions button.danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}
.modal-actions button:hover { filter: brightness(1.1); }

/* =====================================================================
   CLASSIC WINAMP SKIN  —  body.skin-classic
   Chunky beveled gunmetal panels, blue title, green-on-black LCD,
   classic playlist-editor list with the blue selected row.
   ===================================================================== */

body.skin-classic {
  --bg: #000000;
  --panel: #2b2b34;
  --panel-2: #3a3a46;
  --line: #0c0c10;
  --green: #1ef04a;
  --green-dim: #2aa84e;
  --amber: #ffd24a;
  --text: #d6dccb;
  --text-dim: #8a907e;
  --row-hover: #00170c;
  --danger: #ff5050;
  --font-lcd: "Monaco", "Lucida Console", "Courier New", monospace;
  --font-ui: Tahoma, Geneva, Verdana, sans-serif;
  background: #1d1d33;
}

/* bevel helpers via box-shadow: light top-left, dark bottom-right */
body.skin-classic .player {
  background: linear-gradient(180deg, #54545f 0%, #3b3b45 6%, #2c2c34 100%);
  border-bottom: 2px solid #0a0a0e;
  box-shadow: inset 1px 1px 0 #74748a, inset -1px -1px 0 #13131a, 0 2px 8px rgba(0,0,0,0.6);
}
body.skin-classic .brand {
  color: #d8d8e6;
  font-weight: 800;
  text-shadow: 1px 1px 0 #000, 0 0 1px #000;
}
body.skin-classic .brand span { color: #8fa0c8; text-shadow: 1px 1px 0 #000; }

/* LCD = black with classic green digits */
body.skin-classic .lcd {
  background: #000;
  border: 2px solid #0a0a0e;
  border-radius: 0;
  box-shadow: inset 2px 2px 0 #15151c, inset -1px -1px 0 #2a2a34;
}
body.skin-classic .lcd-row { color: #1ec84a; }
body.skin-classic .lcd-row span,
body.skin-classic .lcd-marquee { text-shadow: 0 0 3px rgba(30,240,74,0.7); }
body.skin-classic .lcd-marquee { color: #1ef04a; }
body.skin-classic .eq span { background: #1ef04a; box-shadow: 0 0 3px rgba(30,240,74,0.7); }

/* beveled gunmetal buttons */
body.skin-classic .controls button,
body.skin-classic .rack button {
  background: linear-gradient(180deg, #6c6c7c 0%, #45454f 50%, #3a3a44 100%);
  color: #eef0f5;
  border: 1px solid #0a0a0e;
  border-radius: 0;
  text-shadow: 1px 1px 0 #000;
  box-shadow: inset 1px 1px 0 #9b9bb0, inset -1px -1px 0 #1b1b22;
}
body.skin-classic .controls button:hover,
body.skin-classic .rack button:hover { filter: brightness(1.08); background: linear-gradient(180deg,#76768a,#4b4b57); }
body.skin-classic .controls button:active,
body.skin-classic .rack button:active { box-shadow: inset -1px -1px 0 #9b9bb0, inset 1px 1px 0 #1b1b22; }
body.skin-classic .controls button.toggle.on,
body.skin-classic .rack button.toggle.on {
  background: #1ef04a; color: #002a0f;
  text-shadow: none;
  box-shadow: inset 1px 1px 0 #adffc6, inset -1px -1px 0 #0a7a2a;
}
body.skin-classic #btn-keep { color: #ff7a7a; }
body.skin-classic #btn-keep.flash { background: #1ef04a; color: #002a0f; }

/* sliders: inset black troughs, silver thumbs */
body.skin-classic .seek input[type=range],
body.skin-classic .vol input[type=range] {
  background: #000; border: 1px solid #0a0a0e; border-radius: 0;
  box-shadow: inset 1px 1px 0 #15151c;
}
body.skin-classic .seek input[type=range]::-webkit-slider-thumb,
body.skin-classic .vol input[type=range]::-webkit-slider-thumb {
  background: linear-gradient(180deg,#cfcfe0,#7b7b8c);
  border-radius: 0; box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #2a2a34;
}

/* rack selects + crate input inset */
body.skin-classic .rack select,
body.skin-classic #crate-name,
body.skin-classic #search {
  background: #000; color: #1ec84a; border: 1px solid #0a0a0e; border-radius: 0;
  box-shadow: inset 1px 1px 0 #15151c;
  font-family: var(--font-lcd);
}
body.skin-classic .rack { border-top: 1px solid #54545f; }

/* library = classic playlist editor: black bg, green monospace, blue selection */
body.skin-classic .lib-head {
  background: linear-gradient(180deg,#45454f,#2c2c34);
  box-shadow: inset 1px 1px 0 #6a6a7e, inset -1px -1px 0 #14141a;
  border-bottom: 2px solid #0a0a0e;
}
body.skin-classic .lib-list { background: #000; }
body.skin-classic .row {
  font-family: var(--font-lcd);
  color: #1ec84a;
  border-bottom: 1px solid #0a140d;
}
body.skin-classic .row.head {
  background: linear-gradient(180deg,#45454f,#2c2c34);
  color: #dfe0ea;
  box-shadow: inset 1px 1px 0 #6a6a7e;
  border-bottom: 2px solid #0a0a0e;
}
body.skin-classic .row:not(.head):hover { background: #06231a; }
body.skin-classic .row.playing { background: #00007b; }
body.skin-classic .row.playing .c-title,
body.skin-classic .row.playing .c-idx,
body.skin-classic .row.playing .c-artist { color: #ffffff; }
body.skin-classic .c-idx,
body.skin-classic .c-artist,
body.skin-classic .c-dur { color: #16a23c; }
body.skin-classic .c-act button {
  background: linear-gradient(180deg,#6c6c7c,#3a3a44);
  color: #eef0f5; border: 1px solid #0a0a0e; border-radius: 0;
  box-shadow: inset 1px 1px 0 #9b9bb0, inset -1px -1px 0 #1b1b22;
}
body.skin-classic .row.is-kept .keep-btn { color: #ff7a7a; }

/* modal in classic dressing */
body.skin-classic .modal-box {
  background: linear-gradient(180deg,#3b3b45,#2c2c34);
  border: 2px solid #0a0a0e; border-radius: 0;
  box-shadow: inset 1px 1px 0 #6a6a7e, 0 12px 40px rgba(0,0,0,0.7);
}
body.skin-classic .modal-title { color: #1ef04a; }
body.skin-classic .modal-actions button {
  border-radius: 0;
  box-shadow: inset 1px 1px 0 #6a6a7e, inset -1px -1px 0 #14141a;
}

/* crates sidebar — classic */
body.skin-classic .crates {
  background: #2b2b34;
  border-left: 2px solid #0a0a0e;
  box-shadow: inset 1px 0 0 #54545f;
}
body.skin-classic .crates-head { color: #1ef04a; border-bottom: 2px solid #0a0a0e; }
body.skin-classic .crates-head button,
body.skin-classic .crates-new button {
  background: linear-gradient(180deg,#6c6c7c,#3a3a44); color: #eef0f5;
  border: 1px solid #0a0a0e; border-radius: 0;
  box-shadow: inset 1px 1px 0 #9b9bb0, inset -1px -1px 0 #1b1b22;
}
body.skin-classic .crate-item {
  background: linear-gradient(180deg,#3a3a44,#2c2c34); color: #cfd0da;
  border: 1px solid #0a0a0e; border-radius: 0;
  box-shadow: inset 1px 1px 0 #55556a;
}
body.skin-classic .crate-item.active { box-shadow: inset 0 0 0 1px #1ef04a; }
body.skin-classic .crate-item.active .cname { color: #1ef04a; }
body.skin-classic .crate-item.drop-hover { background: #1ef04a; color: #002a0f; }
body.skin-classic .crate-item.drop-hover .ccount { color: #002a0f; }
body.skin-classic .crate-item .ccount { color: #16a23c; }
body.skin-classic .active-crate { color: #1ef04a; }
body.skin-classic #btn-reveal { color: #ffd24a; }
body.skin-classic .crates-new input { background: #000; color: #1ec84a; border-radius: 0; }

/* ---------- hover tooltips (JS-positioned, clamped to viewport) ---------- */
.tip {
  position: fixed;
  left: 0; top: 0;
  z-index: 400;
  max-width: min(260px, calc(100vw - 16px));
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-left: 3px solid var(--green);
  padding: 8px 11px;
  border-radius: 6px;
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.2px;
  white-space: normal;
  text-align: left;
  box-shadow: 0 10px 30px rgba(0,0,0,0.55);
  pointer-events: none;
  opacity: 1;
  transition: opacity 90ms ease;
}
.tip.hidden { opacity: 0; pointer-events: none; visibility: hidden; }

body.skin-classic .tip {
  background: linear-gradient(180deg,#3b3b45,#2c2c34);
  border: 2px solid #0a0a0e; border-left: 3px solid #1ef04a; border-radius: 0;
  box-shadow: inset 1px 1px 0 #55556a, 0 10px 30px rgba(0,0,0,0.6);
  color: #d6dccb;
}

/* =====================================================================
   GOLD SKIN  —  body.skin-gold   "digging for gold"
   Warm gold/amber accents on a dark-soil background.
   ===================================================================== */

body.skin-gold {
  --bg: #0c0a05;
  --panel: #171005;
  --panel-2: #221808;
  --line: #46340f;
  --green: #ffc733;          /* primary accent → gold */
  --green-dim: #c8902a;
  --amber: #ffe27a;
  --text: #f2e7c6;
  --text-dim: #b89a5e;
  --row-hover: #241a09;
  --danger: #ff6a45;
  --font-lcd: "SF Mono", "Menlo", "Consolas", monospace;
  --font-ui: -apple-system, BlinkMacSystemFont, "Inter", system-ui, sans-serif;
  background: #0c0a05;
}

/* header: warm gold sheen */
body.skin-gold .player {
  background: linear-gradient(180deg, #2c200c 0%, #1a1207 55%, #0f0a05 100%);
  border-bottom: 1px solid #46340f;
  box-shadow: 0 2px 14px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,201,51,0.16);
}
body.skin-gold .brand {
  color: #ffd24a;
  text-shadow: 0 0 16px rgba(255,201,51,0.6), 0 1px 0 #4a3208;
}
body.skin-gold .brand span { color: #c8902a; text-shadow: none; }

/* LCD: amber-on-black with gold glow */
body.skin-gold .lcd {
  background: #120c04;
  border-color: #46340f;
  box-shadow: inset 0 0 18px rgba(255,201,51,0.12);
}
body.skin-gold .lcd-row { color: #c8902a; }
body.skin-gold .lcd-row span { text-shadow: 0 0 6px rgba(255,201,51,0.45); }
body.skin-gold .lcd-marquee { color: #ffd24a; text-shadow: 0 0 8px rgba(255,201,51,0.55); }
body.skin-gold .eq span { background: #ffc733; box-shadow: 0 0 5px rgba(255,201,51,0.7); }

/* buttons */
body.skin-gold .controls button,
body.skin-gold .rack button {
  color: #ffd24a;
  text-shadow: 0 0 5px rgba(255,201,51,0.35);
}
body.skin-gold .controls button:hover,
body.skin-gold .rack button:hover { background: #2e2109; }
body.skin-gold .controls button.toggle.on,
body.skin-gold .rack button.toggle.on {
  background: linear-gradient(180deg, #ffe07a, #d99a1f);
  color: #3a2600; text-shadow: none;
  box-shadow: 0 0 12px rgba(255,201,51,0.7);
}
body.skin-gold #btn-keep { color: #ff8a5a; }

/* sliders */
body.skin-gold .seek input[type=range],
body.skin-gold .vol input[type=range] { background: #1c1407; border-color: #46340f; }
body.skin-gold .seek input[type=range]::-webkit-slider-thumb,
body.skin-gold .vol input[type=range]::-webkit-slider-thumb {
  background: #ffc733; box-shadow: 0 0 8px rgba(255,201,51,0.8);
}

/* library */
body.skin-gold #search { background: #140e06; }
body.skin-gold #search:focus { border-color: var(--green-dim); box-shadow: 0 0 0 1px var(--green-dim); }
body.skin-gold .row.playing { background: rgba(255,201,51,0.10); }
body.skin-gold .row.playing .c-title, body.skin-gold .row.playing .c-idx { color: #ffd24a; }
body.skin-gold .scan-status { color: #2a1c05; }

/* crates sidebar */
body.skin-gold .crate-item.active { box-shadow: inset 0 0 0 1px var(--green-dim); }
body.skin-gold .crate-item.drop-hover { background: #ffc733; color: #2a1c05; }
body.skin-gold .active-crate { color: #ffd24a; }
body.skin-gold #btn-reveal { color: #ffe27a; }

/* =====================================================================
   RESPONSIVE LAYOUTS
   Compact: narrow landscape window (snapped next to a browser).
   Mobile:  small or portrait window — single column, crates drawer.
   ===================================================================== */

/* ---------- COMPACT (≤ 1020px wide) ---------- */
@media (max-width: 1020px) {
  .player { padding: 10px 14px; grid-template-columns: 130px 1fr; gap: 10px 12px; }
  .brand { font-size: 17px; letter-spacing: 1px; }
  #lcd-kbps, #lcd-khz { display: none; }       /* keep time + SNAP readout */
  .lcd-row { gap: 14px; }
  .lcd-marquee { font-size: 13px; }
  .vol { min-width: 0; flex: 1 1 130px; }
  .controls button, .rack button { padding: 6px 10px; }
  .rack { gap: 10px; }
  .rack button.btn-purge { padding: 8px 14px; font-size: 13px; }
  .active-crate { max-width: 140px; }
  .main { grid-template-columns: 1fr 230px; }
  .row { grid-template-columns: 40px 1fr 150px 56px 104px; padding: 6px 12px; gap: 8px; }
  .lib-head { padding: 8px 12px; gap: 8px; }
}

/* ---------- MOBILE / PORTRAIT ---------- */
@media (max-width: 700px), ((orientation: portrait) and (max-width: 920px)) {
  /* header stacks into one column */
  .player {
    grid-template-columns: 1fr;
    grid-template-areas: "brand" "lcd" "seek" "ctrl" "rack";
    gap: 8px;
    padding: 10px 12px;
  }
  .brand { font-size: 16px; }
  .eq { display: none; }                        /* avoid overlap on tiny LCDs */
  .lcd { padding: 8px 10px; }
  .lcd-marquee { font-size: 13px; }

  /* touch-friendlier transport */
  .controls { gap: 6px; }
  .controls button { padding: 9px 13px; font-size: 15px; }
  .vol { min-width: 0; flex: 1 1 100px; }
  .rack { gap: 8px; padding-top: 8px; }
  .rack-group { gap: 6px; flex-wrap: wrap; }
  .rack-group.rack-right { margin-left: 0; }
  .active-crate { max-width: 120px; }

  /* library fills the width; crates become a slide-over drawer */
  .main { grid-template-columns: 1fr; }
  .btn-crates { display: inline-flex; }
  .crates-close { display: inline-flex; }
  .crates {
    position: fixed; top: 0; right: 0; bottom: 0;
    width: min(85vw, 320px);
    z-index: 150;
    border-left: 1px solid var(--line);
    box-shadow: -14px 0 40px rgba(0,0,0,0.6);
    transform: translateX(105%);
    transition: transform 200ms ease;
  }
  .crates.open { transform: translateX(0); }
  .crates-hint { display: none; }               /* drag doesn't apply on touch */

  /* search row */
  .lib-head { flex-wrap: wrap; }
  #search { flex: 1 1 100%; order: -1; }
  .lib-stats { flex: 1; }

  /* rows: title with artist stacked under it; no index column or header row */
  .row.head { display: none; }
  .row {
    grid-template-columns: 1fr 52px 96px;
    grid-template-rows: auto auto;
    row-gap: 1px;
    padding: 9px 12px;
  }
  .c-idx { display: none; }
  .c-title { grid-column: 1; grid-row: 1; font-size: 14px; }
  .c-artist { grid-column: 1; grid-row: 2; font-size: 11.5px; }
  .c-dur { grid-column: 2; grid-row: 1 / span 2; font-size: 12px; }
  .c-act { grid-column: 3; grid-row: 1 / span 2; display: flex; gap: 6px; justify-content: flex-end; }
  .c-act button { padding: 8px 9px; font-size: 12px; }

  /* toasts + modal sized for small screens */
  .toast-host { left: 12px; right: 12px; bottom: 12px; align-items: stretch; }
  .toast { max-width: none; white-space: normal; }
  .modal-box { width: 94%; padding: 16px; }
}

/* ---------- source tabs (LIBRARY / DRIVE) ---------- */
.src-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px 0;
  background: var(--panel);
}
.src-tab {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--line);
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  padding: 8px 14px;
  font-family: var(--font-lcd);
  font-size: 12px;
  letter-spacing: 1px;
  cursor: pointer;
}
.src-tab:hover { color: var(--text); }
.src-tab.active {
  background: var(--bg);
  color: var(--green);
  box-shadow: inset 0 2px 0 var(--green);
}
.src-tab span { color: var(--text-dim); margin-left: 6px; font-size: 11px; }
.src-tab.active span { color: var(--green-dim); }
.drive-sync {
  background: var(--panel-2); color: var(--green);
  border: 1px solid var(--line); border-radius: 4px; cursor: pointer;
  padding: 6px 10px; font-family: var(--font-lcd); font-size: 11px;
}
.drive-sync.hidden { display: none; }
.drive-note { font-family: var(--font-lcd); font-size: 11px; color: var(--amber); }
.drive-note.hidden { display: none; }

/* drive connect modal bits */
.setup-steps { margin: 8px 0 10px; padding-left: 18px; line-height: 1.55; }
.setup-steps li { margin-bottom: 3px; }
#drive-modal input {
  width: 100%;
  margin-top: 8px;
  background: #0d1413; color: var(--text);
  border: 1px solid var(--line); border-radius: 4px;
  padding: 9px 10px; font-family: var(--font-lcd); font-size: 12px;
  outline: none;
}
#drive-modal input:focus { border-color: var(--green-dim); box-shadow: 0 0 0 1px var(--green-dim); }
.modal-actions button.primary {
  background: var(--green); color: #051a0d; border-color: var(--green); font-weight: 700;
}

/* PULL button on drive rows */
.c-act .pull-btn { color: var(--amber); border-color: var(--line); }
.c-act .pull-btn:hover { color: #1a1205; background: var(--amber); border-color: var(--amber); }
.row.pulled .pull-btn { color: var(--green); border-color: var(--green-dim); }

/* notice row when a huge list is capped */
.row.notice {
  display: block;
  text-align: center;
  color: var(--text-dim);
  font-family: var(--font-lcd);
  font-size: 11px;
  cursor: default;
  padding: 10px;
}

/* skin adaptations come free via CSS vars; classic squares the tabs */
body.skin-classic .src-tab { border-radius: 0; }

/* tabs on small screens */
@media (max-width: 700px), ((orientation: portrait) and (max-width: 920px)) {
  .src-tabs { padding: 8px 12px 0; flex-wrap: wrap; }
  .src-tab { padding: 9px 12px; flex: 1 1 auto; text-align: center; }
}

.ctx button.hidden { display: none; }

/* =====================================================================
   SERATO DJ SKIN  —  body.skin-serato
   Flat near-black panels, Serato's signature bright blue, clean sans
   type, deck-style cyan glow on the LCD, blue playing row.
   ===================================================================== */

body.skin-serato {
  --bg: #0c0d0f;
  --panel: #16181b;
  --panel-2: #1e2125;
  --line: #2a2e33;
  --green: #00a8ff;        /* accent slot reused: Serato blue */
  --green-dim: #0072b8;
  --amber: #ffb400;
  --text: #e8eaed;
  --text-dim: #8b9197;
  --row-hover: #182430;
  --danger: #ff4d4d;
  --font-lcd: "Helvetica Neue", Arial, sans-serif;
  --font-ui: "Helvetica Neue", Arial, sans-serif;
  background: #0c0d0f;
}

body.skin-serato .player {
  background: linear-gradient(180deg, #1e2125 0%, #16181b 100%);
  border-bottom: 1px solid #000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.6);
}
body.skin-serato .brand { color: #fff; font-weight: 700; letter-spacing: 1px; }
body.skin-serato .brand span { color: #00a8ff; }

/* LCD = flat black deck display with cyan track readout */
body.skin-serato .lcd {
  background: #0a0b0c;
  border: 1px solid #2a2e33;
  border-radius: 4px;
  box-shadow: inset 0 0 18px rgba(0,168,255,0.07);
}
body.skin-serato .lcd-row { color: #cfd4d9; }
body.skin-serato .lcd-marquee { color: #00c0ff; text-shadow: 0 0 6px rgba(0,168,255,0.55); }
body.skin-serato .eq span { background: #00a8ff; box-shadow: 0 0 4px rgba(0,168,255,0.6); }

/* flat dark buttons, blue when active */
body.skin-serato .controls button,
body.skin-serato .rack button {
  background: #23272c;
  color: #d9dde1;
  border: 1px solid #33383e;
  border-radius: 4px;
  text-shadow: none;
  box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset, 0 1px 2px rgba(0,0,0,0.4);
}
body.skin-serato .controls button:hover,
body.skin-serato .rack button:hover { background: #2b3036; border-color: #00a8ff; }
body.skin-serato .controls button:active,
body.skin-serato .rack button:active { background: #1a1d20; }
body.skin-serato .controls button.toggle.on,
body.skin-serato .rack button.toggle.on {
  background: #0072b8; color: #fff; border-color: #00a8ff;
  box-shadow: 0 0 10px rgba(0,168,255,0.45);
}
body.skin-serato #btn-keep { color: #2bd96e; }
body.skin-serato #btn-keep.flash { background: #2bd96e; color: #03240f; }
body.skin-serato #btn-purge { color: #ff6b6b; }
body.skin-serato #btn-reveal { color: #ffb400; }

/* sliders: flat troughs, blue-lit thumbs (pitch-fader vibes) */
body.skin-serato .seek input[type=range],
body.skin-serato .vol input[type=range] {
  background: #0a0b0c; border: 1px solid #2a2e33; border-radius: 3px;
}
body.skin-serato .seek input[type=range]::-webkit-slider-thumb,
body.skin-serato .vol input[type=range]::-webkit-slider-thumb {
  background: linear-gradient(180deg, #3a3f45, #23272c);
  border: 1px solid #00a8ff;
  border-radius: 3px;
  box-shadow: 0 0 6px rgba(0,168,255,0.5);
}

body.skin-serato .rack select,
body.skin-serato #crate-name,
body.skin-serato #search {
  background: #0a0b0c; color: #e8eaed; border: 1px solid #2a2e33; border-radius: 4px;
}
body.skin-serato .rack select:focus,
body.skin-serato #search:focus { border-color: #00a8ff; outline: none; }
body.skin-serato .rack { border-top: 1px solid #2a2e33; }

/* library = Serato browser: dark rows, blue playing row */
body.skin-serato .lib-head {
  background: #16181b;
  border-bottom: 1px solid #2a2e33;
}
body.skin-serato .lib-list { background: #0e0f11; }
body.skin-serato .row { color: #d4d8db; border-bottom: 1px solid #17191c; }
body.skin-serato .row.head {
  background: #1e2125; color: #9aa1a8;
  border-bottom: 1px solid #2a2e33;
  text-transform: uppercase; letter-spacing: 0.6px;
}
body.skin-serato .row:not(.head):hover { background: #182430; }
body.skin-serato .row.playing { background: #003e66; }
body.skin-serato .row.playing .c-title { color: #00c0ff; }
body.skin-serato .row.playing .c-idx,
body.skin-serato .row.playing .c-artist { color: #bfe9ff; }
body.skin-serato .c-idx, body.skin-serato .c-dur { color: #6e757c; }
body.skin-serato .c-artist { color: #9aa1a8; }
body.skin-serato .c-act button {
  background: #23272c; color: #d9dde1; border: 1px solid #33383e; border-radius: 3px;
}
body.skin-serato .row.is-kept .keep-btn { color: #2bd96e; }

/* modal + context menu + toast */
body.skin-serato .modal-box {
  background: #1e2125; border: 1px solid #2a2e33; border-radius: 6px;
  box-shadow: 0 0 0 1px rgba(0,168,255,0.25), 0 16px 50px rgba(0,0,0,0.8);
}
body.skin-serato .modal-title { color: #00c0ff; }
body.skin-serato .ctx {
  background: #1e2125; border: 1px solid #2a2e33; border-radius: 6px;
}
body.skin-serato .ctx button:hover { background: #003e66; color: #00c0ff; }
body.skin-serato .toast {
  background: #1e2125; border: 1px solid #2a2e33; color: #e8eaed;
}
body.skin-serato .toast.ok { border-left: 3px solid #00a8ff; }

/* crates sidebar — Serato crate column */
body.skin-serato .crates { background: #131517; border-left: 1px solid #2a2e33; }
body.skin-serato .crates-head { color: #00c0ff; border-bottom: 1px solid #2a2e33; }
body.skin-serato .crates-head button,
body.skin-serato .crates-new button {
  background: #23272c; color: #d9dde1; border: 1px solid #33383e; border-radius: 4px;
}
body.skin-serato .crate-item {
  background: #1a1d20; color: #cfd4d9;
  border: 1px solid #26292d; border-radius: 4px;
}
body.skin-serato .crate-item.active { border-color: #00a8ff; box-shadow: 0 0 8px rgba(0,168,255,0.3); }
body.skin-serato .crate-item.active .cname { color: #00c0ff; }
body.skin-serato .crate-item.drop-hover { background: #0072b8; color: #fff; }
body.skin-serato .crate-item.drop-hover .ccount { color: #cfeeff; }
body.skin-serato .crate-item .ccount { color: #6e757c; }
body.skin-serato .active-crate { color: #00c0ff; }
body.skin-serato .crates-new input { background: #0a0b0c; color: #e8eaed; border-radius: 4px; }

body.skin-serato .tip {
  background: #1e2125; border: 1px solid #2a2e33; border-left: 3px solid #00a8ff;
  border-radius: 4px; color: #e8eaed;
}

/* =====================================================================
   EQUALIZER PANEL  —  #eq-panel (floating, Winamp-EQ-window vibes)
   ===================================================================== */

.eq-panel {
  position: fixed;
  top: 120px; right: 18px;
  z-index: 300;
  width: min(520px, calc(100vw - 24px));
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(0,0,0,0.65);
  padding: 10px 12px 12px;
}
.eq-panel.hidden { display: none; }

.eq-panel-head {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 10px;
}
.eq-title {
  font-family: var(--font-lcd);
  font-size: 12px; letter-spacing: 2px;
  color: var(--green);
  margin-right: auto;
}
.eq-panel-head button, .eq-panel-head select {
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 5px;
  font-size: 11px; padding: 4px 9px; cursor: pointer;
}
.eq-panel-head button.toggle.on { background: var(--green); color: #04130a; }
#eq-close { padding: 4px 8px; }

.eq-bands {
  display: flex; justify-content: space-between; gap: 4px;
}
.eq-band {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  flex: 1 1 0; min-width: 0;
}
.eq-band input[type=range] {
  writing-mode: vertical-lr;
  direction: rtl;
  width: 22px; height: 110px;
  margin: 0; padding: 0;
  accent-color: var(--green);
  background: transparent;
  cursor: ns-resize;
}
.eq-val {
  font-family: var(--font-lcd); font-size: 10px;
  color: var(--text-dim); min-height: 12px;
}
.eq-hz {
  font-family: var(--font-lcd); font-size: 10px;
  color: var(--text-dim); letter-spacing: 0.5px;
}
.eq-panel.eq-off .eq-bands { opacity: 0.45; }
#btn-eq.active { box-shadow: 0 0 8px var(--green); }

/* classic (Winamp) dressing */
body.skin-classic .eq-panel {
  background: linear-gradient(180deg,#3b3b45,#2c2c34);
  border: 2px solid #0a0a0e; border-radius: 0;
  box-shadow: inset 1px 1px 0 #6a6a7e, 0 14px 40px rgba(0,0,0,0.7);
}
body.skin-classic .eq-title { color: #1ef04a; text-shadow: 0 0 3px rgba(30,240,74,0.7); }
body.skin-classic .eq-panel-head button,
body.skin-classic .eq-panel-head select {
  background: linear-gradient(180deg,#6c6c7c,#3a3a44); color: #eef0f5;
  border: 1px solid #0a0a0e; border-radius: 0;
  box-shadow: inset 1px 1px 0 #9b9bb0, inset -1px -1px 0 #1b1b22;
}
body.skin-classic .eq-panel-head button.toggle.on { background: #1ef04a; color: #002a0f; }
body.skin-classic .eq-band input[type=range] { accent-color: #1ef04a; }
body.skin-classic .eq-val, body.skin-classic .eq-hz { color: #16a23c; }

/* serato dressing */
body.skin-serato .eq-panel {
  background: #1e2125; border: 1px solid #2a2e33; border-radius: 6px;
  box-shadow: 0 0 0 1px rgba(0,168,255,0.2), 0 16px 50px rgba(0,0,0,0.8);
}
body.skin-serato .eq-title { color: #00c0ff; }
body.skin-serato .eq-panel-head button.toggle.on { background: #0072b8; color: #fff; }
body.skin-serato .eq-band input[type=range] { accent-color: #00a8ff; }

@media (max-width: 640px) {
  .eq-panel { top: auto; bottom: 12px; left: 12px; right: 12px; width: auto; }
  .eq-band input[type=range] { height: 90px; width: 18px; }
}

/* =====================================================================
   WAVEFORM  —  #wave (overview waveform above the seek bar)
   ===================================================================== */

.seek { display: flex; flex-direction: column; gap: 2px; }
.wave {
  display: block;
  width: 100%;
  height: 46px;
  cursor: crosshair;
  background: rgba(0,0,0,0.25);
  border-radius: 4px;
}
body.skin-classic .wave { border-radius: 0; background: #000; border: 1px solid #0a0a0e; }
body.skin-serato .wave { background: #0a0b0c; border: 1px solid #2a2e33; }

@media (max-width: 640px) {
  .wave { height: 34px; }
}

/* ===== Digger Web: gate + connect screens ===== */
.gate, .connect {
  position: fixed; inset: 0; z-index: 500;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 50% 30%, #1a1207 0%, #0c0a05 70%);
  overflow-y: auto; padding: 20px;
}
.gate.hidden, .connect.hidden { display: none; }
.gate-box, .connect-box {
  width: min(520px, 94vw);
  background: var(--panel-2, #221808);
  border: 1px solid var(--line, #46340f);
  border-radius: 10px;
  padding: 30px 30px 24px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,201,51,0.15);
  text-align: center;
}
.gate-brand {
  font-family: var(--font-lcd); font-weight: 800; font-size: 34px; letter-spacing: 3px;
  color: #ffd24a; text-shadow: 0 0 18px rgba(255,201,51,0.55);
}
.gate-brand span { color: #c8902a; }
.gate-tag { margin: 6px 0 18px; color: #f2e7c6; font-size: 15px; }
.gate-feats { text-align: left; margin: 0 0 20px; padding: 0 4px; list-style: none; color: #d9c79a; font-size: 13.5px; line-height: 1.5; }
.gate-feats li { margin-bottom: 9px; }
.gate-feats b { color: #ffd24a; }
#gate-form input, .connect-box input {
  width: 100%; margin-bottom: 10px;
  background: #120c04; color: #f2e7c6;
  border: 1px solid #46340f; border-radius: 6px;
  padding: 12px 14px; font-size: 14px; outline: none;
}
#gate-form input:focus { border-color: #c8902a; box-shadow: 0 0 0 1px #c8902a; }
#gate-form button, .connect-btn {
  width: 100%;
  background: linear-gradient(180deg, #ffe07a, #d99a1f);
  color: #3a2600; font-weight: 800; font-size: 16px; letter-spacing: 0.5px;
  border: 1px solid #8a6a1e; border-radius: 6px;
  padding: 13px; cursor: pointer;
  box-shadow: 0 0 18px rgba(255,201,51,0.35);
}
#gate-form button:hover, .connect-btn:hover { filter: brightness(1.07); }
.connect-btn.alt { background: transparent; color: #ffd24a; box-shadow: none; margin-top: 10px; font-weight: 600; font-size: 13px; }
.gate-fine { margin-top: 14px; color: #8a6a1e; font-size: 11.5px; font-family: var(--font-lcd); }
.connect-copy { color: #d9c79a; font-size: 14px; line-height: 1.55; margin: 14px 0 20px; }
#app.hidden { display: none; }

/* global utility — several elements toggle this */
.hidden { display: none !important; }

.gate-row { display: flex; gap: 10px; }
.gate-row input { flex: 1; min-width: 0; }

/* ===== DJ-software picker ===== */
.dj-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 14px; }
.dj-opt {
  background: #120c04; color: #f2e7c6;
  border: 1px solid #46340f; border-radius: 8px;
  padding: 18px 10px; font-size: 14.5px; font-weight: 700; cursor: pointer;
}
.dj-opt:hover { border-color: #ffc733; color: #ffd24a; box-shadow: 0 0 14px rgba(255,199,51,0.25); }
@media (max-width: 520px) { .dj-options { grid-template-columns: 1fr; } }
