:root{
  --bg: #0b0f1a;
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.65);
  --accent: #7c5cff;
  --accent2: #2ee59d;
  --shadow: 0 18px 60px rgba(0,0,0,.45);
  --radius: 22px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 20% 10%, rgba(124,92,255,.20), transparent 60%),
    radial-gradient(900px 500px at 80% 30%, rgba(46,229,157,.18), transparent 60%),
    radial-gradient(900px 700px at 40% 90%, rgba(255,255,255,.08), transparent 55%),
    var(--bg);
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 18px;
  overflow: hidden; /* desktop */
}

/* Desktop: capped */
.player{
  width: min(980px, 100%);
  height: min(100vh, 980px);
  max-height: 100vh;
  display:flex;
  flex-direction:column;
  background: linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.05));
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  overflow: hidden;
}

/* Mobile: cap OFF */
@media (max-width: 600px){
  body{ align-items:flex-start; overflow:auto; padding:14px; }
  .player{ height:auto; max-height:none; overflow:visible; }
}

.header{
  flex:0 0 auto;
  padding: 2rem 18px 16px 18px;
  border-bottom: 1px solid rgba(255,255,255,.10);
  background:
    radial-gradient(120% 160% at 15% 20%, rgba(124,92,255,.28), rgba(124,92,255,0) 55%),
    radial-gradient(120% 160% at 85% 70%, rgba(46,229,157,.22), rgba(46,229,157,0) 55%),
    linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
}

.headerRow{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.brand{ display:flex; align-items:center; gap:12px; min-width:0; }
.logo{
  width:42px;height:42px;border-radius:14px;
  border:1px solid rgba(255,255,255,.16);
  background:
    radial-gradient(120% 120% at 30% 25%, rgba(124,92,255,.60), rgba(124,92,255,0) 60%),
    radial-gradient(120% 120% at 80% 70%, rgba(46,229,157,.55), rgba(46,229,157,0) 60%),
    rgba(255,255,255,.06);
  box-shadow: 0 12px 28px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.16);
  display:grid; place-items:center; flex:0 0 auto;
}
.logo svg{
  width:22px;height:22px; stroke: rgba(255,255,255,.95);
  stroke-width:2.4; fill:none; stroke-linecap:round; stroke-linejoin:round;
}

.headline{
  margin:0;
  font-size: clamp(18px, 2.2vw, 22px);
  font-weight: 900;
  letter-spacing: .6px;
  text-transform: uppercase;
  white-space: nowrap;
  overflow:hidden;
  text-overflow: ellipsis;
  line-height:1.1;
}
.subline{ margin:0; font-size:12px; color: rgba(255,255,255,.68); letter-spacing:.3px; }

.chips{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.chip{
  font-size:12px; padding:7px 10px; border-radius:999px;
  border:1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.86); box-shadow: inset 0 1px 0 rgba(255,255,255,.10);
  white-space: nowrap;
}
.chip.accent{ border-color: rgba(124,92,255,.28); background: rgba(124,92,255,.14); }
.chip.green{ border-color: rgba(46,229,157,.26); background: rgba(46,229,157,.12); }

@media (max-width: 520px){
  .headerRow{ flex-direction:column; align-items:flex-start; }
  .chips{ justify-content:flex-start; }
}

.content{
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display:flex;
}
@media (max-width: 600px){
  .content{ overflow:visible; display:block; }
}

.layout{
  flex:1 1 auto;
  min-height:0;
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  overflow:hidden;
}
@media (max-width: 860px){
  .layout{ grid-template-columns: 1fr; }
}
@media (max-width: 600px){
  .layout{ overflow:visible; }
}

.main{
  padding:22px;
  display:flex;
  flex-direction:column;
  gap:14px;
  border-right: 1px solid rgba(255,255,255,.08);
  min-height:0;
  overflow:hidden;
}
@media (max-width: 860px){
  .main{ border-right:none; border-bottom:1px solid rgba(255,255,255,.08); }
}
@media (max-width: 600px){
  .main{ overflow:visible; }
}

.coverWrap{
  width:100%;
  flex: 1 1 auto;
  min-height:180px;
  max-height:420px;
  border-radius: calc(var(--radius) - 6px);
  overflow:hidden;
  background: rgba(255,255,255,.06);
  box-shadow: 0 14px 40px rgba(0,0,0,.35);
}
@media (max-width: 600px){
  .coverWrap{ max-height:none; aspect-ratio:1/1; height:auto; }
}

.cover{ width:100%; height:100%; object-fit:cover; display:block; transform:scale(1.02); }

