@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600&family=Fira+Code:wght@400;500&display=swap");

:root {
  --bg: #0f172a;
  --panel: #111827;
  --panel-2: #0b1224;
  --accent: #00d2ff;
  --accent-2: #ff7a18;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --stroke: rgba(255,255,255,0.08);
  --shadow: 0 20px 50px rgba(0,0,0,0.35);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Space Grotesk", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 20% 20%, #102d47, #0f172a 40%),
              radial-gradient(circle at 80% 0%, #2a0f33, #0f172a 35%),
              var(--bg);
  min-height: 100vh;
  padding: 32px;
}

.app { max-width: 1200px; margin: 0 auto; }

header { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 24px; }
h1 { margin: 0; font-size: 44px; letter-spacing: -0.02em; }
h2 { margin: 0; font-size: 24px; }
p { margin: 6px 0; }
.lede { color: var(--muted); max-width: 640px; }

.badges { display: flex; gap: 8px; }
.badges span {
  padding: 8px 12px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  font-size: 13px;
}

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

.card {
  background: linear-gradient(145deg, var(--panel), var(--panel-2));
  border: 1px solid var(--stroke);
  border-radius: 20px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.pill {
  background: rgba(0,210,255,0.08);
  color: var(--accent);
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(0,210,255,0.4);
  font-size: 13px;
}
.pill.alt {
  background: rgba(255,122,24,0.08);
  color: var(--accent-2);
  border-color: rgba(255,122,24,0.4);
}

.eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 12px; color: var(--muted); margin-bottom: 4px; }

.field { display: grid; gap: 8px; margin: 14px 0; }
.field input, .field select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  font-size: 16px;
}
.field input:focus, .field select:focus { outline: 2px solid rgba(0,210,255,0.25); }

.actions { display: flex; gap: 10px; margin: 12px 0; }
button {
  flex: 1;
  padding: 14px 16px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  color: #0b1224;
  background: linear-gradient(135deg, var(--accent), #18ffd6);
  box-shadow: 0 10px 25px rgba(0,210,255,0.25);
  transition: transform 150ms ease, box-shadow 150ms ease;
}
button:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(0,210,255,0.35); }
button.ghost {
  background: rgba(255,255,255,0.05);
  color: var(--text);
  box-shadow: none;
  border: 1px solid var(--stroke);
}

.statusbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  margin: 8px 0 4px;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
}
.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #6b7280;
  box-shadow: 0 0 0 0 rgba(0,210,255,0.2);
  transition: all 180ms ease;
}
.dot.waiting { background: #f59e0b; box-shadow: 0 0 0 6px rgba(245,158,11,0.10); animation: pulse 1.4s infinite; }
.dot.listening { background: var(--accent); box-shadow: 0 0 0 6px rgba(0,210,255,0.16); animation: pulse 1.2s infinite; }
.dot.processing { background: #a855f7; box-shadow: 0 0 0 6px rgba(168,85,247,0.12); }
.dot.done { background: #10b981; box-shadow: 0 0 0 4px rgba(16,185,129,0.18); }
.dot.idle { background: #6b7280; }

@keyframes pulse { 0% { transform: scale(1);} 50% { transform: scale(1.2);} 100% { transform: scale(1);} }

.card.receiver.listening { border-color: rgba(0,210,255,0.3); box-shadow: 0 12px 30px rgba(0,210,255,0.12); }

canvas {
  width: 100%;
  border-radius: 14px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--stroke);
  margin-top: 10px;
}

.hint { color: var(--muted); font-size: 13px; }

.readout { display: flex; justify-content: space-between; gap: 16px; margin-top: 10px; align-items: flex-start; }
.mono { font-family: "Fira Code", monospace; letter-spacing: 0.04em; }
.small { font-size: 13px; color: var(--muted); }

@media (max-width: 720px) { body { padding: 18px; } header { flex-direction: column; } }
