:root {
  color-scheme: dark;
  --bg: #101312;
  --panel: #181c1b;
  --panel-soft: #202523;
  --line: #303834;
  --text: #f4f7f4;
  --muted: #aab4ad;
  --green: #94ff80;
  --green-strong: #52de5f;
  --danger: #ff5c77;
  --amber: #ffc857;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; min-height: 100%; background-color: var(--bg); color: var(--text); font-family: Inter, system-ui, -apple-system, sans-serif; overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { border: 0; background: transparent; cursor: pointer; }

/* Entry & layout (unchanged core) */
.entry-screen { position: fixed; inset: 0; background: radial-gradient(circle at 25% 10%, rgba(148,255,128,.06), transparent 40rem), #101312; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem; z-index: 999; }
.brand-lockup { text-align: center; margin-bottom: 2rem; }
.brand-mark { width: 72px; height: 72px; margin-bottom: 1rem; }
.brand-word { font-size: 2.25rem; font-weight: 800; letter-spacing: -0.04em; }
.brand-word span { color: var(--green); }
.brand-lockup p { color: var(--muted); font-size: .9rem; margin-top: .5rem; }
.entry-grid { width: 100%; max-width: 400px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 2rem; box-shadow: var(--shadow); }
.auth-tabs { display: flex; border-bottom: 1px solid var(--line); margin-bottom: 1.5rem; }
.auth-tab { flex: 1; padding: .75rem; text-align: center; color: var(--muted); font-weight: 600; }
.auth-tab.active { color: var(--green); border-bottom: 2px solid var(--green); }
.auth-form-segment { display: flex; flex-direction: column; gap: 1.25rem; }
.auth-form-segment h2 { font-size: 1.25rem; }
.auth-form-segment label { display: flex; flex-direction: column; gap: .4rem; font-size: .85rem; color: var(--muted); }
.auth-form-segment input { background: var(--panel-soft); border: 1px solid var(--line); padding: .75rem; border-radius: 6px; outline: none; }
.auth-form-segment input:focus { border-color: var(--green); }
button.primary { background: var(--green); color: #000; font-weight: 700; padding: .75rem; border-radius: 6px; }
button.primary:hover { background: var(--green-strong); }
.small-note { font-size: .75rem; color: var(--muted); text-align: center; }

.app-shell { display: flex; flex-direction: column; height: 100vh; width: 100vw; background: var(--bg); }
.main-screen { display: flex; flex: 1; height: calc(100vh - 90px); width: 100%; overflow: hidden; }

/* Sidebar */
.sidebar { width: 240px; background: #090b0a; border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 1.5rem 1rem; }
.sidebar-header { display: flex; align-items: center; gap: .75rem; margin-bottom: 2rem; }
.sidebar-logo { width: 28px; height: 28px; }
.sidebar-brand { font-weight: 700; font-size: 1.1rem; }
.main-nav { display: flex; flex-direction: column; gap: .25rem; flex: 1; }
.main-nav button { text-align: left; padding: .75rem 1rem; color: var(--muted); font-weight: 600; border-radius: 6px; width: 100%; }
.main-nav button:hover, .main-nav button.active { color: var(--text); background: var(--panel); }
.session-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 1rem; border-top: 1px solid var(--line); }
#sessionLabel { font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-circle { width: 32px; height: 32px; background: var(--panel-soft); border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); }

/* Content area */
.content-area { flex: 1; display: flex; flex-direction: column; background: var(--bg); overflow-y: auto; }
.content-header { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem 2rem; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: rgba(16,19,18,.9); backdrop-filter: blur(8px); }
.content-header h1 { font-size: 1.5rem; font-weight: 800; }
.search-wrap input { background: var(--panel); border: 1px solid var(--line); padding: .5rem 1rem; border-radius: 20px; font-size: .85rem; width: 220px; outline: none; }
.view-container { padding: 2rem; }

/* Songs list */
.songs-grid-layout { display: flex; flex-direction: column; gap: .5rem; }
.song-item-row { display: flex; align-items: center; justify-content: space-between; padding: .5rem 1rem; background: var(--panel); border-radius: 6px; border: 1px solid transparent; }
.song-item-row:hover { background: var(--panel-soft); border-color: var(--line); }
.song-meta-clickable { display: flex; align-items: center; gap: 1rem; flex: 1; cursor: pointer; }
.track-thumb { width: 40px; height: 40px; border-radius: 4px; object-fit: cover; }
.song-meta-clickable h4 { font-size: .9rem; font-weight: 600; }
.song-meta-clickable p { font-size: .8rem; color: var(--muted); }
.alphabet-bar{
    position:sticky;
    top:80px;
    z-index:20;

    display:flex;
    flex-wrap:wrap;
    gap:6px;

    padding:12px;

    margin-bottom:20px;

    background:#111314;

    border-radius:12px;
}

.alphabet-btn{
    width:34px;
    height:34px;

    border-radius:8px;

    background:#1b1f20;

    color:white;

    font-weight:700;
}

.alphabet-btn:hover{
    background:#94ff80;
    color:black;
}

.letter-section{
    margin-bottom:30px;
}

.letter-heading{
    font-size:28px;

    font-weight:800;

    margin-bottom:15px;

    color:#94ff80;
}

/* REVAMPED PLAYER */
.player { position: fixed; bottom: 0; left: 0; right: 0; height: 96px; background: var(--panel); border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 1rem; gap: .75rem; z-index: 900; }
.now-playing { display: flex; align-items: center; gap: .75rem; min-width: 240px; max-width: 32%; }
.now-playing img { width: 56px; height: 56px; border-radius: 6px; object-fit: cover; }
.now-playing strong { display: block; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-playing span { display: block; font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Modern control buttons */
.transport { display: flex; flex-direction: column; align-items: center; gap: .5rem; width: 36%; min-width: 420px; }
.controls { display: flex; align-items: center; gap: .5rem; }
.control-btn { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 10px; background: var(--panel-soft); border: 1px solid var(--line); color: var(--text); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03); transition: transform .08s ease, background .15s ease; }
.control-btn:hover { background: #252b28; }
.control-btn:active { transform: translateY(1px); }
.play-primary { width: 46px; height: 46px; border-radius: 12px; background: var(--green); color: #081208; border-color: #7ce96a; font-weight: 800; }
.play-primary:hover { background: var(--green-strong); }

/* Seek area */
.seek-wrap { display: flex; align-items: center; gap: .6rem; width: 100%; font-size: .8rem; color: var(--muted); }
.seek-host { position: relative; flex: 1; height: 16px; display: flex; align-items: center; }
.custom-slider.seek { width: 100%; }

/* Volume area */
.volume-wrap { display: flex; align-items: center; justify-content: flex-end; gap: .5rem; min-width: 220px; }
.volume-icon { font-size: 1rem; }
.custom-slider.vol { width: 110px; }

/* Sliders base */
.custom-slider { appearance: none; -webkit-appearance: none; background: transparent; height: 5px; border-radius: 999px; outline: none; cursor: pointer; position: relative; }
.custom-slider::-webkit-slider-runnable-track {

  background: transparent;

  height: 5px;

  border-radius: 999px;

}.custom-slider.seek::-webkit-slider-thumb,
.custom-slider.vol::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--green); border: 2px solid #0b140f; margin-top: -4.5px; }
.custom-slider::-moz-range-track { background: var(--line); height: 5px; border-radius: 999px; }
.custom-slider::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--green); border: 2px solid #0b140f; }

/* Seek tooltip */
.seek-tooltip { position: absolute; bottom: 18px; left: 0; transform: translateX(-50%); padding: 3px 6px; border-radius: 4px; background: var(--panel-soft); border: 1px solid var(--line); color: var(--text); font-size: .72rem; white-space: nowrap; pointer-events: none; }
.seek-tooltip.hidden { display: none; }

/* Utilities */
.hidden { display: none !important; }
.toast-host { position: fixed; top: 1rem; right: 1rem; z-index: 1000; display: flex; flex-direction: column; gap: .5rem; }
.toast { background: var(--panel-soft); border: 1px solid var(--line); padding: .75rem 1.25rem; border-radius: 6px; font-size: .85rem; box-shadow: var(--shadow); }
.cookie-banner { position: fixed; bottom: 110px; left: 50%; transform: translateX(-50%); background: var(--panel); border: 1px solid var(--line); padding: 1rem; border-radius: 8px; display: flex; align-items: center; gap: 1rem; z-index: 950; box-shadow: var(--shadow); }

/* Responsive */
@media (max-width: 860px) {
  .main-screen { flex-direction: column; height: calc(100vh - 110px); }
  .sidebar { width: 100%; order: 2; border-right: none; border-top: 1px solid var(--line); padding: .5rem 1rem; }
  .sidebar-header, .session-footer { display: none; }
  .main-nav { flex-direction: row; justify-content: space-around; }
  .main-nav button { text-align: center; padding: .5rem; font-size: .8rem; }
  .player { height: 120px; flex-direction: column; justify-content: center; gap: .6rem; padding: .6rem; }
  .now-playing, .transport, .volume-wrap { width: 100%; justify-content: center; text-align: center; min-width: 0; }
  .transport { min-width: 0; }
  .volume-wrap { display: none; }
}

/* Guarantee compact volume width */
#volumeSlider { width: 110px !important; }
/* ===== PLAYER V2 ===== */

:root{
 --accent:#8CF46A;
}

.player{
 background:#111314 !important;
 border-top:1px solid #262b2e !important;
 box-shadow:0 -8px 35px rgba(0,0,0,.35);
}

.now-playing img{
 width:64px !important;
 height:64px !important;
 border-radius:12px !important;
 box-shadow:0 8px 22px rgba(0,0,0,.4);
}

.control-btn{
 min-width:46px !important;
 min-height:46px !important;
 width:auto !important;
 padding:0 14px !important;

 background:#1a1d1f !important;

 border:1px solid #2c3235 !important;

 border-radius:14px !important;

 transition:.18s ease;
}

.control-btn:hover{
 background:#25292c !important;
 transform:translateY(-2px);
}

.play-primary{
 width:60px !important;
 height:60px !important;

 border-radius:18px !important;

 background:var(--accent) !important;

 color:#101312 !important;

 box-shadow:
 0 0 24px rgba(140,244,106,.25);
}

.play-primary:hover{
 background:#9eff82 !important;
}

.repeat-btn{
 width:auto !important;
}

.repeat-btn span{
 margin-left:8px;
}

.active-control{
 background:rgba(140,244,106,.12) !important;
 border-color:rgba(140,244,106,.4) !important;
 color:var(--accent) !important;
}

.toast-host{
 left:50% !important;
 right:auto !important;
 top:auto !important;
 bottom:110px !important;
 transform:translateX(-50%);
 align-items:center;
}

.toast{
 min-width:220px !important;
 text-align:center;

 font-size:1rem !important;

 padding:14px 24px !important;

 border-radius:14px !important;

 background:rgba(24,27,29,.96) !important;

 border:1px solid rgba(140,244,106,.3) !important;
}

.volume-icon{
 font-size:1.2rem !important;
}

.seek-tooltip{
 border-radius:8px !important;
 padding:5px 10px !important;
}
/* ===== DARKER SLIDERS ===== */

#seekBar,
#volumeSlider {

  pointer-events:auto !important;

  height:6px !important;

  border-radius:999px !important;

  cursor:pointer;

  appearance:none;
  -webkit-appearance:none;

}

#seekBar::-webkit-slider-runnable-track,
#volumeSlider::-webkit-slider-runnable-track {

  height:6px !important;

  border-radius:999px !important;

}

#seekBar::-webkit-slider-thumb,
#volumeSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  border: none;
  margin-top: -4px;
  transition: transform 0.1s ease;
}

#seekBar:hover::-webkit-slider-thumb,
#volumeSlider:hover::-webkit-slider-thumb {
  transform: scale(1.15);
}

