/* Onstagelyricbrowser - szinpadi UI (fekete + neonzold #00ff88, az eredeti dizajn nyoman) */

/* ---- Outfit betutipus, HELYBEN beagyazva (offline szinpad, net nelkul is mukodik).
   Variable font: egy-egy fajl fedi a teljes 100-900 sulytartomanyt subsetenkent.
   latin-ext kell a magyar o"/u" (kettos ekezet) karakterekhez. ---- */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/outfit-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/outfit-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #000000;
  --sidebar-bg: #111111;
  --panel: #1a1a1a;
  --line: #222222;
  --fg: #ffffff;
  --muted: #888888;
  --accent: #00ff88;
  --upcoming: #ffaa00;
  --glow: rgba(0, 255, 136, 0.4);
  --lyric-font-size: 4rem;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  height: 100%;
  background: var(--bg); color: var(--fg);
  font-family: 'Outfit', system-ui, -apple-system, Roboto, Arial, sans-serif;
  overflow: hidden;
}
body { display: flex; flex-direction: column; }
.hidden { display: none !important; }

/* ---- logo (jobbra fent, feheren) ---- */
#main-logo {
  position: fixed; top: 4rem; right: 1.5rem; width: 7rem; height: auto;
  z-index: 1; filter: invert(1) brightness(2); opacity: .8;   /* a szinpad/dalszoveg (z-index:2) es a menu is a logo ele kerul */
  cursor: pointer; transition: opacity .15s, transform .15s;
}
#main-logo:hover { opacity: 1; transform: scale(1.05); }
#main-logo:active { transform: scale(.97); }

/* PWA telepites / uzenet toast */
#toast {
  position: fixed; left: 50%; bottom: 6rem; transform: translateX(-50%) translateY(20px);
  background: var(--panel); color: var(--fg); border: 1px solid var(--accent);
  box-shadow: 0 0 20px var(--glow); border-radius: 10px; padding: .8rem 1.1rem;
  font-size: .95rem; max-width: 86vw; text-align: center; z-index: 11000;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---- topbar (letisztult, komoly "konzol" stilus, neon-ragyogas nelkul) ---- */
#topbar {
  display: flex; align-items: center; gap: .45rem;
  height: 3.75rem; padding: 0 1rem;
  background: linear-gradient(#0c0c0c, #070707);
  border-bottom: 1px solid #1e1e1e;
  box-shadow: 0 1px 0 rgba(255,255,255,.02);
  z-index: 9000;
}
.spacer { flex: 1; }

