/* ---------------- Basic Reset ---------------- */
*{margin:0;padding:0;box-sizing:border-box}
html,body{height:100%;width:100%;font-family:system-ui,-apple-system,Segoe UI,Roboto,"Helvetica Neue",Arial;background:#0f0f10;color:#fff}

/* ---------------- LOGIN (applies only when body.login) ---------------- */
body.login{
  display:flex;
  justify-content:center;
  align-items:center;
  min-height:100vh;
  background: radial-gradient(circle at top left, #1db954 0%, #121212 50%);
}
.login-card{
  background: rgba(24,24,24,0.95);
  padding:36px;
  width:92%;
  max-width:380px;
  border-radius:14px;
  box-shadow:0 10px 40px rgba(0,0,0,0.6);
  text-align:center;
  backdrop-filter: blur(6px);
}
.login-card h2{font-size:1.6rem;margin-bottom:18px}
.login-card input{width:100%;padding:12px 14px;margin:8px 0;border-radius:10px;border:none;background:#222;color:#fff;font-size:1rem}
.login-card input:focus{outline:none;box-shadow:0 0 0 3px rgba(29,185,84,0.14)}
.login-card button{width:100%;padding:12px;border-radius:999px;border:none;background:linear-gradient(135deg,#1db954,#1ed760);color:#07100b;font-weight:700;cursor:pointer;font-size:1rem}
.login-card .error{background:#ff4d4d;color:#fff;padding:10px;border-radius:8px;margin-bottom:12px}

/* ---------------- Header ---------------- */
.header{
  height:80px;display:flex;align-items:center;justify-content:space-between;padding:0 20px;background:#111;position:fixed;top:0;left:0;width:100%;z-index:50;border-bottom:1px solid rgba(255,255,255,0.02)
}
.header-left{display:flex;align-items:center;gap:12px;font-weight:600}
.profile-pic{width:44px;height:44px;border-radius:50%;object-fit:cover;border:2px solid rgba(255,255,255,0.08)}
.greeting{font-size:1rem}
.top-actions{display:flex;align-items:center;gap:12px}
.logout-btn{background:#ff4d4d;padding:8px 12px;border-radius:12px;color:#fff;text-decoration:none;font-weight:700}

/* ---------------- Navigation Buttons ---------------- */
.viewBtns{display:flex;gap:10px;justify-content:center;padding-top:100px}
.viewBtns button{padding:8px 14px;border-radius:10px;border:none;background:#202020;color:#fff;font-weight:700;cursor:pointer}
.viewBtns button.active{background:#1db954;color:#07100b}

/* ---------------- Main ---------------- */
.main{padding:22px;margin-top:120px;max-width:1100px;margin-left:auto;margin-right:auto}
.card{background:#121212;padding:16px;border-radius:12px;margin-bottom:18px;box-shadow:0 4px 18px rgba(0,0,0,0.4)}

/* center helper */
.center{text-align:center}
.muted{color:#9aa0a6}
.small{font-size:0.9rem}

/* ---------------- Playlist Accordion ---------------- */
.playlist-card{margin-bottom:12px}
.playlist-header{display:flex;justify-content:space-between;align-items:center;padding:10px;background:#151515;border-radius:10px;cursor:pointer}
.playlist-header button{background:#1db954;border:none;padding:6px 10px;border-radius:8px;color:#07100b;font-weight:700}
.playlist-songs{list-style:none;margin-top:8px;padding-left:12px}
.playlist-songs li{display:flex;align-items:center;gap:10px;padding:8px;border-radius:8px}
.playlist-songs li:hover{background:#1a1a1a}
li.active{background:#1db954;color:#07100b}

/* numbers + labels */
.song-number{width:28px;text-align:right;font-weight:700;color:#cfd6d6}
.song-label{flex:1}

/* ---------------- Player ---------------- */
#bottomPlayer{
  position:fixed;
  left:50%;
  transform:translateX(-50%);
  bottom:18px;
  width:92%;
  max-width:980px;
  background:linear-gradient(180deg,#0f0f10,#121212);
  padding:12px;
  border-radius:14px;
  box-shadow:0 12px 40px rgba(0,0,0,0.6);
  z-index:60;
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap: wrap; /* Buttons umbrechen, falls nötig */
}

#playerInner{
  display:flex;
  align-items:center;
  width:100%;
  gap:12px;
  flex-wrap: wrap; /* Buttons umbrechen, falls nötig */
}

.player-left img{
  width:64px;
  height:64px;
  border-radius:8px;
  object-fit:cover;
  border:2px solid rgba(255,255,255,0.04)
}

.player-center{
  flex:1 1 auto; /* flexibel, nimmt nur den nötigen Platz */
  display:flex;
  flex-direction:column;
  gap:8px;
  padding:0 12px;
  min-width:0; /* verhindert Überlauf durch Tracktitel */
}

#trackTitle{
  font-weight:700;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis
}

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

#progressBar[type=range]{
  flex:1;
  -webkit-appearance:none;
  height:6px;
  border-radius:6px;
  background:#202020
}

#progressBar[type=range]::-webkit-slider-thumb{
  -webkit-appearance:none;
  width:14px;
  height:14px;
  border-radius:50%;
  background:#1db954
}

#timeCurrent,#timeRemaining{
  font-size:0.9rem;
  color:#9aa0a6;
  width:48px;
  text-align:center
}

/* controls */
#controls{
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:center;
  flex-shrink:0; /* Buttons behalten ihre Größe */
}

/* Controls Buttons */
#controls button{
  background:#1db954;
  border:none;
  border-radius:50%;
  width:52px;
  height:52px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:1.3rem;
  color:#07100b;
  cursor:pointer
}

#controls button#playBtn{
  width:64px;
  height:64px;
  font-size:1.6rem
}

/* ---------------- Responsive ---------------- */
@media(max-width:600px){
  .player-left img{width:54px;height:54px}
  #controls button{width:44px;height:44px}
  #controls button#playBtn{width:54px;height:54px}
  .viewBtns{padding-top:120px}
  .main{padding:16px;margin-top:140px}
}