/**
 * SunMoon — jPlayer: Обложка | Плеер | Инструменты | Плейлист
 * Пропорции: 20% | 30% | 30% | 20%   Высота: 200px
 */

/* === СБРОС JPLAYER === */
.jp-jplayer { width:0; height:0; overflow:hidden; position:absolute; }
.jp-video-play, .jp-video-play-icon, .jp-full-screen, .jp-restore-screen { display:none; }

/* === КОНТЕЙНЕР ПЛЕЕРА === */
#webplayer {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: 200px;
  background: rgba(10, 10, 15, 0.88);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-top: 5px solid #f59e0b;
  box-shadow: 0 -2px 20px rgba(0,0,0,0.4);
  z-index: var(--z-fixed, 1000);
  padding: 0; display: none;
}
.jp-area { background: transparent; border-radius: 0; overflow: hidden; margin: 0; width: 100%; height: 100%; }
.jp-type-playlist { background: transparent; height: 100%; }
.jp-gui { position: static; }

/* === РАСКЛАДКА: 4 КОЛОНКИ 20|30|30|20 === */
.vesna-player-layout {
  display: flex; flex-direction: row;
  height: 200px; width: 100%;
  overflow: hidden; gap: 0;
}

/* === 1. ОБЛОЖКА (20%) === */
.vesna-player-art {
  width: 20%; min-width: 160px; height: 200px;
  overflow: hidden; position: relative; flex-shrink: 0;
  background: rgba(0,0,0,0.3);
}
.vesna-player-art img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.3s ease;
}
.vesna-player-art:hover img { transform: scale(1.05); }
.vesna-player-art::after {
  content: ''; position: absolute; top: 0; right: 0;
  width: 30px; height: 100%;
  background: linear-gradient(to right, transparent, rgba(10, 10, 15, 0.88));
  pointer-events: none;
}

/* === 2. ПЛЕЕР (30%) — кнопки+громкость+прогресс === */
.vesna-player-center {
  width: 40%; min-width: 280px;
  display: flex; flex-direction: column;
  justify-content: center; align-items: stretch;
  gap: 6px; padding: 10px 12px 10px 8px;
}

/* Контрольная строка: кнопки + громкость */
.vesna-player-controls-row {
  display: flex; align-items: center; gap: 4px; width: 100%;
}

