:root{
  --bg:#000;
  --text:#fff;

  /* EVENT DEFAULT SIZES */
  --meta-size:34px;
  --meta-color: var(--text);

  --title-size:110px;
  --title-align:center;

  --text-size:72px;
  --text-align:left;

  /* LIST DEFAULT */
  --list-size:26px;
  --list-align:left;

  --meta-align:center;

  /* VERTICAL ALIGN */
  --detail-justify:flex-start;
  --list-justify:flex-start;

  /* OPTICAL CORRECTION */
  --detail-offset:0px;

  /* SONG OVERRIDES (JS setzt diese dynamisch) */
  --song-title-size: var(--title-size);
  --song-meta-size:  var(--meta-size);
  --song-text-size:  var(--text-size);
  --song-list-size:  var(--list-size);
}

/* =========================================================
   BASE
   ========================================================= */
html,body{
  width:100%;
  height:100%;
  margin:0;
  background:var(--bg);
  color:var(--text);
  overflow:hidden;
  font-family: Arial, Helvetica, sans-serif;
}

.displayGrid{
  display:grid;
  grid-template-columns:380px 1fr;
  gap:14px;
  height:100vh;
  padding:18px;
  align-items:stretch;
}

.card{
  background:transparent;
  border:none;
  box-shadow:none;
}

/* =========================================================
   LEFT LIST
   ========================================================= */
section.card.list{
  display:flex;
  flex-direction:column;
  justify-content: var(--list-justify, flex-start);
  overflow: hidden; /* die Section selbst scrollt nicht */
}

#items{
  width:100%;
  box-sizing:border-box;
  padding-top:14px;

  overflow-y:auto;     /* ✅ scrollen möglich */
  max-height:100%;     /* ✅ aber kein height:100% erzwingen */
}

/* ✅ Scrollbar verstecken (Chrome/Safari/Edge) */
#items::-webkit-scrollbar{
  width: 0;
  height: 0;
}

/* ✅ Scrollbar verstecken (Firefox) */
#items{
  scrollbar-width: none;
}

/* ✅ Scrollbar verstecken (alte Edge/IE, falls relevant) */
#items{
  -ms-overflow-style: none;
}

/* fixed height = no jumping */
.itemRow{
  padding:10px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.25);
  margin-bottom:10px;
  height:64px;
  display:flex;
  align-items:center;
}

.itemRow.active{
  outline:3px solid rgba(255,255,255,.35);
}

/* EVENT ROW */
.itemRowText{
  width:100%;
  font-weight:700;
  font-size: var(--list-size);
  text-align: var(--list-align);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* SONG ROW */
.itemRowSong{
  width:100%;
  display:flex;
  flex-direction:column;
  gap:2px;
}

.itemRowSongNum{
  font-weight:800;
  line-height:1.0;
  font-size: var(--song-list-size, var(--list-size));
}

.itemRowSongMeta{
  font-size: calc(var(--song-list-size, var(--list-size)) * 0.55);
  opacity:0.85;
  line-height:1.0;
}

/* =========================================================
   RIGHT DETAIL
   ========================================================= */
section.card.detail{
  display:flex;
  flex-direction:column;
  justify-content: var(--detail-justify, flex-start);
  align-items:center;
  min-height:100%;
  transform: translateY(var(--detail-offset));
}

#detailTitle{
  width:100%;
  max-width:1100px;
  font-weight:900;
  line-height:1.05;
  text-align: var(--title-align);
  margin:0 0 10px 0;
  font-size: var(--title-size);

  /* wichtig: NICHT nowrap → sonst wird Titel zu klein */
  white-space: normal;
  word-break: break-word;

  /* Platz für große Song-Titel */
  overflow:hidden;
}

#detailMeta{
  width:100%;
  max-width:1100px;
  font-size: var(--meta-size);
  color: var(--meta-color);
  text-align: var(--meta-align);
  margin:0 0 18px 0;
}

#detailText{
  width:100%;
  max-width:1100px;
  font-size: var(--text-size);
  line-height:1.25;
  white-space:pre-wrap;
  text-align: var(--text-align);
  margin:0;
}


/* DetailTitle: Instrumental immer 1 Zeile */
#detailTitle.instrumental-one-line{
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: clip !important;
}

/* =========================================================
   SONG MODE
   ========================================================= */
body.song-mode section.card.detail{
  justify-content: center;
}

body.song-mode #detailTitle{
  font-size: var(--song-title-size, var(--title-size));
  line-height:0.95;
}

body.song-mode #detailMeta{
  font-size: var(--song-meta-size, var(--meta-size));
}

body.song-mode #detailText{
  font-size: var(--song-text-size, var(--text-size));
}

/* =========================================================
   EVENT MODE (explicit, stable)
   ========================================================= */
body.event-mode #detailTitle{
  font-size: var(--title-size);
}

body.event-mode #detailMeta{
  font-size: var(--meta-size);
}

body.event-mode #detailText{
  font-size: var(--text-size);
}

/* linke Liste aus */
body.hide-list .displayGrid{
  grid-template-columns: 1fr;
}
body.hide-list section.card.list{
  display:none !important;
}

/* Minimal-Modus: nur Text */
body.minimal-mode #detailTitle,
body.minimal-mode #detailMeta{
  display:none !important;
}
body.minimal-mode #detailText{
  max-width:none !important;
  width:100% !important;
  font-size: calc(var(--text-size) * 1.35);
  line-height: 1.15;
}

/* ================================
   DISPLAY: LIST EIN/AUS
   ================================ */

/* Wenn Liste deaktiviert */
body.hide-list section.card.list {
  display: none !important;
}

/* Grid auf volle Breite ziehen */
body.hide-list .displayGrid {
  grid-template-columns: 1fr !important;
}

/* ================================
   DETAIL AUS → TEXT ZENTRIERT
   ================================ */

body.hide-detail section.card.detail{
  justify-content: center !important;
  align-items: center !important;
  text-align: center;
}

body.hide-detail #detailTitle,
body.hide-detail #detailMeta{
  display:none !important;
}

body.hide-detail #detailText{
  width:100% !important;
  max-width:none !important;
  text-align:center !important;
  font-size: calc(var(--text-size) * 1.25);
  line-height: 1.2;
}




/* =========================================
   DETAIL AUS → LISTE VOLLE BREITE + ZENTRIERT
   ========================================= */

/* Grid nur noch 1 Spalte */
body.hide-detail .displayGrid{
  grid-template-columns: 1fr !important;
}

/* rechte Spalte komplett weg */
body.hide-detail section.card.detail{
  display:none !important;
}

/* linke Spalte volle Höhe + Mitte */
body.hide-detail section.card.list{
  width:100%;
  height:100%;
  display:flex;
  justify-content:center !important;
  align-items:center !important;
}

/* Liste selbst zentrieren */
body.hide-detail #items{
  width:100%;
  max-width:1100px;
}

/* einzelne Einträge zentriert */
body.hide-detail .itemRow{
  justify-content:center;
  text-align:center;
}

/* Text zentrieren */
body.hide-detail .itemRowText,
body.hide-detail .itemRowSongNum,
body.hide-detail .itemRowSongMeta{
  text-align:center !important;
}