:root {
  --green: #76b900;       /* NVIDIA green */
  --green-dim: #5a8c00;
  --bg: #0a0c08;
  --panel: #12150e;
  --panel-2: #171b10;
  --line: #2a3320;
  --text: #e8efe0;
  --muted: #8a957d;
  --red: #ff4d4d;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.grid-bg {
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(1200px 600px at 70% -10%, rgba(118,185,0,0.10), transparent 60%),
    linear-gradient(transparent 95%, rgba(118,185,0,0.05) 95%),
    linear-gradient(90deg, transparent 95%, rgba(118,185,0,0.05) 95%);
  background-size: auto, 26px 26px, 26px 26px;
  pointer-events: none;
  z-index: 0;
}

header, main, footer { position: relative; z-index: 1; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 650; letter-spacing: .2px; }
.brand .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); box-shadow: 0 0 14px var(--green); }
.brand-by { color: var(--muted); font-weight: 500; }
.brand-link { color: var(--green); text-decoration: none; font-weight: 650; }
.brand-link:hover { text-decoration: underline; }
.brand-tag {
  font-size: 12px; color: var(--green);
  border: 1px solid var(--green-dim); border-radius: 999px;
  padding: 4px 11px; letter-spacing: .4px;
}

main {
  flex: 1;
  width: min(860px, 92vw);
  margin: 0 auto;
  padding: 44px 0 36px;
}

.hero h1 {
  font-size: clamp(28px, 5vw, 46px);
  line-height: 1.05;
  margin: 0 0 12px;
  letter-spacing: -0.5px;
}
.hero .sub { color: var(--muted); font-size: 17px; max-width: 56ch; margin: 0; }
.hero strong { color: var(--text); }

.console {
  margin-top: 30px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,0.8);
}

.controls {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "rec meta" "level level";
  gap: 18px 20px;
  align-items: center;
  padding: 22px;
  border-bottom: 1px solid var(--line);
}

.rec {
  grid-area: rec;
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--green); color: #0a0c08;
  border: none; border-radius: 12px;
  padding: 14px 22px; font-size: 16px; font-weight: 700;
  cursor: pointer; transition: transform .08s ease, box-shadow .2s ease, background .2s;
  box-shadow: 0 0 0 0 rgba(118,185,0,0.6);
}
.rec:hover { transform: translateY(-1px); }
.rec:active { transform: translateY(0); }
.rec .mic {
  width: 14px; height: 22px; border-radius: 7px;
  background: currentColor; position: relative; display: inline-block;
}
.rec .mic::after {
  content: ""; position: absolute; left: -5px; bottom: -8px; right: -5px;
  height: 10px; border: 2px solid currentColor; border-top: none;
  border-radius: 0 0 12px 12px;
}
.rec.recording {
  background: var(--red); color: #fff;
  animation: pulse 1.4s infinite;
}
.rec.recording .mic { border-radius: 3px; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255,77,77,0.5); }
  70% { box-shadow: 0 0 0 16px rgba(255,77,77,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,77,77,0); }
}
.rec:disabled { opacity: .5; cursor: not-allowed; }

.meta { grid-area: meta; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.lang { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.lang select {
  background: var(--bg); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 10px; font-size: 14px;
}
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.status .pip { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.status.live { color: var(--green); }
.status.live .pip { background: var(--green); box-shadow: 0 0 10px var(--green); animation: blink 1s infinite; }
.status.err { color: var(--red); }
.status.err .pip { background: var(--red); }
@keyframes blink { 50% { opacity: .35; } }

.level { grid-area: level; height: 6px; background: var(--bg); border-radius: 4px; overflow: hidden; }
.level-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--green-dim), var(--green)); transition: width .06s linear; }

.transcript-wrap { padding: 8px; }
.transcript {
  min-height: 220px; max-height: 46vh; overflow-y: auto;
  padding: 22px 24px; font-size: 20px; line-height: 1.6;
  white-space: pre-wrap; word-break: break-word;
}
.transcript .placeholder { color: var(--muted); font-size: 17px; }
.transcript .final { color: var(--text); }
.transcript .interim { color: var(--muted); font-style: italic; }

.console-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 22px; border-top: 1px solid var(--line);
}
.ghost {
  background: transparent; color: var(--muted);
  border: 1px solid var(--line); border-radius: 8px;
  padding: 7px 14px; font-size: 13px; cursor: pointer;
}
.ghost:hover { color: var(--text); border-color: var(--muted); }
.words { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }

.footer {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  padding: 16px 24px; border-top: 1px solid var(--line);
  font-size: 12px; color: var(--muted); font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
.footer a { color: var(--green); text-decoration: none; }
