/* /var/www/music/public/style.css */
:root {
  --bg: #12141a;
  --surface: #1b1e27;
  --surface-2: #242837;
  --text: #eef0f5;
  --text-dim: #8b8fa3;
  --accent: #ff6a5b;
  --accent-2: #4fd6c4;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

#app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

#view {
  flex: 1;
  padding: 16px 16px 140px;
  overflow-y: auto;
}

.loading { color: var(--text-dim); }

.section-title { font-size: 16px; margin: 20px 0 10px; }

.track-list { display: flex; flex-direction: column; gap: 8px; }

.track-row, .playlist-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 10px;
  background: var(--surface);
}

.track-art {
  width: 40px; height: 40px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  flex: none;
}

.track-title { font-size: 14px; font-weight: 600; }
.track-artist { font-size: 12px; color: var(--text-dim); }

.search-input {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--surface-2);
  background: var(--surface);
  color: var(--text);
  margin-bottom: 12px;
}

.mini-player {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--surface);
  border-top: 1px solid var(--surface-2);
  position: fixed;
  left: 0; right: 0;
  bottom: 56px;
}

.mini-player[hidden] { display: none; }

.mini-art { width: 32px; height: 32px; border-radius: 6px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); flex: none; }
.mini-info { flex: 1; overflow: hidden; }
.mini-title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-artist { font-size: 11px; color: var(--text-dim); }
.mini-play { width: 32px; height: 32px; border-radius: 50%; border: none; background: var(--accent); }

.bottom-nav {
  display: flex;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 56px;
  background: var(--surface);
  border-top: 1px solid var(--surface-2);
}

.nav-item {
  flex: 1;
  border: none;
  background: none;
  color: var(--text-dim);
  font-size: 12px;
}

.nav-item.active { color: var(--accent); font-weight: 600; }

.mini-play::before {
  content: '';
  display: block;
  margin: 0 auto;
  width: 0; height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 9px solid #fff;
}

.mini-play.is-playing::before {
  border: none;
  width: 3px; height: 12px;
  background: #fff;
  box-shadow: 5px 0 0 #fff;
}

.now-playing {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 10;
  display: flex;
  flex-direction: column;
  padding: 24px;
  gap: 16px;
}

.now-playing[hidden] { display: none; }

.np-art {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.np-title { font-size: 20px; font-weight: 700; margin-top: 12px; }
.np-artist { color: var(--text-dim); }

.np-progress { height: 4px; background: var(--surface-2); border-radius: 2px; margin: 16px 0; }
.np-progress-fill { height: 100%; width: 0%; background: var(--accent); border-radius: 2px; }

.np-controls { display: flex; align-items: center; justify-content: center; gap: 24px; }
.np-controls button { background: none; border: none; color: var(--text); font-size: 20px; }
.np-play-btn { width: 56px; height: 56px; border-radius: 50%; background: var(--accent); }

.zone-queue { display: none; }
.zone-nav { display: none; }

.zone-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-dim); margin-bottom: 8px;
}

.queue-row { padding: 8px 0; border-bottom: 1px solid var(--surface-2); font-size: 14px; }

@media (orientation: landscape) {
  .now-playing {
    flex-direction: row;
    align-items: stretch;
  }

  .zone-player {
    width: 34%;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .np-art { max-width: 220px; margin: 0 auto; }

  .zone-queue {
    display: block;
    flex: 1;
    overflow-y: auto;
    border-left: 1px solid var(--surface-2);
    padding-left: 20px;
  }

  .zone-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    width: 72px;
    border-left: 1px solid var(--surface-2);
    padding-left: 12px;
  }

  .zone-nav .nav-item {
    display: flex;
    flex: none;
    flex-direction: column;
    gap: 4px;
    font-size: 11px;
    color: var(--text-dim);
  }

  .bottom-nav { display: none; }
}

.stale-banner {
  background: var(--surface-2);
  color: var(--text-dim);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 12px;
}

.toast {
  position: fixed;
  bottom: 72px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface-2);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
  z-index: 20;
}

.offline-banner {
  background: var(--accent);
  color: #fff;
  text-align: center;
  padding: 6px;
  font-size: 13px;
}
