:root {
  --bg: #0A0A0F;
  --surface: #14141D;
  --surface-2: #1C1C28;
  --surface-hover: #242433;
  --border: rgba(255, 255, 255, 0.08);
  --text: #F5F5FA;
  --muted: #9898AD;
  --accent-1: #8B5CF6;
  --accent-2: #EC4899;
  --grad: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%);
  --danger: #EF4444;
  --success: #10B981;
  --sidebar-w: 240px;
  --player-h: 76px;
  --bnav-h: 62px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bot: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  overscroll-behavior-y: none;
  min-height: 100%;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

.hidden {
  display: none !important;
}

.muted {
  color: var(--muted);
}

.mb12 { margin-bottom: 12px; }
.mt12 { margin-top: 12px; }
.row-gap { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* Анимированные полосы волны */
.wave-bars {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 36px;
}
.wave-bars i {
  display: block;
  width: 6px;
  height: 18px;
  border-radius: 6px;
  background: var(--grad);
  animation: wavePulse 1.3s ease-in-out infinite;
}
.wave-bars i:nth-child(2) { height: 32px; animation-delay: 0.18s; }
.wave-bars i:nth-child(3) { height: 24px; animation-delay: 0.36s; }
.wave-bars i:nth-child(4) { height: 14px; animation-delay: 0.54s; }
.wave-bars.small { height: 20px; gap: 3px; }
.wave-bars.small i { width: 3.5px; height: 12px; }
.wave-bars.small i:nth-child(2) { height: 19px; }
.wave-bars.small i:nth-child(3) { height: 14px; }

@keyframes wavePulse {
  0%, 100% { transform: scaleY(0.65); opacity: 0.85; }
  50% { transform: scaleY(1.1); opacity: 1; }
}

/* Экран входа */
.auth-screen {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(circle at 50% 20%, rgba(139, 92, 246, 0.22), transparent 55%), var(--bg);
}
.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 32px 24px;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
}
.auth-logo {
  width: 68px;
  height: 68px;
  margin: 0 auto 16px;
  border-radius: 20px;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
}
.auth-card h1 {
  margin: 0 0 6px;
  font-size: 24px;
}
.auth-sub {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 14px;
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.auth-form input, .input-field, .textarea-field {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  outline: none;
  color: var(--text);
}
.auth-form input:focus, .input-field:focus, .textarea-field:focus {
  border-color: var(--accent-1);
}
.auth-error {
  margin-top: 12px;
  color: #FCA5A5;
  font-size: 13px;
}
.ya-logo {
  background: linear-gradient(135deg, #FC3F1D, #FF7A00);
  border: none;
}
.ya-letter {
  font-size: 32px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}
.btn-yandex {
  width: 100%;
  background: #FC3F1D;
  color: #fff;
  font-weight: 700;
  padding: 13px 18px;
  border-radius: 12px;
  font-size: 15px;
  transition: transform 0.12s, opacity 0.15s;
}
.btn-yandex:hover { opacity: 0.94; }
.btn-yandex:active { transform: scale(0.98); }
.btn-link {
  display: inline-block;
  color: var(--muted);
  font-size: 13.5px;
  padding: 8px 12px;
}
.btn-link:hover { color: var(--text); }
.ya-code-display {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.16em;
  background: var(--surface-2);
  border: 1px solid rgba(252, 63, 29, 0.45);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 14px;
  color: #fff;
  user-select: all;
}
.ya-poll-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #FC3F1D;
  flex-shrink: 0;
  animation: dotPulse 1.2s ease-in-out infinite;
}
@keyframes dotPulse {
  0%, 100% { opacity: 0.35; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.15); }
}
.ya-connected-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.16);
  color: #34D399;
  font-size: 13px;
  font-weight: 600;
}
.sync-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(139, 92, 246, 0.14);
  border: 1px solid rgba(139, 92, 246, 0.35);
  color: #E2E8F0;
  padding: 10px 14px;
  border-radius: 12px;
  margin-bottom: 14px;
  font-size: 13px;
  cursor: pointer;
}
.ya-status-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
}