.jam-options{
    display:flex;
    flex-direction:column;
    gap:12px;
    margin-top:20px;
    margin-bottom:20px;
}

button.jam-option{
    display:block !important;
    width:100% !important;

    background:#202523 !important;
    border:1px solid #303834 !important;

    border-radius:10px !important;

    padding:14px !important;

    color:white !important;

    font-size:16px !important;

    font-weight:600 !important;

    text-align:center !important;

    cursor:pointer !important;
}

button.jam-option:hover{
    background:#252b28 !important;
    border-color:#94ff80 !important;
}

button.jam-option.active{
    background:#94ff80 !important;
    color:#000 !important;
}

#joinJamButton:disabled{
    background:#444 !important;
    color:#888 !important;
    cursor:not-allowed !important;
}

/* ==========================
   JOIN JAM FORM LAYOUT
========================== */

#jamFields{

    display:flex;

    flex-direction:column;

    gap:14px;

    margin-top:20px;
}

#jamFields input{

    width:100%;

    padding:14px;

    border-radius:10px;

    background:#202523;

    border:1px solid #303834;

    color:white;

    font-size:15px;

    outline:none;

    transition:.2s;
}

#jamFields input:focus{

    border-color:#94ff80;

    box-shadow:
    0 0 0 2px rgba(148,255,128,.15);
}

