:root{
  --bg:#0b0f16;
  --panel:#0f1624;
  --panel2:#101a2c;
  --text:#e9eefb;
  --muted:#9aa7c7;
  --accent:#7aa7ff;
  --border:rgba(255,255,255,.08);
  --shadow: 0 20px 60px rgba(0,0,0,.35);
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(900px 500px at 30% -10%, rgba(122,167,255,.25), transparent 60%),
              radial-gradient(800px 500px at 90% 30%, rgba(180,122,255,.16), transparent 60%),
              var(--bg);
  color:var(--text);
}

.app{
  height:100%;
  display:grid;
  grid-template-columns: 280px 1fr;
}

.sidebar{
  border-right:1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,.03), transparent 45%);
  padding:18px;
}

.brand{
  font-weight:800;
  letter-spacing:.3px;
  margin-bottom:14px;
}

.section-title{
  color:var(--muted);
  font-size:12px;
  text-transform: uppercase;
  letter-spacing: .12em;
  margin:12px 0;
}

.list{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.item{
  padding:10px 12px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.03);
  border-radius:14px;
  cursor:pointer;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
  user-select:none;
}

.item:hover{
  transform: translateY(-1px);
  border-color: rgba(122,167,255,.35);
  background: rgba(255,255,255,.05);
}

.item.active{
  border-color: rgba(122,167,255,.55);
  background: rgba(122,167,255,.10);
}

.item .title{ font-weight:650; }
.item .sub{ color:var(--muted); font-size:12px; margin-top:2px; }

.main{
  display:flex;
  flex-direction:column;
  min-width:0;
}

.header{
  padding: 24px 18px 10px 18px;
  display:flex;
  flex-direction: column;
  align-items: center;   /* центрируем */
  text-align: center;
  gap: 6px;
}

#badge{
  display: none !important;
}

.now-title{   
  font-size: 26px;
  font-weight: 800;
  line-height: 1.2;
  text-shadow: 0 4px 20px rgba(122,167,255,.35);
  font-size: clamp(22px, 4vw, 32px);
 }
.now-meta{ 
  font-size: 15px;
  color: var(--muted);
 }

.content{
  display:grid;
  grid-template-columns: 0.9fr 1.2fr;
  gap:16px;
  padding: 12px 18px;
  min-height:0;

  flex: 1 1 auto;
  overflow: hidden;
}

.tracks{
  min-width:0;
  min-height:0;
  display:flex;
  flex-direction:column;
}

#tracks{
  overflow:auto;
  padding-right:6px;
}

.visual{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:0;
}

.dvd-case{
  width: min(720px, 100%);
  aspect-ratio: 3/4;
  position: relative;
  overflow: hidden;

  /* убираем “рисованный контейнер” */
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;

  transform: scale(var(--pulse, 1));
  transition: transform 60ms linear;
  will-change: transform;
}

.case-glass{
  position:absolute;
  inset:-40% -40%;
  background: linear-gradient(120deg,
    transparent 30%,
    rgba(255,255,255,.10) 45%,
    rgba(255,255,255,.02) 55%,
    transparent 70%);
  transform: rotate(18deg);
  pointer-events:none;
}

.dvd-overlay{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:contain;   /* важно: чтобы PNG не обрезался */
  pointer-events:none;
  z-index: 2;
}
.case-inner{ position: relative; }
.disc-wrap{
  position:absolute;
  left:50%;
  top:50%;
  transform: translate(-50%, -50%);
  width: 91%;
  aspect-ratio: 1/1;
  z-index: 1;
  display:flex;
  align-items:center;
  justify-content:center;
}
.dvd-overlay{ z-index: 2; }

.visual-caption{
  color:var(--muted);
  font-size:12px;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.disc{
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
}


.cover{
  position: absolute;
  inset: 2.06%;
  width: 96%;
  height: 96%;
  border-radius: 50%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.05);
  border: 1px solid rgba(255,255,255,.18);
  transform: translateZ(0);

  /* настоящая дырка по центру */
  --hole-size: 21%;

  -webkit-mask-image:
    radial-gradient(
      circle at center,
      transparent 0,
      transparent calc(var(--hole-size) / 2),
      #000 calc(var(--hole-size) / 2 + 1px)
    );
  mask-image:
    radial-gradient(
      circle at center,
      transparent 0,
      transparent calc(var(--hole-size) / 2),
      #000 calc(var(--hole-size) / 2 + 1px)
    );

  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

.disc-hole{
  display: none;
}
.disc-ring{
  position:absolute;
  left:50%;
  top:50%;
  width:22%;
  height:22%;
  transform:translate(-50%,-50%);
  border-radius:50%;
  border:1px dashed rgba(255,255,255,.22);
  opacity:.6;
}

.controls{
  padding: 12px 18px 18px 18px;
  display:flex;
  align-items:center;
  gap:10px;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.01));
}

