* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: #0d0f14;
  color: #e6e8ee;
  min-height: 100vh;
}

.app {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

header h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

.status {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  background: #2a2f3a;
}
.status.idle      { background: #2a2f3a; color: #9aa3b2; }
.status.connecting{ background: #3a3715; color: #e7c34b; }
.status.listening { background: #103a1e; color: #61e08a; }
.status.speaking  { background: #0f2f4a; color: #6ab6ff; }
.status.error     { background: #3a1010; color: #ff7676; }

.video-wrap {
  position: relative;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  margin-bottom: 16px;
}

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

#video-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #5b6272;
  font-size: 14px;
}

.controls {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

button {
  background: #1b2030;
  border: 1px solid #2a3040;
  color: #e6e8ee;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}

button:hover:not(:disabled) {
  background: #242a3b;
}
button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

#start-btn { background: #1f4a2a; border-color: #2d6a3c; }
#start-btn:hover:not(:disabled) { background: #25583a; }
#stop-btn { background: #4a1f1f; border-color: #6a2d2d; }

.debug {
  background: #131724;
  border: 1px solid #1f2533;
  border-radius: 10px;
  padding: 12px 16px;
}
.debug summary { cursor: pointer; font-weight: 600; }

.debug dl {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 4px 16px;
  margin: 12px 0 0 0;
  font-size: 13px;
}
.debug dt { color: #7d879c; }
.debug dd { margin: 0; word-break: break-word; }