#passwordStrength{

    margin-top:-4px;

    margin-bottom:4px;

    font-size:13px;

    color:#94ff80;

    font-weight:600;
}
/* JOIN JAM ERROR BOX */

.jam-error{

    margin-top:15px;

    margin-bottom:15px;

    padding:15px;

    border-radius:10px;

    background:#321818;

    border:1px solid #ff6565;

    color:white;

    font-size:14px;
}

.jam-error a{

    color:#4aa8ff;

    text-decoration:none;
}

.jam-error a:hover{

    text-decoration:underline;
}
.playlist-list{

  display:grid;

  grid-template-columns:
  repeat(
    auto-fill,
    minmax(
      220px,
      1fr
    )
  );

  gap:20px;

  margin-top:20px;

}

.playlist-card{

  background:#1a1d1f;

  border:1px solid #2a3134;

  border-radius:18px;

  padding:20px;

  cursor:pointer;

  transition:.2s;

display:flex;
flex-direction:column;
align-items:center;
text-align:center;
overflow:hidden;
}

.playlist-card:hover{

  transform:
  translateY(-4px);

  border-color:#94ff80;

}

.playlist-card h4{

  margin-bottom:10px;

}

.playlist-card p{

  color:#999;

}

.library-header{

  margin-bottom:20px;

}
.playlist-modal{

  position:fixed;
  inset:0;

  background:
  rgba(0,0,0,.7);

  display:flex;
  align-items:center;
  justify-content:center;

  z-index:9999;
}

