/* ===== RESET & BASE ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-card: #1a1a1a;
  --bg-hover: #242424;
  --bg-active: #2a2a2a;

  --gold: #d4a04a;
  --gold-light: #e8c06a;
  --gold-dark: #aa7b3e;
  --gold-dim: #8a6530;

  --leather: #5c3a1e;
  --leather-dark: #3d2510;
  --leather-light: #7a4e2a;

  --text-primary: #e8e0d0;
  --text-secondary: #a09880;
  --text-dim: #706050;
  --text-muted: #504540;

  --border-color: #2a2218;
  --border-gold: #5c3a1e;

  --font-display: 'Georgia', 'Times New Roman', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --radius: 6px;
  --radius-lg: 10px;
  --shadow: 0 2px 12px rgba(0,0,0,0.5);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
}

::-webkit-scrollbar {
  width: 4px;
}
::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--gold-dark), var(--gold));
  border-radius: 2px;
  border: none;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gold-light);
}

/* ===== KEYFRAMES ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 6px rgba(212,160,74,0.3); }
  50%      { box-shadow: 0 0 20px rgba(212,160,74,0.6); }
}

/* ===== HEADER ===== */
.header {
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0px,
      transparent 2px,
      rgba(255,255,255,0.006) 2px,
      rgba(255,255,255,0.006) 3px
    ),
    linear-gradient(180deg, #0d0d0b 0%, #11100a 60%, var(--bg-primary) 100%);
  border-bottom: 1px solid var(--leather-dark);
  box-shadow: 0 2px 16px rgba(0,0,0,0.5);
  padding: 0.75rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.logo-img {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  object-fit: cover;
}

.logo .rune {
  font-size: 2rem;
  color: var(--gold);
  text-shadow: 0 0 12px rgba(212,160,74,0.3);
  line-height: 1;
}

.logo h1 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.05em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.subtitle {
  font-size: 0.7rem;
  color: var(--gold-dark);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-family: var(--font-display);
}

.header-info {
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

#currentAlbum {
  font-family: var(--font-body);
  color: var(--gold-dim);
  font-size: 0.75rem;
  font-weight: 400;
  margin-left: 0.5rem;
  display: none;
  vertical-align: middle;
}

/* ===== LAYOUT ===== */
.main {
  display: flex;
  max-width: 1400px;
  margin: 0 auto;
  min-height: calc(100vh - 60px);
}

.sidebar {
  width: 340px;
  flex-shrink: 0;
  padding: 1rem;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.content {
  flex: 1;
  padding: 1rem 1.5rem;
  overflow-y: auto;
  position: relative;
}

.content::before {
  content: '';
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(calc(-50% + 170px), -50%);
  width: min(50vw, 600px);
  aspect-ratio: 2102 / 2396;
  background: url('../logo_background.png') center / contain no-repeat;
  opacity: 0.04;
  pointer-events: none;
  z-index: 0;
}

/* ===== PLAYER CARD ===== */
.player-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.player-art {
  width: 100%;
  aspect-ratio: 1;
  background: var(--bg-secondary);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  overflow: hidden;
}

.player-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.player-art.playing {
  box-shadow: 0 0 24px rgba(212,160,74,0.3), 0 0 60px rgba(212,160,74,0.1);
  border-color: var(--gold-dark);
}

.art-placeholder {
  font-size: 4rem;
  color: var(--gold-dim);
  opacity: 0.4;
  text-shadow: 0 0 20px rgba(212,160,74,0.15);
}

.player-info {
  text-align: center;
  margin-bottom: 1rem;
}

.player-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-artist {
  font-size: 0.85rem;
  color: var(--gold-dark);
  margin-top: 0.15rem;
}

.player-album {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 0.1rem;
}

/* ===== PROGRESS ===== */
.progress-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.time {
  font-size: 0.7rem;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  min-width: 32px;
  text-align: center;
}

.progress-bar {
  flex: 1;
  height: 4px;
  background: var(--bg-secondary);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
  transition: height 0.15s;
}

.progress-bar:hover {
  height: 6px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold));
  border-radius: 2px;
  width: 0%;
  position: relative;
  transition: width 0.1s linear;
  box-shadow: 0 0 6px rgba(212,160,74,0.3);
}

