* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #111;
  color: #eee;
  padding: 24px;
  max-width: 560px;
  margin: 0 auto;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

h1 {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

#settings-toggle {
  padding: 8px 12px;
  font-size: 18px;
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
}

#settings-panel {
  border: 1px solid #333;
  border-radius: 12px;
  padding: 0 14px 14px;
  margin-top: 12px;
  background: #161616;
}

.hidden { display: none; }

h2 {
  font-weight: 500;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #999;
  margin: 28px 0 12px;
}

.panel {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.controls {
  grid-template-columns: repeat(6, 1fr);
}

button {
  padding: 16px 8px;
  font-size: 16px;
  border-radius: 10px;
  border: 1px solid #333;
  background: #1c1c1c;
  color: #eee;
  cursor: pointer;
}

button:active { background: #2a2a2a; }

button.active {
  color: #1db954;
  border-color: #1db954;
}

select {
  padding: 14px 10px;
  font-size: 16px;
  border-radius: 10px;
  border: 1px solid #333;
  background: #1c1c1c;
  color: #eee;
}

.wide { grid-column: 1 / -1; }

/* Now Playing Karte */
.card {
  display: flex;
  gap: 14px;
  align-items: center;
  border: 1px solid #333;
  border-radius: 12px;
  background: #161616;
  padding: 14px;
  margin-bottom: 12px;
}

#np-cover {
  width: 84px;
  height: 84px;
  border-radius: 8px;
  background: #222;
  object-fit: cover;
  flex-shrink: 0;
}

.np-info {
  flex: 1;
  min-width: 0;
}

#np-title {
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#np-artist {
  font-size: 13px;
  color: #999;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.np-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 11px;
  color: #777;
}

.bar {
  flex: 1;
  height: 4px;
  background: #333;
  border-radius: 2px;
  overflow: hidden;
}

#np-bar-fill {
  height: 100%;
  width: 0%;
  background: #1db954;
  border-radius: 2px;
  transition: width 0.5s linear;
}

/* Lautstaerke */
.volume-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 2px;
}

.volume-row span { font-size: 14px; color: #999; }
#volume-label { min-width: 40px; text-align: right; }

input[type="range"] {
  flex: 1;
  accent-color: #1db954;
  height: 4px;
}

/* Playlists */
.playlist-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.playlist-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px;
  font-size: 12px;
}

.playlist-tile img,
.playlist-noimg {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  background: #222;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #555;
}

.playlist-tile span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.playlist-hint {
  grid-column: 1 / -1;
  color: #777;
  font-size: 13px;
}

#default-device-label {
  font-size: 13px;
  color: #1db954;
  padding: 2px 4px;
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #ccc;
  padding: 6px 4px 2px;
  cursor: pointer;
}

.toggle-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: #1db954;
}

#status {
  font-size: 13px;
  color: #777;
  margin-top: 24px;
}