.playlist-modal-box{

  width:400px;
  max-width:90vw;

  background:#181c1b;

  border-radius:20px;

  padding:25px;

  border:1px solid #2c3235;
}

.playlist-modal-box h2{

  margin-bottom:15px;
}

.playlist-modal-box input{

  width:100%;

  padding:14px;

  border-radius:12px;

  background:#202523;

  border:1px solid #303834;

  margin-bottom:15px;
}

.playlist-modal-actions{

  display:flex;
  justify-content:flex-end;
  gap:10px;
}
.playlist-page-header{

  display:flex;

  gap:30px;

  align-items:flex-end;

  margin-bottom:40px;

  padding-bottom:25px;

  border-bottom:1px solid #2c3235;

}

.playlist-cover{

  width:180px;
  height:180px;

  border-radius:18px;

  object-fit:cover;

  background:#1b1f20;
}
.liked-playlist-cover{

  width:120px;
  height:120px;

  border-radius:16px;

  object-fit:cover;

  margin-bottom:15px;
}
.playlist-back-btn{

  margin-bottom:20px;

  padding:12px 18px;

  border-radius:12px;

  background:#1c2124;

  color:white;

  border:1px solid #2c3235;
}

.playlist-back-btn:hover{

  border-color:#94ff80;
}

.delete-playlist-btn{

  margin-top:12px;

  padding:10px 16px;

  border-radius:10px;

  background:#a42b2b;

  color:white;
}
.playlist-picker-btn{

  width:100%;

  display:flex;

  align-items:center;

  gap:12px;

  padding:16px 18px;

  margin-bottom:14px;

  background:#1b1f20;

  border:2px solid #3d5c3a;

  border-radius:16px;

  color:white;

  font-size:16px;

  font-weight:600;

  text-align:left;

  cursor:pointer;

  transition:
    transform .18s ease,
    border-color .18s ease,
    box-shadow .18s ease,
    background .18s ease;

}

