:root{
  --fg:#fff; --bg:#000; --panel:rgba(0,0,0,0.55); --border:rgba(255,255,255,0.12);
  --accent1:#48c2ff; --accent2:#6ad2ff;
}
*{box-sizing:border-box}
html,body{height:100%;margin:0;background:var(--bg);color:var(--fg);font-family:system-ui,Segoe UI,Roboto,Helvetica,Arial,sans-serif}

/* Hintergrund: Video + Bild, gleicher Layer-Stack */
#bgVideo, #bgImage{
  position:fixed; inset:0; width:100%; height:100%; object-fit:cover; z-index:0;
  transform: translate3d(0,0,0) scale(1.06);
  will-change: transform, opacity;
  transition: opacity .25s ease;
}
#bgVideo{ opacity:0; }
#bgImage{
  filter: brightness(0.6) saturate(1.05);
  opacity:1;
}

/* Visualisierung */
#bgCanvas{
  position:fixed; inset:0; width:100%; height:100%; display:block; z-index:1;
  mix-blend-mode: overlay; opacity: .9; transition: opacity .15s ease;
}

/* Center Overlay – nur Titel mittig */
.center-overlay{
  position:fixed; inset:0; z-index:3; display:grid; place-items:center; pointer-events:none; text-align:center; padding:20px;
  padding-top: 60px;
}
.co-title{ font-size: clamp(28px, 6vw, 72px); font-weight: 800; letter-spacing:.02em; text-shadow:0 6px 28px rgba(0,0,0,0.4); }

/* Ecke oben links – Künstler + Zitat */
.corner-overlay{
  position:fixed; top:16px; left:16px; z-index:3; 
  display:flex; flex-direction:column; gap:6px;
  max-width:min(40vw, 520px); pointer-events:none;
  opacity:0; transform: translateY(-8px);
  transition: opacity .25s ease, transform .25s ease;
}
.corner-overlay.show{ opacity:1; transform: translateY(0); }
.co-artist{ font-size:clamp(12px,1.8vw,16px); opacity:.9; }
.co-quote{ font-size:clamp(11px,1.6vw,15px); opacity:.85; max-width:520px; }

/* Maus-Cursor Effekt */
body, #bgCanvas { cursor: none; }
#cursorDot{
  position: fixed; top: 0; left: 0; width: 18px; height: 18px; 
  margin: -9px 0 0 -9px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(255,255,255,0.95), rgba(255,255,255,0.35) 50%, rgba(255,255,255,0) 70%);
  box-shadow: 0 0 24px rgba(255,255,255,0.45), 0 0 60px rgba(72,194,255,0.35);
  pointer-events: none; z-index: 10; 
  mix-blend-mode: screen; transform: translate3d(0,0,0) scale(1);
  transition: transform .12s ease-out, opacity .2s ease;
  opacity: .9;
}
#cursorDot.fast { transform: scale(0.8); opacity: .8; }
#cursorDot.click { animation: cursorPulse .35s ease-out; }
@keyframes cursorPulse{
  0%{ transform: scale(0.9); box-shadow: 0 0 28px rgba(255,255,255,0.5), 0 0 70px rgba(72,194,255,0.45); }
  100%{ transform: scale(1.25); box-shadow: 0 0 18px rgba(255,255,255,0.35), 0 0 40px rgba(72,194,255,0.3); }
}

/* Bottom Player Bar */
.bottom-player{
  position:fixed;
  left:0; right:0;
  bottom:32px; /* direkt über dem Ticker */
  z-index:5;
  padding:8px 16px;
  background:linear-gradient(to top, rgba(0,0,0,0.78), rgba(0,0,0,0.45));
  border-top:1px solid var(--border);
  backdrop-filter: blur(10px);
  display:flex;
  align-items:center;
  gap:16px;
  transition:opacity .35s ease, transform .35s ease;
}
.bottom-player.hidden{
  opacity:0;
  pointer-events:none;
  transform:translateY(12px);
}
.bp-left, .bp-center, .bp-right{
  display:flex;
  align-items:center;
}
.bp-left{
  min-width:0;
  flex:0 0 auto;
}
.bp-center{
  flex:1 1 auto;
  flex-direction:column;
  gap:4px;
}
.bp-right{
  flex:0 0 auto;
}
.np .np-title{ font-size:14px; font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.np .np-artist{ font-size:12px; opacity:.85; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:220px; }

/* responsive Anpassungen */
@media (max-width:700px){
  .bottom-player{
    flex-wrap:wrap;
    row-gap:4px;
    padding:6px 10px;
  }
  .bp-left{
    order:1;
    flex:1 1 100%;
  }
  .bp-center{
    order:2;
    flex:1 1 100%;
  }
  .bp-right{
    order:3;
    width:100%;
    justify-content:flex-end;
  }
  .np .np-artist{ max-width:100%; }
}

/* Bauchbinde / Ticker */
.ticker{
  position: fixed; bottom: 0; left: 0; right: 0; height: 32px;
  z-index: 4; overflow: hidden; pointer-events: none;
  background: linear-gradient(to top, rgba(0,0,0,0.45), rgba(0,0,0,0.0));
}
.ticker-track{
  position: absolute; white-space: nowrap; will-change: transform;
  display: inline-block; padding-left: 100vw;
  font-size: 12px; letter-spacing: 0.02em; opacity: .92;
  color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,0.35);
}
.ticker .badge{ display:inline-block; margin: 0 16px; opacity: .9; }
.ticker .sep{ opacity:.5; margin: 0 10px; }
.ticker .tag{ opacity:.85; }

