:root {
  --bg-main: #121212;
  --bg-surface: #181818;
  --bg-elevated: #242424;
  --bg-hover: #2a2a2a;
  --accent: #10b981; /* Энергичный изумрудный акцент Spotify/Yandex */
  --accent-glow: rgba(16, 185, 129, 0.35);
  --text-primary: #ffffff;
  --text-secondary: #b3b3b3;
  --text-muted: #727272;
  --border: rgba(255, 255, 255, 0.08);
  --border-light: rgba(255, 255, 255, 0.14);
  --mini-player-height: 64px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

input, button {
  font-family: inherit;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font);
}

/* ======================================================== */
/* 1. ПОЛНОЭКРАННЫЙ ПЛЕЕР (FULL PLAYER SCREEN)               */
/* ======================================================== */
.full-player {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: radial-gradient(circle at 50% 12%, #1f2d25 0%, var(--bg-main) 70%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100vh;
  height: 100dvh;
  min-height: 100dvh;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 20px 0 20px;
  box-sizing: border-box;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.25s ease;
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Состояние, когда открыта библиотека (Full Player уезжает вниз) */
.full-player.minimized {
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
}

/* Визуальный индикатор свайпа вниз (Swipe Handle) */
.swipe-indicator-bar {
  width: 40px;
  height: 4px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 2px;
  margin: 0 auto 8px;
  flex-shrink: 0;
  cursor: grab;
}

/* Верхняя панель Full Player (ТОП-НАВИГАЦИЯ) */
.player-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 40px;
  flex-shrink: 0;
}

.top-nav-btn {
  background: transparent;
  border: none;
  color: var(--text-primary);
  opacity: 0.65;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 50%;
  padding: 0;
  transition: opacity 0.2s ease, transform 0.15s ease, background-color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.top-nav-btn svg {
  width: 24px;
  height: 24px;
}

.top-nav-btn:active {
  transform: scale(0.9);
  opacity: 1;
  background: rgba(255, 255, 255, 0.08);
}

.player-top-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 65%;
  overflow: hidden;
  text-align: center;
}

.player-top-subtitle {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  opacity: 0.6;
  color: var(--text-primary);
  text-transform: uppercase;
}

.player-top-title {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  margin-top: 2px;
}

/* 1. ЦЕНТРАЛЬНАЯ ЧАСТЬ: ОБЛОЖКА (.album-art-container) */
.album-art-container,
.player-cover-container {
  width: 80vw;
  max-width: 330px;
  aspect-ratio: 1 / 1;
  border-radius: 20px;
  margin: auto auto;
  flex-shrink: 0;
  touch-action: pan-y;
  transition: transform 0.2s ease, opacity 0.2s ease;
  position: relative;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.album-art-container img,
.player-cover-container img,
.player-cover-img {
  width: 100%;
  height: 100%;
  border-radius: 20px;
  object-fit: cover;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
  display: block;
}

.album-art-container.playing,
.player-cover-container.playing {
  transform: scale(1.02);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.8), 0 0 32px rgba(255, 230, 0, 0.15);
}

/* 2. НИЖНЯЯ ЧАСТЬ: ЕДИНЫЙ КОНТЕЙНЕР УПРАВЛЕНИЯ */
.player-bottom-group {
  margin-top: auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  flex-shrink: 0;
}

/* Блок названия трека и действий (.track-info-row) */
.track-info-row,
.player-track-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding: 0 4px;
  gap: 12px;
  width: 100%;
}

.player-titles {
  min-width: 0;
  flex: 1;
}

.player-title {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.player-artist {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 3px;
}

.player-quick-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.quick-action-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-primary);
  opacity: 0.7;
  cursor: pointer;
  border-radius: 50%;
  padding: 0;
  pointer-events: auto;
  transition: opacity 0.2s ease, transform 0.15s ease, background-color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.quick-action-btn:active {
  transform: scale(0.9);
  opacity: 1;
  background: rgba(255, 255, 255, 0.08);
}

/* 3. ПРОГРЕСС-БАР (.progress-container) */
.progress-container,
.player-scrubber {
  margin-bottom: 12px;
  width: 100%;
}

.slider-wrapper {
  position: relative;
  width: 100%;
  height: 18px;
  display: flex;
  align-items: center;
  cursor: pointer;
  touch-action: none;
}

.scrubber-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.2);
  outline: none;
  position: relative;
  z-index: 2;
  cursor: pointer;
  margin: 0;
  padding: 0;
}