.progress-playing .progress-fill {
  animation: pulseGlow 2s ease-in-out infinite;
}

.progress-thumb {
  position: absolute;
  top: 50%;
  width: 16px;
  height: 16px;
  background: radial-gradient(circle at 35% 35%, var(--gold-light), var(--gold));
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.15s;
  pointer-events: none;
  box-shadow: 0 0 8px rgba(212,160,74,0.5);
}

.progress-bar:hover .progress-thumb {
  opacity: 1;
}

/* ===== CONTROLS ===== */
.controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.ctrl-btn {
  background: none;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s;
  position: relative;
}

.ctrl-btn:hover {
  color: var(--gold);
  border-color: var(--gold-dark);
  background: rgba(212,160,74,0.08);
}

.ctrl-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.ctrl-btn.play-btn {
  width: 44px;
  height: 44px;
  background: var(--gold-dark);
  border-color: var(--gold);
  color: #fff;
}

.ctrl-btn.play-btn:hover {
  background: var(--gold);
  border-color: var(--gold-light);
  color: #000;
}

.ctrl-btn[data-active="true"] {
  color: var(--gold);
  border-color: var(--gold);
}

.repeat-indicator {
  position: absolute;
  bottom: -1px;
  right: -1px;
  font-size: 0.5rem;
  color: var(--gold);
  background: var(--bg-card);
  border-radius: 50%;
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
}

/* ===== VOLUME ===== */
.volume-container {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: 0.25rem;
}

.volume-slider {
  width: 70px;
  height: 4px;
  background: var(--bg-secondary);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
}

.volume-fill {
  height: 100%;
  background: var(--gold-dim);
  border-radius: 2px;
  width: 70%;
  transition: width 0.1s;
}

.volume-thumb {
  position: absolute;
  top: 50%;
  width: 10px;
  height: 10px;
  background: var(--gold);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.15s;
}

.volume-slider:hover .volume-thumb {
  opacity: 1;
}

/* ===== NOW PLAYING ===== */
.now-playing {
  flex: 1;
  min-height: 0;
}

.now-playing h3 {
  font-family: var(--font-display);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-color);
}

.queue-list {
  max-height: 200px;
  overflow-y: auto;
}

.queue-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.4rem;
  border-radius: var(--radius);
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.15s;
}

.queue-item:hover {
  background: var(--bg-hover);
}

.queue-item.active {
  color: var(--gold);
  background: rgba(212,160,74,0.08);
}

.queue-num {
  color: var(--text-dim);
  min-width: 1.2rem;
  text-align: right;
  font-size: 0.65rem;
}

.queue-title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-dur {
  color: var(--text-dim);
  font-size: 0.65rem;
  font-variant-numeric: tabular-nums;
}

/* ===== TOOLBAR ===== */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.view-tabs {
  display: flex;
  gap: 0;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
}

.tab {
  background: transparent;
  border: none;
  color: var(--text-dim);
  padding: 0.4rem 1rem;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-display);
  letter-spacing: 0.05em;
}

.tab:hover {
  color: var(--text-secondary);
  background: var(--bg-hover);
}

.tab.active {
  color: var(--gold);
  background: rgba(212,160,74,0.1);
  border-bottom: 2px solid var(--gold);
}

.search-container {
  flex: 1;
  max-width: 400px;
  position: relative;
}

.search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  fill: var(--text-dim);
}

.search-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem 0.5rem 2rem;
  color: var(--text-primary);
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s;
}

.search-input::placeholder {
  color: var(--text-dim);
}

.search-input:focus {
  border-color: var(--gold-dark);
}

.sort-bar {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
  padding-top: 0.35rem;
}

.sort-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-family: var(--font-display);
  letter-spacing: 0.05em;
  margin-right: 0.25rem;
}

.sort-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: var(--text-dim);
  padding: 0.3rem 0.65rem;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-display);
  letter-spacing: 0.05em;
}