.btn{
  border:1px solid var(--border);
  background: rgba(255,255,255,.03);
  color:var(--text);
  padding:10px 12px;
  border-radius:14px;
  cursor:pointer;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
  min-width:48px;
}
.btn:hover{
  transform: translateY(-1px);
  border-color: rgba(122,167,255,.35);
  background: rgba(255,255,255,.05);
}
.btn.primary{
  background: rgba(122,167,255,.16);
  border-color: rgba(122,167,255,.55);
}

.progress{
  flex:1;
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}

.time{
  color:var(--muted);
  font-size:12px;
  width:44px;
  text-align:center;
}

input[type="range"]{
  width:100%;
  accent-color: var(--accent);
}

.volume{
  width:160px;
  display:flex;
  align-items:center;
  gap:8px;
}

.modal{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 14px;
}

.modal.hidden{ display:none; }

.modal-card{
  width: min(720px, 100%);
  max-height: min(88vh, 900px);
  overflow-y: auto;
  background: rgba(18,24,36,.96);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 20px 80px rgba(0,0,0,.55);
}

.modal-head{
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(18,24,36,.96);
  padding-bottom: 10px;
}

.modal-title{
  font-weight: 800;
  font-size: 18px;
}

.search-input{
  width: 100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,.2);
  color: var(--text);
  outline: none;
  margin-bottom: 10px;
}

.search-results{
  max-height: min(60vh, 520px);
  overflow: auto;
  display:flex;
  flex-direction: column;
  gap: 8px;
}

.search-row{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255,255,255,.02);
}

