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

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 20% 10%, rgba(117, 80, 255, 0.36), transparent 32rem),
    radial-gradient(circle at 82% 22%, rgba(0, 214, 201, 0.24), transparent 28rem),
    linear-gradient(135deg, #070811 0%, #111225 54%, #080914 100%);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(8, 9, 20, 0.72);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: inherit;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.brand-mark {
  width: 2rem;
  height: 2rem;
  border-radius: 0.75rem;
  background: conic-gradient(from 210deg, #00f5d4, #845ef7, #ff4ecd, #00f5d4);
  box-shadow: 0 0 28px rgba(132, 94, 247, 0.7);
}

.import-button,
.download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0 1.1rem;
  border: 0;
  border-radius: 999px;
  background: #f8f7ff;
  color: #0b0b17;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.32);
}

.import-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.shell {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 5rem) 0;
}

.hero {
  display: grid;
  gap: 2rem;
  margin-bottom: 2rem;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: #72f5e7;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 800px;
  margin-bottom: 1rem;
  font-size: clamp(2.4rem, 8vw, 6.25rem);
  line-height: 0.88;
  letter-spacing: -0.08em;
}

h2 {
  margin-bottom: 0.5rem;
  font-size: clamp(1.4rem, 3vw, 2rem);
  letter-spacing: -0.04em;
}

.lede,
.empty-state p,
.loading p {
  max-width: 670px;
  color: rgba(248, 247, 255, 0.72);
  font-size: 1.05rem;
  line-height: 1.7;
}

.stage {
  min-height: 520px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 2rem;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.36);
}

.empty-state,
.loading {
  display: grid;
  min-height: 520px;
  place-items: center;
  padding: 2rem;
  text-align: center;
}

.empty-state > *,
.loading > * {
  grid-column: 1;
}

.orb {
  width: min(56vw, 21rem);
  height: min(56vw, 21rem);
  margin-bottom: 1.5rem;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.9), transparent 0.8rem),
    conic-gradient(#00f5d4, #845ef7, #ff4ecd, #00f5d4);
  filter: blur(0.2px);
  opacity: 0.88;
}

.spinner {
  width: 5rem;
  height: 5rem;
  margin-bottom: 1.4rem;
  border: 0.45rem solid rgba(255, 255, 255, 0.16);
  border-top-color: #72f5e7;
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
}

progress {
  width: min(28rem, 100%);
  height: 0.65rem;
  margin-top: 1rem;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

progress::-webkit-progress-bar {
  background: rgba(255, 255, 255, 0.12);
}

progress::-webkit-progress-value,
progress::-moz-progress-bar {
  background: linear-gradient(90deg, #00f5d4, #845ef7, #ff4ecd);
}

.result video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.result-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem;
}

.result-actions h2 {
  margin: 0;
  word-break: break-word;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 700px) {
  .result-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .download-button {
    width: 100%;
  }
}