.scrubber-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ffffff;
  border: none;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.scrubber-slider::-moz-range-thumb {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ffffff;
  border: none;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.slider-fill {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 3px;
  border-radius: 2px;
  background: #ffffff;
  width: 0%;
  pointer-events: none;
  z-index: 1;
}

.time-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 12px;
  opacity: 0.6;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
}

/* 4. ГЛАВНЫЙ РЯД УПРАВЛЕНИЯ (.controls-row) */
.controls-row,
.player-controls-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 0 8px;
  width: 100%;
}

.main-ctrl-btn {
  background: transparent;
  border: none;
  color: var(--text-primary);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: transform 0.15s ease, opacity 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.main-ctrl-btn:active {
  transform: scale(0.88);
}

.main-ctrl-btn#btn-shuffle {
  color: var(--text-primary);
  opacity: 0.5;
  transition: opacity 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.main-ctrl-btn#btn-shuffle.active {
  opacity: 1;
  color: #ffe600;
}

.main-ctrl-btn#btn-shuffle:active {
  transform: scale(0.88);
}

.main-ctrl-btn#btn-favorite {
  opacity: 0.7;
}

.main-ctrl-btn#btn-favorite.active {
  opacity: 1;
}

.main-ctrl-btn#btn-favorite:active {
  opacity: 1;
}

/* ОГРОМНЫЙ PLAY/PAUSE: 68px, #ffe600, черная иконка 24px, без теней */
.play-btn-huge {
  width: 68px;
  height: 68px;
  min-width: 68px;
  min-height: 68px;
  border-radius: 50%;
  background: #ffe600;
  color: #000000;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: none;
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
  -webkit-tap-highlight-color: transparent;
}

.play-btn-huge:active {
  transform: scale(0.95);
}

.play-btn-huge svg {
  display: block;
  fill: #000000;
  width: 24px;
  height: 24px;
}

.play-btn-huge .icon-play {
  margin-left: 2px; /* Оптическая центровка треугольника play */
}

/* 5. НИЖНИЙ РЯД УТИЛИТ (.bottom-options) */
.bottom-options,
.player-bottom-utility {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  width: 100%;
}

.utility-circle-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text-primary);
  opacity: 0.85;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: transform 0.15s ease, background-color 0.2s ease, opacity 0.2s ease, color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.utility-circle-btn svg {
  width: 20px;
  height: 20px;
}

.utility-circle-btn:active {
  transform: scale(0.9);
  background: rgba(255, 255, 255, 0.15);
  opacity: 1;
}

.utility-circle-btn.active {
  color: #ffe600;
  opacity: 1;
  background: rgba(255, 230, 0, 0.14);
}

/* Специфика для кнопки Repeat (#btn-repeat) */
.utility-circle-btn#btn-repeat {
  position: relative;
}

/* 1. none — повтор выключен: приглушенный серый / opacity: 0.5 */
.utility-circle-btn#btn-repeat.mode-none,
.utility-circle-btn#btn-repeat:not(.active) {
  opacity: 0.5;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
}

/* 2. all — повтор всего списка: яркий активный цвет */
.utility-circle-btn#btn-repeat.mode-all,
.utility-circle-btn#btn-repeat.active:not(.mode-one) {
  opacity: 1;
  color: #ffe600;
  background: rgba(255, 230, 0, 0.14);
}

/* 3. one — повтор текущего трека: активный цвет с четкой цифрой "1" */
.utility-circle-btn#btn-repeat.mode-one {
  opacity: 1;
  color: #ffe600;
  background: rgba(255, 230, 0, 0.14);
}

.utility-circle-btn .repeat-one-badge {
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  color: #000000;
  background: #ffe600;
  padding: 1px 3px;
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  pointer-events: none;
}

/* Всплывающее уведомление (Toast) */
.player-toast {
  position: fixed;
  top: calc(24px + env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: rgba(36, 36, 36, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.18, 0.89, 0.32, 1.28);
  white-space: nowrap;
  max-width: 90vw;
  text-overflow: ellipsis;
  overflow: hidden;
}

.player-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}


/* ======================================================== */
/* 2. ЭКРАН БИБЛИОТЕКИ И ПЛЕЙЛИСТОВ (LIBRARY VIEW)           */
/* ======================================================== */
.library-view {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-main);
  padding-top: var(--safe-top);
  padding-bottom: calc(var(--mini-player-height) + var(--safe-bottom));
  overflow: hidden;
}