.search-row .left{
  display:flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.search-row .t{
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-row .a{
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn.mini{
  padding: 8px 10px;
  border-radius: 10px;
}




@media (max-width: 980px){

  html, body{
    height: 100%;
  }

  body{
    overflow: hidden;
  }

  .app{
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
    height: 100dvh;
  }

/* SIDEBAR: фикс по высоте, прокрутка только списка плейлистов */
.sidebar{
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden; /* sidebar сам не скроллится */
}

  /* Плейлисты горизонтально */
  #playlists.list{
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 10px;
    -webkit-overflow-scrolling: touch;
  }

  #playlists .item{
    min-width: 200px;
    flex: 0 0 auto;
  }

  .main{
    height: 100%;
  overflow: hidden;
  }

  .header{
    padding: 12px;
  }

  /* Контент: треки + визуал */
  .content{
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 10px 12px;
    overflow: hidden;      /* ВАЖНО */
    min-height: 0;
  }

  /* Треки скроллятся */
  .tracks{
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

 #tracks{
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

  /* Визуал стоит отдельно */
  .visual{
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
  }

  .dvd-case{
    width: min(380px, 100%);
    margin: 0 auto;
  }

  /* === Контролы === */

  .volume{
    display: none;   /* громкость не нужна на мобиле */
  }

  .controls{
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px;
    border-top: 1px solid var(--border);
  }

  /* Прогресс отдельной строкой */
  .progress{
    width: 100%;
  }

  .buttons{
  display: flex;
  justify-content: center;   /* центр по горизонтали */
  align-items: center;
  gap: 14px;
}

.buttons .btn{
  flex: 0 0 auto;            /* чтобы не растягивались */
  min-width: 56px;           /* чуть крупнее */
}

#playBtn{
  transform: scale(1.2);
}

}



/* ===== DESKTOP SCROLL FIX (должно стоять В САМОМ КОНЦЕ) ===== */

/* убираем общий скролл страницы */
html, body { height: 100%; overflow: hidden; }

/* грид на весь экран */
.app { height: 100vh; overflow: hidden; }

/* ВАЖНО: sidebar делаем flex-колонкой, иначе #playlists flex не работает */
.sidebar{
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

/* скролл ТОЛЬКО внутри списка плейлистов */
#playlists{
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

/* main фикс по высоте */
.main{ height: 100%; overflow: hidden; }

/* grid-контент должен уметь сжиматься */
.content{ min-height: 0; overflow: hidden; }

/* треки: заголовок сверху, список скроллится */
.tracks{ min-height: 0; }
#tracks{ min-height: 0; overflow: hidden; }

.tracks-list{
  min-height: 0;
  overflow: auto;
  direction: rtl; /* скролл слева */
}
.tracks-list > *{ direction: ltr; }

/* контролы всегда видны */
.controls{ flex: 0 0 auto; }


/* ===== Pretty scrollbars (Chrome/Edge/Safari + Firefox) ===== */

/* Firefox */
*{
  scrollbar-width: thin;
  scrollbar-color: rgba(120, 210, 255, .85) rgba(255,255,255,.06);
}

/* WebKit (Chrome/Edge/Safari) */
*::-webkit-scrollbar{
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track{
  background: rgba(255,255,255,.06); /* "серенькая" как фон секций */
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb{
  background: linear-gradient(
    180deg,
    rgba(140, 230, 255, .95),
    rgba(80, 190, 255, .85)
  ); /* голубенький как ползунок */
  border-radius: 999px;
  border: 2px solid rgba(18, 24, 36, .6); /* чтобы врезался в фон */
}

*::-webkit-scrollbar-thumb:hover{
  background: linear-gradient(
    180deg,
    rgba(170, 245, 255, 1),
    rgba(95, 205, 255, .95)
  );
}

*::-webkit-scrollbar-corner{
  background: transparent;
}




/* ===== Brand row + logout in sidebar ===== */
.brand-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  margin-bottom:14px;
}

.brand-row .brand{
  margin:0; /* вместо margin-bottom */
}

.logout-btn{
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.9);
  cursor: pointer;
  font-weight: 650;
  font-size: 13px;
  transition: all .2s ease;
  white-space: nowrap;
  margin-left: 12px;
}

.logout-btn:hover{
  background: rgba(120,210,255,.15);
  border-color: rgba(120,210,255,.4);
}

/* ===== Header now-playing full width ===== */
.header{
  align-items: stretch;   /* было center — теперь элементы могут быть на всю ширину */
  text-align: left;       /* чтобы marquee не центрировался странно */
}

.now-wrap{
  width: 100%;
}



/* ===== Now playing (static, 2 lines, soft fade edges) ===== */

#nowTitle{
  width: 100%;
}

/* общий стиль двух строк */
.nowline{
  white-space: nowrap;
  overflow: hidden;

  /* мягкое затухание по краям */
  -webkit-mask-image: linear-gradient(to right, transparent 0, black 7%, black 93%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, black 7%, black 93%, transparent 100%);
}

/* верхняя строка — крупная */
.nowline-top{
  font-weight: 900;
  font-size: clamp(28px, 4vw, 52px);
  letter-spacing: .02em;
  text-shadow: 0 6px 26px rgba(122,167,255,.30);
  line-height: 1.15;
}

/* нижняя строка — меньше и “тише” */
.nowline-sub{
  margin-top: 4px;
  font-weight: 700;
  font-size: clamp(16px, 2vw, 24px);
  color: var(--muted);
  letter-spacing: .06em;
  line-height: 1.1;
}

/* старую nowMeta можно скрыть */
#nowMeta{ display:none; }








/* ===== ADMIN PAGE: normal scrolling ===== */

body.admin-page{
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

body.admin-page .app{
  height: auto !important;
  min-height: 100vh;
  overflow: visible !important;
}

body.admin-page .main{
  height: auto !important;
  overflow: visible !important;
}

body.admin-page .content{
  overflow: visible !important;
  min-height: auto !important;
  display: block;
  max-width: 980px;
  margin: 0 auto;
}

body.admin-page .tracks{
  min-height: auto !important;
  overflow: visible !important;
}

body.admin-page .search-results{
  max-height: none;
}

body.admin-page .adminStats{
  margin: 18px auto 32px auto;
  max-width: 980px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.03);
  border-radius: 16px;
  padding: 14px;
  overflow: auto;
}



#loginError{
  margin-top:10px;
  color:#ff6b6b;
  font-weight:600;
  text-align:center;
}



.btn.active{
  background: rgba(122,167,255,.16);
  border-color: rgba(122,167,255,.55);
  box-shadow: 0 0 0 1px rgba(122,167,255,.18) inset,
              0 6px 20px rgba(122,167,255,.18);
}



/* ===== FULLSCREEN ===== */

.fs-player{
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #05070c;
  overflow: hidden;
}

.fs-player.hidden{
  display: none;
}

