/* Zuujis Radio, in Zuujis Media Player's look (its Ocean theme): a dark gradient, glassy cards with
   hairline borders, the cyan→blue→aqua signal gradient, mint for a boost and amber for a cut. */

:root {
  --top: rgb(10 26 38);
  --bottom: rgb(4 10 19);
  --well: rgb(3 8 14);
  --ink: #fff;
  --dim: rgb(255 255 255 / .58);
  --faint: rgb(255 255 255 / .38);
  --card: rgb(255 255 255 / .045);
  --stroke: rgb(255 255 255 / .09);
  --hair: rgb(255 255 255 / .07);
  --a: rgb(64 204 242);
  --b: rgb(51 140 255);
  --c: rgb(115 242 217);
  --mint: rgb(77 240 168);
  --amber: rgb(255 173 66);
  --signal: linear-gradient(90deg, var(--a), var(--b), var(--c));
  --on-signal: rgb(0 0 0 / .82);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 13px/1.35 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: linear-gradient(var(--top), var(--bottom)) fixed;
  min-height: 100vh;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--a); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* Shared pieces */
.card { background: var(--card); border: 1px solid var(--stroke); border-radius: 18px; }
.well { background: rgb(0 0 0 / .22); border: 1px solid var(--hair); border-radius: 12px; }
.label { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.count { font-size: 10px; font-weight: 600; color: var(--faint); background: rgb(255 255 255 / .06);
  border-radius: 6px; padding: 1px 6px; letter-spacing: .05em; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 15px;
  background: rgb(255 255 255 / .06); border: 1px solid var(--stroke); font-weight: 600; font-size: 12.5px; }
.pill:hover { background: rgb(255 255 255 / .1); }
.pill.on { background: var(--signal); color: var(--on-signal); border-color: transparent; }
.ghost { background: none; border: 0; color: var(--dim); font-size: 18px; width: 36px; height: 36px; border-radius: 50%; }
.ghost:hover { color: var(--ink); background: rgb(255 255 255 / .06); }
.big-play { width: 56px; height: 56px; border-radius: 50%; border: 0; background: radial-gradient(circle at 35% 30%, var(--a), var(--b));
  color: #031019; font-size: 20px; box-shadow: 0 0 0 4px rgb(64 204 242 / .12), 0 8px 26px rgb(51 140 255 / .45); }
.big-play:hover { filter: brightness(1.08); }
.big-play.blocked, .fab.blocked { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 10px rgb(64 204 242 / .18), 0 8px 26px rgb(51 140 255 / .45); } }
@media (prefers-reduced-motion: reduce) { .big-play.blocked, .fab.blocked { animation: none; } }
.slider { -webkit-appearance: none; appearance: none; height: 4px; border-radius: 2px; background: rgb(255 255 255 / .12); }
.slider::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 0 3px rgb(64 204 242 / .35); }
.slider::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: #fff; }
.slider::-moz-range-progress { background: var(--signal); height: 4px; border-radius: 2px; }
.art { width: 120px; height: 120px; border-radius: 18px; display: grid; place-items: center; font-size: 46px;
  background: linear-gradient(145deg, rgb(64 204 242 / .9), rgb(51 140 255 / .85)); box-shadow: 0 10px 30px rgb(0 0 0 / .35);
  color: #fff; flex: none; }
.live-dot::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--mint);
  margin-right: 7px; box-shadow: 0 0 8px var(--mint); }
.badge { font-size: 10px; font-weight: 800; letter-spacing: .08em; color: var(--mint); border: 1px solid rgb(77 240 168 / .55);
  border-radius: 6px; padding: 1px 6px; }
.power { width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--faint); background: none; color: var(--faint); font-size: 15px; }
.power.on { border-color: var(--mint); color: var(--mint); box-shadow: 0 0 12px rgb(77 240 168 / .35); }
select.pick { height: 30px; border-radius: 15px; padding: 0 12px; background: rgb(255 255 255 / .06); border: 1px solid var(--stroke); }
select.pick option { background: rgb(10 26 38); }

/* The radio page */
.app { max-width: 1600px; margin: 0 auto; padding: clamp(10px, 1.6vw, 22px) clamp(10px, 2.2vw, 32px) 22px; display: grid; gap: clamp(10px, 1.4vw, 18px);
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "top" "stage" "panels" "foot"; }
.panels { grid-area: panels; display: flex; flex-direction: column; gap: inherit; min-width: 0; }
.panels:empty, .panels:not(:has(.panel:not([hidden]))) { display: none; }
.topbar { grid-area: top; display: flex; align-items: center; gap: 10px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 700; margin-right: auto; }
/* Collapsed panels sit here as icons; a click brings one back. */
.tray { display: flex; gap: 8px; }
.tray-icon { width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--stroke); font-size: 17px;
  background: rgb(255 255 255 / .06); display: grid; place-items: center; box-shadow: 0 4px 14px rgb(0 0 0 / .3);
  animation: pop .18s ease-out; }
