/* Video dars xonasi: har doim qorong'i fonda, to'liq ekran. */
.room {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  max-width: none;
  background: #0b0d0c;
  color: #f1f3f2;
}

.room-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
}

.room-title {
  display: grid;
  min-width: 0;
  line-height: 1.3;
}

.room-title strong {
  font-size: 15.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-title span {
  color: #99a19d;
  font-size: 13px;
}

.room-top-side {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
}

.room-timer {
  color: #c9cfcc;
  font-size: 14px;
}

.room-status {
  padding: 5px 11px;
  border-radius: 999px;
  background: #1c211f;
  color: #c9cfcc;
  font-size: 12.5px;
  font-weight: 550;
  white-space: nowrap;
}

.room-status.ok {
  background: #11332a;
  color: #34d399;
}

.room-status.warn {
  background: #382a10;
  color: #f2bd62;
}

.room-body {
  display: flex;
  flex: 1;
  gap: 12px;
  min-height: 0;
  padding: 0 12px;
}

.room-stage {
  position: relative;
  flex: 1;
  min-width: 0;
  border-radius: 20px;
  background: #141816;
  overflow: hidden;
}

.room-remote {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #141816;
}

.room-remote.is-screen {
  object-fit: contain;
  background: #000;
}

.room-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  padding: 24px;
  background: #141816;
  text-align: center;
}

.room-placeholder .avatar {
  width: 96px;
  height: 96px;
  font-size: 32px;
  background: hsl(var(--hue) 40% 24%);
  color: hsl(var(--hue) 60% 84%);
}

.room-placeholder strong {
  font-size: 19px;
  font-weight: 600;
}

.room-placeholder p {
  color: #99a19d;
}

.room-notice {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 28px);
  padding: 10px 14px;
  border-radius: 12px;
  background: #382a10;
  color: #f2bd62;
  font-size: 13.5px;
  text-align: center;
}

.room-unmute {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
}

.room-self {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: clamp(120px, 22%, 240px);
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  background: #222826;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.room-local {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

.room-local.is-screen {
  object-fit: contain;
  transform: none;
}

.room-self-off {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: #222826;
  color: #7d8581;
}

.room-chat {
  display: flex;
  flex-direction: column;
  width: 320px;
  flex: none;
  border-radius: 20px;
  background: #141816;
  overflow: hidden;
}

.chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 10px 8px 16px;
}

.room .icon-btn {
  color: #99a19d;
}

.room .icon-btn:hover {
  background: #222826;
  color: #fff;
}

.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  padding: 8px 14px;
  overflow: auto;
}

.chat-empty {
  margin: auto;
  color: #7d8581;
  font-size: 13.5px;
  text-align: center;
}

.chat-msg {
  display: grid;
  gap: 2px;
  justify-items: start;
  max-width: 88%;
}

.chat-msg span {
  color: #7d8581;
  font-size: 11px;
}

.chat-msg.mine {
  align-self: flex-end;
  justify-items: end;
}

.chat-bubble {
  padding: 8px 12px;
  border-radius: 14px;
  background: #222826;
  font-size: 14px;
}

.chat-msg.mine .chat-bubble {
  background: #0b7a5c;
  color: #fff;
}

.chat-form {
  display: flex;
  gap: 8px;
  padding: 10px;
}

.chat-form .input {
  background: #0b0d0c;
  border-color: #2a302d;
  color: #f1f3f2;
}

.room-controls {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
}

.ctrl {
  position: relative;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 0;
  border-radius: 50%;
  background: #222826;
  color: #f1f3f2;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s;
}

.ctrl-icon {
  display: grid;
}

.ctrl:hover {
  background: #2e3532;
}

.ctrl:active {
  transform: scale(0.96);
}

.ctrl.is-off {
  background: #f1f3f2;
  color: #b3261e;
}

.ctrl.is-active {
  background: #34d399;
  color: #05251a;
}

.ctrl-leave {
  width: 72px;
  border-radius: 999px;
  background: #d93025;
}

.ctrl-leave:hover {
  background: #b3261e;
}

.ctrl-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #34d399;
  border: 2px solid #0b0d0c;
}

@media (max-width: 760px) {
  .room-body {
    padding: 0 8px;
  }

  .room-chat {
    position: absolute;
    inset: 60px 8px 92px;
    z-index: 2;
    width: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  }

  .room-self {
    width: 108px;
    aspect-ratio: 3 / 4;
  }

  .ctrl {
    width: 50px;
    height: 50px;
  }
}
