.flex {
  display: flex;
}
.container {
  margin: 0 auto !important;
  max-width: 860px;
}
.main__multimedia {
  flex-wrap: wrap;
  justify-content: space-evenly;
  align-items: center;
  gap: 40px;
  margin-bottom: 50px;
}

.track-title-wrapper {
  position: relative;
  max-width: 210px;
  overflow: hidden;
  white-space: nowrap;
  box-sizing: border-box;
}

/* Стили для основного плеера */

.player-main {
  position: relative;
  flex-direction: column;
  gap: 40px;
  flex-grow: 1;
  max-width: 230px;
  width: 100%;
  padding: 25px;
  background-color: #1f2531;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  display: flex;
  justify-content: space-between;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}

/* 1. Размытый фон (Обложка) */
.player-main__bg {
  position: absolute;
  inset: -10px;
  background-size: cover;
  background-position: center;
  filter: blur(5px) brightness(0.75);
  z-index: -2;
  transition: background-image 0.5s ease-in-out;
}

/* 2. Эффект Шума (Grain) */
.player-main__noise {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.07; /* Едва заметный шум */
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  pointer-events: none;
}

/* Контент поверх фона */
.player-main .controls,
.player-main .track-info {
  position: relative;
  z-index: 2;
  width: 100%;
}

/* Текст */
.player-main .js-track-title {
  font-size: 18px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  color: #fff;
}
.player-main .artist {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7); /* Полупрозрачный белый */
  margin-top: 4px;
}

/* Кнопка Play - Стеклянная (Glassmorphism) */
.player-main button.play-pause-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, background 0.2s;
}

.player-main button.play-pause-btn:hover {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.player-main button.play-pause-btn svg {
  fill: #fff;
  width: 24px;
  height: 24px;
  margin-left: 2px; /* Визуальная компенсация треугольника play */
}

.js-track-title {
  display: inline-block;
  padding-left: 0;
  font-weight: 700;
  transform: none;
}

.track-title-wrapper.marquee-active .js-track-title {
  padding-left: 100%; /* Уводим за правый край */
  animation-name: marquee;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

.track-info .artist {
  font-size: 16px;
  color: #fff;
}

.controls {
  align-items: center;
}

.track-info {
  align-self: start;
}

.track-info__cover {
  width: 48px;
  height: 48px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #333;
  border-radius: 4px;
  margin-right: 15px;
  flex-shrink: 0;
}

button.play-pause-btn {
  margin-top: 0 !important;
  padding: 0;
  width: max-content;
  height: 32px;
  border-radius: 50%;
  border: none;
  font-size: 20px;
  color: #fff;
  background-color: transparent !important;
  cursor: pointer;
}

.volume-slider {
  -webkit-appearance: none;
  width: 200px;
  height: 6px;
  background: linear-gradient(
    to right,
    #347bcb 0%,
    #347bcb 10%,
    #ddd 10%,
    #ddd 100%
  );
  border-radius: 3px;
  outline: none;
  cursor: pointer;
  transition: background 0.2s;
}

/* Chrome, Safari, Edge */
.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  background: #347bcb;
  border: 1px solid #fff;
  border-radius: 50%;
  transition: transform 0.2s, background 0.2s;
}

.volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.volume-slider::-webkit-slider-thumb:active {
  transform: scale(1.3);
}

/* Firefox */
.volume-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: #347bcb;
  border: 1px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}

.volume-slider::-moz-range-thumb:hover {
  transform: scale(1.2);
}

.volume-slider::-moz-range-thumb:active {
  transform: scale(1.3);
}

.volume-slider::-moz-range-progress {
  background: #347bcb;
  height: 6px;
  border-radius: 3px;
}

.volume-slider::-moz-range-track {
  background: #ddd;
  height: 6px;
  border-radius: 3px;
}

/* Прячем стандартный плеер, если он нам не нужен для отладки */
#audio-source {
  display: none;
}

/* --- Сетка потоков --- */
.stream-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-bottom: 30px;
}

/* --- Карточка потока --- */
.stream-item {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end; /* Текст прижат к низу */
  align-items: center;

  flex-basis: 150px;
  height: 160px;
  padding: 0;
  text-align: center;
  color: #fff;
  border-radius: 12px;
  background-color: #1f2531;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
    box-shadow 0.3s ease;
  isolation: isolate;
}

.stream-item::before {
  display: none;
}

/* Эффекты при наведении на саму карточку */
.stream-item:hover {
  transform: translateY(-5px) scale(1.02); /* Чуть всплывает и увеличивается */
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
  z-index: 2;
}