/* Шапка библиотеки: поиск и табы */
.library-header {
  padding: 14px 16px 8px 16px;
  background-color: var(--bg-main);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.search-container {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.search-icon {
  position: absolute;
  left: 14px;
  color: var(--text-secondary);
  pointer-events: none;
}

.library-search-input {
  width: 100%;
  height: 42px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0 40px 0 42px;
  color: var(--text-primary);
  font-size: 0.92rem;
  outline: none;
  user-select: text;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.library-search-input:focus {
  border-color: rgba(16, 185, 129, 0.5);
  background: var(--bg-elevated);
}

.library-search-input::placeholder {
  color: var(--text-muted);
}

.search-clear-btn {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Segmented Control: «Все треки» / «Альбомы» */
.segmented-control {
  display: flex;
  background: var(--bg-surface);
  padding: 3px;
  border-radius: 10px;
  border: 1px solid var(--border);
  gap: 2px;
}

.segment-btn {
  flex: 1;
  height: 36px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.segment-btn.active {
  background: var(--bg-elevated);
  color: var(--text-primary);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.segment-badge {
  font-size: 0.7rem;
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 6px;
  border-radius: 999px;
  color: var(--text-secondary);
}

.segment-btn.active .segment-badge {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent);
}

/* Контейнер контента библиотеки */
.library-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.tab-pane {
  display: none;
  padding: 10px 0;
}

.tab-pane.active {
  display: block;
}

/* ======================================================== */
/* Список треков (Track List) - высота строки >= 56px       */
/* ======================================================== */
.track-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.track-item {
  display: flex;
  align-items: center;
  min-height: 58px;
  padding: 8px 16px;
  gap: 12px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  transition: background-color 0.15s ease;
}

.track-item:active {
  background-color: var(--bg-hover);
}

.track-item.active {
  background-color: rgba(16, 185, 129, 0.08);
}

.track-item-cover-wrapper {
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #202020;
}

.track-item-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.track-playing-indicator {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
}

.track-item.active .track-playing-indicator {
  display: flex;
}

/* Анимированный эквалайзер */
.eq-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}

.eq-bar {
  width: 3px;
  background: var(--accent);
  border-radius: 1px;
  animation: eqBounce 1s infinite ease-in-out;
}
.eq-bar:nth-child(1) { height: 12px; animation-delay: 0.1s; }
.eq-bar:nth-child(2) { height: 16px; animation-delay: 0.3s; }
.eq-bar:nth-child(3) { height: 8px;  animation-delay: 0.2s; }

@keyframes eqBounce {
  0%, 100% { transform: scaleY(0.3); }
  50% { transform: scaleY(1); }
}

.track-item-body {
  flex: 1;
  min-width: 0;
}

.track-item-title {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-item.active .track-item-title {
  color: var(--accent);
  font-weight: 600;
}

.track-item-meta {
  font-size: 0.8rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.track-item-duration {
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ======================================================== */
/* Панель и режимы отображения альбомов (Сетка / Список)    */
/* ======================================================== */
.albums-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 16px 12px 16px;
}

.albums-toolbar-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.view-toggle-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.view-toggle-btn:active {
  transform: scale(0.92);
  background: var(--bg-elevated);
}

.view-toggle-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-light);
}

/* Базовый контейнер альбомов */
#albums-view,
#albums-grid-items,
.albums-grid,
.albums-container {
  width: 100%;
  box-sizing: border-box;
  padding: 0 16px 16px 16px;
  overflow-x: hidden;
}

/* Режим СЕТКИ (2 колонки ровно по 50% экрана без вылетов) */
.view-grid,
#albums-view.view-grid,
#albums-grid-items.view-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

.view-grid .album-card,
#albums-view.view-grid .album-card,
#albums-grid-items.view-grid .album-card {
  display: flex !important;
  flex-direction: column !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  padding: 8px !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  width: 100% !important;
  box-sizing: border-box !important;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.view-grid .album-card:active,
#albums-view.view-grid .album-card:active {
  transform: scale(0.97);
  background: rgba(255, 255, 255, 0.08);
}

.view-grid .album-card-cover-wrapper,
#albums-view.view-grid .album-card-cover-wrapper {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 1 / 1 !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  background: #202020;
}

.view-grid .album-card img,
.view-grid .album-card-cover,
#albums-view.view-grid .album-card img {
  width: 100% !important;
  height: 100% !important;
  aspect-ratio: 1 / 1 !important;
  border-radius: 8px !important;
  object-fit: cover !important;
  display: block !important;
}

.view-grid .album-card-info,
#albums-view.view-grid .album-card-info {
  margin-top: 8px !important;
  min-width: 0 !important;
  width: 100% !important;
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: left !important;
}

