:root {
  --bg-soft: #f7f5f8;
  --text-main: #3d3a46;
  --text-muted: #7b748b;
  --blue: #73aee8;
  --pink: #f47bb5;
  --green: #79cf8a;
  --yellow: #f7cb4d;
  --white-glass: rgba(255, 255, 255, 0.78);
  --danger: #e85d75;
}

* {
  box-sizing: border-box;
  font-family: Inter, system-ui, -apple-system, sans-serif;
}

body {
  margin: 0;
  color: var(--text-main);
}

.home-body {
  min-height: 100vh;
  background: linear-gradient(140deg, #edf5ff 0%, #fef1f8 48%, #fff9e7 100%);
}

.home-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
}

.home-panel {
  width: min(560px, 94vw);
  background: var(--white-glass);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(244, 123, 181, 0.2);
  border-radius: 1.5rem;
  padding: 2.2rem;
  text-align: center;
  box-shadow: 0 12px 45px rgba(88, 102, 145, 0.12);
}

.brand-logo {
  width: 92px;
  height: 92px;
  margin-bottom: 0.9rem;
  border-radius: 22px;
  box-shadow: 0 10px 26px rgba(91, 105, 140, 0.15);
}

.brand-logo.small {
  width: 44px;
  height: 44px;
  margin: 0;
  border-radius: 12px;
  box-shadow: 0 5px 14px rgba(91, 105, 140, 0.12);
}

h1 {
  margin: 0;
  font-size: clamp(1.8rem, 2.8vw, 2.5rem);
}

.subtitle,
.status {
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.btn,
select {
  border: 1px solid rgba(117, 110, 141, 0.25);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text-main);
  border-radius: 0.75rem;
  padding: 0.7rem 0.95rem;
  font-size: 0.98rem;
}

.btn {
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(80, 78, 101, 0.1);
}

.btn.primary {
  background: linear-gradient(120deg, var(--blue), var(--pink));
  color: #fff;
  border-color: transparent;
}

.btn.big {
  margin-top: 1.3rem;
  font-size: 1.1rem;
  padding: 0.9rem 1.2rem;
}

.btn.danger {
  background: var(--danger);
  color: #fff;
  border-color: transparent;
}

.room-body {
  min-height: 100vh;
  background: linear-gradient(160deg, #eef6ff 0%, #fef3f8 47%, #f4ffef 100%);
}

.room-screen {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 0.9rem;
  padding: 0.9rem;
}

.top-bar {
  background: var(--white-glass);
  border: 1px solid rgba(110, 107, 133, 0.17);
  border-radius: 1rem;
  padding: 0.8rem 1rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.top-bar-main {
  min-width: 0;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.security-note {
  margin: 0.35rem 0 0;
  color: #32945c;
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.shield {
  font-size: 1rem;
}

.error {
  margin: 0.35rem 0 0;
  color: #cf4662;
}

.room-tools {
  display: grid;
  justify-items: end;
  gap: 0.45rem;
}

.room-id {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.copy-feedback {
  font-size: 0.88rem;
  color: #4f8c61;
}

.video-stage {
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.video-pane {
  position: relative;
  border-radius: 1.1rem;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(115, 174, 232, 0.26), rgba(247, 203, 77, 0.25));
}

video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pane-label {
  position: absolute;
  left: 0.8rem;
  bottom: 0.8rem;
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 999px;
  padding: 0.3rem 0.65rem;
}

.remote-waiting {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1rem;
  color: #756e8d;
  background: linear-gradient(145deg, rgba(244, 123, 181, 0.16), rgba(121, 207, 138, 0.12));
  font-size: clamp(1rem, 1.7vw, 1.35rem);
}

.controls-bar {
  background: var(--white-glass);
  border: 1px solid rgba(110, 107, 133, 0.17);
  border-radius: 1rem;
  padding: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.icon-btn {
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 999px;
  border: 1px solid rgba(110, 107, 133, 0.25);
  background: #fff;
  font-size: 1.2rem;
  cursor: pointer;
}

.icon-btn.off {
  background: rgba(232, 93, 117, 0.15);
  border-color: rgba(232, 93, 117, 0.45);
}

.camera-select {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.hidden {
  display: none !important;
}

@media (max-width: 980px) {
  .top-bar {
    flex-direction: column;
  }

  .room-tools {
    justify-items: start;
  }

  .video-stage {
    grid-template-columns: 1fr;
  }

  .video-pane {
    min-height: 35vh;
  }
}