.meta{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:12px;
}
.title{ font-size: clamp(18px, 2.2vw, 22px); font-weight:700; }
.artist{ font-size:13px; color: var(--muted); margin-top:4px; }
.badge{
  font-size:12px;
  color: rgba(255,255,255,.85);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  padding: 6px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.controls{ display:flex; justify-content:center; align-items:center; gap:14px; }
.cbtn{
  appearance:none;
  border: 1px solid rgba(255,255,255,.14);
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.04));
  color: var(--text);
  cursor:pointer;
  user-select:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  height:52px;
  padding:0 16px;
  border-radius: 999px;
  box-shadow: 0 10px 26px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.12);
  transition: transform .08s ease, filter .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.cbtn:hover{
  filter: brightness(1.06);
  border-color: rgba(255,255,255,.22);
  box-shadow: 0 12px 28px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.16);
}
.cbtn:active{ transform: translateY(1px) scale(.99); }
.cbtn.small{ width:56px; padding:0; }

.cbtn .svg{
  width:22px;height:22px;
  fill:none; stroke: rgba(255,255,255,.92);
  stroke-width:2.6; stroke-linecap:round; stroke-linejoin:round;
}

.cbtn.play{
  height:62px; min-width:150px; padding:0 18px;
  border-color: rgba(255,255,255,.18);
  background:
    radial-gradient(120% 120% at 30% 25%, rgba(124,92,255,.55), rgba(124,92,255,0) 55%),
    radial-gradient(120% 120% at 80% 60%, rgba(46,229,157,.45), rgba(46,229,157,0) 55%),
    linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.06));
  box-shadow: 0 16px 40px rgba(0,0,0,.35), 0 10px 22px rgba(124,92,255,.22), inset 0 1px 0 rgba(255,255,255,.18);
  position:relative; overflow:hidden;
}
.cbtn.play .playText{
  font-weight:900; letter-spacing:.6px; text-transform:uppercase;
  font-size:12px; color: rgba(255,255,255,.95);
}
.cbtn.play .svg{ width:24px; height:24px; stroke: rgba(255,255,255,.96); }

.timeline{ display:flex; flex-direction:column; gap:8px; }
.timeRow{ display:flex; justify-content:space-between; font-size:12px; color: var(--muted); }

input[type="range"]{
  -webkit-appearance:none;
  appearance:none;
  width:100%;
  height:10px;
  background: rgba(255,255,255,.10);
  border-radius:999px;
  border: 1px solid rgba(255,255,255,.10);
  outline:none;
  cursor:pointer;
}
input[type="range"]::-webkit-slider-thumb{
  -webkit-appearance:none;
  appearance:none;
  width:18px;height:18px;border-radius:50%;
  background: var(--accent);
  border:2px solid rgba(255,255,255,.75);
  box-shadow: 0 8px 18px rgba(124,92,255,.35);
}

.volRow{ display:flex; align-items:center; gap:10px; margin-top:6px; }
.volLabel{ font-size:12px; color: var(--muted); min-width:58px; }

.sidebar{
  padding:18px;
  display:flex;
  flex-direction:column;
  gap:10px;
  min-height:0;
  overflow:hidden;
}
@media (max-width: 600px){
  .sidebar{ overflow:visible; }
}

.listHeader{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding: 6px 4px 10px 4px;
  flex:0 0 auto;
}
.listHeader h2{
  margin:0; font-size:14px; letter-spacing:.3px; text-transform:uppercase;
  color: rgba(255,255,255,.75); font-weight:700;
}

.search{
  width:52%;
  min-width:160px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  color: var(--text);
  border-radius:999px;
  padding:9px 12px;
  outline:none;
  font-size:13px;
}
.search::placeholder{ color: rgba(255,255,255,.45); }

.playlist{
  list-style:none; padding:0; margin:0;
  display:flex; flex-direction:column; gap:10px;
  flex:1 1 auto; min-height:0;
  overflow:auto; padding-right:6px;
}
@media (max-width: 600px){
  .playlist{ overflow:visible; padding-right:0; }
}

.track{
  display:flex; align-items:center; gap:12px;
  padding:10px 10px;
  border-radius:16px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.10);
  cursor:pointer;
  transition: background .2s ease, border-color .2s ease, transform .08s ease;
}
.track:hover{ background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.16); }
.track:active{ transform: scale(.99); }

.thumb{ width:44px;height:44px;border-radius:12px; object-fit:cover; background: rgba(255,255,255,.08); flex:0 0 auto; }
.trackMeta{ min-width:0; flex:1 1 auto; }
.trackTitle{ font-weight:700; font-size:14px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.trackArtist{ font-size:12px; color: var(--muted); margin-top:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

.trackRight{ display:flex; align-items:center; gap:8px; flex:0 0 auto; color: rgba(255,255,255,.70); font-size:12px; }
.pill{
  font-size:12px;
  padding:5px 9px;
  border-radius:999px;
  background: rgba(124,92,255,.18);
  border: 1px solid rgba(124,92,255,.28);
  color: rgba(255,255,255,.90);
  white-space: nowrap;
}
.pill.views{
  background: rgba(46,229,157,.14);
  border-color: rgba(46,229,157,.26);
  color: rgba(255,255,255,.92);
}

.track.active{
  background: linear-gradient(135deg, rgba(124,92,255,.22), rgba(46,229,157,.10));
  border-color: rgba(255,255,255,.20);
}
