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

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top, rgba(37, 99, 235, 0.28), transparent 28%),
    linear-gradient(180deg, #07111f 0%, #091829 100%);
}

.layout {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 16px 0 64px;
}

.hero {
  display: none;
}

.eyebrow {
  margin: 0 0 8px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #7dd3fc;
  font-size: 0.8rem;
}

h1, h2, p {
  margin-top: 0;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  margin-bottom: 12px;
}

.subtitle,
.muted,
ol {
  color: #b8c7d9;
}

.panel {
  background: rgba(8, 16, 29, 0.8);
  border: 1px solid rgba(125, 211, 252, 0.14);
  border-radius: 20px;
  padding: 20px;
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.22);
}

.controls,
.preview-panel,
.notes {
  margin-top: 16px;
}

.sticky-preview {
  position: sticky;
  top: 8px;
  z-index: 10;
}

.preview-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 10px;
}

.preview-topbar h2 {
  margin: 0;
}

.camera-select {
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px solid rgba(125, 211, 252, 0.35);
  background: rgba(15, 23, 42, 0.9);
  color: #e6eef8;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.95rem;
}

input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.9);
  color: inherit;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

button {
  padding: 12px 18px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #38bdf8, #2563eb);
  color: white;
  font-weight: 700;
  cursor: pointer;
}

button[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.status {
  margin: 18px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 600;
}

.status.idle {
  background: rgba(148, 163, 184, 0.14);
}

.status.active {
  background: rgba(34, 197, 94, 0.18);
  color: #86efac;
}

.status.error {
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
}

video {
  width: 100%;
  margin-top: 0;
  border-radius: 18px;
  background: #020617;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  max-height: 60vh;
}

ol {
  padding-left: 20px;
  margin-bottom: 0;
}

code {
  color: #7dd3fc;
}

@media (max-width: 640px) {
  .layout {
    width: min(100% - 20px, 1080px);
    padding-top: 24px;
  }

  .panel {
    padding: 16px;
  }
}