/* --- ТЕКСТОВЫЙ БЛОК --- */
.stream-item__text {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 12px 10px;
  font-family: sans-serif;
  font-size: 14px;
  /* font-weight: 600; */
  line-height: 1.2;
  letter-spacing: 0.3px;
  background: rgba(20, 24, 33, 0.75);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  /* border-top: 1px solid rgba(255, 255, 255, 0.1); */
  transition: background 0.3s ease;
  color: #eff1f3;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis; /* Троеточие, если текст не влезает */
}

/* При наведении делаем подложку текста чуть светлее/ярче */
.stream-item:hover .stream-item__text {
  background: rgba(30, 36, 50, 0.85);
  /* border-top: 1px solid rgba(255, 255, 255, 0.2); */
}

/* Активный элемент */
.active-item {
  box-shadow: 0 0 0 2px #347bcb, 0 8px 20px rgba(0, 0, 0, 0.5);
}

/* Если активен, подкрашиваем полоску текста в фирменный цвет (опционально) */
.active-item .stream-item__text {
  /* background: rgba(52, 123, 203, 0.85); */
  color: #fff;
}

/* Контейнер для загрузчика внутри кнопки */
.play-pause-btn.loading .loader {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  perspective: 800px;
}

/* Общие стили для каждого из трех колец */
.play-pause-btn.loading .inner {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

.play-pause-btn.loading .inner.one {
  left: 0%;
  top: 0%;
  border-bottom: 2px solid #1f2531;
  animation: rotate-one 1s linear infinite;
}

.play-pause-btn.loading .inner.two {
  right: 0%;
  top: 0%;
  border-right: 2px solid #1f2531;
  animation: rotate-two 1s linear infinite;
}

.play-pause-btn.loading .inner.three {
  right: 0%;
  bottom: 0%;
  border-top: 2px solid #1f2531;
  animation: rotate-three 1s linear infinite;
}

/* Стили для нижнего плеера */
.player-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  justify-content: center;
  width: 100%;
  background: rgba(20, 24, 33, 0.75);
  color: #fff;
  padding: 14px 20px;
  align-items: center;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(16px) saturate(180%);
  z-index: 3;
}
.player-footer__container {
  justify-content: space-evenly;
  align-items: center;
  flex-basis: 1900px;
  column-gap: 20px;
  flex-wrap: wrap;
}

.player-footer .track-info .artist,
.player-footer .track-info .title {
  color: #ecf0f1;
}

.player-footer .play-pause-btn svg {
  fill: #fff;
}

.player-footer .play-pause-btn.loading .inner.one,
.player-footer .play-pause-btn.loading .inner.two,
.player-footer .play-pause-btn.loading .inner.three {
  border-color: #fff;
}
.player-footer .track-info {
  flex-basis: 210px;
  align-items: center;
}

#drp-history-section {
  animation: fadeIn 0.5s ease;
}

/* --- HISTORY LIST --- */
.drp-history-list {
  margin: 30px auto;
  max-width: 860px;
  padding: 0 10px;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.2s;
  color: #fff;
}

.history-item:hover {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
}

.history-time {
  font-size: 13px;
  color: #888;
  min-width: 40px;
  font-variant-numeric: tabular-nums; /* Чтобы цифры не прыгали */
}

.history-cover {
  width: 50px;
  height: 50px;
  background-size: cover;
  background-position: center;
  border-radius: 6px;
  background-image: url("../images/no-cover.jpg");
  background-color: #222;
  flex-shrink: 0;
  background-repeat: no-repeat;
}

.history-meta {
  flex-grow: 1;
  overflow: hidden;
}

.history-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-artist {
  font-size: 13px;
  color: #aaa;
}

.history-loading,
.history-empty {
  text-align: center;
  color: #777;
  padding: 20px;
  font-style: italic;
}

/* Джинглы можно сделать чуть тусклее */
.history-item.is-jingle {
  opacity: 0.6;
}

/* --- ОБЩИЙ КОНТЕЙНЕР --- */
.drp-history-container {
  max-width: 860px;
  margin: 20px auto;
  padding: 0 10px;
}

/* --- ВИД: СПИСОК (Вертикальный) --- */
.drp-history-wrapper.drp-is-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.drp-is-list .drp-hist-card {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
}
.drp-is-list .drp-hist-img {
  width: 50px;
  height: 50px;
  flex-shrink: 0;
}