.fs-bg{
  position: absolute;
  inset: 0;
  background: center center / cover no-repeat;
  filter: blur(18px) brightness(.45);
  transform: scale(1.08);
}

.fs-bg video,
.fs-bg img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fs-close{
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 3;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.35);
  color: #fff;
  border-radius: 14px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 18px;
}

.fs-center{
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 32px;
}

.fs-case-wrap{
  width: min(72vh, 76vw, 720px);
}

.fs-case{
  width: 100%;
}

.fs-now{
  text-align: center;
  max-width: min(900px, 90vw);
}

.fs-now-title{
  font-size: clamp(28px, 4vw, 54px);
  font-weight: 900;
  text-shadow: 0 8px 28px rgba(0,0,0,.45);
}

.fs-now-artist{
  margin-top: 6px;
  font-size: clamp(15px, 1.8vw, 24px);
  color: rgba(255,255,255,.82);
}

.fs-controls{
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
}

.fs-split{
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
}

.fs-lyrics-pane{
  width: 50%;
  max-width: 700px;
  height: 70vh;
  overflow: auto;
  padding: 24px 18px;
  direction: rtl;   /* скролл слева */
}

.fs-lyrics-pane > *{
  direction: ltr;   /* сам текст нормальный */
}

.fs-lyrics-pane.hidden{
  display: none;
}

.fs-visual-pane{
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.fs-player.lyrics-on .fs-visual-pane{
  width: 50%;
}

.fs-player.lyrics-on .fs-case-wrap{
  width: min(56vh, 44vw, 560px);
}

.fs-lyrics-list{
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fs-lyric-line{
  font-size: clamp(18px, 2vw, 28px);
  line-height: 1.35;
  color: rgba(255,255,255,.46);
  transition: color .18s ease, transform .18s ease;
}

.fs-lyric-line.active{
  color: #fff;
  transform: scale(1.02);
  text-shadow: 0 8px 24px rgba(0,0,0,.35);
}

.fs-lyric-line.past{
  color: rgba(255,255,255,.72);
}

.fs-bottom-bar{
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  padding: 0 14px 10px 14px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.fs-seek{
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  opacity: .72;
  accent-color: var(--accent);
}

.fs-volume{
  width: 170px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.fs-vol{
  width: 100%;
  margin: 0;
  accent-color: var(--accent);
}

/* ===== drop zone ===== */

.bg-drop-zone{
  border: 1px dashed rgba(122,167,255,.45);
  border-radius: 14px;
  padding: 18px;
  text-align: center;
  color: var(--muted);
  background: rgba(122,167,255,.05);
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}

.bg-drop-zone:hover{
  background: rgba(122,167,255,.08);
  border-color: rgba(122,167,255,.7);
}

.bg-drop-zone.dragover{
  background: rgba(122,167,255,.14);
  border-color: rgba(122,167,255,.95);
  transform: scale(1.01);
}


.sidebar-top-actions{
  flex: 0 0 auto;
  margin-bottom: 10px;
}

.special-entry{
  background: rgba(122,167,255,.06);
}

.special-entry:hover{
  background: rgba(122,167,255,.10);
}

.pl-public-badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  margin-top:4px;
  color: var(--muted);
  font-size: 12px;
}

.rec-owner{
  color: var(--muted);
  font-size: 13px;
}

.rec-actions{
  display:flex;
  gap:8px;
  flex-shrink:0;
}


.radio-mode-card{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:12px;
  border:1px solid var(--border);
  border-radius:14px;
  background:rgba(255,255,255,.03);
}

.radio-mode-card:hover{
  border-color: rgba(122,167,255,.35);
  background: rgba(255,255,255,.05);
}

.radio-mode-meta{
  color: var(--muted);
  font-size: 13px;
}

.radio-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width: 28px;
  height: 28px;
  border-radius: 999px;
  font-size: 12px;
  border:1px solid rgba(122,167,255,.35);
  background: rgba(122,167,255,.10);
  color: var(--text);
}


.playlist-public-toggle{
  display:flex;
  align-items:center;
  gap:10px;
  margin: 6px 0 4px 0;
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  user-select: none;
}

.playlist-public-toggle input{
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

.playlist-public-hint{
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  margin-bottom: 8px;
}

.feedback-wrap{
  position: relative;
  display: none;
}

.feedback-wrap.visible{
  display: inline-flex;
}

.feedback-menu{
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  min-width: 190px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(18,24,36,.98);
  box-shadow: 0 20px 50px rgba(0,0,0,.45);
  z-index: 50;
}

.feedback-menu.hidden{
  display: none;
}

.feedback-action{
  border: 1px solid var(--border);
  background: rgba(255,255,255,.03);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 12px;
  text-align: left;
  cursor: pointer;
  transition: .15s ease;
}

.feedback-action:hover{
  border-color: rgba(122,167,255,.35);
  background: rgba(255,255,255,.06);
}

.feedback-action.active{
  background: rgba(122,167,255,.14);
  border-color: rgba(122,167,255,.55);
}

.feedback-action.danger.active{
  background: rgba(255,90,90,.16);
  border-color: rgba(255,90,90,.45);
}

.feedback-action.danger:hover{
  border-color: rgba(255,90,90,.35);
}

.seek-wrap,
.fs-seek-wrap{
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
}

.seek-buffered{
  position: absolute;
  left: 0;
  right: 0;
  height: 6px;
  border-radius: 999px;
  background:
    linear-gradient(
      to right,
      rgba(255,255,255,.22) 0%,
      rgba(255,255,255,.22) var(--buffered, 0%),
      transparent var(--buffered, 0%),
      transparent 100%
    );
  pointer-events: none;
  z-index: 1;
}

.seek-wrap input[type="range"],
.fs-seek-wrap input[type="range"]{
  position: relative;
  z-index: 2;
  background: transparent;
}

/* чтобы buffered красиво ложился именно на трек */
#seek,
#fsSeek{
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,.10);
  outline: none;
}

#seek::-webkit-slider-runnable-track,
#fsSeek::-webkit-slider-runnable-track{
  height: 6px;
  border-radius: 999px;
  background: transparent;
}

