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

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

button {
  font: inherit;
}

.shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.panel {
  width: min(100%, 420px);
  min-height: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 32px;
  border: 1px solid #1e293b;
  border-radius: 8px;
  background: #0f172a;
  box-shadow: 0 24px 70px rgb(0 0 0 / 45%);
}

.mark {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgb(34 211 238 / 14%);
  color: #67e8f9;
}

.mark svg,
.mic svg {
  width: 40px;
  height: 40px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.1;
  font-weight: 650;
  letter-spacing: 0;
}

.status {
  min-height: 24px;
  margin: 0;
  color: #cbd5e1;
  font-size: 14px;
  text-align: center;
}

.meter {
  height: 44px;
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0.35;
}

.meter.active {
  opacity: 1;
}

.meter span {
  width: 6px;
  height: 18px;
  border-radius: 999px;
  background: #22d3ee;
}

.meter.active span:nth-child(1) { animation: pulse 850ms infinite ease-in-out; }
.meter.active span:nth-child(2) { animation: pulse 950ms infinite ease-in-out 80ms; }
.meter.active span:nth-child(3) { animation: pulse 760ms infinite ease-in-out 160ms; }
.meter.active span:nth-child(4) { animation: pulse 900ms infinite ease-in-out 120ms; }
.meter.active span:nth-child(5) { animation: pulse 820ms infinite ease-in-out 40ms; }

@keyframes pulse {
  0%, 100% { transform: scaleY(0.45); }
  50% { transform: scaleY(1.8); }
}

.controls {
  display: grid;
  grid-template-columns: 1fr 88px 1fr;
  gap: 12px;
  width: 100%;
  align-items: center;
}

.button {
  min-height: 44px;
  border: 1px solid #334155;
  border-radius: 6px;
  background: #020617;
  color: #f8fafc;
  cursor: pointer;
}

.button:hover:not(:disabled) {
  background: #1e293b;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.button.primary {
  background: #22d3ee;
  color: #020617;
  border-color: #22d3ee;
  font-weight: 650;
}

.button.primary:hover:not(:disabled) {
  background: #67e8f9;
}

.button.danger {
  border-color: #7f1d1d;
  color: #fecaca;
}

.button.mic {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #0e7490;
  border-color: #22d3ee;
}

.button.mic.recording {
  background: #dc2626;
  border-color: #fca5a5;
  color: #fff;
}

@media (max-width: 520px) {
  .panel {
    min-height: calc(100vh - 48px);
  }

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

  .button.mic {
    justify-self: center;
  }
}