/* --- ВИД: СЛАЙДЕР (Горизонтальный) --- */
.drp-history-wrapper.drp-is-slider {
  display: flex;
  overflow-x: auto; /* Включаем прокрутку */
  gap: 15px;
  padding-bottom: 15px;
  scroll-snap-type: x mandatory; /* Магнитный эффект */
  scrollbar-width: thin; /* Тонкий скролл для Firefox */
}

/* Стилизация скроллбара для Chrome/Safari */
.drp-history-wrapper.drp-is-slider::-webkit-scrollbar {
  height: 4px;
}
.drp-history-wrapper.drp-is-slider::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}
.drp-history-wrapper.drp-is-slider::-webkit-scrollbar-thumb {
  background: #347bcb;
  border-radius: 10px;
}

.drp-is-slider .drp-hist-card {
  flex: 0 0 140px; /* Фиксированная ширина карточки в слайдере */
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.drp-is-slider .drp-hist-img {
  width: 140px;
  height: 140px;
}

/* --- ОБЩИЙ КОНТЕЙНЕР ИСТОРИИ --- */
.drp-history-root {
  margin: 30px auto;
  max-width: 860px;
  gap: 15px;
}

/* --- ВАРИАНТ 1: СПИСОК (3 КОЛОНКИ) --- */
.drp-history-root.layout-list {
  display: flex;
  flex-wrap: wrap; /* Перенос в строчку */
}

.drp-history-root.layout-list .history-item {
  flex: 0 0 calc(33.333% - 10px); /* Ровно 3 колонки */
  min-width: 200px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  padding: 10px;
  border-bottom: none;
}

/* --- ВАРИАНТ 2: СЛАЙДЕР (ГОРИЗОНТАЛЬНЫЙ) --- */
.drp-history-root.layout-slider {
  display: flex;
  overflow-x: auto; /* Горизонтальный скролл */
  flex-wrap: nowrap;
  padding-bottom: 15px;

  /* Скрываем стандартный скроллбар для красоты (Chrome/Safari) */
  scrollbar-width: thin;
  scrollbar-color: #347bcb rgba(255, 255, 255, 0.1);
}

.drp-history-root.layout-slider::-webkit-scrollbar {
  height: 4px;
}
.drp-history-root.layout-slider::-webkit-scrollbar-thumb {
  background: #347bcb;
  border-radius: 10px;
}

.drp-history-root.layout-slider .history-item {
  flex: 0 0 250px; /* Фиксированная ширина карточки в слайдере */
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 12px;
}

/* --- ВНУТРЕННИЕ СТИЛИ КАРТОЧКИ --- */
.history-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
}

.history-meta {
  overflow: hidden;
}

.history-time {
  font-size: 11px;
  color: #347bcb;
  font-weight: bold;
  margin-bottom: 2px;
}

.history-title {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-artist {
  font-size: 12px;
  color: #999;
}

/* Заголовки для шорткодов */
.drp-section-title {
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 25px;
  margin-top: 10px;
  text-transform: none; /* Или uppercase, если хочешь строгости */
  letter-spacing: 0.5px;
  position: relative;
}

/* Обертка для шорткодов (чтобы не слипались) */
.drp-shortcode-wrapper {
  margin-bottom: 50px;
  width: 100%;
}

/* Адаптивность для 3 колонок */
@media (max-width: 768px) {
  .drp-history-root.layout-list .history-item {
    flex: 0 0 calc(50% - 10px); /* 2 колонки на планшетах */
  }
}
@media (max-width: 480px) {
  .drp-history-root.layout-list .history-item {
    flex: 0 0 100%; /* 1 колонка на телефонах */
  }
}

@media (max-width: 1024px) {
  .volume-slider {
    width: 100px;
  }
}
@media (max-width: 800px) {
  .main__multimedia {
    flex-direction: column-reverse;
  }
}

/* Анимации вращения в 3D (остаются без изменений) */
@keyframes rotate-one {
  0% {
    transform: rotateX(35deg) rotateY(-45deg) rotateZ(0deg);
  }
  100% {
    transform: rotateX(35deg) rotateY(-45deg) rotateZ(360deg);
  }
}
@keyframes rotate-two {
  0% {
    transform: rotateX(50deg) rotateY(10deg) rotateZ(0deg);
  }
  100% {
    transform: rotateX(50deg) rotateY(10deg) rotateZ(360deg);
  }
}
@keyframes rotate-three {
  0% {
    transform: rotateX(35deg) rotateY(55deg) rotateZ(0deg);
  }
  100% {
    transform: rotateX(35deg) rotateY(55deg) rotateZ(360deg);
  }
}

@keyframes marquee {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(-100%, 0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