/* Кнопки */
.btn-primary {
  background: var(--grad);
  color: #fff;
  font-weight: 600;
  padding: 12px 18px;
  border-radius: 12px;
  transition: transform 0.12s, opacity 0.15s;
}
.btn-primary:active { transform: scale(0.98); }
.btn-primary.small { padding: 8px 14px; font-size: 13px; border-radius: 10px; }

.btn-ghost {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 10px 16px;
  border-radius: 12px;
}
.btn-ghost.small { padding: 7px 12px; font-size: 13px; border-radius: 10px; }

.chip-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
}
.chip-btn:hover { background: rgba(255, 255, 255, 0.14); }

.btn-icon-round {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.09);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
}
.btn-icon-round svg { width: 19px; height: 19px; }

/* Основная сетка приложения */
.app-shell {
  display: flex;
  min-height: 100dvh;
}

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: #0E0E15;
  border-right: 1px solid var(--border);
  padding: 20px 14px calc(var(--player-h) + 20px);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 20;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 8px 22px;
}
.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}
.brand-title { font-weight: 700; font-size: 17px; }
.brand-sub { font-size: 11px; color: var(--muted); }

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 12px;
  color: var(--muted);
  font-weight: 500;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}
.nav-item svg { width: 20px; height: 20px; flex-shrink: 0; }
.nav-item:hover { background: var(--surface); color: var(--text); }
.nav-item.active {
  background: rgba(139, 92, 246, 0.16);
  color: #fff;
}

.sidebar-footer { padding-top: 12px; }

.main-area {
  flex: 1;
  min-width: 0;
  width: 100%;
  margin-left: var(--sidebar-w);
  padding: 20px 28px calc(var(--player-h) + 40px);
  max-width: 1240px;
}

.tab-view { display: none; }
.tab-view.active { display: block; }

.mobile-header { display: none; }

.offline-banner {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #FCD34D;
  padding: 10px 14px;
  border-radius: 12px;
  margin-bottom: 16px;
  font-size: 13px;
}

/* Герой-блок Моей волны */
.wave-hero {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: 30px 28px;
  background: linear-gradient(135deg, #17122B 0%, #1F1226 55%, #111119 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 28px;
}
.wave-glow {
  position: absolute;
  width: 340px;
  height: 340px;
  right: -60px;
  top: -80px;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.32), rgba(139, 92, 246, 0.15) 50%, transparent 72%);
  pointer-events: none;
}
.wave-hero-content { position: relative; z-index: 1; min-width: 0; }
.wave-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #C4B5FD;
  margin-bottom: 8px;
}
.wave-title {
  margin: 0 0 6px;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.wave-desc {
  margin: 0 0 20px;
  color: var(--muted);
  max-width: 560px;
}
.wave-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.btn-wave-play {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  border-radius: 999px;
  background: var(--grad);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  box-shadow: 0 10px 28px rgba(139, 92, 246, 0.35);
}
.btn-wave-play svg { width: 18px; height: 18px; }

.wave-modes {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.wave-modes::-webkit-scrollbar { display: none; }
.mode-chip {
  white-space: nowrap;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}
.mode-chip.active {
  background: #fff;
  color: #0A0A0F;
  font-weight: 600;
}

/* Секции и список треков */
.section-block { margin-bottom: 28px; }
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.section-head h1, .section-head h2 { margin: 0; }
.section-head h1 { font-size: 26px; }
.section-head h2 { font-size: 19px; }
.top-pad { padding-top: 4px; }

.track-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.track-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 12px;
  transition: background 0.12s;
  cursor: pointer;
}
.track-row:hover { background: var(--surface); }
.track-row.playing {
  background: rgba(139, 92, 246, 0.14);
}
.track-thumb-wrap {
  position: relative;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-2);
}
.track-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.track-info {
  flex: 1;
  min-width: 0;
}
.track-title-line {
  display: flex;
  align-items: center;
  gap: 6px;
}
.track-title {
  font-weight: 600;
  font-size: 14.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.track-row.playing .track-title { color: #C4B5FD; }
.badge-e {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.14);
  color: #E2E8F0;
}
.badge-offline {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(16, 185, 129, 0.18);
  color: #34D399;
}
.badge-sc {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(249, 115, 22, 0.22);
  color: #FB923C;
}
.badge-yt {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(139, 92, 246, 0.22);
  color: #C4B5FD;
}
.ctrl-play.loading {
  animation: pulseLoad 0.9s ease-in-out infinite;
  opacity: 0.72;
}
@keyframes pulseLoad {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(0.92); }
}
.track-sub {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.track-dur {
  font-size: 12.5px;
  color: var(--muted);
  margin-right: 4px;
  flex-shrink: 0;
}
.track-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.t-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 16px;
}
.t-btn:hover { background: rgba(255, 255, 255, 0.08); color: var(--text); }
.t-btn.liked { color: var(--accent-2); }