/* MENU: kiemelt, de visszafogott (nem neon) */
.menu-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  background: #161616; color: var(--fg); border: 1px solid #2a2a2a;
  padding: .3rem .6rem; border-radius: 8px; font-family: inherit;
  font-size: 1.3rem; line-height: 1; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.menu-toggle:hover { background: #1c1c1c; border-color: var(--accent); }
.menu-toggle:active { background: #222; }

/* setlist szalag: finomabb, tabularis szamok */
#setlist-tape {
  display: flex; align-items: center; gap: .1rem;
  max-width: 40vw; overflow-x: auto; scrollbar-width: none; padding: 0 .25rem;
}
#setlist-tape::-webkit-scrollbar { display: none; }
.tape-number {
  color: var(--muted); font-size: .9rem; font-weight: 600; font-variant-numeric: tabular-nums;
  cursor: pointer; padding: .25rem .5rem; border-radius: 6px; white-space: nowrap;
  transition: background .15s, color .15s;
}
.tape-number:hover { color: #ddd; background: #161616; }
.tape-number.active { background: var(--accent); color: #000; font-weight: 800; }

/* egyseges pill-rendszer, ragyogas nelkul */
.pill {
  display: inline-flex; align-items: center; gap: .35rem;
  background: #161616; color: #b8b8b8; border: 1px solid #2a2a2a; border-radius: 8px;
  padding: .45rem .7rem; font-family: inherit; font-size: .77rem; font-weight: 600;
  cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, color .15s;
}
.pill:hover { border-color: #3a3a3a; color: #eee; }
.pill.on { color: #000; background: var(--accent); border-color: var(--accent); font-weight: 700; }
#ctrl-btn.on { background: var(--upcoming); border-color: var(--upcoming); color: #000; }
/* mas eszkoz vezerel -> "Atvesz" (csak keretez) */
#ctrl-btn.other { color: var(--upcoming); border-color: rgba(255,170,0,.5); background: #161616; }

.dot { width: 9px; height: 9px; border-radius: 50%; background: #d0433a; margin: 0 .1rem; }
.dot.on { background: var(--accent); }

/* jelenlet: egyseges a pillekkel */
.presence {
  font-size: .77rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums;
  padding: .35rem .55rem; border-radius: 8px; border: 1px solid #2a2a2a; background: #161616; white-space: nowrap;
}
.presence.has-ctrl { color: var(--upcoming); border-color: rgba(255,170,0,.5); }

/* "Szabad bongeszes" sav a fejlec alatt (koppintasra vissza a szinkronhoz) */
#freebrowse {
  position: fixed; top: 3.9rem; left: 50%; transform: translateX(-50%);
  z-index: 8800; background: var(--upcoming); color: #000;
  font-size: .82rem; font-weight: 800; padding: .35rem .9rem; border-radius: 999px;
  box-shadow: 0 0 14px rgba(255,170,0,.45); cursor: pointer; max-width: 92vw;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---- sidebar ---- */
#sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: min(340px, 86vw);
  background: var(--sidebar-bg); border-right: 1px solid var(--line);
  z-index: 10000; overflow-y: auto; padding: 1.2rem;
  display: flex; flex-direction: column; gap: 1.2rem;
  transform: translateX(0); transition: transform .3s cubic-bezier(.4,0,.2,1);
}
#sidebar.hidden { transform: translateX(-102%); display: flex !important; }
.sidebar-header { padding-bottom: .4rem; border-bottom: 1px solid var(--line); }
#concert-select {
  width: 100%; background: #222; color: #fff; margin-bottom: .7rem;
  border: 1px solid #333; padding: .9rem; border-radius: 12px; font-family: inherit; font-size: 1rem;
}

/* ---- oldalsav tagolas: cim, szekcio-fejlec, alcimke, magyarazat ---- */
.side-title { font-size: 1.15rem; font-weight: 800; letter-spacing: .02em; color: var(--fg);
  padding-bottom: .6rem; border-bottom: 1px solid var(--line); }
.side-section { padding-bottom: .2rem; }
.side-section h3 { color: var(--fg); font-size: .95rem; font-weight: 800; letter-spacing: .01em;
  text-transform: none; margin-bottom: .3rem; padding-left: .55rem; border-left: 3px solid var(--accent); }
.hint { display: block; color: var(--muted); font-size: .74rem; line-height: 1.4; margin: .1rem 0 .55rem; }
.sub-label { color: var(--muted); font-size: .66rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; margin: .8rem 0 .35rem; }
.src-current { width: 100%; background: #0d0d0d; color: #cfcfcf; border: 1px solid var(--line);
  border-radius: 8px; padding: .55rem .6rem; font-family: inherit; font-size: .8rem; }
.btn-block { width: 100%; margin-top: .1rem; }

/* ---- nezet-valaszto (View): Full / Verse / Scroll ---- */
.mode-group { display: flex; gap: .4rem; }
.mode-opt {
  flex: 1; background: #161616; color: #b8b8b8; border: 1px solid #2a2a2a; border-radius: 8px;
  padding: .55rem .3rem; font-family: inherit; font-size: .8rem; font-weight: 600; cursor: pointer;
  white-space: nowrap; transition: background .15s, border-color .15s, color .15s;
}
.mode-opt:hover { border-color: #3a3a3a; color: #eee; }
.mode-opt.active { background: var(--accent); color: #000; border-color: var(--accent); font-weight: 800; }

/* ---- "Install app" gomb (PWA telepites, az oldalsav aljan) ---- */
.install-btn {
  width: 100%; margin-top: .4rem; padding: .65rem; border-radius: 8px;
  background: var(--accent); color: #000; border: none; font-family: inherit;
  font-size: .85rem; font-weight: 800; cursor: pointer; box-shadow: 0 0 12px var(--glow);
  transition: filter .15s;
}
.install-btn:hover { filter: brightness(1.1); }

/* ---- felho-kezeles (Manage lyrics) ---- */
#manage-concert {
  width: 100%; background: #222; color: #fff; margin-bottom: .5rem;
  border: 1px solid #333; padding: .6rem; border-radius: 8px; font-family: inherit; font-size: .9rem;
}
.side-section .row .btn.danger { color: #ff6b6b; border-color: #7a2b2b; }
.side-section .row .btn.danger:hover { border-color: #c0392b; }
.upload-label { text-align: center; }
#song-list { list-style: none; }
#song-list li {
  padding: 1rem; margin-bottom: .5rem; border-radius: 10px; cursor: pointer;
  background: var(--panel); font-size: 1.05rem; font-weight: 500;
  display: flex; align-items: center; gap: .8rem; transition: background .15s;
}
#song-list li .idx { font-weight: 800; opacity: .6; }
#song-list li:hover { background: #242424; }
#song-list li.active { background: var(--accent); color: #000; font-weight: 700; }
.fld { display: block; font-size: .75rem; color: var(--muted); margin-bottom: .6rem; }
.fld input { width: 100%; margin-top: .3rem; background: #222; color: #fff;
  border: 1px solid #333; border-radius: 8px; padding: .55rem; font-family: inherit; font-size: .85rem; }
.row { display: flex; gap: .5rem; flex-wrap: wrap; }
.btn-flat, .btn.side, .btn { }
.side-section .row .btn {
  flex: 1; background: #222; color: #fff; border: 1px solid #333;
  border-radius: 8px; padding: .6rem; cursor: pointer; font-family: inherit; font-size: .85rem;
  width: auto; height: auto; transform: none; font-weight: 600;
}
.side-section .row .btn:hover { border-color: var(--accent); }
/* ---- mappa-tallozo ---- */
/* ---- mappa-valaszto: "Selected folder" doboz (ut + gomb egyben) + lista ---- */
.picker { margin: .2rem 0 .1rem; }
/* felso sav: csak azt mutatja, hol jarsz (nincs gomb) */
.picker-here {
  display: flex; align-items: center; gap: .5rem;
  background: #101010; border: 1px solid var(--line); border-radius: 8px; padding: .5rem .6rem;
}
.browser-current {
  flex: 1; min-width: 0; color: var(--fg); font-size: .8rem; font-weight: 600;
  white-space: nowrap; overflow-x: auto; scrollbar-width: none;
}
.browser-current::-webkit-scrollbar { display: none; }
.browser-items { list-style: none; max-height: 30vh; overflow-y: auto; margin-top: .45rem;
  border: 1px solid var(--line); border-radius: 10px; }
.drive-list { list-style: none; max-height: 30vh; overflow-y: auto; }
/* ---- eszkozlista (jelenlet) ---- */
.devices-list { list-style: none; margin-top: .4rem; display: flex; flex-direction: column; gap: .3rem; }
.devices-list li { padding: .5rem .6rem; border-radius: 8px; font-size: .85rem;
  background: var(--panel); border: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.devices-list li.ctrl { border-color: var(--upcoming); color: var(--upcoming); font-weight: 700; }
.devices-list li.me { border-color: var(--accent); }
.devices-list li.me.ctrl { border-color: var(--upcoming); }
.devices-list li.muted { background: transparent; border: none; color: var(--muted); }
.browser-item { border-bottom: 1px solid #1c1c1c; display: flex; align-items: stretch; }
.browser-item:last-child { border-bottom: none; }
/* ".. feljebb" sor */
.browser-item.parent {
  padding: .6rem; font-size: .86rem; cursor: pointer; color: var(--upcoming);
  font-weight: 700; transition: background .12s;
}
.browser-item.parent:hover { background: #242424; }
/* mappa-sor: nyito resz (bi-main) + kozvetlen "Use" gomb */
.bi-main {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: .5rem;
  background: none; border: none; color: var(--fg); font: inherit; text-align: left;
  padding: .6rem; cursor: pointer; transition: background .12s;
}
.bi-main:hover { background: #242424; }
.bi-ic { flex: 0 0 auto; }
.bi-nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .88rem; }
.bi-go { flex: 0 0 auto; color: var(--muted); font-size: .72rem; }
.bi-main:hover .bi-go { color: var(--accent); }
.bi-use {
  flex: 0 0 auto; align-self: center; margin: 0 .5rem; padding: .35rem .7rem;
  background: #1c1c1c; color: var(--accent); border: 1px solid var(--accent);
  border-radius: 7px; font: inherit; font-size: .74rem; font-weight: 800; cursor: pointer;
  transition: background .12s, color .12s;
}
.bi-use:hover { background: var(--accent); color: #000; }
.browser-items .muted, .drive-list .muted { padding: .55rem .6rem; font-size: .8rem; color: var(--muted); cursor: default; }
.drive-list { margin-top: .4rem; border: 1px solid var(--line); border-radius: 10px; }
.drive-list:empty { border: none; }
.btn-primary { background: var(--accent) !important; color: #000 !important; border-color: var(--accent) !important; font-weight: 800 !important; box-shadow: 0 0 12px var(--glow); }
.msg { margin-top: .5rem; font-size: .8rem; color: var(--accent); min-height: 1.1em; }
.side-foot { margin-top: auto; color: var(--muted); font-size: .72rem; }
#scrim { position: fixed; inset: 0; background: #000a; z-index: 9500; }

/* ---- stage / lyrics ---- */
#stage { flex: 1; position: relative; overflow: hidden; z-index: 2; }
#lyrics-container {
  position: absolute; inset: 0; padding: 6vh 5vw; overflow-y: auto;
  text-align: center; scroll-behavior: smooth; scrollbar-width: none;
}
#lyrics-container::-webkit-scrollbar { display: none; }
.lyric-line {
  font-size: var(--lyric-font-size); line-height: 1.24; font-weight: 700;
  margin-bottom: .6rem; transition: color .2s, text-shadow .2s, opacity .2s;
}
.lyric-line.empty-line { height: 2rem; margin: 0; }
.lyric-line.is-title { color: var(--accent); text-shadow: 0 0 20px var(--glow); font-size: calc(1.5 * var(--lyric-font-size)); }
/* gorgetos mod: aktiv sor kiemelese, tobbi halvany */
#lyrics-container:not(.full-view) .lyric-line { opacity: .4; }
#lyrics-container:not(.full-view) .lyric-line.active {
  opacity: 1; color: var(--accent); text-shadow: 0 0 30px var(--glow);
  background: rgba(0,255,136,.08); border-radius: 10px;
}
#lyrics-container.full-view .lyric-line.active { color: var(--accent); }
/* teljes / verzus mod: fuggolegesen kozepre igazitott, kepernyore meretezett szoveg */
#lyrics-container.full-view { display: flex; flex-direction: column; justify-content: center; }
/* verzus mod: nagyobb levegos sorkoz (keves sor, nagy betu) */
#lyrics-container.verse-view .lyric-line { line-height: 1.3; margin-bottom: 1rem; }

/* ---- controls (jobbra lent, kor gombok) ---- */
.controls-overlay {
  position: fixed; bottom: 1.5rem; right: 1.5rem;
  display: flex; flex-direction: column; gap: 1rem; z-index: 9800;
}
/* elozo/kovetkezo: egyseges, visszafogottabb meret */
.controls-overlay .btn { width: 3.6rem; height: 3.6rem; font-size: 2rem; }
.btn {
  width: 4.5rem; height: 4.5rem; border-radius: 50%; border: none;
  background: #222; color: #fff; font-size: 2.4rem; font-weight: 800; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px #0008; transition: transform .12s, filter .12s;
}
.btn:active { transform: scale(.94); }
.btn-next { background: var(--accent); color: #000; box-shadow: 0 0 18px var(--glow); }

/* aktualis dal jelveny (bal lent) */
#song-badge {
  position: fixed; bottom: 1.6rem; left: 1.6rem; z-index: 9700;
  background: var(--accent); color: #000; padding: .12rem .7rem; border-radius: 6px;
  font-size: .85rem; font-weight: 800; letter-spacing: .4px; line-height: 1.35;
  box-shadow: 0 0 15px var(--glow);
  max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

@media (max-width: 720px) {
  #topbar { height: 3.4rem; padding: 0 .6rem; gap: .3rem; }
  .menu-toggle { padding: .45rem .6rem; font-size: .68rem; letter-spacing: .06em; }
  #setlist-tape { max-width: 24vw; }
  .tape-number { font-size: .82rem; padding: .2rem .4rem; }
  .pill { padding: .4rem .55rem; font-size: .72rem; }
  .presence { padding: .3rem .45rem; font-size: .72rem; }
  #main-logo { width: 4.5rem; top: calc(2.4rem + 20px); right: .8rem; }
  .btn { width: 3.6rem; height: 3.6rem; font-size: 2rem; }
  .controls-overlay .btn { width: 3rem; height: 3rem; font-size: 1.6rem; }
}
