/* =======================================
   LOUDWAVE — Shared Styles
   ======================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0a0a0a;
  --bg-2:      #111111;
  --bg-3:      #181818;
  --bg-4:      #202020;
  --bg-5:      #2a2a2a;
  --border:    rgba(255,255,255,0.07);
  --border-2:  rgba(255,255,255,0.14);
  --white:     #ffffff;
  --text:      #f0f0f0;
  --text-2:    #909090;
  --text-3:    #505050;
  --text-4:    #303030;
  --nav-h:     60px;
  --player-h:  80px;
  --sidebar-w: 200px;
  --radius:    8px;
}

html { scroll-behavior: smooth; scrollbar-gutter: stable; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; color: inherit; font-family: inherit; }
input, textarea { font-family: inherit; }
img { display: block; max-width: 100%; }

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-5); border-radius: 3px; }

/* =========================================
   SHARED NAV
   ========================================= */
.top-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(10,10,10,0.92);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 32px;
  gap: 0;
  z-index: 200;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--white);
  flex-shrink: 0;
  margin-right: 36px;
}

.nav-logo svg { width: 26px; height: 26px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
}

.nav-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  padding: 6px 12px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}

.nav-link:hover { color: var(--text); background: var(--bg-3); }
.nav-link.active { color: var(--white); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.nav-auth {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-search {
  position: relative;
  margin-right: 4px;
}

.nav-search svg {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: var(--text-3);
  pointer-events: none;
}

.nav-search input {
  height: 34px;
  width: 220px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 0 14px 0 34px;
  font-size: 13px;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s, width 0.2s;
}

.nav-search input::placeholder { color: var(--text-3); }
.nav-search input:focus { border-color: var(--border-2); width: 260px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 34px;
  padding: 0 18px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.15s;
  white-space: nowrap;
}

.btn-ghost {
  color: var(--text-2);
  border: 1px solid transparent;
}
.btn-ghost:hover { color: var(--white); background: var(--bg-3); }

.btn-outline {
  color: var(--white);
  border: 1px solid var(--border-2);
}
.btn-outline:hover { background: var(--bg-3); border-color: var(--border-2); }

.btn-primary {
  background: var(--white);
  color: #000;
}
.btn-primary:hover { background: #e0e0e0; transform: translateY(-1px); }

.btn-lg {
  height: 44px;
  padding: 0 28px;
  font-size: 14px;
  border-radius: 100px;
}

.btn svg { width: 15px; height: 15px; }

.avatar-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--bg-4);
  border: 1px solid var(--border-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--white);
  flex-shrink: 0;
  cursor: pointer;
  transition: border-color 0.15s;
}
.avatar-btn:hover { border-color: var(--white); }

/* =========================================
   PLAYER BAR (shared)
   ========================================= */
.player-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--player-h);
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  z-index: 300;
}

.player-track {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 260px;
  flex-shrink: 0;
}

.player-art {
  width: 46px; height: 46px;
  border-radius: 5px;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--bg-4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.player-meta { flex: 1; min-width: 0; }
.player-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player-artist { font-size: 11px; color: var(--text-2); margin-top: 2px; }

.player-heart {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: var(--text-3);
  transition: color 0.15s;
  flex-shrink: 0;
}
.player-heart:hover { color: var(--text); }
.player-heart.liked { color: var(--white); }
.player-heart.liked svg { fill: var(--white); }
.player-heart svg { width: 15px; height: 15px; }

.player-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.ctrl {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: var(--text-2);
  transition: all 0.15s;
}
.ctrl svg { width: 15px; height: 15px; }
.ctrl:hover { color: var(--white); background: var(--bg-4); }
.ctrl.on { color: var(--white); }

.ctrl-play {
  width: 36px; height: 36px;
  background: var(--white);
  color: #000 !important;
  border-radius: 50%;
  transition: transform 0.1s, background 0.15s !important;
}
.ctrl-play:hover { background: #e0e0e0 !important; transform: scale(1.06); }
.ctrl-play svg { width: 14px; height: 14px; }

.player-waveform-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.time { font-size: 10px; color: var(--text-3); width: 30px; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.time-r { text-align: right; }

.waveform-wrap {
  flex: 1;
  height: 36px;
  position: relative;
  cursor: pointer;
  overflow: hidden;
}

#playerCanvas { width: 100%; height: 100%; display: block; }

.player-right {
  width: 200px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.vol-wrap { display: flex; align-items: center; gap: 6px; }

.vol-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 80px;
  height: 3px;
  background: var(--bg-5);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--white);
  cursor: pointer;
}

.hidden { display: none !important; }

/* =========================================
   ARTWORK COLORS (used everywhere)
   ========================================= */
.art-1 { background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460); }
.art-2 { background: linear-gradient(135deg, #0c1a0c, #1a3a1a, #2d5a2d); }
.art-3 { background: linear-gradient(135deg, #1a0a0a, #3a1010, #5a1818); }
.art-4 { background: linear-gradient(135deg, #0a0a1a, #1a0a3a, #2a1050); }
.art-5 { background: linear-gradient(135deg, #1a1508, #3a2e10, #5a4818); }
.art-6 { background: linear-gradient(135deg, #0a1a1a, #103a3a, #186060); }
.art-7 { background: linear-gradient(135deg, #1a0a1a, #3a103a, #601860); }
.art-8 { background: linear-gradient(135deg, #0a0a0a, #1a1a1a, #2a2a2a); }
