 body {
    margin: 0;
    background-color: #1f2937;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: sans-serif;
    color: white;
  }

  /* ======= Верхняя надпись ======= */
  .room-label {
    text-align: center;
    padding: 1rem;
    background-color: #111827;
    border-bottom: 1px solid #374151;
    font-size: 1.2rem;
  }

  .room-code {
    color: #60a5fa;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s ease;
  }

  .room-code:hover {
    color: #93c5fd;
    text-decoration: underline;
  }

  /* Контейнер для видео */
  .video-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
  flex: 1;
  align-items: center;
  justify-content: center;
  position: relative;
}
 .video-container video {
    width: 100%;
    max-width: 500px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    border: 2px solid #374151;
  }

  /* new
  .video-container video {
  width: 100%;
  max-width: 500px;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  border: 2px solid #374151;
  background-color: black;
  object-fit: contain;
} */


  /* Панель с кнопками */
  .button-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #111827;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem;
    border-top: 1px solid #374151;
  }

  .button-bar button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 9999px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    transition: background-color 0.2s ease, transform 0.1s ease;
  }

  .button-bar button:active {
    transform: scale(0.97);
  }

  .button-create {
    background-color: #16a34a;
  }

  .button-create:hover {
    background-color: #15803d;
  }

  .button-join {
    background-color: #2563eb;
  }

  .button-join:hover {
    background-color: #1d4ed8;
  }

  .button-leave {
    background-color: #dc2626;
  }

  .button-leave:hover {
    background-color: #b91c1c;
  }

  /*-------------------------------------------*/
  /* --- Иконки микрофона и камеры --- */
.icon-bar {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.icon-button {
  background: none;
  border: 2px solid #374151;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 22px;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.icon-button:hover {
  background-color: #374151;
}

.mic-off .icon,
.cam-off .icon {
  text-decoration: line-through;
  opacity: 0.6;
}

/* --- Горизонтально на десктопе --- */
@media (min-width: 768px) {
  .video-container {
    flex-direction: row;
  }
  .video-container video {
    width: 48%;
  }
}

@media (max-width: 767px) {
  .video-container {
    flex-direction: column;
  }

  /* remoteVideo — почти на весь экран */
  #remoteVideo {
    position: fixed;
    top: 3rem;
    left: 0;
    width: 100%;
    height: calc(100% - 8rem); /* чтобы не перекрывал панель кнопок */
    object-fit: contain;
    background-color: black;
    border: none;
    border-radius: 0;
  }

  /* localVideo — плавающее окошко */
  #localVideo {
    position: fixed;
    bottom: 6rem; /* чуть выше панели кнопок */
    right: 1rem;
    width: 35%;
    max-width: 180px;
    aspect-ratio: 16/9;
    z-index: 10;
    cursor: grab;
    object-fit: contain;
    border: 2px solid #374151;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  }
}  