/* Поиск */
.search-sticky {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(12px);
  padding: 6px 0 14px;
}
.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 14px;
}
.search-box svg { width: 19px; height: 19px; color: var(--muted); flex-shrink: 0; }
.search-box input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-size: 15px;
}
.icon-clear { color: var(--muted); padding: 4px 6px; }
.suggestions {
  margin-top: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.suggestion-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.suggestion-item:last-child { border-bottom: none; }
.suggestion-item:hover { background: var(--surface-2); }

.filter-pills, .import-tabs {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}
.pill {
  white-space: nowrap;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
}
.pill.active {
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
}

/* Карточки альбомов / артистов / плейлистов */
.cards-grid, .playlists-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: 14px;
}
.media-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  cursor: pointer;
  transition: background 0.15s;
}
.media-card:hover { background: var(--surface-2); }
.media-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 11px;
  background: var(--surface-2);
  margin-bottom: 10px;
}
.media-card-title {
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.media-card-sub {
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lib-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.lib-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
}
.lib-card:hover { background: var(--surface-2); }
.lib-card-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
  flex-shrink: 0;
}
.likes-card .lib-card-icon { background: linear-gradient(135deg, #EC4899, #F43F5E); }
.import-card .lib-card-icon { background: linear-gradient(135deg, #8B5CF6, #3B82F6); }
.lib-card-title { font-weight: 700; font-size: 15.5px; }
.lib-card-sub { font-size: 13px; color: var(--muted); }

.detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.detail-title { margin: 0 0 4px; font-size: 24px; }
.detail-back { margin-bottom: 10px; }

/* Импорт */
.import-panel { margin-top: 16px; max-width: 720px; }
.info-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 14px;
  font-size: 13.5px;
}
.info-box ol { margin: 8px 0; padding-left: 18px; }
.code-copy-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px 0;
}
.code-snippet {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #09090D;
  border: 1px solid var(--border);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  color: #C4B5FD;
}
.field-label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.import-progress {
  margin-top: 18px;
  max-width: 720px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
}
.progress-bar-bg {
  height: 8px;
  border-radius: 99px;
  background: var(--surface-2);
  overflow: hidden;
  margin: 10px 0;
}
.progress-bar-fill {
  height: 100%;
  background: var(--grad);
  transition: width 0.25s;
}

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 40px 16px;
}

/* Нижняя панель плеера (ПК и мини-плеер на iPhone) */
.player-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--player-h);
  background: rgba(18, 18, 26, 0.94);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  gap: 16px;
}
.player-progress-top {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
}
#player-progress-top-fill {
  height: 100%;
  width: 0%;
  background: var(--grad);
}
.player-track {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  width: 280px;
  cursor: pointer;
}
.bar-thumb {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--surface-2);
  flex-shrink: 0;
}
.bar-meta { min-width: 0; flex: 1; }
.bar-title { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-artist { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.player-center {
  flex: 1;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.player-controls {
  display: flex;
  align-items: center;
  gap: 14px;
}
.ctrl-btn {
  color: var(--text);
  padding: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.ctrl-btn svg { width: 20px; height: 20px; }
.ctrl-btn.lg svg { width: 28px; height: 28px; }
.ctrl-play {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  color: #0A0A0F;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ctrl-play svg { width: 18px; height: 18px; }
.ctrl-play.lg { width: 64px; height: 64px; }
.ctrl-play.lg svg { width: 26px; height: 26px; }

.seek-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
}
.time-label { font-size: 11px; color: var(--muted); min-width: 34px; text-align: center; }
.seek-slider, .vol-slider {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.16);
  outline: none;
}
.seek-slider::-webkit-slider-thumb, .vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}
.seek-slider.big { width: 100%; height: 5px; }
.seek-slider.big::-webkit-slider-thumb { width: 15px; height: 15px; }

.player-right {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 280px;
  justify-content: flex-end;
}
.vol-wrap { display: flex; align-items: center; gap: 6px; width: 110px; }
.vol-wrap svg { width: 18px; height: 18px; color: var(--muted); flex-shrink: 0; }

/* Нижний таббар (только мобильный) */
.bottom-nav { display: none; }

/* Полноэкранный плеер */
.full-player {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: #0B0B12;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.full-bg {
  position: absolute;
  inset: -40px;
  background-size: cover;
  background-position: center;
  filter: blur(55px) brightness(0.32) saturate(1.4);
  pointer-events: none;
}
.full-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  padding: calc(var(--safe-top) + 14px) 22px calc(var(--safe-bot) + 22px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}
.full-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.full-source {
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.78);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.full-cover-wrap {
  display: flex;
  justify-content: center;
  padding: 6px 0;
}
.full-thumb {
  width: min(78vw, 330px);
  aspect-ratio: 1;
  border-radius: 22px;
  object-fit: cover;
  background: var(--surface-2);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.65);
}
.full-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.full-titles { min-width: 0; flex: 1; }
.full-title { font-size: 21px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.full-artist { font-size: 15px; color: rgba(255, 255, 255, 0.72); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn-like {
  font-size: 26px;
  width: 44px;
  height: 44px;
  color: var(--text);
  flex-shrink: 0;
}
.btn-like.liked { color: var(--accent-2); }

.full-times {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.68);
  margin-top: 6px;
}
.full-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px;
}
.full-bottom-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

/* Модальное окно */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-sheet {
  width: 100%;
  max-width: 480px;
  max-height: 82dvh;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}
.modal-head h3 { margin: 0; font-size: 17px; }
.modal-body {
  padding: 16px 18px;
  overflow-y: auto;
}
.lyrics-text {
  white-space: pre-wrap;
  line-height: 1.65;
  font-size: 15px;
}
.menu-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.menu-item {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface-2);
  font-size: 14.5px;
}
.menu-item:hover { background: var(--surface-hover); }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--player-h) + 20px);
  transform: translateX(-50%);
  z-index: 95;
  background: #232333;
  border: 1px solid var(--border);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
}