/* Информация о треке */
.playing_info {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%;
  margin-bottom: 4px;
}
.playing_artist {
  color: #fbbf24; font-size: 18px; font-weight: 800;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
  text-shadow: 0 0 16px rgba(251, 191, 36, 0.5);
}
.playing_artist:empty { display: none; }
.playing_title {
  font-weight: 900; font-size: 24px; color: #f59e0b;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
  text-shadow: 0 2px 12px rgba(0,0,0,0.6), 0 0 20px rgba(245, 158, 11, 0.4);
  letter-spacing: 0.3px;
}
.playing_title a, .playing_artist a {
  color: #f59e0b; text-decoration: none; font-weight: inherit; font-size: inherit;
  pointer-events: none;
}
.playing_title a:hover, .playing_artist a:hover {
  color: #fbbf24; text-decoration: none;
}
/* === КАРАОКЕ — строка текста песни === */
.vesna-lyrics-line {
  width: 100%;
  height: 24px;
  overflow: hidden;
  position: relative;
  margin: 4px 0 2px 0;
  display: flex;
  align-items: center;
}
.vesna-lyrics-text {
  display: block;
  width: 100%;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-shadow: 0 0 10px rgba(139, 92, 246, 0.5), 0 0 4px rgba(255,255,255,0.3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  opacity: 1;
}
.vesna-lyrics-text.fading { opacity: 1; }
.vesna-lyrics-line:hover .vesna-lyrics-text {
  color: #fbbf24;
  text-shadow: 0 0 14px rgba(245, 158, 11, 0.6), 0 0 6px rgba(255,255,255,0.4);
}

/* Рейтинг/звёзды и флаги в playing_actions — СКРЫТЫ */
.playing_features { display: flex; align-items: center; gap: 6px; }
.playing_actions { display: none !important; }
.playing_lyrics { display: none; }

/* === КНОПКИ УПРАВЛЕНИЯ === */
.vesna-player-row, .jp-controls {
  list-style: none; margin: 0; padding: 0;
  display: inline-flex; align-items: center; gap: 2px;
  position: static; width: auto; height: auto;
  float: none; top: auto; left: auto; right: auto;
  background: none; overflow: visible;
}
.jp-controls li { display: inline-flex; float: none; }
.jp-controls a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.07); color: var(--text-primary, #f4f4f5);
  border: none; cursor: pointer; transition: all 0.15s ease;
  overflow: visible; text-decoration: none; line-height: 1;
}
.jp-controls a:hover { background: var(--primary, #8b5cf6); color: white; transform: scale(1.08); }
.jp-controls a svg { width: 18px; height: 18px; fill: currentColor; pointer-events: none; }

/* Play/Pause — главная */
a.jp-play, a.jp-pause {
  width: 44px; height: 44px;
  background: var(--primary, #8b5cf6); color: white;
  box-shadow: 0 2px 10px rgba(139, 92, 246, 0.4);
}
a.jp-play:hover, a.jp-pause:hover {
  background: var(--primary-hover, #7c3aed); transform: scale(1.1);
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.5);
}
a.jp-play svg, a.jp-pause svg { width: 24px; height: 24px; fill: white; }

/* Порядок кнопок */
a.jp-previous { order: 0; }
a.jp-play, a.jp-pause { order: 1; }
a.jp-next { order: 2; }
a.jp-stop { order: 3; }

/* === ГРОМКОСТЬ (в строке с кнопками) === */
.vesna-volume-group {
  display: flex; align-items: center; gap: 2px; margin-left: 4px;
}
.vesna-volume-group a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  color: var(--text-secondary, #a1a1aa); border: none; cursor: pointer;
  transition: color 0.15s ease; text-decoration: none; background: none;
}
.vesna-volume-group a:hover { color: var(--primary, #8b5cf6); }
.vesna-volume-group a svg { width: 16px; height: 16px; fill: currentColor; pointer-events: none; }
.vesna-volume-bar {
  width: 80px; height: 4px; background: rgba(255,255,255,0.1);
  border-radius: 2px; cursor: pointer;
  position: static; float: none; top: auto; left: auto;
  transition: height 0.1s ease;
}
.vesna-volume-bar:hover { height: 7px; }
.jp-volume-bar-value {
  height: 100%; background: var(--accent, #f59e0b);
  border-radius: 2px; background-image: none;
}

/* === ПРОГРЕСС-БАР === */
.vesna-player-progress {
  display: flex; align-items: center; gap: 6px; width: 100%;
}
.vesna-player-progress .jp-progress {
  flex: 1; height: 10px; background: rgba(255,255,255,0.1);
  border-radius: 5px; overflow: hidden; cursor: pointer;
  position: static; margin: 0; transition: height 0.1s ease;
}
.vesna-player-progress .jp-progress:hover { height: 14px; }
.vesna-player-progress .jp-seek-bar { width: 100%; height: 100%; background: transparent; }
.vesna-player-progress .jp-play-bar {
  height: 100%; background: linear-gradient(90deg, #8b5cf6, #a78bfa, #f59e0b);
  border-radius: 5px; transition: none; position: relative;
  box-shadow: 0 0 4px rgba(139, 92, 246, 0.1);
}
.vesna-player-progress .jp-progress:hover .jp-play-bar {
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.4);
}

/* Время */
.vesna-player-time {
  display: flex; align-items: center; gap: 3px;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.vesna-player-time .jp-current-time {
  font-size: 11px; color: var(--text-secondary, #a1a1aa);
  min-width: 32px; text-align: right;
  position: static; float: none; width: auto; height: auto; line-height: 1;
}
.vesna-player-time .vesna-time-sep { font-size: 10px; color: var(--text-muted, #71717a); }
.vesna-player-time .jp-duration {
  font-size: 11px; color: var(--text-muted, #71717a); min-width: 32px;
  position: static; float: none; width: auto; height: auto; line-height: 1;
}

/* === 3. ИНСТРУМЕНТЫ (30%) — без прокрутки === */
.vesna-player-tools {
  width: 20%; min-width: 120px;
  display: grid; grid-template-columns: repeat(4, 1fr);
  align-content: start; justify-items: stretch;
  gap: 4px; padding: 8px 6px;
  background: rgba(0,0,0,0.15);
  border-left: 1px solid rgba(255,255,255,0.04);
  border-right: 1px solid rgba(255,255,255,0.04);
  overflow: hidden;
}

/* .player_actions не используется — кнопки прямо в .vesna-player-tools */
.vesna-player-tools .action_button { margin: 0; padding: 0; display: flex; justify-content: center; }
.vesna-player-tools .action_button a {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 8px;
  background: rgba(245, 158, 11, 0.25); color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.4);
  text-decoration: none; transition: all 0.15s ease; line-height: 1;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.15);
}
.vesna-player-tools .action_button a:hover {
  background: rgba(245, 158, 11, 0.45); border-color: #f59e0b; color: #fbbf24;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.4);
}
.vesna-player-tools .action_button a svg {
  width: 18px; height: 18px; fill: #f59e0b;
}
.vesna-player-tools .action_button a .material-symbol {
  font-size: 18px; color: #f59e0b;
}
.vesna-player-tools .action_button a svg path,
.vesna-player-tools .action_button a svg circle,
.vesna-player-tools .action_button a svg rect {
  fill: inherit;
}

/* Shuffle/Повтор */
/* Toggle-кнопки (shuffle/repeat) — grid ячейки */
.vesna-player-tools .jp-toggle-shuffle,
.vesna-player-tools .jp-toggle-repeat {
  margin: 0; padding: 0; display: flex; justify-content: center; gap: 0;
  position: relative;
}
.vesna-player-tools .jp-toggle-shuffle a,
.vesna-player-tools .jp-toggle-repeat a {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 8px; color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.4); cursor: pointer;
  transition: all 0.15s ease; text-decoration: none;
  background: rgba(245, 158, 11, 0.25); overflow: visible;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.15);
}
.vesna-player-tools .jp-toggle-shuffle a:hover,
.vesna-player-tools .jp-toggle-repeat a:hover {
  background: rgba(245, 158, 11, 0.45); border-color: #f59e0b; color: #fbbf24;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.4);
}
.jp-shuffle-off, .jp-repeat-off {
  color: #fbbf24 !important; border-color: #f59e0b !important;
  background: rgba(245, 158, 11, 0.35) !important;
}
.vesna-player-tools .jp-toggle-shuffle a svg,
.vesna-player-tools .jp-toggle-repeat a svg {
  width: 18px; height: 18px; fill: #f59e0b; pointer-events: none;
}
.vesna-player-tools .jp-toggle-shuffle a svg path,
.vesna-player-tools .jp-toggle-repeat a svg path {
  fill: inherit;
}

/* Кнопка плейлиста в инструментах */
.vesna-player-tools .vesna-playlist-toggle-vertical {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  background: rgba(245, 158, 11, 0.25); color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.4); border-radius: 8px;
  cursor: pointer; transition: all 0.15s ease; padding: 0;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.15);
}
.vesna-player-tools .vesna-playlist-toggle-vertical:hover {
  background: rgba(245, 158, 11, 0.45); color: #fbbf24; border-color: #f59e0b;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.4);
}
.vesna-player-tools .vesna-playlist-toggle-vertical svg { width: 18px; height: 18px; fill: #f59e0b; }

/* === 4. ПЛЕЙЛИСТ (20%) === */
.vesna-player-playlist {
  width: 20%; min-width: 180px; height: 200px;
  flex-shrink: 0; display: flex; flex-direction: column;
  background: rgba(0, 0, 0, 0.2);
  border-left: 1px solid rgba(255,255,255,0.04);
  overflow: hidden; position: relative;
}
.vesna-player-playlist::before {
  content: ''; position: absolute; top: 0; left: 0;
  width: 20px; height: 100%;
  background: linear-gradient(to left, rgba(10, 10, 15, 0.88), transparent);
  pointer-events: none; z-index: 1;
}

/* Кнопка раскрытия плейлиста */
.vesna-playlist-toggle {
  display: flex; align-items: center; justify-content: center;
  gap: 4px; padding: 4px 8px;
  background: rgba(18, 18, 26, 0.5); border: none;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  cursor: pointer; color: var(--text-muted, #71717a);
  font-size: 11px; font-weight: 500;
  transition: all 0.15s ease; flex-shrink: 0;
  position: relative; z-index: 2;
}
.vesna-playlist-toggle:hover { color: #f59e0b; background: rgba(245, 158, 11, 0.1); }
.vesna-playlist-toggle svg { transition: transform 0.2s ease; }
.vesna-playlist-toggle-text { font-family: var(--font-family, -apple-system, BlinkMacSystemFont, sans-serif); }

/* Плейлист скролл */
.vesna-playlist-inner {
  background: transparent; border-top: none;
  flex: 1; overflow-y: auto; transition: none;
  width: 100%; margin: 0; max-height: none;
  position: relative; z-index: 2;
}
.vesna-playlist-inner.playlist-expanded { max-height: none; }
.jp-playlist ul { list-style: none; padding: 0; margin: 0; }
.jp-playlist li {
  padding: 4px 8px; font-size: 11px; color: var(--text-muted, #71717a);
  cursor: pointer; border-bottom: 1px solid rgba(255,255,255,0.03);
  transition: background 0.12s ease;
  display: flex; align-items: center;
}
.jp-playlist li:hover { background: rgba(139, 92, 246, 0.08); }
.jp-playlist li.jp-playlist-current {
  background: rgba(139, 92, 246, 0.08); color: var(--text-primary, #f4f4f5);
  border-left: 2px solid var(--primary, #8b5cf6);
}
.jp-playlist li.jp-playlist-current::before {
  content: '🎵';
  color: #8b5cf6;
  font-size: 11px;
  margin-right: 6px;
}
.jp-playlist li a { color: var(--text-muted, #71717a); text-decoration: none; font-size: 11px; }
.jp-playlist li::before {
  content: '♪';
  color: rgba(139, 92, 246, 0.5);
  font-size: 12px;
  margin-right: 6px;
  flex-shrink: 0;
}
.jp-playlist li.jp-playlist-current a { color: var(--text-primary, #f4f4f5); }
.jp-playlist-item-remove { color: var(--text-muted, #71717a); font-size: 9px; margin-left: 4px; }
.jp-playlist-item-remove:hover { color: #ef4444; }
.jp-no-solution { padding: 12px; text-align: center; color: #ef4444; font-size: 12px; }

/* === МИНИМИЗАЦИЯ === */
#webplayer-minimize {
  position: fixed; bottom: 8px; right: 8px;
  z-index: calc(var(--z-fixed, 1000) + 1); display: flex;
}
#webplayer-minimize a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  background: var(--primary, #8b5cf6); color: white; border-radius: 50%;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
  text-decoration: none; transition: all 0.2s ease; font-size: 0;
}
#webplayer-minimize a:hover { background: var(--primary-hover, #7c3aed); transform: scale(1.08); }
#webplayer-minimize a svg, #webplayer-minimize .material-symbol { width: 24px; height: 24px; fill: white; color: white; font-size: 24px; }

/* === ОБЛОЖКА В RIGHTBAR === */
.cel_albumart img, .now-playing-art img, #now_playing .cel_albumart img {
  width: 48px; height: 48px; border-radius: 6px; object-fit: cover;
  transition: transform 0.25s ease, box-shadow 0.25s ease; cursor: pointer;
}
.cel_albumart img:hover, .now-playing-art img:hover, #now_playing .cel_albumart img:hover {
  transform: scale(3); box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  z-index: 9999; position: relative; border-radius: 4px;
}

/* === RB ACTION === */
#rb_action a, #rb_action button {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  background: rgba(245, 158, 11, 0.15); color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.25); border-radius: 6px;
  font-size: 0; padding: 0; margin: 0; cursor: pointer;
  transition: all 0.15s ease; text-decoration: none; line-height: 1;
}
#rb_action a:hover, #rb_action button:hover { background: rgba(245, 158, 11, 0.3); border-color: #f59e0b; }
#rb_action a svg, #rb_action button svg { width: 14px; height: 14px; fill: #f59e0b; }

/* Рейтинг скрыт везде в плеере */
.home-album-rating { display: none !important; }
#action_buttons { display: none !important; }
.star-rating, .dynamic-star-rating { display: none !important; }

/* Звёзды — только если явно показаны */
.star-rating a svg, .dynamic-star-rating a svg { fill: #f59e0b; }
.star-rating a.empty svg, .dynamic-star-rating a.empty svg { fill: rgba(255,255,255,0.1); }

.jp-title {
  position: static; display: block; font-size: 12px;
  color: var(--text-primary, #f4f4f5); padding: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  width: auto; height: auto; float: none;
}
#rightbar { width: 280px; }
#rb_current_playlist li { font-size: 11px; padding: 3px 6px; }

/* === ИНТЕРФЕЙС === */
.jp-interface {
  position: static; height: auto; width: 100%;
  background: transparent; padding: 0;
  display: flex; flex-direction: column; align-items: stretch; gap: 4px;
}
.jp-controls-holder { all: unset; display: flex; align-items: center; gap: 8px; }

/* === АДАПТИВНОСТЬ === */
@media (max-width: 992px) {
  #webplayer { height: 170px; }
  .vesna-player-layout { height: 170px; }
  .vesna-player-art { width: 15%; min-width: 120px; height: 170px; }
  .vesna-player-center { width: 35%; min-width: 200px; }
  .vesna-player-tools { width: 20%; min-width: 120px; }
  .vesna-player-playlist { width: 25%; min-width: 150px; height: 170px; }
}

@media (max-width: 768px) {
  #webplayer { height: 140px; }
  .vesna-player-layout { height: 140px; }
  .vesna-player-art { width: 110px; min-width: 110px; height: 140px; }
  .vesna-player-playlist { display: none; }
  .vesna-player-tools { width: 20%; min-width: 120px; }
  .vesna-player-center { width: auto; flex: 1; padding: 6px; gap: 3px; }
  .jp-controls a { width: 30px; height: 30px; }
  .jp-controls a svg { width: 16px; height: 16px; }
  a.jp-play, a.jp-pause { width: 36px; height: 36px; }
  a.jp-play svg, a.jp-pause svg { width: 20px; height: 20px; }
  a.jp-stop { display: none; }
  .vesna-volume-bar { width: 50px; }
  .playing_artist { display: none; }
  .vesna-player-progress .jp-progress { height: 8px; }
  .vesna-player-progress .jp-progress:hover { height: 12px; }
  .vesna-player-tools .action_button a { width: 28px; height: 28px; }
  .jp-toggles a { width: 28px; height: 28px; }
}