/* Preloader */
.preloader{
  position: fixed; inset:0; display:grid; place-items:center; z-index:6;
  background: rgba(0,0,0,0.25); backdrop-filter: blur(2px);
  opacity:0; pointer-events:none; transition: opacity .2s ease;
}
.preloader.show{ opacity:1; pointer-events:auto; }
.spinner{
  width: 34px; height: 34px; border-radius:50%; border: 3px solid rgba(255,255,255,0.25); border-top-color:#fff;
  animation: spin 0.8s linear infinite;
}
@keyframes spin{ to { transform: rotate(360deg); } }

/* Panel Toggle */
.panel-toggle{
  position:fixed; top:16px; right:16px; z-index:4; width:44px; height:44px;
  border-radius:10px; border:1px solid var(--border); background:var(--panel); color:#fff; cursor:pointer;
}
.panel-toggle:hover{ background: rgba(255,255,255,0.08); }

/* Side Panel */
.side-panel{
  position:fixed; top:0; right:0; width:min(440px, 96vw); height:100%; z-index:5;
  background:var(--panel); border-left:1px solid var(--border); backdrop-filter: blur(8px);
  transform: translateX(100%); transition: transform .25s ease;
  display:flex; flex-direction:column;
}
.side-panel.open{ transform: translateX(0%); }
.sp-header{ display:flex; justify-content:space-between; align-items:center; padding:12px; font-weight:600; border-bottom:1px solid var(--border); }
.icon-btn{ appearance:none; border:1px solid var(--border); background:transparent; color:#fff; width:32px; height:32px; border-radius:8px; cursor:pointer; }

/* Accordion – Playlist-first + echtes Scrollen */
.side-panel{ display:flex; flex-direction:column; }

/* WICHTIG: Der Innenbereich des Panels scrollt,
   damit geöffnete Bodies nicht abgeschnitten werden */
.accordion{
  flex:1;
  display:flex; flex-direction:column; gap:10px;
  padding: 8px 10px 12px;
  overflow:auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.acc{ border:1px solid var(--border); border-radius:12px; overflow:hidden; background:rgba(0,0,0,0.35); }
.acc-head{
  width:100%; text-align:left; background:transparent; color:#fff; padding:12px; border:0; cursor:pointer; font-weight:600;
  display:flex; justify-content:space-between; align-items:center;
}
.acc-head::after{ content: "▾"; opacity:.8; transition: transform .15s ease; }
.acc.open .acc-head::after{ transform: rotate(180deg); }

/* Standard: Bodies geschlossen */
.acc-body{
  max-height: 0;
  overflow: hidden;
  transition: max-height .2s ease, padding .2s ease;
  padding: 0 10px;
}

/* Geöffneter Body: natürlich „auto“, aber mit Transition (große max-height) */
.acc.open .acc-body{
  padding: 8px 10px 10px;
  max-height: 2000px;
  overflow: visible;
}

/* Playlist-Body: eigener Scroll-Kontext */
.acc-body.scrollable{ }
.acc.open .acc-body.scrollable{
  max-height: 50vh;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* Controls im Player */
.transport{ display:flex; gap:8px; }
.btn{ appearance:none; border:0; background: rgba(255,255,255,0.10); color:#fff; width:36px; height:36px; border-radius:10px; cursor:pointer; display:grid; place-items:center; }
.btn:hover{ background: rgba(255,255,255,0.18); }

.progress{ display:flex; align-items:center; gap:8px; margin-top:6px; }
.time{ font-variant-numeric: tabular-nums; font-size:12px; opacity:.9; }
.bar{ position:relative; height:8px; background:rgba(255,255,255,0.08); border-radius:999px; flex:1; cursor:pointer; border:1px solid var(--border); }
.bar .fill{ position:absolute; inset:0 auto 0 0; width:0%; background:linear-gradient(90deg,var(--accent1),var(--accent2)); border-radius:999px; }
.bar .knob{ position:absolute; top:50%; transform:translate(-50%,-50%); left:0%; width:12px; height:12px; border-radius:50%; background:#fff; display:none; }
.bar:hover .knob{ display:block; }

.volume{ display:flex; align-items:center; gap:8px; }
.vol{ width:140px; height:8px; background:rgba(255,255,255,0.08); border-radius:999px; position:relative; cursor:pointer; border:1px solid var(--border); }
.vol .vfill{ position:absolute; inset:0 auto 0 0; width:60%; background:linear-gradient(90deg,#ddd,#fff); border-radius:999px; }

/* Playlist */
.playlist{ display:flex; flex-direction:column; gap:4px; }
.playlist .track{ display:flex; justify-content:space-between; gap:8px; padding:8px; border-radius:8px; cursor:pointer; }
.playlist .track:hover{ background: rgba(255,255,255,.08); }
.playlist .track.active{ background: rgba(255,255,255,.14); }
.playlist .t-meta{ display:flex; flex-direction:column; min-width:0; }
.playlist .t-title{ font-size:14px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.playlist .t-artist{ font-size:12px; opacity:.8; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.playlist .t-dur{ font-size:12px; opacity:.75; flex:0 0 auto; padding-left:6px; }
