:root {
  --bg: #000000;
  --fg: #ffffff;
  --muted: #8b909a;
  --accent: #3b7dd8;
  --accent-hover: #5591e6;
  --violet: #9b5de5;
  --panel: #0b0b0d;
  --border: #1e1f24;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(1100px 600px at 50% 8%, #0a0d16 0%, #000 60%),
    var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 96px 24px 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  text-align: center;
}

.state { width: 100%; }
.hidden { display: none !important; }

/* ---------- IDLE ---------- */
.title {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 4px;
  margin: 0 0 10px;
}
.subtitle {
  font-size: 15px;
  letter-spacing: 1px;
  color: var(--muted);
  margin: 0 0 44px;
}

.dropzone {
  border: 1.5px dashed var(--border);
  border-radius: 18px;
  padding: 72px 24px;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  background: linear-gradient(180deg, rgba(255,255,255,0.015), rgba(255,255,255,0));
}
.dropzone:hover, .dropzone.drag {
  border-color: var(--accent);
  background: rgba(59,125,216,0.06);
}
.dz-title { font-size: 18px; font-weight: 500; color: var(--fg); margin: 0; }
.dz-file { font-size: 14px; color: var(--muted); margin: 14px 0 0; }

.hint {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: .3px;
  margin: 20px 0 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  margin-top: 28px;
  padding: 14px 34px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background .2s, opacity .2s, transform .1s, border-color .2s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:disabled { background: #1a2537; color: #5a6472; cursor: not-allowed; }
.btn-secondary {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--accent); }
.btn:active { transform: translateY(1px); }

/* ---------- PROCESSING ---------- */
.proc-title {
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 40px;
}
.progress {
  height: 8px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin: 0 auto 18px;
  max-width: 460px;
}
.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--violet));
  border-radius: 999px;
  transition: width .4s ease;
}
.status-line {
  font-size: 15px;
  color: var(--muted);
  letter-spacing: .3px;
  margin: 0;
}

.error-box { margin-top: 8px; }
.error-msg { color: #ff6b6b; font-size: 14px; margin: 14px 0; }

/* ---------- COMPLETE ---------- */
.done-title {
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 28px;
}
.video-shell {
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border);
}
#videoPlayer { width: 100%; display: block; background: #000; }
.complete-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

@media (max-width: 520px) {
  .wrap { padding-top: 64px; }
  .title { font-size: 26px; letter-spacing: 2px; }
  .dropzone { padding: 52px 18px; }
  .complete-actions { flex-direction: column; }
  .btn { width: 100%; }
}
