:root {
  color-scheme: dark;
  --bg: #14161a;
  --panel: #1e2126;
  --text: #e8eaed;
  --muted: #9aa0a6;
  --accent: #4c8dff;
  --danger: #e5484d;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
}

#app {
  width: 100%;
  max-width: 640px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.5rem;
}

.state {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.state[hidden] {
  display: none;
}

h1 {
  font-size: 1.4rem;
  margin: 0;
}

.hint {
  color: var(--muted);
  font-size: 0.9rem;
}

#remote-video-container {
  position: relative;
  background: #000;
  border-radius: 8px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

#remote-video-container video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#waiting-for-video {
  position: absolute;
  margin: 0;
}

#controls {
  display: flex;
  gap: 0.75rem;
}

button {
  font: inherit;
  border: none;
  border-radius: 6px;
  padding: 0.65rem 1.1rem;
  cursor: pointer;
  background: var(--panel);
  color: var(--text);
}

button:hover {
  filter: brightness(1.15);
}

button[aria-pressed="true"] {
  background: var(--accent);
}

#hangup-btn {
  background: var(--danger);
  margin-left: auto;
}

#message-form {
  display: flex;
  gap: 0.5rem;
}

#message-input {
  flex: 1;
  font: inherit;
  padding: 0.65rem 0.85rem;
  border-radius: 6px;
  border: 1px solid #333;
  background: var(--panel);
  color: var(--text);
}

#send-btn {
  background: var(--accent);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
