:root {
  color-scheme: dark;
  --bg: #090b14;
  --panel: #121729;
  --panel-border: #2a3355;
  --text: #edf2ff;
  --muted: #9fb0d7;
  --primary: #5b8cff;
  --primary-2: #7f5bff;
  --danger: #ff5f76;
  --ok: #45d483;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 30% -10%, #182449 0%, var(--bg) 45%) fixed;
  min-height: 100vh;
}

.container {
  width: min(1180px, 92vw);
  margin-inline: auto;
}

.bg-glow {
  position: fixed;
  border-radius: 999px;
  filter: blur(90px);
  opacity: 0.28;
  pointer-events: none;
}

.bg-glow-a {
  width: 360px;
  height: 360px;
  background: #6f56ff;
  top: -120px;
  right: -90px;
}

.bg-glow-b {
  width: 420px;
  height: 420px;
  background: #0aa4ff;
  left: -140px;
  bottom: -150px;
}

.hero {
  padding: 40px 0 22px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
}

.hero-text h1 {
  font-size: clamp(1.8rem, 2.4vw, 2.8rem);
  margin: 8px 0 12px;
}

.hero-text h1 span {
  color: #84a8ff;
}

.hero-text p {
  color: var(--muted);
  margin: 0;
  max-width: 65ch;
}

.eyebrow {
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  color: #bfd0ff;
}

.hero-card {
  background: linear-gradient(140deg, #121a33, #11162b);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 16px 18px;
}

.hero-card h2 {
  margin-top: 0;
}

.hero-card ul {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
  display: grid;
  gap: 8px;
}

.app-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding-bottom: 24px;
}

.panel {
  background: linear-gradient(180deg, #11172a, #101526);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.panel h3 {
  margin-top: 0;
  margin-bottom: 14px;
}

.upload-panel,
.settings-panel,
.action-panel {
  align-self: start;
}

.preview-panel {
  grid-column: 1 / -1;
}

.dropzone {
  border: 1.5px dashed #3f4f8b;
  border-radius: 14px;
  display: grid;
  place-items: center;
  padding: 28px 16px;
  text-align: center;
  background: #0f1425;
  cursor: pointer;
  transition: border-color 150ms ease, transform 150ms ease;
}

.dropzone.dragging {
  border-color: #7ea3ff;
  transform: translateY(-2px);
}

.dropzone input {
  display: none;
}

.drop-icon {
  font-size: 1.55rem;
  margin-bottom: 6px;
}

.meta-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.meta-grid div {
  background: #0c1222;
  border: 1px solid #27335d;
  border-radius: 10px;
  padding: 8px;
}

.meta-grid span {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.meta-grid strong {
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.analysis-progress-wrap {
  margin-top: 12px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #2b3968;
  background: #0c1222;
}

.analysis-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.88rem;
  color: #cfddff;
}

.analysis-head strong {
  color: #9fc0ff;
}

.field-grid {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  color: #dbe6ff;
  font-size: 0.92rem;
}

select,
input[type="text"] {
  background: #0d1323;
  color: var(--text);
  border: 1px solid #2e3d6e;
  border-radius: 10px;
  padding: 10px 11px;
  font: inherit;
}

.inline-check {
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
}

.inline-check input {
  inline-size: 16px;
  block-size: 16px;
}

video {
  width: 100%;
  max-height: 430px;
  background: #03060f;
  border-radius: 12px;
  border: 1px solid #2c3966;
}

.timeline-controls,
.manual-range,
.actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.manual-range label {
  min-width: 180px;
}

button {
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  color: var(--text);
}

button.primary {
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
}

button.ghost {
  background: #101a34;
  border-color: #35457a;
}

button.danger {
  background: #2a1320;
  border-color: #6f2940;
  color: #ffc8d2;
}

button.large {
  padding: 12px 16px;
}

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

.segments-list-wrap {
  margin-top: 14px;
}

.list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.segments-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.segments-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  background: #0d1427;
  border: 1px solid #2b3968;
  border-radius: 10px;
  padding: 9px 10px;
}

.segments-list li button {
  padding: 5px 8px;
  border-radius: 8px;
}

progress {
  width: 100%;
  height: 14px;
  margin-top: 12px;
}

.status {
  color: #cae0ff;
  font-size: 0.92rem;
}

.downloads {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.downloads a {
  display: inline-block;
  width: fit-content;
  text-decoration: none;
  color: #d4e5ff;
  background: #0d1f38;
  border: 1px solid #355b98;
  border-radius: 9px;
  padding: 8px 10px;
}

.muted {
  color: var(--muted);
  font-size: 0.9rem;
}

.footer {
  padding: 8px 0 22px;
  color: var(--muted);
}

code {
  background: #16203c;
  border: 1px solid #30457f;
  border-radius: 6px;
  padding: 2px 6px;
}

@media (max-width: 930px) {
  .hero {
    grid-template-columns: 1fr;
  }

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

  .preview-panel {
    grid-column: auto;
  }
}