.view-grid .album-card-title,
.view-grid .album-title,
#albums-view.view-grid .album-card-title {
  font-size: 14px !important;
  font-weight: 600 !important;
  color: var(--text-primary);
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.view-grid .album-card-meta,
.view-grid .album-subtitle,
#albums-view.view-grid .album-card-meta {
  font-size: 12px !important;
  color: #888 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* Режим СПИСКА (1 вертикальная колонка) */
.view-list,
#albums-view.view-list,
#albums-grid-items.view-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}

.view-list .album-card,
#albums-view.view-list .album-card,
#albums-grid-items.view-list .album-card {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 14px !important;
  background: rgba(255, 255, 255, 0.03) !important;
  border-radius: 12px !important;
  padding: 10px 12px !important;
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
  width: 100% !important;
  box-sizing: border-box !important;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.view-list .album-card:active,
#albums-view.view-list .album-card:active {
  transform: scale(0.98);
  background: rgba(255, 255, 255, 0.08);
}

.view-list .album-card-cover-wrapper,
#albums-view.view-list .album-card-cover-wrapper {
  width: 64px !important;
  height: 64px !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  flex-shrink: 0 !important;
  background: #202020;
}

.view-list .album-card img,
.view-list .album-card-cover,
#albums-view.view-list .album-card img {
  width: 64px !important;
  height: 64px !important;
  border-radius: 8px !important;
  object-fit: cover !important;
  display: block !important;
  flex-shrink: 0 !important;
}

.view-list .album-card-info,
#albums-view.view-list .album-card-info {
  min-width: 0 !important;
  flex: 1 !important;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left !important;
}

.view-list .album-card-title,
#albums-view.view-list .album-card-title {
  font-size: 0.98rem !important;
  font-weight: 600 !important;
  color: var(--text-primary);
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.view-list .album-card-meta,
#albums-view.view-list .album-card-meta {
  font-size: 0.82rem !important;
  color: var(--text-secondary) !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* Просмотр конкретного альбома (Detail View) */
.album-detail-header {
  padding: 8px 16px 16px 16px;
  border-bottom: 1px solid var(--border);
}

.album-back-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 8px 0;
  cursor: pointer;
  margin-bottom: 12px;
}

.album-back-btn:active {
  color: var(--text-primary);
}

.album-detail-hero {
  display: flex;
  gap: 16px;
  align-items: center;
}

.album-detail-cover {
  width: 96px;
  height: 96px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
}

.album-detail-info {
  min-width: 0;
  flex: 1;
}

.album-detail-title {
  font-size: 1.15rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.album-detail-artist {
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 2px;
}

.album-detail-count {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.album-play-all-btn {
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.album-play-all-btn:active {
  transform: scale(0.95);
}


/* ======================================================== */
/* 3. МИНИ-ПЛЕЕР (FLOATING BOTTOM BAR)                      */
/* ======================================================== */
.mini-player {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--mini-player-height) + var(--safe-bottom));
  z-index: 70;
  background: rgba(24, 24, 24, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding-bottom: var(--safe-bottom);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}

/* Тонкая полоска прогресса на верхнем ребре мини-плеера */
.mini-progress-line {
  width: 100%;
  height: 2.5px;
  background: rgba(255, 255, 255, 0.1);
  position: relative;
}

.mini-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.2s linear;
}

.mini-player-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  gap: 12px;
}

.mini-track-info {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  cursor: pointer;
}

.mini-cover-wrapper {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: #202020;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.mini-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.mini-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-artist {
  font-size: 0.78rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.mini-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.mini-ctrl-btn {
  background: transparent;
  border: none;
  color: var(--text-primary);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.mini-ctrl-btn:active {
  transform: scale(0.9);
}


/* ======================================================== */
/* 4. ПУСТОЕ СОСТОЯНИЕ                                      */
/* ======================================================== */
.empty-state {
  text-align: center;
  padding: 60px 24px;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.empty-state h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.empty-state p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.empty-state code {
  display: inline-block;
  background: rgba(0, 0, 0, 0.4);
  padding: 6px 14px;
  border-radius: 8px;
  color: #34d399;
  font-family: monospace;
  font-size: 0.85rem;
  border: 1px solid var(--border);
}