.tray-icon:hover { background: var(--signal); color: var(--on-signal); border-color: transparent; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
/* A panel's own tools, always in its top-right corner: the move handle and collapse. Its header leaves room. */
.panel { position: relative; }
.tools { position: absolute; top: 12px; right: 12px; display: flex; gap: 4px; z-index: 1; }
.libhead, .eqhead { padding-right: 66px; }
.tool { width: 28px; height: 28px; border-radius: 8px; border: 1px solid transparent; background: none; color: var(--faint);
  font-size: 15px; line-height: 1; display: grid; place-items: center; }
.tool:hover { color: var(--ink); background: rgb(255 255 255 / .07); border-color: var(--stroke); }
.grip { cursor: grab; touch-action: none; }
.moving, .moving * { cursor: grabbing !important; user-select: none; }
.panel.dragging { outline: 2px solid var(--a); outline-offset: 3px; box-shadow: 0 16px 40px rgb(0 0 0 / .45); }
@media (prefers-reduced-motion: reduce) { .tray-icon { animation: none; } }
.brand .logo { width: 30px; height: 30px; border-radius: 8px; background: var(--signal); display: grid; place-items: center; font-size: 16px; }
.brand span { font-weight: 400; color: var(--dim); }
.stage { grid-area: stage; position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 22px;
  align-items: center; padding: 6px 4px 10px; min-height: 140px; }
.stage canvas.bars { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 80px; opacity: .3; pointer-events: none; }
.stage > * { position: relative; }
.now { min-width: 0; }
.now h1 { margin: 4px 0 2px; font-size: 24px; display: flex; gap: 8px; align-items: center; min-width: 0; }
.now h1 .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.now .heart { background: none; border: 0; color: var(--mint); font-size: 20px; padding: 0; flex: none; }
.now .sub { color: var(--dim); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now .meta { margin-top: 8px; display: flex; gap: 8px; align-items: center; color: var(--faint); font-size: 12px; flex-wrap: wrap; }
.now .meta a { color: var(--a); text-decoration: none; }
.transport { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.transport .row { display: flex; align-items: center; gap: 14px; }
.side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.vol { display: flex; align-items: center; gap: 8px; color: var(--dim); }
.vol .slider { width: 150px; }
.status { color: var(--dim); font-size: 12px; min-height: 16px; text-align: center; }

.library { padding: 14px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.libhead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.tabs button { flex: none; }
.tabs button { background: none; border: 0; padding: 5px 12px; border-radius: 14px; color: var(--dim); font-weight: 600; }
.tabs button.on { background: var(--signal); color: var(--on-signal); }
.search { margin-left: auto; display: flex; align-items: center; gap: 6px; background: rgb(255 255 255 / .05);
  border: 1px solid var(--stroke); border-radius: 15px; padding: 0 12px; height: 30px; width: 220px; }
.search input { background: none; border: 0; outline: 0; width: 100%; }
/* The library takes the height the window leaves after the stage and the equalizer (all of it without one). */
.cols { display: grid; grid-template-columns: 1fr 1fr 1.6fr; gap: 10px; height: clamp(280px, calc(100vh - 690px), 760px); }
.no-eq .cols { height: clamp(280px, calc(100vh - 420px), 900px); }
.col { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.col > .label { padding: 9px 12px; border-bottom: 1px solid var(--hair); display: flex; gap: 8px; align-items: center; }
.col ol { list-style: none; margin: 0; padding: 4px; overflow-y: auto; flex: 1; }
.item { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; background: none; border: 0;
  border-radius: 8px; padding: 6px 8px; }
.item:hover { background: rgb(255 255 255 / .05); }
.item.on { background: linear-gradient(90deg, rgb(64 204 242 / .28), rgb(51 140 255 / .12)); box-shadow: inset 3px 0 0 var(--a); }
.item .dot { width: 22px; height: 22px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 11px;
  font-weight: 700; color: var(--on-signal); }
.dot.t0 { background: rgb(64 204 242); } .dot.t1 { background: rgb(57 172 248); } .dot.t2 { background: rgb(51 140 255); }
.dot.t3 { background: rgb(83 191 236); } .dot.t4 { background: rgb(99 217 226); } .dot.t5 { background: rgb(115 242 217); }
.item .txt { min-width: 0; flex: 1; }
.item .t1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .t2 { color: var(--faint); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .n { color: var(--faint); font-size: 11px; font-variant-numeric: tabular-nums; flex: none; }
.item .flag { width: 22px; text-align: center; font-size: 15px; flex: none; }
.empty { color: var(--faint); padding: 14px; }

.eq { padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.eqhead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.eqhead .count { margin-left: auto; }
.preamp { display: flex; align-items: center; gap: 14px; padding: 10px 14px; }
.preamp .slider { flex: 1; }
.preamp .db { font-variant-numeric: tabular-nums; font-weight: 700; min-width: 62px; text-align: right; }
.graph { position: relative; height: clamp(110px, 16vh, 190px); overflow: hidden; touch-action: none; }
.graph canvas { width: 100%; height: 100%; display: block; }
.foot { grid-area: foot; color: var(--faint); font-size: 12px; text-align: center; }
.foot a { color: var(--dim); }

@media (min-width: 1500px) {
  .art { width: 140px; height: 140px; font-size: 54px; }
  .now h1 { font-size: 28px; }
  .vol .slider { width: 200px; }
}
@media (max-width: 960px) {
  .stage { grid-template-columns: auto minmax(0, 1fr); gap: 16px; }
  .stage .transport, .stage .side { grid-column: 1 / -1; }
  .stage .side { align-items: center; }
  .cols { grid-template-columns: 1fr 1fr; height: auto; }
  .cols .col { height: clamp(220px, 32vh, 340px); }
  .cols .col.stations { grid-column: 1 / -1; height: clamp(300px, 52vh, 560px); }
}
@media (max-width: 600px) {
  .art { width: 72px; height: 72px; font-size: 30px; border-radius: 14px; }
  .now h1 { font-size: 19px; }
  .now .sub { font-size: 13px; }
  .stage { padding: 0; min-height: 0; }
  .vol { width: 100%; }
  .vol .slider { width: 100%; }
  .library, .eq { padding: 10px; border-radius: 14px; }
  .libhead { gap: 8px; }
  .search { width: 100%; margin-left: 0; order: 3; }
  .tools { top: 8px; right: 8px; }
  .cols { grid-template-columns: 1fr; }
  .cols .col { height: clamp(180px, 28vh, 260px); }
  .cols .col.stations { height: clamp(300px, 60vh, 520px); }
  .eqhead .count { display: none; }
  .preamp { padding: 8px 10px; gap: 10px; }
  .item { padding: 8px; }
}
@media (max-height: 640px) and (min-width: 961px) {
  .cols { height: 300px; }
}

/* The embedded player (a frame on other sites) */
html.embed, html.embed body { background: transparent; color-scheme: normal; min-height: 0; overflow: hidden; }
.dock { position: fixed; bottom: 0; display: flex; flex-direction: column; gap: 8px; padding: 8px; }
.dock.left { left: 0; align-items: flex-start; }
.dock.right { right: 0; align-items: flex-end; }
.fab { width: 50px; height: 50px; border-radius: 50%; border: 1px solid var(--stroke); font-size: 21px; color: var(--ink);
  background: linear-gradient(var(--top), var(--bottom)); box-shadow: 0 4px 14px rgb(0 0 0 / .45); }
.fab.on { background: radial-gradient(circle at 35% 30%, var(--a), var(--b)); color: #031019; border-color: transparent; }
.mini { width: min(300px, calc(100vw - 16px)); max-height: calc(100vh - 74px); overflow-y: auto; padding: 14px; border-radius: 18px; background: linear-gradient(var(--top), var(--bottom));
  border: 1px solid var(--stroke); box-shadow: 0 10px 28px rgb(0 0 0 / .5); display: flex; flex-direction: column; gap: 10px; }
.mini .head { display: flex; gap: 12px; align-items: center; min-width: 0; }
.mini .head > div:last-child { min-width: 0; }
.mini .art { width: 54px; height: 54px; border-radius: 12px; font-size: 22px; }
.mini .t1 { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini .t2 { color: var(--dim); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini .t3 { color: var(--a); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 16px; }
.mini .row { display: flex; align-items: center; justify-content: center; gap: 12px; }
.mini .big-play { width: 46px; height: 46px; font-size: 17px; }
.mini .vol, .mini .vol .slider { width: 100%; }
.mini .chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.mini .chip { flex: none; height: 26px; padding: 0 10px; border-radius: 13px; border: 1px solid var(--stroke);
  background: rgb(255 255 255 / .05); color: var(--dim); font-size: 12px; }
.mini .chip.on { background: var(--signal); color: var(--on-signal); border-color: transparent; }
.mini .eqrow { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--hair); padding-top: 10px; }
.mini .eqrow .power { width: 28px; height: 28px; font-size: 12px; }
.mini .eqrow select { flex: 1; min-width: 0; height: 28px; }
.mini .open { height: 30px; border-radius: 15px; border: 1px solid var(--stroke); background: rgb(255 255 255 / .05); font-weight: 600; }
.mini .note { color: var(--faint); font-size: 11px; text-align: center; margin: 0; }
.mini .follow { display: flex; gap: 8px; align-items: flex-start; color: var(--dim); font-size: 11.5px; }
.mini .follow input { accent-color: rgb(64 204 242); margin: 1px 0 0; }

/* The radio window opened from another site (/?window): one column, the essentials first. */
body.window .app { padding: 10px 12px; gap: 12px; }
body.window .stage { grid-template-columns: auto minmax(0, 1fr); gap: 14px; }
body.window .stage .transport, body.window .stage .side { grid-column: 1 / -1; }
body.window .stage .side { align-items: center; }
body.window .art { width: 72px; height: 72px; font-size: 30px; }
body.window .now h1 { font-size: 18px; }
body.window .cols { grid-template-columns: 1fr; height: auto; }
body.window .cols .col { height: 220px; }
