:root {
  --bg: #07080a;
  --bg-elev: #101217;
  --bg-card: #16181e;
  --line: #2a2d36;
  --text: #f4f1ea;
  --muted: #9a9488;
  --orange: #ff7a18;
  --orange-2: #ff9a3c;
  --orange-dim: rgba(255, 122, 24, 0.14);
  --danger: #ff5c5c;
  --ok: #3dd68c;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --radius: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(255, 122, 24, 0.16), transparent 55%),
    radial-gradient(900px 500px at -10% 110%, rgba(255, 154, 60, 0.08), transparent 50%),
    var(--bg);
}

.wrap {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 64px;
}

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.logo {
  width: min(280px, 46vw);
  height: auto;
  display: block;
  filter: drop-shadow(0 8px 24px rgba(255, 122, 24, 0.25));
}

.hero-copy h1 {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: clamp(2rem, 5vw, 3.4rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 8px;
}
.hero-copy p {
  margin: 0;
  color: var(--muted);
  max-width: 36ch;
  line-height: 1.5;
}

.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent 40%), var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}

.drop {
  border: 1.5px dashed #3a3d47;
  border-radius: 12px;
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  background: var(--bg-elev);
}
.drop.dragover, .drop:hover {
  border-color: var(--orange);
  background: var(--orange-dim);
}
.drop strong { color: var(--orange-2); display: block; font-size: 1.15rem; margin-bottom: 6px; }
.drop span { color: var(--muted); font-size: 0.95rem; }
#file { display: none; }

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 720px) {
  .hero { flex-direction: column; align-items: flex-start; }
  .grid { grid-template-columns: 1fr; }
}

label {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
input[type="number"], input[type="text"] {
  width: 100%;
  background: #0c0d11;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
}
input[type="range"] {
  width: 100%;
  accent-color: var(--orange);
}
.row { margin-top: 14px; }
.range-val {
  float: right;
  color: var(--orange-2);
  font-variant-numeric: tabular-nums;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  color: var(--muted);
  font-size: 0.92rem;
  margin: 8px 0 18px;
}
.meta b { color: var(--text); font-weight: 600; }

.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
button, .btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 12px 20px;
  font: 600 0.95rem/1 "IBM Plex Sans", sans-serif;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.primary {
  background: linear-gradient(90deg, var(--orange), var(--orange-2));
  color: #1a0d00;
}
.primary:disabled { opacity: 0.5; cursor: not-allowed; }
.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

.progress {
  margin-top: 16px;
  height: 10px;
  background: #0c0d11;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.progress > span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--orange), #ffe0b8);
  transition: width 0.3s ease;
}
.status { margin-top: 10px; color: var(--muted); min-height: 1.3em; }
.status.ok { color: var(--ok); }
.status.err { color: var(--danger); white-space: pre-wrap; }

.hidden { display: none !important; }
.hint { color: var(--muted); font-size: 0.85rem; margin-top: 10px; }
.session-id { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.82rem; }

.preview-wrap {
  margin: 0 0 18px;
  background: #050608;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.preview-wrap video {
  display: block;
  width: 100%;
  max-height: 420px;
  background: #000;
}
.preview-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
}
.playhead {
  font-variant-numeric: tabular-nums;
  color: var(--orange-2);
  font-weight: 600;
  min-width: 5.5rem;
}
.trim-hint { color: var(--muted); font-size: 0.88rem; flex: 1; }
.preview-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.preview-actions .ghost { padding: 8px 14px; font-size: 0.85rem; }
.flash {
  outline: 2px solid var(--orange);
  outline-offset: 1px;
}
