/* MusicBox – közös stílus (kioszk, TV, admin). Sötét téma, nagy érintőfelületek. */
:root {
  --bg: #0d0f14;
  --bg2: #161a23;
  --bg3: #1f2532;
  --fg: #f2f4f8;
  --fg2: #a9b1c2;
  --accent: #ffb84d;
  --accent2: #ff6b3d;
  --ok: #4cd97b;
  --warn: #ff5c5c;
  --radius: 14px;
  --touch: 64px;
  --font: "Noto Sans", "Segoe UI", "DejaVu Sans", Roboto, system-ui, sans-serif;
  --on-accent: #1a1200;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--fg); overflow: hidden; }
body { font-family: var(--font); font-size: 20px; user-select: none; -webkit-user-select: none; transition: background .3s, color .3s; }
button { font: inherit; color: inherit; border: 0; cursor: pointer; }
input { font: inherit; }
.hidden { display: none !important; }

/* Kioszk: nincs látható görgetősáv (érintéssel görgethető marad) */
.content, .queue, .results, .dls, .modal { scrollbar-width: none; }
.content::-webkit-scrollbar, .queue::-webkit-scrollbar, .results::-webkit-scrollbar, .dls::-webkit-scrollbar { width: 0; height: 0; }

/* --- gombok ---------------------------------------------------------------- */
.btn {
  min-height: var(--touch); padding: 0 22px; border-radius: var(--radius);
  background: var(--bg3); color: var(--fg); font-weight: 600; font-size: 20px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  transition: transform .08s, background .15s;
}
.btn:active { transform: scale(.97); background: #2b3345; }
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: var(--on-accent); }
.btn.danger { background: var(--warn); color: #fff; }
.btn.ghost { background: transparent; border: 2px solid var(--bg3); }
.btn[disabled] { opacity: .4; pointer-events: none; }
.btn.small { min-height: 44px; font-size: 16px; padding: 0 14px; border-radius: 10px; }

/* --- kioszk elrendezés -------------------------------------------------------- */
.kiosk { display: grid; grid-template-rows: 84px 1fr; height: 100vh; }
.topbar {
  display: flex; align-items: center; gap: 18px; padding: 0 20px;
  background: var(--bg2); border-bottom: 1px solid #262c3a;
}
.brand { font-weight: 800; letter-spacing: .08em; font-size: 24px; color: var(--accent); }
.brand small { display: block; font-size: 12px; letter-spacing: .2em; color: var(--fg2); font-weight: 500; }
.btn.lang { min-height: 52px; padding: 0 14px; font-size: 16px; margin-left: auto; }
.langs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.langs .btn { min-height: 64px; font-size: 20px; }
.credits {
  margin-left: 0; display: flex; align-items: center; gap: 12px;
  background: var(--bg3); border-radius: var(--radius); padding: 8px 18px;
}
.credits .n { font-size: 34px; font-weight: 800; color: var(--accent); min-width: 48px; text-align: right; }
.credits .l { font-size: 14px; color: var(--fg2); line-height: 1.15; }
.credits.flash { animation: flash .6s ease-out; }
@keyframes flash { 0% { background: var(--accent); color: var(--on-accent); } 100% { background: var(--bg3); } }

.main { display: grid; grid-template-columns: 1fr 380px; min-height: 0; }
.left { display: grid; grid-template-rows: auto 1fr; min-height: 0; }
.tabs { display: flex; gap: 8px; padding: 12px 16px 0; min-width: 0; }
.tabs .btn { flex: 1; min-width: 0; padding: 0 12px; white-space: nowrap; }
@media (max-width: 1100px) { .tabs .btn { font-size: 16px; padding: 0 8px; } .brand { font-size: 20px; } }
.tabs .btn.active { background: var(--accent); color: var(--on-accent); }
.content { min-height: 0; overflow-y: auto; padding: 12px 16px 24px; }
.right { background: var(--bg2); border-left: 1px solid #262c3a; display: grid; grid-template-rows: auto 1fr auto; min-height: 0; }
.right h2, .right h3 { margin: 0; padding: 14px 16px 6px; font-size: 16px; letter-spacing: .1em; color: var(--fg2); text-transform: uppercase; }

/* most szól */
.now { padding: 8px 16px 12px; display: grid; grid-template-columns: 150px 1fr; gap: 14px; align-items: center; }
.now .cover { width: 150px; height: 150px; border-radius: 12px; background: var(--bg3) center/cover no-repeat; box-shadow: 0 8px 24px rgba(0,0,0,.45); display: grid; place-items: center; font-size: 48px; color: var(--fg2); }
.now .t { font-weight: 700; font-size: 20px; line-height: 1.15; }
.now .a { color: var(--fg2); font-size: 16px; margin-top: 4px; }
.now .k { font-size: 12px; color: var(--accent); margin-top: 6px; letter-spacing: .1em; text-transform: uppercase; }
.progress { height: 5px; background: var(--bg3); border-radius: 3px; margin: 0 16px; overflow: hidden; }
.progress > div { height: 100%; width: 0; background: var(--accent); transition: width 1s linear; }

/* sor */
.queue { overflow-y: auto; overflow-x: hidden; min-height: 0; padding: 6px 10px 16px; }
.qitem { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 8px; border-radius: 10px; }
.qitem > div:nth-child(2) { min-width: 0; }
.qitem:nth-child(odd) { background: rgba(255,255,255,.03); }
.qitem .idx { font-weight: 800; color: var(--fg2); text-align: center; }
.qitem .t { font-weight: 600; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qitem .a { color: var(--fg2); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qitem .pri { font-size: 11px; background: var(--accent2); color: #fff; padding: 3px 7px; border-radius: 6px; font-weight: 700; }
.empty { color: var(--fg2); text-align: center; padding: 30px 12px; font-size: 16px; }

/* számlista */
.tracks { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.track {
  display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center;
  min-height: 80px; padding: 8px 12px 8px 8px; border-radius: var(--radius); background: var(--bg2);
  text-align: left; width: 100%;
}
.track:active { background: var(--bg3); }
.track .cover { width: 64px; height: 64px; border-radius: 8px; background: var(--bg3) center/cover no-repeat; display: grid; place-items: center; color: var(--fg2); font-size: 26px; }
.track .t { font-weight: 700; font-size: 18px; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.track .a { color: var(--fg2); font-size: 15px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track .d { color: var(--fg2); font-size: 14px; font-variant-numeric: tabular-nums; }
.badge { font-size: 11px; background: var(--bg3); color: var(--fg2); padding: 2px 6px; border-radius: 5px; margin-left: 6px; vertical-align: middle; }

/* betűk */
.letters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.letters .btn { min-height: 48px; min-width: 48px; padding: 0 10px; font-size: 18px; }
.artists { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.artists .btn { justify-content: space-between; min-height: 60px; font-weight: 600; }
.artists .btn span.n { color: var(--fg2); font-size: 14px; font-weight: 500; }

/* keresés + billentyűzet */
.search { display: grid; grid-template-rows: auto auto 1fr; gap: 10px; height: 100%; min-height: 0; }
.searchbox { display: flex; gap: 10px; align-items: center; }
.searchbox .field {
  flex: 1; min-height: var(--touch); border-radius: var(--radius); background: var(--bg2);
  padding: 0 18px; display: flex; align-items: center; font-size: 26px; gap: 4px;
}
.searchbox .field .caret { width: 2px; height: 32px; background: var(--accent); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.searchbox .field .ph { color: var(--fg2); font-size: 20px; }
.kb { display: grid; gap: 6px; }
.kb .row { display: flex; gap: 6px; justify-content: center; }
.kb .key { flex: 1; max-width: 76px; min-height: 58px; border-radius: 10px; background: var(--bg3); font-size: 22px; font-weight: 600; display: grid; place-items: center; }
.kb .key:active { background: var(--accent); color: var(--on-accent); }
.kb .key.wide { max-width: 160px; flex: 2; font-size: 16px; }
.kb .key.space { max-width: 420px; flex: 6; }
.results { overflow-y: auto; min-height: 0; }

/* modal */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.7); display: grid; place-items: center; z-index: 50; }
.modal { width: min(640px, 92vw); background: var(--bg2); border-radius: 22px; padding: 26px; display: grid; gap: 18px; }
.modal .head { display: grid; grid-template-columns: 140px 1fr; gap: 18px; align-items: center; }
.modal .cover { width: 140px; height: 140px; border-radius: 14px; background: var(--bg3) center/cover no-repeat; }
.modal .t { font-size: 26px; font-weight: 800; line-height: 1.15; }
.modal .a { color: var(--fg2); font-size: 20px; margin-top: 6px; }
.modal .price { color: var(--fg2); font-size: 16px; }
.modal .actions { display: grid; gap: 10px; }
.modal .actions .btn { min-height: 72px; font-size: 22px; }
.modal .need { color: var(--accent); font-weight: 700; font-size: 18px; text-align: center; }

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  background: var(--bg3); color: var(--fg); padding: 14px 22px; border-radius: 12px;
  font-weight: 600; box-shadow: 0 8px 30px rgba(0,0,0,.5); z-index: 60; max-width: 80vw; text-align: center;
}
.toast.err { background: var(--warn); color: #fff; }
.toast.ok { background: var(--ok); color: #05210f; }

/* --- TV ---------------------------------------------------------------------- */
.tv { height: 100vh; display: grid; grid-template-columns: 1fr 420px; position: relative; overflow: hidden; }
.tv .bgblur { position: absolute; inset: -40px; background: center/cover no-repeat; filter: blur(40px) brightness(.35); z-index: 0; }
.tv .stage { position: relative; z-index: 1; display: grid; place-items: center; padding: 40px; }
.tv .card { display: grid; gap: 24px; text-align: center; max-width: 900px; }
.tv .cover { width: min(52vh, 520px); height: min(52vh, 520px); margin: 0 auto; border-radius: 28px; background: var(--bg3) center/cover no-repeat; box-shadow: 0 30px 80px rgba(0,0,0,.6); display: grid; place-items: center; font-size: 120px; }
.tv .t { font-size: 54px; font-weight: 800; line-height: 1.1; }
.tv .a { font-size: 32px; color: var(--fg2); }
.tv .k { font-size: 18px; letter-spacing: .25em; color: var(--accent); text-transform: uppercase; }
.tv .progress { height: 8px; margin: 0; }
.tv .side { position: relative; z-index: 1; background: rgba(13,15,20,.85); padding: 30px 26px; display: grid; grid-template-rows: auto 1fr auto; gap: 18px; }
.tv .side h3 { margin: 0; font-size: 18px; letter-spacing: .2em; color: var(--fg2); text-transform: uppercase; }
.tv .qitem .t { font-size: 22px; } .tv .qitem .a { font-size: 17px; }
.tv .qr { text-align: center; display: grid; gap: 10px; justify-items: center; }
.tv .qr img { width: 180px; height: 180px; background: #fff; border-radius: 12px; padding: 8px; }
.tv .qr .l { font-size: 15px; color: var(--fg2); }
.tv .idle { font-size: 40px; color: var(--fg2); text-align: center; }

/* --- admin --------------------------------------------------------------------- */
body.admin { overflow: auto; font-size: 17px; }
.admin .wrap { max-width: 1100px; margin: 0 auto; padding: 20px; display: grid; gap: 20px; }
.admin h1 { margin: 0; font-size: 22px; color: var(--accent); letter-spacing: .1em; }
.card { background: var(--bg2); border-radius: var(--radius); padding: 18px; display: grid; gap: 12px; }
.card h2 { margin: 0; font-size: 16px; color: var(--fg2); letter-spacing: .1em; text-transform: uppercase; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.row input[type=number], .row input[type=text], .row input[type=date], .row input[type=password] {
  min-height: 48px; border-radius: 10px; border: 1px solid #2b3345; background: var(--bg3); color: var(--fg); padding: 0 12px; font-size: 18px; width: 140px;
}
input[type=range] { width: 260px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 7px 8px; border-bottom: 1px solid #262c3a; }
th { color: var(--fg2); font-weight: 600; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.stat { display: grid; gap: 4px; }
.stat .v { font-size: 30px; font-weight: 800; color: var(--accent); }
.stat .l { font-size: 13px; color: var(--fg2); text-transform: uppercase; letter-spacing: .1em; }
.pin { display: grid; place-items: center; height: 100vh; }
.pin .box { display: grid; gap: 14px; width: 320px; }
.pin .dots { text-align: center; font-size: 34px; letter-spacing: .3em; min-height: 48px; }
.numpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.numpad .btn { min-height: 70px; font-size: 26px; }
.tag { display: inline-block; padding: 3px 8px; border-radius: 6px; font-size: 13px; background: var(--bg3); color: var(--fg2); }
.tag.ok { background: rgba(76,217,123,.15); color: var(--ok); }
.tag.bad { background: rgba(255,92,92,.15); color: var(--warn); }
ul.notes { margin: 0; padding-left: 20px; color: var(--fg2); font-size: 15px; }

@media (max-width: 900px) {
  .main { grid-template-columns: 1fr; }
  .right { display: none; }
  .tv { grid-template-columns: 1fr; }
  .tv .side { display: none; }
}

/* --- YouTube keresés és letöltések ---------------------------------------------- */
.ytbar { margin: 12px 0; display: grid; gap: 8px; }
.ytbar .btn { min-height: 60px; justify-content: flex-start; }
.badge.yt { background: #e62117; color: #fff; }
.track .cover.thumb { background-size: cover; }
/* letöltés-panel: a jobb oldali sáv alján, a Következik lista alatt (jobb alsó sarok) */
.dls { padding: 8px 12px 12px; border-top: 1px solid rgba(255,255,255,.08); background: var(--bg3);
  display: grid; gap: 8px; max-height: 34vh; overflow-y: auto; }
.dls h3 { margin: 0; padding: 0 4px 2px; font-size: 13px; letter-spacing: .12em; color: var(--fg2); text-transform: uppercase; }
.dl { background: rgba(255,255,255,.05); border-radius: 10px; padding: 8px 10px; display: grid; gap: 6px; transition: opacity 2.5s ease; }
.dl.fading { opacity: 0; }
.dl .t { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl .s { font-size: 12px; color: var(--fg2); display: flex; justify-content: space-between; }
.dl .bar { height: 5px; background: var(--bg3); border-radius: 3px; overflow: hidden; }
.dl .bar > div { height: 100%; background: var(--accent); transition: width .5s; }
.dl.failed .bar > div { background: var(--warn); }
.dl.done .bar > div { background: var(--ok); }

/* --- böngészős lejátszó (HTML5 video az oldalon) ------------------------------------- */
.bpwrap { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 12px; overflow: hidden; }
.bpwrap video { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }
.bpwrap .bptap { position: absolute; inset: 0; margin: auto; width: 96px; height: 96px; border-radius: 50%; font-size: 40px; }
.now.video { grid-template-columns: 1fr; }
.now.video .bpslot { width: 100%; height: auto; aspect-ratio: 16 / 9; background: #000; }
.attract .cover.bpslot { width: min(80vw, 1100px); max-height: 66vh; aspect-ratio: 16 / 9; height: auto; border-radius: 18px; }
.attract .cover.bpslot .bpwrap { border-radius: 18px; }
.tv .cover.bpslot { width: min(calc(88vw - 420px), 1200px); aspect-ratio: 16 / 9; height: auto; }

/* --- tétlenségi (attract) képernyő a kioszkon: nagy albumborító ------------------- */
.attract { position: fixed; inset: 0; z-index: 40; display: grid; grid-template-rows: 1fr auto; background: var(--bg); overflow: hidden; }
.attract .bgblur { position: absolute; inset: -40px; background: center/cover no-repeat; filter: blur(50px) brightness(.35); }
.attract .stage { position: relative; display: grid; place-items: center; padding: 30px; }
.attract .card { display: grid; gap: 18px; text-align: center; justify-items: center; }
.attract .cover { width: min(48vh, 440px); height: min(48vh, 440px); border-radius: 24px; background: var(--bg3) center/cover no-repeat; box-shadow: 0 30px 80px rgba(0,0,0,.6); display: grid; place-items: center; font-size: 110px; color: var(--fg2); }
.attract .t { font-size: 40px; font-weight: 800; line-height: 1.1; }
.attract .a { font-size: 26px; color: var(--fg2); }
.attract .k { font-size: 16px; letter-spacing: .25em; color: var(--accent); text-transform: uppercase; }
.attract .cta { position: relative; padding: 22px; text-align: center; font-size: 24px; font-weight: 700; background: linear-gradient(135deg, var(--accent), var(--accent2)); color: var(--on-accent); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { filter: brightness(1.15); } }
.attract .next { position: relative; color: var(--fg2); font-size: 18px; text-align: center; padding: 0 20px 14px; }

/* --- admin témaválasztó ------------------------------------------------------------ */
.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.theme { display: grid; gap: 8px; padding: 10px; border-radius: 12px; background: var(--bg3); border: 2px solid transparent; text-align: left; }
.theme.active { border-color: var(--accent); }
.theme .sw { display: flex; height: 26px; border-radius: 6px; overflow: hidden; }
.theme .sw span { flex: 1; }
.theme .n { font-weight: 700; }
.theme .d { font-size: 12px; color: var(--fg2); }

/* --- karaoke (dalszöveg) ------------------------------------------------------------- */
.klines { display: grid; gap: 6px; text-align: center; }
.klines .kl { line-height: 1.25; transition: opacity .3s, transform .3s; opacity: .45; font-size: 22px; min-height: 1.25em; }
.klines .kl.d1 { opacity: .7; }
.klines .kl.cur { opacity: 1; font-weight: 800; color: var(--accent); transform: scale(1.06); }
.klines.attractk { position: relative; margin-top: 14px; max-width: 900px; }
.klines.attractk .kl { font-size: 26px; }
.klines.tvk { position: relative; z-index: 1; padding: 0 40px 30px; max-width: 1100px; margin: 0 auto; }
.klines.tvk .kl { font-size: 34px; }
.klines.tvk .kl.cur { font-size: 44px; }
.now .kbtn { margin-top: 8px; }
.karaoke { position: fixed; inset: 0; z-index: 45; background: var(--bg); display: grid; grid-template-rows: auto 1fr; }
.karaoke .khead { display: flex; justify-content: space-between; align-items: center; padding: 16px 22px; background: var(--bg2); }
.karaoke .khead .t { font-size: 24px; font-weight: 800; }
.karaoke .khead .a { color: var(--fg2); font-size: 18px; }
.karaoke .klines.big { align-content: center; padding: 20px 40px; gap: 14px; }
.karaoke .klines.big .kl { font-size: 38px; }
.karaoke .klines.big .kl.cur { font-size: 50px; }
.karaoke .klines.big .kl.d3 { opacity: .25; }

/* --- zárképernyő (licenc) ---------------------------------------------------------- */
.lockscreen { position: fixed; inset: 0; z-index: 90; background: var(--bg); display: grid; place-items: center; padding: 24px; }
.lockscreen .box { max-width: 900px; text-align: center; display: grid; gap: 18px; }
.lockscreen .ic { font-size: 96px; }
.lockscreen .t { font-size: 40px; font-weight: 800; line-height: 1.15; }
.lockscreen .m { font-size: 24px; color: var(--fg2); }
.lockscreen .c { font-size: 26px; }
.lockscreen .s { font-size: 14px; color: var(--fg2); letter-spacing: .1em; }
