:root{
  --bg:#0f0f11;
  --panel:#0b0b0c;
  --muted:#9b9b9b;
  --accent:#1db954;
  --accent2:#1db954;
  --accent-hover:#2dc964;
  --card:#121212;
  --glass: rgba(255,255,255,0.02);
  --white: #e6e6e6;
  --background-noise: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMDAiIGhlaWdodD0iMzAwIj48ZmlsdGVyIGlkPSJhIiB4PSIwIiB5PSIwIj48ZmVUdXJidWxlbmNlIGJhc2VGcmVxdWVuY3k9Ii43NSIgc3RpdGNoVGlsZXM9InN0aXRjaCIgdHlwZT0iZnJhY3RhbE5vaXNlIi8+PGZlQ29sb3JNYXRyaXggdHlwZT0ic2F0dXJhdGUiIHZhbHVlcz0iMCIvPjwvZmlsdGVyPjxwYXRoIGQ9Ik0wIDBoMzAwdjMwMEgweiIgZmlsdGVyPSJ1cmwoI2EpIiBvcGFjaXR5PSIuMDUiLz48L3N2Zz4=");
      --track: #222;       /* background around the white rail */
    --rail: #333;        /* default rail color (thin white line) */
    --accent: #fff;   /* green when hovered / active */
    --thumb-size: 14px;
    --rail-height: 6px;
}
html,body{height:100%;}
body{
  margin:0;font-family: Inter, Roboto, "Segoe UI", system-ui, -apple-system, sans-serif;
  background: linear-gradient(180deg,#0b0b0c 0%, #0f0f13 60%);
  color:var(--white);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}
svg {
    fill:var(--muted);
}
/* Layout */
.app{
  display:grid;
  grid-template-rows: 64px 1fr 96px;
  grid-template-columns: 72px 1fr 360px;
  gap:18px;
  height:100vh;
  padding:18px;
  box-sizing:border-box;
}
/* Left column (icons) */
.left{
    grid-row:1 / span 2;
    grid-column:1 / 2;
}
.left-container {
    background: rgb(20,20,20);
    display:flex;
    flex-direction:column;
    align-items:center;
    padding-top:8px;
    gap:12px;
    margin-right: 10px;
    border-radius: 12px;
}
.logo{width:40px;height:40px;border-radius:8px;background:linear-gradient(135deg,#e91e63,#9c27b0);box-shadow:0 6px 18px rgba(0,0,0,0.6)}
.icon-btn{width:48px;height:48px;border-radius:12px;display:flex;align-items:center;justify-content:center;background:transparent;border:0;color:var(--muted);cursor:pointer}
.icon-btn.active{background:linear-gradient(180deg, rgba(255,255,255,0.02), transparent);color:var(--white)}
.nav-thumb{width:48px;height:48px;border-radius:4px;background:#222;background-size:cover;box-shadow: inset 0 0 0 2px rgba(255,255,255,0.02)}
.nav-thumb:hover{background:#333;-webkit-filter: brightness(150%);}

/* Top bar spanning columns 2-3 */
header{
  grid-column:2 / 4;grid-row:1 / 2; display:flex;align-items:center;justify-content:space-between;gap:16px;padding:6px 12px;
  background:transparent;
  margin-top: -30px;
}
.search-flex{
    flex:1;
    display:flex;
    align-items:center;
    gap:12px;
    max-width:750px;
    height: 30px;
}
.search{
    flex:1;
    display:flex;
    align-items:center;
    gap:12px;
    background:#222;
    padding:10px;
    border-radius:24px;
    max-width:450px;
    height: 30px;
}
.search input{flex:1;background:transparent;border:0;color:var(--white);outline:none;font-size:14px}
.profile{display:flex;align-items:center;gap:12px}
.profile .avatar{width:36px;height:36px;border-radius:50%;background:linear-gradient(135deg,#ff9a9e,#fad0c4)}
.install{
    position: relative;
    top: -5px;
    color:var(--muted);
    font-size: 10pt;
    font-weight: bold;
    margin-left: 10px;
}
.install-container {
    position: absolute;
    right: 100px;
}

/* Main content - playlist area middle */
.playlist{
    grid-column:2 / 3;
    grid-row:2 / 3;
    display:flex;
    flex-direction:column;
    gap:18px;
    padding:18px;
    border-radius:12px;
    background: linear-gradient(180deg, rgba(80, 56, 160, 0.3), rgba(230,230,230,0.05));
    margin-top: -30px;
    margin-left: -16px;
    overflow-y: scroll;
    height: calc(100vh - 230px);
    scrollbar-width: 20px;
    scrollbar-gutter: stable;
}

/* Scrollbar track (background area) */
.playlist::-webkit-scrollbar {
  width: 14px; /* makes scrollbar wider */
}

/* Remove track background */
.playlist::-webkit-scrollbar-track {
  background: transparent;
}

/* Scrollbar thumb (the moving part) */
.playlist::-webkit-scrollbar-thumb {
  background-color: #888;  /* thumb color */
  border-radius: 0;        /* makes it fully rectangular */
  border: none;            /* removes any inset border */
}

/* Optional: thumb hover */
.playlist::-webkit-scrollbar-thumb:hover {
  background-color: #555;
}

.playlist-header{
    display:flex;
    gap:18px;
    align-items:end;
    padding-left: 18px;
    margin-left: -18px;
    margin-top: -18px;
    margin-right: -18px;
    padding-top: 18px;
    padding-bottom: 18px;
    border-radius: 12px;
}
.playlist-header-cover {
    background: linear-gradient(transparent 0,rgba(0,0,0,.5) 100%),var(--background-noise);
    display: block;
    height: 100%;
    left: 0;
    position: absolute;
    top: 0;
    width: 100%;
    padding-left: 18px;
    padding-right: 18px;
    margin-left: -18px;
    margin-top: -18px;
    margin-right: -18px;
    padding-top: 18px;
    border-radius: 12px;
    z-index: -1;
}
.playlist-header-background {
    background-color: rgb(80, 56, 160);
}
.playlist-header-noise {
    background: linear-gradient(transparent 0,rgba(0,0,0,.5) 100%),var(--background-noise);
}
.cover{width:180px;height:180px;border-radius:8px;background:linear-gradient(135deg,#6a1b9a,#1e88e5);box-shadow:0 20px 40px rgba(0,0,0,0.6);display:flex;align-items:end;justify-content:flex-start;padding:12px;color:#fff;font-size:13px}
.liked{width:180px;height:180px;border-radius:8px;box-shadow:0 20px 40px rgba(0,0,0,0.6);display:flex;align-items:end;justify-content:flex-start;font-size:13px}
.meta{display:flex;flex-direction:column;justify-content:flex-end;gap:8px}
.meta .type{font-size:14px;color:var(--white);}
.meta h1{margin:0;font-size:60pt;letter-spacing:-1px}
.meta .by{color:var(--muted)}
.controls{display:flex;gap:12px;align-items:center;margin-top:8px}
.btn-big{
    width:56px;
    height:56px;
    border-radius:50%;
    background:var(--accent2);
    display:inline-grid;
    place-items:center;
    color:#000;
    font-weight:700;
    border:0;
    cursor:pointer;
    transition: all 0.25s ease;
    transform: scale(1);
}
.btn-small{
    height:36px;
    padding:6px 12px;
    border-radius:20px;
    background:transparent;
    color:var(--white);
    cursor:pointer;
    transition: all 0.25s ease;
    transform: scale(1);
}
.btn-smaller{
    height:16px;
    background:transparent;
    color:var(--white);
    cursor:pointer;
    transition: all 0.25s ease;
    transform: scale(1);
}
.btn-smaller:hover, .btn-small:hover, .btn-big:hover{
    fill:#fff;
    cursor:pointer;
    transform: scale(1.1) perspective(1px);
}
.btn-big:hover {
    fill:#fff;
    cursor:pointer;
    transform: scale(1.1) perspective(1px);
    background:var(--accent-hover);
}

/* Song list */
.list{
  background:transparent;
  border-radius:8px;
  padding:6px 0;
  margin-top:-32px;
  flex:1;
}
table{width:100%;border-collapse:collapse}
thead svg{height:100%;width:100%;}
thead th{font-size:16px;color:var(--muted);fill:var(--muted);text-align:left;padding:12px 8px;font-weight: unset;}
tbody tr{height:64px;border-radius:6px}
tbody tr:hover{background:rgba(255,255,255,0.02)}
td{padding:8px;color:var(--white);vertical-align:middle}
.song-title{display:flex;gap:12px;align-items:center}
.thumb{width:48px;height:48px;border-radius:6px;background:#0d0d0d;flex-shrink:0}
.duration{text-align:right;color:var(--muted)}
.table-hr {
    top: 50px;
    position: relative;
    height: 1px;
    border: none;
    background-color: #33333387;
}

.track-selected {
    background: rgba(255,255,255,0.1);
}

/* Right preview */
.preview{grid-column:3 / 4;grid-row:2 / 3;border-radius:12px;padding:18px;background:linear-gradient(180deg, rgba(255,255,255,0.015), transparent);display:flex;flex-direction:column;justify-content:space-between;margin-top:-30px;margin-left: -8px;
    height: calc(100vh - 230px);}
.preview .art{height:50vh;border-radius:8px;display:flex;align-items:end;margin-right:16px;max-width:100%;filter: blur(2px);}
.preview .art h2{margin:0}
.preview .info{margin-top:12px;color:var(--muted)}

/* Bottom player */
footer {
    background-color: #000;
    padding-left: 16px;
    margin-left: -16px;
    margin-right: -16px;
    padding-right: 16px;
    margin-bottom: -5px;
}
footer.player{
    grid-column:1 / 4;
    grid-row:3 / 4;
    display:flex;
    align-items:center;
    gap:12px;
    padding:12px 18px;
    background:linear-gradient(0deg, rgba(0,0,0,0.4), rgba(0,0,0,0.2));
    border-top:1px solid rgba(255,255,255,0.03)}
.track-info{display:flex;gap:12px;align-items:center;width:320px}
.track-info .small-thumb{width:56px;height:56px;border-radius:6px;}
.controls-center{flex:1;display:flex;flex-direction:column;gap:8px;align-items:center}
.transport{display:flex;gap:18px;align-items:center}
.transport button{background:transparent;border:0;color:var(--white);font-size:18px;cursor:pointer}
.progress{display:flex;gap:12px;align-items:center;width:60%;max-width:800px}
.progress input[type=range]{flex:1}
.right-controls{display:flex;gap:8px;align-items:center}

/* small helpers */
.muted{color:var(--muted);font-size:13px}
a{color:inherit}

/* responsive tweak */
@media (max-width:1000px){
  .app{grid-template-columns:72px 1fr;grid-template-rows:64px 1fr 96px}
  .left{grid-row:1 / span 3}
  header{grid-column:2 / 3}
  .preview{display:none}
  .app{padding:12px}
  .install-container{display: none;}
}
@media (max-width:1100px){
  .search-flex { margin-left: -100px; }
}
@media (min-width:1300px){
  .search-flex { margin-left: 100px; }
}

  .range-wrap{
    width: 100%;
    padding: 18px;
  }

  /* Container to detect hover/focus to show accent & thumb */
  .range{
    position: relative;
  }

  /* remove default appearance */
  input[type="range"]{
    -webkit-appearance: none;
    appearance: none;
    width:100%;
    height: var(--rail-height);
    margin: 0;
    background: transparent;
    cursor: pointer;
    background: var(--accent);
    border-radius: 999px;
    transition: background 200ms linear;
    outline: none;
  }

  /* WebKit track sizing (keeps track clickable) */
  input[type="range"]::-webkit-slider-runnable-track{
    height: var(--rail-height);
    -webkit-appearance: none;
    appearance: none;
  }

  /* WebKit thumb (the round handle) */
  input[type="range"]::-webkit-slider-thumb{
    -webkit-appearance: none;
    appearance: none;
    width: var(--thumb-size);
    height: var(--thumb-size);
    border-radius: 50%;
    background: white;
    box-shadow: 0 0 0 4px rgba(255,255,255,0.03), 0 2px 8px rgba(0,0,0,0.6);
    transform: translateY(calc((var(--rail-height) - var(--thumb-size)) / 2));
    transition: transform 160ms ease, opacity 160ms ease, box-shadow 160ms ease;
    opacity: 0; /* hidden by default */
  }

  /* Show thumb & color when hovered on container or when input is focused */
  .range:hover input[type="range"]::-webkit-slider-thumb,
  .range:focus-within input[type="range"]::-webkit-slider-thumb{
    opacity: 1;
    transform: translateY(0) scale(1.05);
    box-shadow: 0 6px 12px rgba(0,0,0,0.6);
  }

  /* Firefox: style track and progress separately */
  input[type="range"]::-moz-range-track{
    background: var(--rail);
    height: var(--rail-height);
    border-radius: 999px;
  }
  input[type="range"]::-moz-range-progress{
    background: var(--accent);
    height: var(--rail-height);
    border-radius: 999px;
  }
  input[type="range"]::-moz-range-thumb{
    width: var(--thumb-size);
    height: var(--thumb-size);
    border-radius: 50%;
    background: white;
    border: none;
    transition: opacity 160ms ease, transform 160ms ease;
    opacity: 0;
  }
  .range:hover input[type="range"]::-moz-range-thumb,
  .range:focus-within input[type="range"]::-moz-range-thumb{
    opacity: 1;
    transform: scale(1.05);
  }

  /* focus visible outline for accessibility */
  input[type="range"]:focus{
    box-shadow: 0 0 0 6px rgba(46,204,113,0.08);
    border-radius: 999px;
  }

  /* small value label for demo */
  .value {
    margin-top: 8px;
    font-size: 13px;
    color: #ddd;
    text-align:right;
  }
  
.range:hover input[type="range"],
.range:focus-within input[type="range"] {
  --accent: #2ecc71;
}