#seek::-webkit-slider-thumb,
#fsSeek::-webkit-slider-thumb{
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  margin-top: -4px;
  box-shadow: 0 0 0 2px rgba(255,255,255,.12);
  cursor: pointer;
}

#seek::-moz-range-track,
#fsSeek::-moz-range-track{
  height: 6px;
  border-radius: 999px;
  background: transparent;
}

#seek::-moz-range-thumb,
#fsSeek::-moz-range-thumb{
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  cursor: pointer;
}


.playlist-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.playlist-meta{
  min-width:0;
  flex:1 1 auto;
}

.playlist-actions{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  justify-content:center;
}

/* ===== MOBILE FIX: ДОБАВИТЬ В САМЫЙ КОНЕЦ styles.css ===== */
@media (max-width: 980px) {
  html, body {
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
  }

  body:not(.admin-page) .app {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }

  body:not(.admin-page) .sidebar {
    height: auto;
    overflow: visible;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 14px 12px 10px;
  }

  body:not(.admin-page) .brand-row {
    gap: 12px;
    margin-bottom: 10px;
  }

  body:not(.admin-page) .brand {
    font-size: clamp(18px, 6vw, 32px);
  }

  body:not(.admin-page) .logout-btn {
    padding: 7px 10px;
    font-size: 12px;
    margin-left: 0;
  }

  body:not(.admin-page) .sidebar-top-actions {
    margin-bottom: 8px;
  }

  body:not(.admin-page) #playlists {
    flex: 0 0 auto;
    overflow-x: auto;
    overflow-y: hidden;
    padding-right: 0;
    padding-bottom: 2px;
  }

  body:not(.admin-page) #playlists.list {
    flex-direction: row;
    gap: 10px;
  }

  body:not(.admin-page) #playlists .item {
    min-width: 210px;
    max-width: 78vw;
    flex: 0 0 auto;
  }

  body:not(.admin-page) .main {
    height: auto;
    min-height: 0;
    overflow: visible;
    display: flex;
    flex-direction: column;
  }

  body:not(.admin-page) .header {
    padding: 12px 12px 6px;
  }

  body:not(.admin-page) .nowline-top {
    font-size: clamp(20px, 7vw, 30px);
  }

  body:not(.admin-page) .nowline-sub {
    font-size: clamp(13px, 4.3vw, 18px);
  }

  body:not(.admin-page) .content {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 8px 12px 12px;
    overflow: visible;
    min-height: 0;
  }

  /* На телефоне сначала визуал, потом список треков */
  body:not(.admin-page) .visual {
    order: 1;
    justify-content: center;
    padding-top: 4px;
    padding-bottom: 4px;
  }

  body:not(.admin-page) .tracks {
    order: 2;
  }

  body:not(.admin-page) .tracks,
  body:not(.admin-page) #tracks,
  body:not(.admin-page) .tracks-list {
    min-height: 0;
    overflow: visible;
  }

  body:not(.admin-page) .tracks-list {
    direction: ltr;
    padding-left: 0;
    gap: 8px;
  }

  body:not(.admin-page) .tracks-head {
    padding: 0 0 4px;
  }

  body:not(.admin-page) .tracks-title {
    font-size: 15px;
  }

  body:not(.admin-page) .tracks .item {
    padding: 12px;
    border-radius: 12px;
  }

  /* Уменьшаем DVD overlay, чтобы не лез на интерфейс */
  body:not(.admin-page) .dvd-case {
    width: min(240px, 62vw);
    max-width: 240px;
  }

  /* Нижняя панель всегда видна */
  body:not(.admin-page) .controls {
    position: sticky;
    bottom: 0;
    z-index: 30;
    gap: 10px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: rgba(11,15,22,.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255,255,255,.08);
  }

  body:not(.admin-page) .buttons {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
  }

  body:not(.admin-page) .buttons .btn {
    width: 100%;
    min-width: 0;
    padding: 10px 0;
  }

  body:not(.admin-page) .feedback-wrap {
    width: 100%;
  }

  body:not(.admin-page) .feedback-wrap.visible {
    display: block;
  }

  body:not(.admin-page) .feedback-wrap > .btn {
    width: 100%;
    min-width: 0;
    padding: 10px 0;
  }

  body:not(.admin-page) #playBtn {
    transform: none;
  }

  body:not(.admin-page) .progress {
    width: 100%;
    gap: 8px;
  }

  body:not(.admin-page) .time {
    width: 38px;
    font-size: 11px;
  }

  body:not(.admin-page) .volume {
    display: none;
  }
}

