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: #f0f0e8;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.33);
}
#title h1 {
  margin: 0;
  padding: 0;
  font-size: 2.5em;
}
/* Controls */
.controlsOuter {
  position: absolute;
  width: 95%;
  max-width: min(1000px, 70vh);
  left: 50%;
  transform: translateX(-50%);
  bottom: 2%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.5);
  padding: 1rem 0;
  border-radius: 1rem;
  box-sizing: border-box;
  gap: 1rem;
}
.controlsWrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  position: relative;
  padding: 1rem 0;
  box-sizing: border-box;
}
.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: #f0f0e8;
  font-size: 6rem; /* 108px на мобильных (база 18px), 96px на десктопе (база 16px) */
  line-height: 1;
  padding: 0.5rem 0;
  width: 6rem;
  height: 6rem;
}
.btn:hover {
  opacity: 1;
}

/* VU Meters */
#vumeters {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: row;
  -webkit-user-select: none;
  user-select: none;
  width: 100%;
  padding: 1rem;
  box-sizing: border-box;
  gap: 2rem;
}

#vumeterLeft, #vumeterRight {
  width: calc(45%);
  aspect-ratio: 1;
  display: block;
}

#vumeterLeft {
    margin-left: calc(100% * 0.085 / 2.17);
    margin-right: 0;
  //margin-right: calc(100% * 0.085 / 2.17 / 2);
}

#vumeterRight {
    //margin-left: calc(100% * 0.085 / 2.17 / 2);
    margin-left:0;
       margin-right: calc(100% * 0.085 / 2.17);
}

/* 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;
}

/* 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;
  z-index: 1000;
}
#barEmpty {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 95%;
  max-width: 1000px;
  height: 10px;
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: 5px;
  cursor: pointer;
  z-index: 1;
}
#barFull {
  position: absolute;
  height: 10px;
  width: 0px;
  background-color: rgba(255, 255, 255, 0.9);
  box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.33);
  border-radius: 5px;
  pointer-events: none;
  z-index: 2;
}
#sliderBtn {
  width: 30px;
  height: 70px;
  position: absolute;
  background-color: #ffffff;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.4);
  border-radius: 8px;
  cursor: pointer;
  z-index: 3;
  margin: 0 0 -35px -15px;
  border: 2px solid rgba(200, 200, 200, 0.3);
}

#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; }
}
