:root {
  --bg-dark: #000000; --bg-panel: #121212; --bg-card: #181818; --bg-hover: #282828;
  --accent: #1db954; --text-main: #ffffff; --text-muted: #b3b3b3; --border: #2a2a2a;
}
* { box-sizing: border-box; margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; -webkit-tap-highlight-color: transparent; }
body { background-color: var(--bg-dark); color: var(--text-main); display: flex; height: 100vh; overflow: hidden; }

aside { width: 240px; background-color: var(--bg-dark); padding: 24px 20px; display: flex; flex-direction: column; gap: 16px; flex-shrink: 0; }
.brand-header { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; cursor: pointer; }
.brand-header h2 { font-size: 1.35rem; font-weight: 800; color: #fff; }
aside nav a { color: var(--text-muted); display: flex; align-items: center; gap: 16px; font-weight: 700; font-size: 0.9rem; padding: 8px 0; cursor: pointer; }
aside nav a.active, aside nav a:hover { color: #fff; }

main { flex: 1; background: linear-gradient(180deg, #222 0%, var(--bg-panel) 40%); border-radius: 8px; margin: 8px 8px 98px 0; display: flex; flex-direction: column; overflow-y: auto; }
.top-bar { display: flex; padding: 16px 28px; background: rgba(0,0,0,0.4); backdrop-filter: blur(20px); position: sticky; top: 0; z-index: 10; }
.search-box { display: flex; flex: 1; max-width: 480px; }
.search-box input { flex: 1; padding: 10px 20px; border-radius: 500px; border: none; background: #262626; color: #fff; outline: none; font-size: 0.9rem; }
.search-box input:focus { background: #303030; }

.main-content-area { padding: 24px 28px; flex: 1; }
.view-title { font-size: 1.6rem; margin-bottom: 24px; font-weight: 700; }

.grid-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 18px; margin-bottom: 24px; }
.track-card { background: var(--bg-card); border-radius: 8px; padding: 12px; cursor: pointer; transition: background 0.2s, transform 0.15s; }
.track-card:hover { background: var(--bg-hover); transform: translateY(-2px); }
.track-card img { width: 100%; aspect-ratio: 16 / 9; border-radius: 6px; object-fit: cover; margin-bottom: 10px; background: #111; }
.card-title { font-size: 0.88rem; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 3px; }
.card-artist { font-size: 0.76rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

footer { position: fixed; bottom: 0; left: 0; width: 100%; height: 90px; background: #181818; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 16px; z-index: 50; }
.player-track { display: flex; align-items: center; gap: 14px; width: 28%; min-width: 180px; }
.player-cover { width: 56px; height: 56px; border-radius: 6px; object-fit: cover; background: #222; }
.player-names { display: flex; flex-direction: column; overflow: hidden; flex: 1; }
.player-names span:first-child { font-size: 0.86rem; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-names span:last-child { font-size: 0.74rem; color: var(--text-muted); margin-top: 2px; }

.player-center { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 1; max-width: 600px; }
.controls-main { display: flex; align-items: center; gap: 20px; }
.btn-circle { background: #fff; color: #000; width: 34px; height: 34px; border-radius: 50%; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.btn-trans { background: none; border: none; color: var(--text-muted); font-size: 1rem; cursor: pointer; }
.btn-trans:hover { color: #fff; }

.progress-wrap { display: flex; align-items: center; gap: 10px; width: 100%; font-size: 0.72rem; color: var(--text-muted); }
.bar-bg { flex: 1; height: 4px; background: #4d4d4d; border-radius: 2px; cursor: pointer; position: relative; }
.bar-fill { height: 100%; width: 0%; background: #fff; border-radius: 2px; pointer-events: none; }
.bar-bg:hover .bar-fill { background: var(--accent); }

.player-right { width: 28%; display: flex; justify-content: flex-end; align-items: center; gap: 12px; color: var(--text-muted); }
.btn-right { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 1rem; }
.vol-slider-wrap { width: 75px; height: 4px; background: #4d4d4d; border-radius: 2px; cursor: pointer; }
.vol-fill { height: 100%; width: 100%; background: #fff; border-radius: 2px; }

.loader-spinner { border: 3px solid rgba(255,255,255,0.2); border-top-color: #1db954; border-radius: 50%; width: 28px; height: 28px; animation: spin 0.8s linear infinite; margin: 20px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
#toast { position: fixed; bottom: 105px; left: 50%; transform: translateX(-50%); background: #2e77d0; color: #fff; padding: 10px 22px; border-radius: 500px; font-size: 0.85rem; font-weight: 600; display: none; z-index: 1000; }

@media (max-width: 768px) {
  aside { display: none; }
  main { margin: 0; border-radius: 0; height: calc(100vh - 90px); }
  .grid-container { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .player-right { display: none; }
  .player-track { flex: 1; }
}