:root {
  color-scheme: dark;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #050608;
  color: #f4f7fb;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 50% 26%, rgba(80, 210, 195, 0.16), transparent 28rem),
    linear-gradient(145deg, #050608 0%, #10141b 46%, #07090d 100%);
}

button {
  font: inherit;
}

.shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.status-panel {
  width: min(100%, 560px);
  text-align: center;
}

h1 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(2.1rem, 8vw, 4.8rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 0.95;
}

.orb {
  display: grid;
  width: min(54vw, 240px);
  aspect-ratio: 1;
  margin: 34px auto 24px;
  place-items: center;
  border: 1px solid rgba(160, 245, 231, 0.32);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent),
    radial-gradient(circle, rgba(109, 223, 208, 0.3), rgba(28, 44, 58, 0.1) 58%, transparent 64%);
  box-shadow:
    0 0 60px rgba(87, 229, 209, 0.16),
    inset 0 0 42px rgba(255, 255, 255, 0.08);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.orb span {
  width: 34%;
  aspect-ratio: 1;
  border-radius: 999px;
  background: #eefdf9;
  box-shadow: 0 0 40px rgba(150, 255, 239, 0.7);
}

.orb[data-state="listening"] {
  border-color: rgba(120, 255, 220, 0.75);
  animation: pulse 1.4s ease-in-out infinite;
}

.orb[data-state="speaking"] {
  border-color: rgba(255, 214, 112, 0.76);
  box-shadow:
    0 0 78px rgba(255, 205, 96, 0.2),
    inset 0 0 42px rgba(255, 255, 255, 0.08);
  transform: scale(1.04);
}

.orb[data-state="error"] {
  border-color: rgba(255, 91, 91, 0.86);
  box-shadow: 0 0 64px rgba(255, 72, 72, 0.2);
}

.state {
  min-height: 2.8rem;
  margin: 0;
  color: #c9fdf3;
  font-size: 1.95rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.detail {
  min-height: 1.5rem;
  margin: 10px auto 28px;
  color: #aeb9c8;
  font-size: 1rem;
  line-height: 1.45;
}

.detail:empty {
  display: none;
}

.help {
  width: min(100%, 520px);
  margin: 0 auto 24px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 214, 112, 0.32);
  border-radius: 8px;
  background: rgba(255, 214, 112, 0.08);
  color: #f5e5b8;
  text-align: left;
}

.help p {
  margin: 0;
  line-height: 1.45;
}

.help p + p {
  margin-top: 8px;
}

.controls {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.controls button {
  min-width: 112px;
  min-height: 44px;
  border: 1px solid rgba(173, 244, 231, 0.28);
  border-radius: 8px;
  background: rgba(238, 253, 249, 0.08);
  color: #f8fffd;
  cursor: pointer;
}

.controls button:hover:not(:disabled) {
  background: rgba(238, 253, 249, 0.16);
}

.controls button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.035);
  }
}
