/* Базовое оформление */
body {
  font-family: Arial, sans-serif;
  background: #1a1a1a;
  color: #fff;
  margin: 0;
  padding: 10px;
  min-height: 100vh;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Контейнер плеера */
.player {
  background: #2a2a2a;
  padding: 15px;
  border-radius: 15px;
  box-shadow: 0 0 15px rgba(0,0,0,0.5);
  width: 320px;
  text-align: center;

  display: flex;
  flex-direction: column;
  max-height: 90vh; /* ограничиваем */
}

/* Кнопки */
.controls {
  margin: 10px 0;
}

button {
  background: #444;
  border: none;
  padding: 10px;
  margin: 5px;
  border-radius: 50%;
  cursor: pointer;
  color: white;
}

button:hover {
  background: #666;
}

/* Список песен */
.playlist {
  list-style: none;
  padding: 0;
  margin-top: 15px;

  flex-grow: 1;              /* 👈 занимает всё свободное место */
  min-height: 150px;         /* чтобы не схлопывался */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#rad_list {
  overflow-y: auto;
  overflow-x: hidden;

  /* Firefox */
  scrollbar-width: thin;
  scrollbar-color: #555 #1a1a1a;

  /* IE и старый Edge */
  -ms-overflow-style: auto;
}

/* Chrome, Safari, Opera */
#rad_list::-webkit-scrollbar {
  width: 8px;
}

#rad_list::-webkit-scrollbar-track {
  background: #1a1a1a;
  border-radius: 8px;
}

#rad_list::-webkit-scrollbar-thumb {
  background: #555;
  border-radius: 8px;
}

#rad_list::-webkit-scrollbar-thumb:hover {
  background: #888;
}





.playlist li {
  padding: 8px;
  cursor: pointer;
}

.playlist li.active {
  background: #555;
  border-radius: 8px;
}

/* Прогресс и громкость */
.progress,
.volume {
  width: 100%;
  margin-top: 10px;
}

/* Бегущая строка */
.marquee-box {
  margin-top: 12px;
  padding-bottom: 10px;
  width: 100%;
  height: 35px;
  overflow: hidden;
  position: relative;
  white-space: nowrap;
  box-sizing: border-box;
}

.marquee-box span {
  display: inline-block;
  padding-right: 100%;  /* запас справа */
  animation: marquee 40s linear infinite;
  font-size: 1rem;
  color: #ffcc00;
}

@keyframes marquee {
  0%   { transform: translateX(100%); }   /* старт за экраном справа */
  100% { transform: translateX(-100%); }  /* конец за экраном слева */
}


#marquee-text {
  display: inline-block;
  white-space: nowrap;
  position: absolute;
  will-change: transform;
  animation: marquee 12s linear infinite;
  color: #ffcc00;
  font-size: 14px;
}

#marquee-text::after {
  content: attr(data-text);
  padding-left: 50px;
}

@keyframes marquee {
  from { transform: translateX(100%); }
  to   { transform: translateX(-100%); }
}

/* 🔧 Для мобильных */
@media (max-width: 768px) {
  body {
    justify-content: flex-start; /* плеер сверху */
  }

  .player {
    width: 100%;
    max-width: 480px;
    margin-top: 10px;

    height: calc(100vh - 20px); /* 👈 реальная высота экрана */
    max-height: none;           /* убираем ограничение */
  }

  .playlist {
    flex-grow: 1;     /* занимает оставшееся место */
    min-height: 200px;
  }
}

.mode-controls {
  margin: 10px 0;
}

.mode-controls button {
  background: #333;
  border: none;
  padding: 8px 12px;
  margin: 3px;
  border-radius: 8px;
  cursor: pointer;
  color: #fff;
}

.mode-controls button.active {
  background: #ffcc00;
  color: #000;
  font-weight: bold;
}

#radiobells_container {
  margin-top: 35px;

}



