:root {
  --bg: #07111a;
  --bg-elevated: rgba(8, 21, 33, 0.88);
  --surface: rgba(10, 26, 40, 0.92);
  --surface-strong: rgba(14, 37, 55, 0.98);
  --stroke: rgba(126, 188, 233, 0.18);
  --text: #f2f7fb;
  --muted: #9cb5c7;
  --accent: #7ef29a;
  --accent-strong: #30d268;
  --danger: #ff8d73;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(48, 210, 104, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(96, 174, 255, 0.18), transparent 26%),
    linear-gradient(180deg, #081420 0%, #050a11 100%);
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  padding: 28px;
  margin-bottom: 22px;
}

.hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(48, 210, 104, 0.14), rgba(12, 30, 45, 0.92)),
    var(--surface-strong);
}

.eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

h1,
h2 {
  margin: 0;
  line-height: 1.05;
}

h1 {
  max-width: 12ch;
  font-size: clamp(2.4rem, 5vw, 4.7rem);
}

h2 {
  font-size: clamp(1.5rem, 2vw, 2rem);
}

.hero-copy,
.hint,
.paths span,
.panel-error p {
  color: var(--muted);
}

.hero-copy {
  max-width: 62ch;
  margin: 14px 0 0;
  font-size: 1.04rem;
}

.samples {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.sample-pill,
.secondary-link,
.download-link {
  text-decoration: none;
}

.sample-pill {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(126, 242, 154, 0.2);
  color: var(--text);
  background: rgba(9, 25, 18, 0.52);
  font: inherit;
  cursor: pointer;
}

.sample-group-label {
  margin-top: 22px;
  margin-bottom: 10px;
}

.sample-preview-link {
  color: var(--muted);
}

.quick-demo-band {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-top: 28px;
  padding: 22px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(126, 242, 154, 0.12), rgba(7, 17, 26, 0.2));
  border: 1px solid rgba(126, 242, 154, 0.18);
}

.quick-demo-band h2 {
  max-width: 18ch;
}

.quick-demo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.inline-action-form {
  margin: 0;
}

.quick-demo-button {
  min-width: 260px;
}

.secondary-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 220px;
  padding: 14px 22px;
  border-radius: 999px;
  border: 1px solid rgba(126, 242, 154, 0.24);
  color: var(--text);
  text-decoration: none;
  background: rgba(4, 13, 22, 0.6);
}

.ready-demo-panel {
  scroll-margin-top: 24px;
}

.ready-demo-copy {
  margin-top: 14px;
}

.analysis-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-wide {
  grid-column: 1 / -1;
}

label {
  font-size: 0.92rem;
  font-weight: 500;
}

textarea,
input,
select,
.readonly-box {
  width: 100%;
  border: 1px solid rgba(156, 181, 199, 0.2);
  background: rgba(4, 13, 22, 0.75);
  color: var(--text);
  border-radius: 16px;
  padding: 14px 16px;
  font: inherit;
}

textarea {
  resize: vertical;
  min-height: 92px;
}

.readonly-box,
code {
  font-family: "IBM Plex Mono", monospace;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent-strong);
}

.field-toggle {
  justify-content: flex-end;
}

.primary-button {
  width: fit-content;
  min-width: 220px;
  border: none;
  border-radius: 999px;
  padding: 14px 22px;
  font: inherit;
  font-weight: 700;
  color: #04110b;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
  box-shadow: 0 18px 40px rgba(48, 210, 104, 0.28);
}

.primary-button:hover {
  transform: translateY(-1px);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.8;
}

.loading-note {
  margin: 0;
  color: var(--muted);
}

.panel-error {
  border-color: rgba(255, 141, 115, 0.25);
  background: rgba(40, 12, 8, 0.78);
}

.panel-status {
  border-color: rgba(126, 242, 154, 0.18);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.status-queued,
.status-running {
  color: #0d1a06;
  background: linear-gradient(135deg, #e7ff85, #7ef29a);
}

.status-done {
  color: #04110b;
  background: linear-gradient(135deg, #7ef29a, #30d268);
}

.status-failed {
  color: #240904;
  background: linear-gradient(135deg, #ffc5ae, #ff8d73);
}

.results-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  gap: 22px;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.secondary-link,
.download-link {
  color: var(--accent);
}

.video-frame {
  width: 100%;
  border-radius: 22px;
  border: 1px solid rgba(156, 181, 199, 0.2);
  background: #02060b;
}

.video-frame.compact {
  margin-top: 14px;
}

.download-link {
  display: inline-block;
  margin-top: 14px;
  font-weight: 600;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
  margin: 20px 0;
}

.stats-grid dt {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.stats-grid dd {
  margin: 0;
  font-size: 1rem;
}

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

.paths code {
  display: block;
  margin-top: 6px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(4, 13, 22, 0.75);
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.source-preview {
  margin-top: 22px;
}

@media (max-width: 900px) {
  .results-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .quick-demo-band {
    flex-direction: column;
    align-items: flex-start;
  }

  .panel-header {
    flex-direction: column;
  }

  .page-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 20px;
  }

  .panel {
    padding: 20px;
    border-radius: 22px;
  }
}
