:root {
  color-scheme: dark;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: #101214;
  color: #f5f7f8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(28, 91, 86, 0.35), transparent 42%),
    linear-gradient(315deg, rgba(162, 92, 62, 0.26), transparent 38%),
    #101214;
}

button,
input {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  min-height: 100vh;
  padding: 24px;
}

.call-stage {
  position: relative;
  min-height: calc(100vh - 48px);
  overflow: hidden;
  background: #050607;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

.call-stage:fullscreen {
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  border: 0;
  border-radius: 0;
}

.call-stage:fullscreen .remote-video {
  min-height: 100vh;
}

.call-stage:fullscreen .local-video {
  display: none;
}

.remote-video {
  width: 100%;
  height: 100%;
  min-height: calc(100vh - 48px);
  object-fit: cover;
  display: block;
  background: #050607;
}

.local-video {
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: min(260px, 34vw);
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  background: #1b1f22;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
}

.fullscreen-button {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  min-height: 38px;
  padding: 0 13px;
  color: #f5f7f8;
  background: rgba(5, 6, 7, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
}

.fullscreen-button:hover {
  background: rgba(18, 24, 26, 0.82);
}

.fullscreen-button:disabled {
  color: #8b969b;
  background: rgba(255, 255, 255, 0.12);
}

.control-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
  min-width: 0;
}

.eyebrow {
  margin: 0 0 8px;
  color: #7dd3c7;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 4.5rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.status {
  min-height: 3rem;
  margin: 18px 0 0;
  color: #cbd3d7;
  line-height: 1.5;
}

.field {
  display: grid;
  gap: 8px;
  color: #dbe3e6;
  font-size: 0.95rem;
}

.field input {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  color: #f5f7f8;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  outline: none;
}

.field input:focus {
  border-color: #7dd3c7;
  box-shadow: 0 0 0 3px rgba(125, 211, 199, 0.18);
}

.button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.media-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.media-controls button:last-child {
  grid-column: 1 / -1;
}

button {
  min-height: 44px;
  padding: 0 14px;
  color: #0c1112;
  background: #7dd3c7;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
}

button:disabled {
  color: #8b969b;
  background: rgba(255, 255, 255, 0.12);
  cursor: not-allowed;
}

#hangupButton:not(:disabled) {
  color: #fff;
  background: #b85243;
}

.media-controls button:not(:disabled) {
  color: #f5f7f8;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.media-controls button.is-off:not(:disabled) {
  color: #fff;
  background: #b85243;
  border-color: #b85243;
}

.hint {
  color: #aeb9bd;
  font-size: 0.92rem;
  line-height: 1.55;
}

@media (max-width: 860px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .call-stage,
  .remote-video {
    min-height: 56vh;
  }

  .control-panel {
    justify-content: start;
  }
}

@media (max-width: 520px) {
  .app-shell {
    padding: 14px;
    gap: 18px;
  }

  .local-video {
    right: 10px;
    bottom: 10px;
    width: 42vw;
  }

  .fullscreen-button {
    top: 10px;
    right: 10px;
  }

  .button-row {
    grid-template-columns: 1fr;
  }

  .media-controls {
    grid-template-columns: 1fr;
  }

  .media-controls button:last-child {
    grid-column: auto;
  }
}