@media (max-width: 420px) {
  body:not(.admin-page) .dvd-case {
    width: min(210px, 58vw);
    max-width: 210px;
  }
}


/* ===== HARD MOBILE DISC SHRINK ===== */
@media (max-width: 980px) {
  body:not(.admin-page) .content {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    padding: 10px 12px 8px !important;
    overflow: visible !important;
  }

  body:not(.admin-page) .tracks {
    order: 1 !important;
    min-height: 0 !important;
  }

  body:not(.admin-page) .visual {
    order: 2 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    min-height: auto !important;
    padding: 4px 0 0 !important;
    overflow: visible !important;
  }

  /* DVD-блок делаем реально маленьким */
  body:not(.admin-page) .dvd-case {
    width: clamp(110px, 30vw, 140px) !important;
    max-width: 140px !important;
    margin: 0 auto !important;
  }

  body:not(.admin-page) .disc-wrap {
    width: 91% !important;
  }

  body:not(.admin-page) .dvd-overlay,
  body:not(.admin-page) .cover,
  body:not(.admin-page) .disc {
    width: 100% !important;
    height: 100% !important;
  }

  body:not(.admin-page) #tracks,
  body:not(.admin-page) .tracks-list {
    overflow: visible !important;
    min-height: 0 !important;
  }

  body:not(.admin-page) .tracks-list {
    direction: ltr !important;
    gap: 8px !important;
  }

  body:not(.admin-page) .tracks .item {
    padding: 12px !important;
  }

  body:not(.admin-page) .controls {
    position: sticky !important;
    bottom: 0 !important;
    z-index: 50 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom)) !important;
    background: rgba(11,15,22,.96) !important;
    border-top: 1px solid rgba(255,255,255,.08) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  body:not(.admin-page) .buttons {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  body:not(.admin-page) .buttons .btn {
    width: 100% !important;
    min-width: 0 !important;
    padding: 10px 0 !important;
  }

  body:not(.admin-page) .progress {
    width: 100% !important;
  }

  body:not(.admin-page) .volume {
    display: none !important;
  }
}

/* ===== MOBILE: CENTER CONTROL BUTTONS ===== */
@media (max-width: 980px) {
  body:not(.admin-page) .buttons {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
  }

  body:not(.admin-page) .buttons .btn {
    width: auto !important;
    min-width: 52px !important;
    flex: 0 0 auto !important;
    padding: 10px 12px !important;
  }

  body:not(.admin-page) .feedback-wrap {
    width: auto !important;
    flex: 0 0 auto !important;
  }

  body:not(.admin-page) .feedback-wrap.visible {
    display: inline-flex !important;
  }

  body:not(.admin-page) .feedback-wrap > .btn {
    width: auto !important;
    min-width: 52px !important;
    padding: 10px 12px !important;
  }
}