:root {
  --sidebar-width: 280px;
  --accent: #1f8eed;
  --bg: #0f1720;
  --panel: #0b1220;
  --muted: #9aa6b2;
}

* {
  box-sizing: border-box
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  background: var(--bg);
  color: #e6eef6
}

.app {
  display: flex;
  min-height: 100vh
}

.sidebar {
  width: var(--sidebar-width);
  background: linear-gradient(180deg, #071021 0%, #0b1724 100%);
  padding: 12px;
  overflow: auto;
  border-right: 1px solid rgba(255, 255, 255, 0.03)
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px
}

.hamburger {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 20px
}

.playlist {
  display: flex;
  flex-direction: column;
  gap: 6px
}

.track-item {
  padding: 10px;
  border-radius: 6px;
  cursor: pointer;
  background: transparent;
  border: 1px solid transparent
}

.track-item:hover {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.02)
}

.track-item.active {
  background: linear-gradient(90deg, rgba(31, 142, 237, 0.12), rgba(31, 142, 237, 0.04));
  border-color: rgba(31, 142, 237, 0.12)
}

.track-title {
  font-weight: 600
}

.track-meta {
  font-size: 12px;
  color: var(--muted)
}

.main {
  flex: 1;
  padding: 18px
}

.player {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px
}

.now-info {
  padding: 8px 12px
}

.title {
  font-size: 20px;
  font-weight: 700
}

.meta,
.source {
  font-size: 13px;
  color: var(--muted)
}

.media {
  background: var(--panel);
  padding: 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.03)
}

.controls {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px
}

.controls button {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 8px;
  border-radius: 6px;
  color: #e6eef6
}

.controls input[type=range] {
  vertical-align: middle
}

.status {
  color: var(--muted);
  font-size: 13px
}

@media (max-width:800px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 30;
    transform: translateX(0);
    transition: transform .22s
  }

  .sidebar.closed {
    transform: translateX(-110%)
  }

  .main {
    padding-top: 60px
  }
}

/* Gate modal */
.gate-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 12, 20, 0.92);
  backdrop-filter: saturate(120%) blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000
}

.gate-modal {
  width: min(92vw, 420px);
  background: linear-gradient(180deg, #0e1726, #0a1322);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35)
}

.gate-title {
  margin: 0 0 8px 0;
  font-size: 20px
}

.gate-body {
  display: flex;
  gap: 8px
}

.gate-body input {
  flex: 1;
  background: #0b1626;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e6eef6;
  border-radius: 8px;
  padding: 10px 12px
}

.gate-submit {
  background: var(--accent);
  border: 0;
  color: white;
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer
}

.gate-error {
  color: #ff7575;
  font-size: 13px;
  margin-top: 8px;
  min-height: 18px
}

.gate-hint {
  color: var(--muted);
  font-size: 12px;
  margin-top: 6px
}