:root {
  --bg: #090b13;
  --panel: rgba(10, 14, 30, 0.62);
  --panel-2: rgba(255, 255, 255, 0.06);
  --line: rgba(255,255,255,0.12);
  --text: #f5f7ff;
  --muted: #b8c0e0;
  --cyan: #00eaff;
  --pink: #ff3df2;
  --violet: #8b5cff;
  --glow: 0 0 16px rgba(0,234,255,.35), 0 0 28px rgba(255,61,242,.2);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--bg);
}

body {
  display: grid;
  grid-template-columns: 300px 1fr;
  min-height: 100vh;
  overflow-x: hidden;
  padding-bottom: 120px;
}

.bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(255,61,242,.16), transparent 30%),
    radial-gradient(circle at bottom left, rgba(0,234,255,.14), transparent 35%),
    linear-gradient(135deg, #090b13, #0d1224);
  background-size: cover;
  background-position: center;
  z-index: -3;
  transition: background-image .5s ease;
}

.bg-overlay {
  position: fixed;
  inset: 0;
  background:
    linear-gradient(rgba(4,8,18,.60), rgba(4,8,18,.85)),
    repeating-linear-gradient(
      90deg,
      rgba(255,255,255,0.02) 0,
      rgba(255,255,255,0.02) 1px,
      transparent 1px,
      transparent 80px
    );
  z-index: -2;
  pointer-events: none;
}

.sidebar {
  border-right: 1px solid var(--line);
  background: rgba(8,10,18,.55);
  backdrop-filter: blur(16px);
  padding: 24px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.brand-logo {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  background: linear-gradient(135deg, rgba(0,234,255,.25), rgba(255,61,242,.25));
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: var(--glow);
}

.brand h1 {
  margin: 0;
  font-size: 1.2rem;
}
.brand p {
  margin: 4px 0 0;
  color: var(--muted);
}

.nav-block {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}

.nav-btn,
.pill-btn,
.controls button,
#reloadTracksBtn,
#createPlaylistBtn {
  border: 1px solid rgba(255,255,255,.12);
  background: linear-gradient(135deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
  color: white;
  border-radius: 14px;
  cursor: pointer;
  transition: .2s ease;
  box-shadow: 0 0 0 transparent;
}

.nav-btn {
  padding: 12px 14px;
  text-align: left;
}

.nav-btn:hover,
.nav-btn.active,
.pill-btn:hover,
.controls button:hover,
#reloadTracksBtn:hover,
#createPlaylistBtn:hover {
  border-color: rgba(0,234,255,.35);
  box-shadow: var(--glow);
  transform: translateY(-1px);
}

.side-card,
.panel,
.hero {
  background: var(--panel);
  backdrop-filter: blur(18px);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 12px 45px rgba(0,0,0,.28);
}

.side-card {
  padding: 18px;
}

.side-head h3,
.panel-head h3 {
  margin: 0;
}

.playlist-create {
  display: flex;
  gap: 10px;
  margin: 14px 0;
}

input {
  width: 100%;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: white;
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
}

input::placeholder {
  color: #cfd7f0;
}

#playlists,
.track-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

#playlists li,
.track-item {
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.05);
  border-radius: 16px;
  padding: 12px 14px;
  margin-bottom: 10px;
}

#playlists li:hover,
.track-item:hover {
  border-color: rgba(0,234,255,.28);
  box-shadow: var(--glow);
}

.main {
  padding: 24px;
  display: grid;
  gap: 18px;
}

.hero {
  padding: 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--cyan);
  letter-spacing: .16em;
  font-size: .75rem;
  text-transform: uppercase;
}

.hero h2 {
  font-size: 2rem;
  margin: 0;
}
.hero-text {
  color: var(--muted);
  margin-top: 8px;
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.pill-btn {
  padding: 12px 16px;
  text-decoration: none;
}

.panel {
  padding: 20px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.panel-head p {
  margin: 6px 0 0;
  color: var(--muted);
}

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

.track-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.track-main strong {
  display: block;
  margin-bottom: 4px;
}
.track-main span {
  color: var(--muted);
  font-size: .94rem;
}

.track-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.track-actions button {
  border-radius: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: white;
  cursor: pointer;
}

.player-bar {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 50;
  display: grid;
  grid-template-columns: 320px 1fr 180px;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  border-radius: 24px;
  background: rgba(10,14,30,.82);
  border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(20px);
  box-shadow: 0 18px 55px rgba(0,0,0,.35), var(--glow);
}

.player-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.cover-glow {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(0,234,255,.4), rgba(255,61,242,.4));
  box-shadow: var(--glow);
}

.track-now {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.track-now strong,
.track-now span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-now span {
  color: var(--muted);
  margin-top: 4px;
}

.player-center {
  display: grid;
  gap: 10px;
}

.controls {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.controls button {
  padding: 10px 14px;
}

.play-main {
  background: linear-gradient(135deg, rgba(0,234,255,.25), rgba(255,61,242,.22));
}

audio {
  width: 100%;
  filter: hue-rotate(180deg) saturate(1.2);
}

.player-right {
  display: flex;
  justify-content: flex-end;
}

#reloadTracksBtn {
  padding: 12px 14px;
}

@media (max-width: 1100px) {
  body {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .player-bar {
    grid-template-columns: 1fr;
  }
}