.sort-btn:hover {
  color: var(--text-secondary);
  background: var(--bg-hover);
  border-radius: var(--radius) var(--radius) 0 0;
}

.sort-btn.active {
  color: var(--gold);
  border-bottom: 2px solid var(--gold);
  background: rgba(212,160,74,0.08);
  border-radius: var(--radius) var(--radius) 0 0;
}

.sort-directions {
  display: flex;
  gap: 2px;
  margin-left: 0.5rem;
}

.sort-dir-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  color: var(--text-dim);
  width: 24px;
  height: 22px;
  font-size: 0.6rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.sort-dir-btn:hover {
  color: var(--text-primary);
  border-color: var(--text-dim);
}

.sort-dir-btn.active {
  color: var(--gold);
  border-color: var(--gold-dark);
  background: rgba(212,160,74,0.08);
}

/* ===== TRACK LIST ===== */
.track-list {
  display: flex;
  flex-direction: column;
}

.loading {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-dim);
  font-family: var(--font-display);
  font-style: italic;
}

.track-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem 0.5rem 1rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s, padding-left 0.2s;
  border-bottom: 1px solid var(--border-color);
  animation: fadeInUp 0.25s ease-out both;
  position: relative;
}

.track-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  height: 60%;
  width: 2px;
  background: var(--gold-dim);
  border-radius: 1px;
  opacity: 0;
  transition: opacity 0.2s, top 0.2s, height 0.2s;
}

.track-item:hover::before {
  opacity: 1;
  top: 10%;
  height: 80%;
}

.track-item:last-child {
  border-bottom: none;
}

.track-item:hover {
  background: var(--bg-hover);
}

.track-item.active {
  background: rgba(212,160,74,0.08);
}

.track-item.active::before {
  opacity: 1;
  top: 10%;
  height: 80%;
  background: var(--gold);
  box-shadow: 0 0 6px rgba(212,160,74,0.4);
}

.track-item.active .track-title {
  color: var(--gold);
}

.track-num {
  color: var(--text-dim);
  font-size: 0.75rem;
  min-width: 1.5rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.track-item.active .track-num {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gold);
}

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

.track-title {
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.15s;
}

.track-artist {
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-album {
  font-size: 0.7rem;
  color: var(--text-dim);
}

.like-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius);
  color: var(--text-dim);
  transition: all 0.2s;
  font-size: 0.8rem;
}

.like-btn:hover {
  color: var(--gold);
  background: rgba(212,160,74,0.08);
}

.like-btn[data-liked="true"] {
  color: #e74c3c;
}

.like-btn[data-liked="true"]:hover {
  color: #c0392b;
}

.like-heart {
  font-size: 1rem;
  line-height: 1;
}

.like-count {
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
  min-width: 1.2rem;
  text-align: left;
}

.player-like {
  margin: 0.5rem auto 0;
  font-size: 0.9rem;
}

.player-like .like-heart {
  font-size: 1.3rem;
}

.fav-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.2rem 0.3rem;
  border-radius: var(--radius);
  color: var(--text-dim);
  transition: all 0.2s;
  font-size: 1rem;
  line-height: 1;
}

.fav-btn:hover {
  color: var(--gold);
  background: rgba(212,160,74,0.08);
}

.fav-btn[data-favorited="true"] {
  color: var(--gold);
}

.fav-btn[data-favorited="true"]:hover {
  color: var(--gold-light);
}

.player-fav {
  margin: 0.5rem auto 0;
  font-size: 1.3rem;
}

.player-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.track-duration {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  min-width: 3rem;
  text-align: right;
}

/* ===== ALBUM VIEW ===== */
.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}

.album-card {
  background: #2a2218;
  border: 1px solid rgba(212,160,74,0.3);
  border-radius: var(--radius-lg);
  padding: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.album-card:hover {
  background: #3a2e1e;
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(212,160,74,0.2);
}

.album-art {
  width: 100%;
  aspect-ratio: 1;
  background: var(--bg-secondary);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  font-size: 2rem;
  color: var(--gold-dim);
  opacity: 1;
  overflow: hidden;
}

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

.album-name {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  word-break: break-word;
  line-height: 1.3;
}

.album-artist {
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-top: 0.15rem;
}

.album-count {
  font-size: 0.65rem;
  color: var(--text-dim);
  margin-top: 0.1rem;
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--text-dim);
}