/* Адаптация под iPhone / мобильные экраны */
@media (max-width: 767px) {
  .sidebar, .desktop-only { display: none !important; }
  .mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 0 14px;
  }
  .brand-inline {
    display: flex;
    align-items: center;
    gap: 9px;
    font-weight: 700;
    font-size: 17px;
  }
  .main-area {
    margin-left: 0;
    padding: calc(var(--safe-top) + 10px) 16px calc(var(--bnav-h) + var(--player-h) + var(--safe-bot) + 24px);
  }
  .wave-hero {
    padding: 22px 18px;
    border-radius: 20px;
  }
  .wave-title { font-size: 26px; }

  .player-bar {
    bottom: calc(var(--bnav-h) + var(--safe-bot));
    height: 62px;
    padding: 0 12px;
    margin: 0 8px 6px;
    border-radius: 16px;
    border: 1px solid var(--border);
  }
  .player-progress-top {
    display: block;
    border-radius: 16px 16px 0 0;
    overflow: hidden;
  }
  .player-track { width: auto; flex: 1; }
  .bar-thumb { width: 42px; height: 42px; }
  .player-center { flex: 0; }
  .ctrl-play { width: 36px; height: 36px; }

  .bottom-nav {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(var(--bnav-h) + var(--safe-bot));
    padding-bottom: var(--safe-bot);
    background: rgba(12, 12, 18, 0.96);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    z-index: 35;
  }
  .bnav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--muted);
    font-size: 11px;
  }
  .bnav-item svg { width: 21px; height: 21px; }
  .bnav-item.active { color: #fff; }
  .toast { bottom: calc(var(--bnav-h) + var(--player-h) + var(--safe-bot) + 14px); }
}
