:root {
  --bg: #16171b; --panel: #202228; --row: #26282f; --row-hover: #2e313a;
  --text: #eceef2; --muted: #9a9fab; --accent: #f2c14e; --accent-ink: #1b1b1b;
  --live: #3ddc84; --danger: #e5534b; --chord: #f2c14e; --hl: rgba(242, 193, 78, .16);
  --lyrics-size: 19px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: "Segoe UI", "Rubik", "Arial Hebrew", Arial, sans-serif; }
body { min-height: 100vh; padding-bottom: 72px; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }

.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 8px 16px; background: var(--panel); border-bottom: 1px solid #000; }
.brand { font-weight: 700; display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--danger); flex: none; }
.dot.on { background: var(--live); }
.tabs { display: flex; gap: 4px; margin-inline-start: auto; }
.tab { background: none; border: 0; padding: 10px 12px; color: var(--muted); border-bottom: 2px solid transparent; }
.tab.active { color: var(--accent); border-color: var(--accent); }
.live { color: var(--live); animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.who { font-size: 13px; color: var(--muted); white-space: nowrap; }
.who button { background: none; border: 1px solid #444; border-radius: 6px; padding: 3px 8px; }

.view { max-width: 900px; margin: 0 auto; padding: 12px 16px; }
.filters { display: flex; gap: 8px; position: sticky; top: 57px; z-index: 10; background: var(--bg); padding: 6px 0; }
.search { flex: 1; position: relative; }
.search input, .filters select { width: 100%; height: 42px; border-radius: 8px; border: 1px solid #3a3d46; background: var(--panel); color: var(--text); padding: 0 12px; font-size: 16px; }
.filters select { width: auto; min-width: 110px; }
.search .icon { position: absolute; left: 6px; top: 6px; height: 30px; width: 30px; border: 0; background: none; color: var(--muted); }
.count { color: var(--muted); font-size: 13px; margin: 4px 2px 8px; }

.songs { list-style: none; margin: 0; padding: 0; }
.songs li { display: flex; align-items: center; gap: 10px; background: var(--row); margin-bottom: 3px; padding: 9px 14px; border-radius: 4px; cursor: pointer; }
.songs li:hover { background: var(--row-hover); }
.songs li.playing { outline: 1px solid var(--live); }
.songs .t { flex: 1; min-width: 0; }
.songs .name { font-weight: 600; }
.songs .singer { color: var(--muted); font-size: 14px; }
.songs .chev { color: var(--muted); }
.badge { font-size: 11px; padding: 2px 6px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.badge.live { background: var(--live); animation: none; }

.empty { text-align: center; padding: 70px 16px; color: var(--text); }
.empty .big { font-size: 54px; color: var(--accent); }
.muted { color: var(--muted); }

.overlay { position: fixed; inset: 57px 0 40px 0; max-width: none; overflow-y: auto; background: var(--bg); z-index: 15; }
.song-head { display: flex; align-items: flex-start; gap: 12px; margin: 4px 0 14px; }
.song-head h2 { margin: 0; font-size: 24px; }
.song-head .singer { color: var(--muted); }
.song-head .actions { margin-inline-start: auto; display: flex; gap: 8px; }
.btn { border: 1px solid #444; background: var(--panel); border-radius: 8px; padding: 8px 14px; }
.btn.primary, button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 700; }

.lyrics { font-family: "Courier New", Consolas, monospace; font-size: var(--lyrics-size); line-height: 1.35; white-space: pre; overflow-x: auto; padding-bottom: 40vh; }
.lyrics .r { padding: 1px 6px; border-radius: 4px; min-height: 1.35em; }
.lyrics .r.chord { color: var(--chord); font-weight: 700; }
.lyrics .r.chord span { unicode-bidi: isolate; direction: ltr; }
.lyrics.no-chords .r.chord { display: none; }
.lyrics.fit { padding-bottom: 0; overflow: hidden; column-gap: 28px; column-rule: 1px solid #3a3d46; column-fill: auto; }
.lyrics.fit .r { break-inside: avoid; }
body.fitmode #playingNow, body.fitmode #songView { max-width: none; }
.lyrics.fit .r.chord { break-after: avoid; }
.lyrics .r.hl { background: var(--hl); }
.band .lyrics .r:not(.blank) { cursor: pointer; }
.band .lyrics .r:not(.blank):hover { background: rgba(255,255,255,.05); }

.toolbar { position: fixed; bottom: 40px; left: 50%; transform: translateX(-50%); z-index: 30; display: flex; align-items: center; gap: 6px; padding: 6px 10px; background: var(--panel); border: 1px solid #3a3d46; border-radius: 12px; box-shadow: 0 6px 20px rgba(0,0,0,.4); max-width: calc(100vw - 32px); overflow-x: auto; }
.toolbar button { background: var(--row); border: 0; border-radius: 8px; min-width: 38px; height: 36px; padding: 0 10px; }
.toolbar button.off { opacity: .45; }
.toolbar button.danger { background: var(--danger); }
.toolbar #tVal { min-width: 26px; text-align: center; font-weight: 700; }
.toolbar .sep { width: 1px; height: 24px; background: #3a3d46; }
body:not(.band) .band-only { display: none; }

.status { position: fixed; bottom: 0; inset-inline: 0; height: 40px; display: flex; justify-content: space-between; align-items: center; padding: 0 16px; background: var(--panel); font-size: 13px; color: var(--muted); z-index: 25; }

dialog { background: var(--panel); color: var(--text); border: 1px solid #3a3d46; border-radius: 12px; padding: 20px; width: min(320px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(0,0,0,.6); }
dialog h3 { margin-top: 0; }
#pinInput { width: 100%; height: 44px; font-size: 20px; text-align: center; letter-spacing: 4px; border-radius: 8px; border: 1px solid #444; background: var(--bg); color: var(--text); }
dialog .small { font-size: 13px; margin: -8px 0 10px; }
.req-song { font-weight: 700; margin: 0 0 12px; }
.req-song span { color: var(--muted); font-weight: 400; }
.fld { display: block; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.fld input, .fld textarea { display: block; width: 100%; margin-top: 4px; font: inherit; font-size: 16px; padding: 8px 10px; border-radius: 8px; border: 1px solid #444; background: var(--bg); color: var(--text); resize: vertical; }
.radios { display: flex; gap: 18px; margin: 4px 0; }
.radios label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.radios input { accent-color: var(--accent); }

.tab-count { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.req-group { background: var(--panel); border-radius: 8px; margin-bottom: 10px; overflow: hidden; }
.req-group.next { outline: 1px solid var(--accent); }
.req-group h4 { margin: 0; padding: 9px 14px; display: flex; align-items: center; gap: 8px; font-size: 15px; border-bottom: 1px solid #000; }
.req-group h4 .pos { color: var(--muted); font-weight: 400; font-size: 13px; }
.req-group h4 .me { font-size: 11px; color: var(--accent); }
.req-item { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-top: 1px solid rgba(255,255,255,.04); }
.req-item .t { flex: 1; min-width: 0; cursor: pointer; }
.req-item .name { font-weight: 600; }
.req-item .meta { color: var(--muted); font-size: 13px; }
.req-item .remark { font-size: 13px; color: var(--text); opacity: .85; margin-top: 2px; }
.req-item button { border: 1px solid #444; background: var(--row); border-radius: 8px; height: 34px; padding: 0 10px; white-space: nowrap; }
.req-item button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 700; }
.req-by { color: var(--accent); font-size: 14px; margin-top: 2px; }

.toast { position: fixed; bottom: 56px; left: 50%; transform: translateX(-50%); z-index: 50; background: var(--live); color: #0d2716; padding: 10px 18px; border-radius: 10px; font-weight: 600; box-shadow: 0 6px 20px rgba(0,0,0,.4); max-width: calc(100vw - 32px); text-align: center; }
.toast.bad { background: var(--danger); color: #fff; }
dialog .row { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }
dialog .row button { border: 1px solid #444; background: var(--row); border-radius: 8px; padding: 8px 14px; }
dialog .row button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 700; }
.err { color: var(--danger); margin: 8px 0 0; }

@media (max-width: 560px) {
  .top { flex-wrap: wrap; gap: 0 8px; padding: 6px 12px 0; }
  .tabs { order: 3; width: 100%; margin: 0; }
  .tab { flex: 1; }
  .filters { top: 93px; }
  .overlay { top: 93px; }
  .song-head { flex-wrap: wrap; }
  .song-head h2 { font-size: 20px; }
  :root { --lyrics-size: 16px; }
}

/* Colors matching the original synctheband.com playingNow page */
:root { --accent: #ffff00; --chord: #0000ff; --hl: rgba(255, 230, 0, .35); }
html, body { background: #0f0f12 linear-gradient(0deg, #0f0f12, #1f2125 45%, #2b2f34) fixed; }
.top { background: #39434e; }
.filters { background: transparent; }
#playingNow, #songView { background: #fff; color: #000; }
#playingNow .song-head h2, #songView .song-head h2 { color: #0000ff; font-weight: 700; }
#playingNow .song-head .singer, #songView .song-head .singer { color: #6495ed; }
#playingNow .empty, #songView .empty { color: #000; }
#playingNow .muted, #songView .muted { color: #555; }
#playingNow .btn, #songView .btn { background: #f1f3f6; color: #000; border-color: #c9ced6; }
#playingNow .btn.primary, #songView .btn.primary { background: #ffd600; border-color: #e6c000; color: #000; }
.lyrics .r { color: #000; }
.lyrics .r.chord { color: #0000ff; }
.lyrics.fit { column-rule: 3px solid #06dfff; }
.req-by { color: #e07b00; }
.band .lyrics .r:not(.blank):hover { background: rgba(0, 0, 255, .06); }
#playingNow { min-height: calc(100vh - 57px - 72px); }
#playingNow .empty .big, #songView .empty .big { color: #0000ff; }