.playlist-picker-name{

  font-size:16px;

  font-weight:600;

}

.playlist-picker-btn:hover{

  border-color:#94ff80;

  background:#222827;

  box-shadow:
    0 0 12px rgba(148,255,128,.18);

  transform:translateY(-2px);

}

.playlist-picker-btn:active{

  background:#94ff80;

  color:black;

}
.playlist-picker-btn:active{

  transform:scale(.98);

}

.playlist-remove-btn{

  margin-left:auto;

  width:36px;

  height:36px;

  border:none;

  border-radius:50%;

  background:#2a2f31;

  color:#ff8a8a;

  cursor:pointer;

}

.playlist-remove-btn:hover{

  background:#402525;

}
.playlist-header-actions{

  margin-top:15px;

}

.playlist-play-btn{

  background:#95ff7a;

  color:#000;

  border:none;

  border-radius:999px;

  padding:12px 22px;

  font-weight:700;

  cursor:pointer;

}

.playlist-play-btn:hover{

  transform:scale(1.03);

}
.playlist-card-cover{

  width:100%;

  aspect-ratio:1;

  object-fit:cover;

  border-radius:12px;

  margin-bottom:12px;

}
.playlist-artwork{

  width:100%;

  aspect-ratio:1;

  overflow:hidden;

  border-radius:12px;

  margin-bottom:12px;

}

.playlist-cover-single{

  width:100%;

  height:100%;

  object-fit:cover;

  display:block;

}
.playlist-cover-split{

  width:100%;

  height:100%;

  display:grid;

  grid-template-columns:1fr 1fr;

}

.playlist-cover-split img{

  width:100%;

  height:100%;

  object-fit:cover;

  display:block;

}
.playlist-cover-three{

  width:100%;

  height:100%;

  display:grid;

  grid-template-columns:2fr 1fr;

  grid-template-rows:1fr 1fr;

}

.playlist-cover-three img{

  width:100%;

  height:100%;

  object-fit:cover;

}

.playlist-cover-three .cover-large{

  grid-row:1 / 3;

}
.playlist-cover-four{

  width:100%;

  height:100%;

  display:grid;

  grid-template-columns:1fr 1fr;

  grid-template-rows:1fr 1fr;

}

.playlist-cover-four img{

  width:100%;

  height:100%;

  object-fit:cover;

  display:block;

}
.playlist-page-artwork{

  width:260px;

  height:260px;

  border-radius:20px;

  overflow:hidden;

  flex-shrink:0;

  box-shadow:
    0 15px 40px rgba(0,0,0,.4);

}
.playlist-page-header h1{

  font-size:48px;

  font-weight:800;

  margin-bottom:12px;

}

.playlist-page-header p{

  color:#aab4ad;

  font-size:18px;

  margin-bottom:18px;

}
