:root {
  color-scheme: dark;
  font-family: "Space Grotesk", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bg: #030a16;
  --panel: rgba(8, 18, 33, 0.85);
  --border: rgba(255, 255, 255, 0.08);
  --text: #f4f8ff;
  --muted: rgba(244, 248, 255, 0.65);
  --accent: #52ffe0;
  --accent-strong: #3a7bd5;
  --danger: #ff5c8d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top, #071c32 0%, #050f1b 40%, #02060c 100%);
  color: var(--text);
}

.shell {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 48px 24px 72px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(120px, 180px) 1fr;
  align-items: center;
}

.hero__icon {
  width: 160px;
  height: 160px;
  background: linear-gradient(135deg, rgba(82, 255, 224, 0.15), rgba(58, 123, 213, 0.35));
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
}

.hero__icon svg {
  width: 120px;
  height: 120px;
}

.eyebrow {
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.3em;
  color: var(--muted);
  margin: 0 0 8px;
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 4vw, 48px);
}

.lead {
  margin: 0;
  color: var(--muted);
  max-width: 600px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(20px);
}

.panel--accent {
  background: linear-gradient(135deg, rgba(82, 255, 224, 0.12), rgba(58, 123, 213, 0.2));
}

.panel__form {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

label {
  font-size: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--muted);
}

input {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  font-size: 15px;
  color: var(--text);
}

input:focus {
  outline: 2px solid rgba(82, 255, 224, 0.5);
  border-color: transparent;
}

.panel__actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
}

.status {
  font-size: 14px;
  color: var(--muted);
}

.status--ok {
  color: var(--accent);
}

.status--error {
  color: var(--danger);
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.cta {
  border: none;
  border-radius: 999px;
  padding: 16px 32px;
  font-size: 16px;
  font-weight: 600;
  color: #02060c;
  background: linear-gradient(120deg, var(--accent), var(--accent-strong));
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta:active {
  transform: scale(0.98);
}

.cta.recording {
  background: linear-gradient(120deg, var(--danger), #ff805f);
  color: #fff;
}

.ghost {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  border-radius: 12px;
  padding: 12px 18px;
  cursor: pointer;
}

.ghost:disabled,
.cta:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
  box-shadow: 0 0 12px currentColor;
}

.meters {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.meter {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
  height: 12px;
  overflow: hidden;
}

.meter__bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  transition: width 80ms linear;
}

.meter__bar.playback {
  background: linear-gradient(90deg, #ffd25f, #ff874f);
}

.hints {
  margin-top: 18px;
  color: var(--muted);
  font-size: 14px;
  display: grid;
  gap: 4px;
}

.conversation {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.conversation__column h2,
.logs h2 {
  margin-top: 0;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bubble {
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.bubble--user {
  border-color: rgba(82, 255, 224, 0.4);
}

.bubble--assistant {
  border-color: rgba(58, 123, 213, 0.4);
}

.assistant {
  min-height: 140px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.assistant__text {
  min-height: 80px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 16px;
  letter-spacing: 0.01em;
}

.assistant__audio {
  font-size: 14px;
  color: var(--muted);
}

.logs__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logs__body {
  max-height: 200px;
  overflow-y: auto;
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.log-entry {
  font-family: "Space Grotesk", monospace;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
}

.log-entry strong {
  color: var(--accent);
  margin-right: 8px;
}

@media (max-width: 720px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero__icon {
    margin: 0 auto;
  }

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