html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  padding: 0;
  margin: 0;
  outline: 0;
  font-size: clamp(1em, 3.5vw, 1.5em); /* Базовый размер для rem */
}

/* На мобильных делаем базу чуть больше для удобства */
/*@media (max-width: 768px) {
  html {
      font-size: 1em;
  }
}*/

/*
@media screen {
    html {
        font-size: 1em;
    }
}
*/

body {
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  overflow: hidden;
  background-color: #1a1a1a;
  background-image: url('tube.jpeg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  font-family: "Helvetica Neue", "Futura", "Trebuchet MS", Arial;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: rgba(255, 255, 255, 0);
}

/* Top Info */
#title {
  position: absolute;
  width: 100%;
  top: 3%;
  line-height: 1.1; /* Относительное значение для нормального расстояния между строками */
  text-align: center;
  font-size: 2.125rem; /* 34px при базе 16px, 38px при базе 18px на мобильных */
  opacity: 0.9;
  font-weight: 300;
  color: #fff;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.33);
}
/* Controls */
.controlsOuter {
  position: absolute;
  width: 90%;
  left: 5%;
  bottom: 2%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.5);
  padding: 1rem 0;
  border-radius: 1rem;
}
.controlsInner {
  display: flex;
  gap: 2rem;
  align-items: center;
  position: relative; /* Для абсолютного позиционирования loading */
}
#volumeBtn {
  position: absolute;
  right: 5%;
}
#chatBtn {
  position: absolute;
  left: 5%;
  text-decoration: none; /* Убираем подчеркивание ссылки */
}
.btn {
  cursor: pointer;
  opacity: 0.8;
  -webkit-filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.33));
  filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.33));
  -webkit-user-select: none;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 4rem; /* 90px на мобильных (база 18px), 80px на десктопе (база 16px) */
}
.btn:hover {
  opacity: 1;
}

/* Progress */
#waveform {
  width: 100%;
  height: 30%;
  position: absolute;
  left: 0;
  top: 50%;
  margin: -15% auto;
  display: none;
  cursor: pointer;
  opacity: 0.8;
  -webkit-user-select: none;
  user-select: none;
}
#waveform:hover {
  opacity: 1;
}

/* Loading */
#loading {
  position: absolute; /* Абсолютное позиционирование внутри controlsInner */
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: none;
  pointer-events: none; /* Не мешает кликам */
  color: white;
  -webkit-filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.33));
  filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.33));
  align-items: center;
  justify-content: center;
}

/* Plylist */
#playlist {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
}
#list {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
}

/* Volume */
#volume {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background-color: rgba(0, 0, 0, 0.5);
  touch-action: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  display: none;
}
.bar {
  position: absolute;
  top: 50%;
  left: 5%;
  margin: -5px auto;
  height: 10px;
  background-color: rgba(255, 255, 255, 0.9);
  box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.33);
  border-radius: 5px; /* Закругленные края */
}
#barEmpty {
  width: 90%;
  opacity: 0.5;
  box-shadow: none;
  cursor: pointer;
}
#barFull {
  width: 90%;
}
#sliderBtn {
  width: 50px;
  height: 50px;
  position: absolute;
  top: 50%;
  left: 93.25%;
  margin: -25px auto;
  background-color: rgba(255, 255, 255, 0.8);
  box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.33);
  border-radius: 25px;
  cursor: pointer;
}

#streamMessage {
    display: none;
}

/* Fade-In */
.fadeout {
  webkit-animation: fadeout 0.5s;
  -ms-animation: fadeout 0.5s;
  animation: fadeout 0.5s;
}
.fadein {
  webkit-animation: fadein 0.5s;
  -ms-animation: fadein 0.5s;
  animation: fadein 0.5s;
}
@keyframes fadein {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@-webkit-keyframes fadein {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@-ms-keyframes fadein {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes fadeout {
  from { opacity: 1; }
  to   { opacity: 0; }
}
@-webkit-keyframes fadeout {
  from { opacity: 1; }
  to   { opacity: 0; }
}
@-ms-keyframes fadeout {
  from { opacity: 1; }
  to   { opacity: 0; }
}
