/* ── Reset & Base ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green:       #1DB954;
  --green-dark:  #17a349;
  --bg:          #121212;
  --bg-card:     #1e1e1e;
  --bg-item:     #2a2a2a;
  --bg-hover:    #333333;
  --text:        #ffffff;
  --text-muted:  #a0a0a0;
  --border:      #333333;
  --radius:      12px;
  --radius-sm:   8px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

/* ── Header ────────────────────────────────────────────────────────────────── */
header {
  background: #0a0a0a;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--green);
  font-weight: 700;
  font-size: 1.1rem;
}

#user-area {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

#user-name {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.1rem;
  border-radius: 500px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.15s ease;
}

.btn-primary {
  background: var(--green);
  color: #000;
}
.btn-primary:hover { background: var(--green-dark); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--text); border-color: #666; }

.btn-large { padding: 0.8rem 2rem; font-size: 1rem; }

.btn-danger {
  background: transparent;
  color: #e05555;
  border: 1px solid #e05555;
  padding: 0.35rem 0.8rem;
  font-size: 0.8rem;
}
.btn-danger:hover { background: #e05555; color: #fff; }

.btn-seek {
  background: var(--green);
  color: #000;
  padding: 0.35rem 0.9rem;
  font-size: 0.8rem;
}
.btn-seek:hover { background: var(--green-dark); }

/* ── Main Layout ───────────────────────────────────────────────────────────── */
main {
  max-width: 860px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ── Welcome ───────────────────────────────────────────────────────────────── */
.welcome-box {
  text-align: center;
  padding: 4rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.welcome-icon { color: var(--green); opacity: 0.85; }

.welcome-box h1 { font-size: 2rem; }

.welcome-box p {
  color: var(--text-muted);
  max-width: 420px;
  font-size: 1.05rem;
}

/* ── Card ──────────────────────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.card h2 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── Now Playing ───────────────────────────────────────────────────────────── */
.track-info {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.cover {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-item);
}

.track-details { flex: 1; min-width: 0; }

.track-title {
  font-size: 1.05rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-author {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.2rem;
  margin-bottom: 0.75rem;
}

.progress-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.time {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  min-width: 36px;
}

.progress-bar {
  flex: 1;
  height: 4px;
  background: var(--bg-hover);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--green);
  border-radius: 2px;
  transition: width 1s linear;
}

.actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.note-wrap { flex: 1; min-width: 180px; }

.note-wrap input {
  width: 100%;
  padding: 0.5rem 0.85rem;
  background: var(--bg-item);
  border: 1px solid var(--border);
  border-radius: 500px;
  color: var(--text);
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.15s;
}

.note-wrap input:focus { border-color: var(--green); }
.note-wrap input::placeholder { color: var(--text-muted); }

.success-msg {
  color: var(--green);
  font-size: 0.875rem;
  font-weight: 600;
}

/* ── Bookmark List ─────────────────────────────────────────────────────────── */
.bookmark-item {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: 0.9rem;
  background: var(--bg-item);
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}

.bookmark-item + .bookmark-item { margin-top: 0.6rem; }
.bookmark-item:hover { background: var(--bg-hover); }

.bm-cover {
  width: 52px;
  height: 52px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--bg-hover);
  flex-shrink: 0;
}

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

.bm-title {
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bm-author {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-top: 0.1rem;
}

.bm-meta {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-top: 0.35rem;
  flex-wrap: wrap;
}

.bm-position {
  font-size: 0.82rem;
  color: var(--green);
  font-weight: 600;
}

.bm-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
}

.bm-date {
  font-size: 0.75rem;
  color: #666;
}

.bm-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* ── Empty State ───────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ── Player Controls ───────────────────────────────────────────────────────── */
.player-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ctrl-btn {
  background: var(--bg-item);
  border: none;
  color: var(--text);
  font-size: 1.1rem;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  flex-shrink: 0;
}

.ctrl-btn:hover { background: var(--bg-hover); }

.ctrl-main {
  background: var(--green);
  color: #000;
  font-size: 1rem;
  width: 44px;
  height: 44px;
}

.ctrl-main:hover { background: var(--green-dark); }

.volume-wrap {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.volume-slider {
  width: 90px;
  accent-color: var(--green);
  cursor: pointer;
}

/* ── Bibliothek Tabs ───────────────────────────────────────────────────────── */
.lib-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.75rem;
}

.lib-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.4rem 1rem;
  border-radius: 500px;
  cursor: pointer;
  transition: all 0.15s;
}

.lib-tab:hover { color: var(--text); background: var(--bg-item); }
.lib-tab.active { color: #000; background: var(--green); }

/* ── Library Item ──────────────────────────────────────────────────────────── */
.lib-item {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: 0.9rem;
  background: var(--bg-item);
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}

.lib-item + .lib-item { margin-top: 0.6rem; }
.lib-item:hover { background: var(--bg-hover); }

/* ── Utilities ─────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 540px) {
  .track-info { flex-direction: column; }
  .cover { width: 100%; height: 200px; }
  .actions { flex-direction: column; align-items: stretch; }
  .note-wrap { min-width: unset; }
  .bm-actions { flex-direction: column; }
}
