:root {
  --level: 0;
  --bubble-color: #6b7280;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0b0b0f;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

#bubble {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

#bubble-core {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--bubble-color) 70%, white), var(--bubble-color));
  box-shadow: 0 0 calc(20px + 60px * var(--level)) calc(4px + 20px * var(--level))
    color-mix(in srgb, var(--bubble-color) 55%, transparent);
  transform: scale(calc(1 + 0.18 * var(--level)));
  transition: transform 60ms linear, box-shadow 60ms linear, background 400ms ease;
}

body[data-state="idle"] {
  --bubble-color: #6b7280;
}
body[data-state="connecting"] #bubble-core {
  --bubble-color: #6b7280;
  animation: pulse 1.1s ease-in-out infinite;
}
body[data-state="listening"] {
  --bubble-color: #3b82f6;
}
body[data-state="speaking"] {
  --bubble-color: #22c55e;
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

#status {
  color: #d1d5db;
  font-size: 15px;
  letter-spacing: 0.02em;
  text-align: center;
  min-height: 1.2em;
}
