/* music/index.css
   Songlab’s Tunes — responsive Musikarchiv mit Auswahlspalte
*/

:root {
  --blue: #00009C;
  --muted: #666;
}

* { box-sizing: border-box; }

body {
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  margin: 0;
  color: var(--blue);
  background: #fff url("../pat.gif") repeat;
  text-align: center;
}

header, footer {
  text-align: center;
  padding: 14px 8px;
}

.logo {
  height: 72px;
  display: block;
  margin: 6px auto;
}

h1 {
  margin: 6px 0;
  font-size: 1.4rem;
}

h2 {
  margin: 4px 0;
  color: var(--blue);
  font-weight: 500;
}

#music-collection {
  max-width: 980px;
  margin: 12px auto;
  padding: 0 12px;
}

.category {
  border-radius: 10px;
  margin: 12px 0;
  padding: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  text-align: left;
}

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.category-left h2 {
  margin: 0;
  font-size: 1.1rem;
}

.controls {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ctl {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.12);
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  color: var(--blue);
  transition: 0.2s;
}

.ctl:hover {
  background: #f7fbff;
  transform: translateY(-1px);
}

.ctl.stop {
  background: linear-gradient(180deg, #ffd6d6, #ffcfcf);
  border-color: #ffabab;
}

.ctl.active {
  background: linear-gradient(180deg, #e3f2fd, #bbdefb);
}

/* Tabelle */
.song-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.song-table th {
  background: rgba(0,0,0,0.03);
  padding: 10px;
  text-align: left;
  color: var(--blue);
}

.song-table td {
  padding: 8px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  vertical-align: middle;
  color: #000;
}

.song-row.playing {
  background: linear-gradient(90deg, #f7fffb, #fffef0);
  font-weight: 700;
}

/* Aktionen */
.song-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.play {
  background: linear-gradient(180deg, #e3f2fd, #bbdefb);
  border: 1px solid #90caf9;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
}

.download {
  background: linear-gradient(180deg, #fff3cf, #ffe59a);
  border: 1px solid #f6c34b;
  padding: 6px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: #000;
  font-weight: 700;
}

.textlink {
  font-size: 1.2rem;
  text-decoration: none;
}

/* Auswahlspalte: zunächst versteckt */
.song-table th.sel-col,
.song-table td.sel-col {
  display: none;
  text-align: center;
  width: 72px;
}

/* sichtbar, wenn .show-selection aktiv ist */
#music-collection.show-selection .song-table th.sel-col,
#music-collection.show-selection .song-table td.sel-col {
  display: table-cell;
}

/* Coverbuttons */
.cover-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
  padding-bottom: 18px;
}

.cover-btn {
  width: 100px;
  height: 100px;
  border-radius: 10px;
  overflow: hidden;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
  transition: transform 0.14s;
}

.cover-btn:hover {
  transform: scale(1.05);
}

.cover-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Fehleranzeige */
.json-error {
  background: #fff5f5;
  border: 1px solid #f5c6cb;
  padding: 12px;
  color: #900;
  margin: 12px;
  border-radius: 6px;
}

/* Fußbereich */
footer {
  font-size: 0.85em;
  color: #222;
  line-height: 1.4em;
  margin-top: 18px;
}

/* Responsive */
@media (max-width:720px) {
  .cover-btn { width: 86px; height: 86px; font-size: 0.9em; }
  .song-table th, .song-table td { padding: 8px 6px; font-size: 0.95rem; }
}