.empty-state .rune {
  font-size: 3rem;
  color: var(--gold-dim);
  opacity: 0.3;
  display: block;
  margin-bottom: 1rem;
}

.empty-state h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.empty-state p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ===== PLAYLIST ===== */
.playlist-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.playlist-create-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--bg-card);
  border: 2px dashed var(--border-gold);
  border-radius: var(--radius-lg);
  color: var(--gold-dim);
  padding: 1rem;
  cursor: pointer;
  font-size: 0.9rem;
  font-family: var(--font-display);
  transition: all 0.2s;
}

.playlist-create-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(212,160,74,0.05);
}

.playlist-create-icon {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
}

.playlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
}

.playlist-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.playlist-card:hover {
  border-color: var(--gold-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.playlist-art {
  width: 100%;
  aspect-ratio: 1;
  background: var(--bg-secondary);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  overflow: hidden;
}

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

.playlist-art-rune {
  font-size: 2rem;
  color: var(--gold-dim);
  opacity: 0.4;
}

.playlist-card-name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  word-break: break-word;
}

.playlist-card-count {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: 0.3rem;
}

.playlist-del-btn {
  background: none;
  border: 1px solid rgba(180,60,60,0.3);
  color: rgba(200,80,80,0.7);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.7rem;
  margin-top: 0.5rem;
  transition: all 0.2s;
}

.playlist-del-btn:hover {
  background: rgba(180,60,60,0.15);
  color: #e74c3c;
  border-color: rgba(180,60,60,0.5);
}

.playlist-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.playlist-back-btn {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.75rem;
  transition: all 0.2s;
}

.playlist-back-btn:hover {
  color: var(--gold);
  border-color: var(--gold-dark);
}

.playlist-title {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--text-primary);
}

.playlist-remove-btn {
  background: none;
  border: 1px solid rgba(180,60,60,0.3);
  color: rgba(200,80,80,0.7);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.65rem;
  transition: all 0.2s;
  white-space: nowrap;
}

.playlist-remove-btn:hover {
  background: rgba(180,60,60,0.15);
  color: #e74c3c;
  border-color: rgba(180,60,60,0.5);
}

.track-pl-add {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-dim);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
  transition: all 0.15s;
  flex-shrink: 0;
}

.track-pl-add:hover {
  color: var(--gold);
  border-color: var(--gold-dark);
  background: rgba(212,160,74,0.08);
}

.playlist-add-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-dim);
  padding: 0.2rem 0.3rem;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  transition: all 0.2s;
}

.playlist-add-btn:hover {
  color: var(--gold);
  background: rgba(212,160,74,0.08);
}

.playlist-menu {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 200;
  min-width: 180px;
  padding: 0.25rem 0;
}

.playlist-menu-header {
  padding: 0.4rem 0.75rem;
  font-size: 0.7rem;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border-color);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.playlist-menu-empty {
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  color: var(--text-dim);
  font-style: italic;
}

.playlist-menu-item {
  display: block;
  width: 100%;
  background: none;
  border: none;
  color: var(--text-primary);
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
  cursor: pointer;
  text-align: left;
  transition: background 0.1s;
}

.playlist-menu-item:hover {
  background: var(--bg-hover);
  color: var(--gold);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .main {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem;
  }

  .sidebar .player-card {
    padding: 1rem;
  }

  .sidebar .player-art {
    width: 120px;
    margin: 0 auto 0.75rem;
  }

  .content {
    padding: 0.75rem;
  }

  .sidebar .now-playing {
    display: none;
  }

  .album-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }
}

@media (max-width: 500px) {
  .header {
    padding: 0.5rem 0.75rem;
  }

  .logo h1 {
    font-size: 1rem;
  }

  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .search-container {
    max-width: 100%;
  }

  .album-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.5rem;
  }

  .album-card {
    padding: 0.5rem;
  }
}
