/* assets/styles.css — Light Spotify (soft) */

:root{
  --bg:#eef2ff;
  --bg2:#f7fafc;
  --panel:#ffffff;
  --panel2:#fbfdff;
  --text:#0f172a;
  --muted:#475569;
  --brand:#1db954;
  --brand2:#22c55e;
  --line:rgba(15,23,42,.12);
  --shadow: 0 14px 50px rgba(2,6,23,.12);
  --radius:18px;
}

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

body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color:var(--text);
  background:
    radial-gradient(1100px 600px at 15% -10%, rgba(29,185,84,.18), transparent 55%),
    radial-gradient(900px 520px at 95% 0%, rgba(99,102,241,.16), transparent 55%),
    linear-gradient(180deg, var(--bg2), var(--bg));
  padding-bottom: 110px; /* reserve space for fixed player */
}

a{color:inherit;text-decoration:none}
button,input{font:inherit}
.small{font-size:.9rem;color:var(--muted)}
.muted{color:var(--muted)}

.pill{
  display:inline-flex;align-items:center;gap:8px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.75);
  padding:10px 12px; border-radius:999px;
  box-shadow: 0 6px 18px rgba(2,6,23,.06);
}

.btn{
  cursor:pointer;
  border:1px solid var(--line);
  background: rgba(255,255,255,.9);
  color:var(--text);
  padding:10px 14px;
  border-radius:12px;
  transition:.15s transform, .15s background, .15s border, .15s box-shadow;
  box-shadow: 0 10px 24px rgba(2,6,23,.06);
}
.btn:hover{
  transform:translateY(-1px);
  background: rgba(255,255,255,1);
  border-color: rgba(15,23,42,.18);
  box-shadow: 0 12px 28px rgba(2,6,23,.10);
}
.btn.primary{
  border-color: rgba(29,185,84,.28);
  background: linear-gradient(180deg, rgba(29,185,84,.95), rgba(34,197,94,.88));
  color:#05210f;
  font-weight:800;
}
.btn.primary:hover{border-color: rgba(29,185,84,.45)}
.btn.danger{
  border-color: rgba(239,68,68,.35);
  background: rgba(239,68,68,.10);
}

.card{
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,255,255,.86));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.container{max-width:1100px;margin:0 auto;padding:18px}

/* Topbar */
.topbar{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:16px 18px;border-radius:var(--radius);
  position:sticky;top:12px;z-index:10;
  backdrop-filter: blur(10px);
}
.brand{
  display:flex;align-items:center;gap:10px;
  font-weight:950;letter-spacing:.3px
}
.logoDot{
  width:12px;height:12px;border-radius:999px;
  background: var(--brand);
  box-shadow: 0 0 0 6px rgba(29,185,84,.16), 0 0 20px rgba(29,185,84,.35);
}

/* Search */
.search{
  flex:1; display:flex; gap:10px; align-items:center;
  border:1px solid var(--line);
  background: rgba(255,255,255,.78);
  border-radius:999px; padding:10px 12px;
  box-shadow: 0 6px 18px rgba(2,6,23,.06);
}
.search input{
  width:100%; border:0; outline:0;
  background:transparent; color:var(--text);
}

/* Layout */
.grid{
  display:grid;
  grid-template-columns: 280px 1fr;
  gap:16px;
  margin-top:16px;
}
.sidebar{padding:14px}
.sideSection{padding:12px;margin-bottom:12px}
.sideTitle{
  font-weight:900;margin:0 0 10px 0;
  font-size:.95rem;color:#0f172a
}

/* Nav */
.nav a{
  display:flex;align-items:center;gap:10px;
  padding:10px 10px;border-radius:12px;color:var(--muted);
}
.nav a.active, .nav a:hover{
  background: rgba(15,23,42,.06);
  color: var(--text);
}

/* Main */
.main{padding:14px}
.sectionHeader{
  display:flex;align-items:flex-end;justify-content:space-between;gap:12px;
  margin:6px 2px 12px;
}
.h1{font-size:1.35rem;font-weight:950;margin:0}

.badge{
  font-size:.75rem; padding:4px 10px;border-radius:999px;
  border:1px solid rgba(29,185,84,.26);
  background: rgba(29,185,84,.10);
  color:#0b3a20;
  font-weight:800;
}

/* Track list */
.trackList{display:flex;flex-direction:column;gap:10px}
.track{
  display:grid;
  grid-template-columns: 42px 1fr auto;
  gap:12px;
  align-items:center;
  padding:12px;border-radius:16px;
  border:1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.78);
  box-shadow: 0 10px 24px rgba(2,6,23,.06);
}
.track:hover{
  border-color: rgba(15,23,42,.18);
  background: rgba(255,255,255,.92);
}
.cover{
  width:42px;height:42px;border-radius:12px;
  background:
    radial-gradient(22px 22px at 30% 30%, rgba(29,185,84,.35), transparent 60%),
    radial-gradient(22px 22px at 70% 70%, rgba(99,102,241,.25), transparent 60%),
    linear-gradient(180deg, rgba(15,23,42,.08), rgba(15,23,42,.02));
  border:1px solid rgba(15,23,42,.10);
}
.tTitle{font-weight:900}
.tMeta{font-size:.9rem;color:var(--muted);margin-top:2px}
.tMeta a{ text-decoration: underline; text-underline-offset: 3px; }
.tActions{display:flex;gap:10px;align-items:center}

.iconBtn{
  width:40px;height:40px;border-radius:14px;
  display:grid;place-items:center;
  border:1px solid rgba(15,23,42,.12);
  background: rgba(255,255,255,.92);
  cursor:pointer;
  box-shadow: 0 10px 22px rgba(2,6,23,.06);
}
.iconBtn:hover{background: rgba(255,255,255,1)}

/* ✅ Player bar (support BOTH class and id) */
.playerBar,
#playerBar{
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 9999;

  overflow: hidden; /* no scrolling inside */
  -webkit-overflow-scrolling: auto;

  padding: 12px 14px;
  border-radius: 22px;

  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}

/* if your player bar needs the card look */
#playerBar.card,
.playerBar.card{
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,255,255,.86));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.now{display:flex;align-items:center;gap:12px;min-width:0}
.now .cover{width:48px;height:48px}
.nowText{min-width:0}
.nowTitle{font-weight:950;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.nowMeta{font-size:.9rem;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

.controls{display:flex;align-items:center;gap:10px;justify-content:center}
.controls .iconBtn{width:44px;height:44px;border-radius:16px}

.timeline{display:flex;align-items:center;gap:10px;justify-content:flex-end}
.range{width:320px;max-width:36vw}
input[type="range"]{width:100%}

/* Visualizer canvas */
#viz{
  width: 360px;
  max-width: 42vw;
  height: 46px;
  border-radius: 14px;
  background: rgba(255,255,255,.80);
  border:1px solid rgba(15,23,42,.12);
  box-shadow: 0 10px 22px rgba(2,6,23,.06);
}

/* Responsive */
@media (max-width: 980px){
  .grid{grid-template-columns:1fr}
  .range{width:220px}
  #viz{width:280px}
}

/* Drag & drop helpers (single copy) */
.track[draggable="true"] { cursor: grab; }
.track.dragging { opacity: .55; transform: scale(.99); }

.plDrop.dragOver,
#list.dragOver {
  outline: 2px dashed rgba(22,163,74,.65);
  outline-offset: 4px;
  border-radius: 14px;
}
