/* =========================================================
   VidSlice — liquid glass UI
   ========================================================= */

:root {
  --bg: #eef1f7;
  --text: #0b0d12;
  --muted: #525a6b;
  --muted-2: #7b8396;

  --glass-a: rgba(255, 255, 255, 0.8);
  --glass-b: rgba(255, 255, 255, 0.5);
  --glass-border: rgba(255, 255, 255, 0.96);
  --glass-sheen: rgba(255, 255, 255, 0.7);
  --glass-sheen-2: rgba(255, 255, 255, 0.2);

  --line: rgba(20, 26, 40, 0.1);
  --line-strong: rgba(20, 26, 40, 0.2);
  --inset: rgba(255, 255, 255, 0.46);
  --field-bg: rgba(255, 255, 255, 0.66);
  --shadow: 0 32px 76px -24px rgba(38, 48, 80, 0.34), 0 2px 8px rgba(38, 48, 80, 0.05);
  --inner: inset 0 1px 0 rgba(255, 255, 255, 0.95), inset 0 0 0 1px rgba(20, 26, 40, 0.03), inset 0 -1px 0 rgba(255, 255, 255, 0.3);

  --accent: #b8ff3e;
  --accent-2: #4ff0b4;
  --accent-ink: #0b0e08;
  --accent-glow: rgba(120, 235, 80, 0.34);
  --grad-a: #4fae00;
  --grad-b: #00a37a;
  --success: #347a00;
  --danger: #d63c3c;
  --focus: #4fae00;

  --shade: rgba(8, 10, 14, 0.6);
  --header-bg: rgba(255, 255, 255, 0.46);

  --orb-1: #ffbf8f;
  --orb-2: #82efcb;
  --orb-3: #b1a4ff;
  --orb-4: #ffa9d3;
  --orb-opacity: 0.8;
  --grain-opacity: 0.05;

  --radius: 32px;
  --container: 1160px;
}

html[data-theme="dark"] {
  --bg: #06070a;
  --text: #f4f6fa;
  --muted: #9aa2b4;
  --muted-2: #6d7485;

  --glass-a: rgba(32, 36, 47, 0.64);
  --glass-b: rgba(13, 15, 22, 0.46);
  --glass-border: rgba(255, 255, 255, 0.14);
  --glass-sheen: rgba(255, 255, 255, 0.2);
  --glass-sheen-2: rgba(255, 255, 255, 0.05);

  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --inset: rgba(255, 255, 255, 0.035);
  --field-bg: rgba(0, 0, 0, 0.24);
  --shadow: 0 44px 110px -34px rgba(0, 0, 0, 0.92);
  --inner: inset 0 1px 0 rgba(255, 255, 255, 0.16), inset 0 -1px 0 rgba(0, 0, 0, 0.3);

  --accent: #c6ff4a;
  --accent-2: #55efb2;
  --accent-glow: rgba(150, 255, 70, 0.3);
  --grad-a: #d9ff72;
  --grad-b: #5df0b5;
  --success: #c8ff5e;
  --danger: #ff7070;
  --focus: #d8ff6a;

  --shade: rgba(4, 6, 10, 0.68);
  --header-bg: rgba(10, 12, 17, 0.46);

  --orb-1: #79f03c;
  --orb-2: #00d6a0;
  --orb-3: #7557ff;
  --orb-4: #ff4fa3;
  --orb-opacity: 0.22;
  --grain-opacity: 0.06;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 110px;
  color-scheme: light;
}

html[data-theme="dark"] { color-scheme: dark; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color 0.45s ease, color 0.45s ease;
}

[hidden] { display: none !important; }

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

button,
input,
a { font: inherit; }

button { -webkit-tap-highlight-color: transparent; }

svg { display: block; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 22px;
}

/* ---------- Background ---------- */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(255, 255, 255, 0.7), transparent 60%),
    linear-gradient(180deg, #f7f9fd 0%, var(--bg) 46%, #e6ebf4 100%);
  transition: background 0.45s ease;
}

html[data-theme="dark"] .backdrop {
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(120, 255, 120, 0.05), transparent 55%),
    var(--bg);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: var(--orb-opacity);
  will-change: transform;
}

.orb--1 {
  width: 34vw;
  height: 34vw;
  min-width: 340px;
  min-height: 340px;
  top: -16vw;
  left: -6vw;
  background: var(--orb-1);
  animation: drift-a 22s ease-in-out infinite alternate;
}

.orb--2 {
  width: 30vw;
  height: 30vw;
  min-width: 300px;
  min-height: 300px;
  top: 2vw;
  right: -14vw;
  background: var(--orb-2);
  animation: drift-b 26s ease-in-out infinite alternate;
}

.orb--3 {
  width: 34vw;
  height: 34vw;
  min-width: 320px;
  min-height: 320px;
  bottom: -20vw;
  left: 28vw;
  background: var(--orb-3);
  animation: drift-c 30s ease-in-out infinite alternate;
}

.orb--4 {
  width: 24vw;
  height: 24vw;
  min-width: 260px;
  min-height: 260px;
  bottom: -10vw;
  right: 2vw;
  background: var(--orb-4);
  animation: drift-a 24s ease-in-out infinite alternate-reverse;
}

@keyframes drift-a {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(6vw, 5vw, 0) scale(1.12); }
}
@keyframes drift-b {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-5vw, 8vw, 0) scale(0.92); }
}
@keyframes drift-c {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-7vw, -4vw, 0) scale(1.1); }
}

.grain {
  position: absolute;
  inset: 0;
  opacity: var(--grain-opacity);
  mix-blend-mode: overlay;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

/* ---------- Glass ---------- */

.glass {
  position: relative;
  background: linear-gradient(150deg, var(--glass-a), var(--glass-b));
  -webkit-backdrop-filter: blur(34px) saturate(180%);
  backdrop-filter: blur(34px) saturate(180%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow), var(--inner);
  border-radius: var(--radius);
}

.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 8% -30%, var(--glass-sheen), transparent 55%),
    radial-gradient(70% 50% at 100% 0%, var(--glass-sheen-2), transparent 60%);
  opacity: 0.6;
  z-index: 0;
}

.glass::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0) 36%, rgba(255, 255, 255, 0) 64%, rgba(255, 255, 255, 0.22));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0.55;
  z-index: 0;
}

html[data-theme="dark"] .glass::after { opacity: 0.35; }

.glass > * { position: relative; z-index: 1; }

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  padding: 14px 16px 0;
  pointer-events: none;
}

.nav {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 9px 10px 9px 16px;
  display: flex;
  align-items: center;
  gap: 18px;
  border-radius: 999px;
  pointer-events: auto;
  transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.site-header.is-scrolled .nav {
  box-shadow: 0 24px 60px -24px rgba(10, 14, 30, 0.45), var(--inner);
  background: linear-gradient(150deg, var(--glass-a), var(--glass-b));
}

html[data-theme="dark"] .site-header.is-scrolled .nav {
  box-shadow: 0 24px 70px -20px rgba(0, 0, 0, 0.9), var(--inner);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}

.brand__mark {
  width: 34px;
  height: 34px;
  display: block;
  filter: drop-shadow(0 6px 14px rgba(110, 240, 120, 0.3));
}

.brand__mark svg { width: 100%; height: 100%; }

.brand__name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.brand__name span {
  background: linear-gradient(100deg, var(--grad-a), var(--grad-b));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}

.nav__links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav__links a:hover {
  color: var(--text);
  background: var(--inset);
}

.nav__actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  background: var(--inset);
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  padding: 12px 20px;
  text-decoration: none;
  cursor: pointer;
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  transition: transform 0.22s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.22s ease, background 0.22s ease, opacity 0.2s ease;
}

.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.985); }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: var(--accent-ink);
  border-color: rgba(255, 255, 255, 0.38);
  box-shadow: 0 14px 34px -10px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, 0.7), inset 0 -1px 0 rgba(0, 0, 0, 0.12);
}

.btn--primary:hover {
  box-shadow: 0 20px 44px -12px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, 0.75), inset 0 -1px 0 rgba(0, 0, 0, 0.12);
}

.btn--ghost {
  background: var(--inset);
  color: var(--text);
  border-color: var(--line-strong);
}

.btn--ghost:hover { background: var(--field-bg); }

.btn--sm {
  padding: 8px 14px;
  font-size: 12.5px;
  gap: 6px;
}

.btn--sm svg { width: 15px; height: 15px; }

.icon-btn {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--inset);
  color: var(--text);
  cursor: pointer;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.icon-btn:hover {
  transform: translateY(-1px);
  background: var(--field-bg);
  border-color: var(--glass-border);
}

.icon-btn:active { transform: scale(0.94); }

.icon-btn svg { width: 18px; height: 18px; }

.icon-btn--solid {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--accent-ink);
  border-color: transparent;
  box-shadow: 0 8px 22px -8px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.icon-btn--solid:hover { background: linear-gradient(135deg, var(--accent), var(--accent-2)); }

.theme-toggle { position: relative; }
.icon--sun { display: none; }
.icon--moon { display: block; }
html[data-theme="dark"] .icon--sun { display: block; }
html[data-theme="dark"] .icon--moon { display: none; }

.icon--pause { display: none; }
.is-playing .icon--play { display: none; }
.is-playing .icon--pause { display: block; }

.icon--muted { display: none; }
.is-muted .icon--volume { display: none; }
.is-muted .icon--muted { display: block; }

.chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line-strong);
  background: var(--inset);
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 13px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.chip-btn svg { width: 14px; height: 14px; }
.chip-btn:hover { color: var(--text); background: var(--field-bg); transform: translateY(-1px); }
.chip-btn:active { transform: scale(0.97); }

/* ---------- Hero ---------- */

.hero { padding: 148px 0 30px; }

.hero__copy {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--inset);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.015em;
  color: var(--muted);
}

.pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 0 rgba(85, 240, 178, 0.5);
  animation: pulse 2.4s ease-out infinite;
  flex-shrink: 0;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(85, 240, 178, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(85, 240, 178, 0); }
  100% { box-shadow: 0 0 0 0 rgba(85, 240, 178, 0); }
}

h1 {
  margin: 0;
  font-size: clamp(46px, 7.3vw, 86px);
  line-height: 0.97;
  letter-spacing: -0.05em;
  font-weight: 700;
}

.grad {
  background: linear-gradient(100deg, var(--grad-a) 0%, #eaffb0 42%, var(--grad-b) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 34px rgba(120, 255, 110, 0.18));
}

html[data-theme="light"] .grad {
  background-image: linear-gradient(100deg, #3f9e00 0%, #2fae62 48%, #008f6d 100%);
}

html[data-theme="dark"] .grad {
  background: linear-gradient(100deg, var(--grad-a) 0%, #f2ffc0 42%, var(--grad-b) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.lead {
  max-width: 640px;
  margin: 0;
  font-size: 17px;
  line-height: 1.62;
  color: var(--muted);
}

.hero__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 12.5px;
  color: var(--muted-2);
}

.dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.6;
  flex-shrink: 0;
}

/* ---------- Editor ---------- */

.editor {
  max-width: 960px;
  margin: 42px auto 0;
  padding: 26px;
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.editor.is-dragover {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow), var(--shadow), var(--inner);
}

.editor__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
  min-height: 30px;
}

.editor__label {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  font-size: 12.5px;
  color: var(--muted-2);
}

.editor__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted-2);
  flex-shrink: 0;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.status-dot.is-loading {
  background: #f5a524;
  box-shadow: 0 0 0 0 rgba(245, 165, 36, 0.45);
  animation: pulse-amber 1.6s ease-out infinite;
}

.status-dot.is-ready {
  background: var(--accent-2);
  box-shadow: 0 0 10px rgba(85, 240, 178, 0.7);
}

.status-dot.is-error {
  background: var(--danger);
  box-shadow: 0 0 10px rgba(255, 90, 90, 0.55);
}

@keyframes pulse-amber {
  0% { box-shadow: 0 0 0 0 rgba(245, 165, 36, 0.45); }
  70% { box-shadow: 0 0 0 7px rgba(245, 165, 36, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 165, 36, 0); }
}

.engine-badge {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11.5px;
  color: var(--muted-2);
}

/* Dropzone */

.dropzone {
  min-height: 330px;
  padding: 40px 24px;
  border-radius: 24px;
  border: 1.5px dashed var(--line-strong);
  background:
    radial-gradient(70% 80% at 50% 0%, rgba(184, 255, 62, 0.08), transparent 68%),
    var(--inset);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 5px;
  cursor: pointer;
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.dropzone:hover,
.dropzone:focus-visible {
  border-color: var(--accent);
  background:
    radial-gradient(70% 80% at 50% 0%, rgba(184, 255, 62, 0.15), transparent 70%),
    var(--inset);
}

.editor.is-dragover .dropzone {
  border-color: var(--accent);
  background:
    radial-gradient(70% 80% at 50% 0%, rgba(184, 255, 62, 0.22), transparent 70%),
    var(--inset);
  transform: scale(0.995);
}

.dropzone__icon {
  width: 76px;
  height: 76px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  color: var(--accent-ink);
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  box-shadow: 0 22px 44px -16px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, 0.65);
  animation: bob 6s ease-in-out infinite;
}

.dropzone__icon svg { width: 32px; height: 32px; }

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.dropzone h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.025em;
}

.dropzone p {
  margin: 2px 0 0;
  font-size: 14.5px;
  color: var(--muted);
}

.link {
  color: var(--text);
  border-bottom: 1px dashed var(--line-strong);
}

.dropzone__formats {
  margin-top: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--muted-2);
}

.dropzone__note {
  margin-top: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--muted-2);
}

.dropzone__note svg { width: 13px; height: 13px; }

/* Workspace */

.workspace {
  display: grid;
  gap: 15px;
}

.preview {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: #06070a;
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.preview video {
  display: block;
  width: 100%;
  max-width: 100%;
  max-height: 500px;
  margin: 0 auto;
  background: #000;
}

.preview:fullscreen {
  border-radius: 0;
  border: 0;
  background: #000;
}

.preview:fullscreen video {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
}

.preview:fullscreen .bigplay,
.preview:fullscreen .preview__info {
  display: none;
}

.bigplay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  width: 78px;
  height: 78px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(10, 12, 16, 0.42);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.25s ease;
}

.bigplay svg { width: 30px; height: 30px; margin-left: 3px; }

.bigplay:hover {
  transform: translate(-50%, -50%) scale(1.06);
  background: rgba(20, 24, 30, 0.55);
}

.preview.is-playing .bigplay {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.9);
}

.preview__info {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  gap: 6px;
  pointer-events: none;
}

.file-pill {
  max-width: 62%;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(8, 10, 14, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  color: rgba(255, 255, 255, 0.92);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-pill--muted { color: rgba(255, 255, 255, 0.62); }

.controls {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 2px;
}

.controls__spacer { flex: 1; }

.timecode {
  display: flex;
  align-items: baseline;
  gap: 5px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  padding-left: 4px;
  white-space: nowrap;
}

.timecode__sep,
.timecode__total { color: var(--muted-2); }

/* Timeline */

.timeline {
  position: relative;
  height: 76px;
  border-radius: 14px;
  overflow: hidden;
  background: #0a0c11;
  border: 1px solid var(--line-strong);
  cursor: pointer;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.timeline:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.timeline.is-dragging { cursor: grabbing; }

#filmstrip {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.timeline.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.07) 50%, transparent 80%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
  pointer-events: none;
}

@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

.timeline__shade {
  position: absolute;
  top: 0;
  bottom: 0;
  background: var(--shade);
  pointer-events: none;
  z-index: 1;
}

.timeline__shade--left { left: 0; width: 0; }
.timeline__shade--right { right: 0; width: 0; }

.timeline__selection {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  border-top: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  background: rgba(184, 255, 62, 0.07);
  box-shadow: inset 0 0 30px rgba(184, 255, 62, 0.08);
  pointer-events: none;
  z-index: 1;
}

.timeline__playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  margin-left: -1px;
  background: #fff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.75);
  pointer-events: none;
  z-index: 2;
}

.timeline__playhead::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fff;
  transform: translateX(-50%);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.timeline__handle {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 56px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  cursor: ew-resize;
  z-index: 3;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.55);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  padding: 0;
}

.timeline__handle:hover {
  transform: translate(-50%, -50%) scale(1.07);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.6), 0 0 0 3px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.timeline__handle:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.timeline__handle span {
  width: 8px;
  height: 18px;
  opacity: 0.55;
  background:
    linear-gradient(#0b0e08, #0b0e08) left center / 2px 100% no-repeat,
    linear-gradient(#0b0e08, #0b0e08) right center / 2px 100% no-repeat;
}

.timeline__handle--start { left: 0; }
.timeline__handle--end { left: 100%; }

.timeline__hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: -4px;
  padding: 0 3px;
  font-size: 11.5px;
  color: var(--muted-2);
}

.kbd-hint { white-space: nowrap; }

kbd {
  display: inline-block;
  padding: 2px 6px;
  margin: 0 1px;
  border-radius: 5px;
  border: 1px solid var(--line-strong);
  background: var(--inset);
  font-family: inherit;
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
}

/* Trim fields */

.trim {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 16px;
  padding: 15px 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--inset);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.time-field label {
  display: block;
  margin-bottom: 7px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.time-field__box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--field-bg);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.time-field__box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.time-field__box input {
  width: 100%;
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 16.5px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.005em;
  padding: 0;
}

.time-field__box span {
  font-size: 9.5px;
  color: var(--muted-2);
  white-space: nowrap;
  letter-spacing: 0.03em;
}

.clip-length {
  text-align: center;
  padding-bottom: 8px;
  min-width: 96px;
}

.clip-length__label {
  display: block;
  margin-bottom: 5px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.clip-length strong {
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  white-space: nowrap;
}

/* Options */

.options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.option {
  display: flex;
  align-items: center;
  gap: 10px;
}

.option__label {
  font-size: 11.5px;
  color: var(--muted-2);
  font-weight: 500;
}

.segmented {
  display: inline-flex;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--inset);
}

.segmented__btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.segmented__btn:hover { color: var(--text); }

.segmented__btn.is-active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--accent-ink);
  box-shadow: 0 5px 16px -6px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.format-chip {
  display: inline-block;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--inset);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.mode-desc {
  margin: -4px 0 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--muted-2);
}

.btn--cta {
  width: 100%;
  min-height: 60px;
  margin-top: 14px;
  border-radius: 18px;
  font-size: 16px;
  gap: 12px;
}

.btn--cta svg { width: 21px; height: 21px; }

.cta__meta {
  font-size: 11.5px;
  font-weight: 600;
  opacity: 0.55;
  padding-left: 12px;
  border-left: 1px solid rgba(0, 0, 0, 0.16);
  font-variant-numeric: tabular-nums;
}

.editor__privacy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 11px 0 0;
  font-size: 11px;
  color: var(--muted-2);
}

.editor__privacy svg { width: 13px; height: 13px; }

/* Processing */

.processing {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 46px 20px 34px;
}

.progress-ring {
  position: relative;
  width: 132px;
  height: 132px;
  display: grid;
  place-items: center;
}

.progress-ring svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.progress-ring circle {
  fill: none;
  stroke-width: 8;
}

.progress-ring__track { stroke: var(--line); }

.progress-ring__value-circle {
  stroke-linecap: round;
  stroke-dasharray: 326.73;
  stroke-dashoffset: 326.73;
  transition: stroke-dashoffset 0.25s ease;
  filter: drop-shadow(0 0 8px rgba(140, 255, 100, 0.4));
}

.progress-ring__value {
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.processing h3 {
  margin: 22px 0 5px;
  font-size: 21px;
  font-weight: 650;
  letter-spacing: -0.025em;
}

.processing p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  min-height: 18px;
}

.processing__bar {
  width: min(320px, 100%);
  height: 6px;
  margin-top: 18px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}

.processing__bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 14px var(--accent-glow);
  transition: width 0.2s ease;
}

.processing .btn { margin-top: 22px; }

/* Result */

.result {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  padding: 10px 0 4px;
}

.result__badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border-radius: 999px;
  background: rgba(184, 255, 62, 0.14);
  border: 1px solid rgba(184, 255, 62, 0.32);
  color: var(--success);
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.result__badge svg { width: 14px; height: 14px; }

.result h2 {
  margin: 14px 0 4px;
  font-size: clamp(24px, 4vw, 30px);
  letter-spacing: -0.035em;
  font-weight: 650;
}

.result__sub {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted-2);
  overflow-wrap: anywhere;
}

.result video {
  display: block;
  width: 100%;
  max-height: 380px;
  margin: 18px 0;
  border-radius: 18px;
  background: #000;
  border: 1px solid var(--line-strong);
}

.result__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.result__stats > div {
  padding: 13px 10px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--inset);
}

.result__stats span {
  display: block;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.result__stats strong {
  display: block;
  margin-top: 4px;
  font-size: 15px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.result__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 20px;
}

.result__actions .btn--cta {
  width: auto;
  min-width: 240px;
  margin-top: 0;
  min-height: 54px;
  font-size: 15px;
}

/* ---------- Sections ---------- */

.section { padding: 92px 0; }

.section__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  max-width: 680px;
  margin: 0 auto 42px;
}

.section__head h2 {
  margin: 0;
  font-size: clamp(30px, 4.2vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.04em;
  font-weight: 700;
}

.muted { color: var(--muted); }

/* Features */

.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.feature {
  padding: 24px;
  border-radius: 24px;
  text-align: left;
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.3s ease;
}

.feature:hover {
  transform: translateY(-4px);
  box-shadow: 0 40px 90px -34px rgba(0, 0, 0, 0.55), var(--inner);
}

.feature__icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--success);
  background: rgba(184, 255, 62, 0.11);
  border: 1px solid rgba(184, 255, 62, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.feature__icon svg { width: 22px; height: 22px; }

.feature h3 {
  margin: 16px 0 8px;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.feature p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

/* Steps */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.step {
  padding: 26px;
  border-radius: 24px;
  text-align: left;
}

.step__num {
  display: inline-block;
  padding: 4px 11px;
  margin-bottom: 18px;
  border-radius: 999px;
  border: 1px solid rgba(184, 255, 62, 0.28);
  background: rgba(184, 255, 62, 0.09);
  color: var(--success);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.step h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.step p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.62;
  color: var(--muted);
}

/* FAQ */

.faq {
  max-width: 820px;
  margin: 0 auto;
  display: grid;
  gap: 10px;
}

.faq__item {
  border-radius: 18px;
  overflow: hidden;
}

.faq__item summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  user-select: none;
}

.faq__item summary::-webkit-details-marker { display: none; }

.faq__plus {
  position: relative;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.55;
  transition: transform 0.28s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.2s ease;
}

.faq__plus::before,
.faq__plus::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 1.6px;
  border-radius: 2px;
  background: currentColor;
  transform: translate(-50%, -50%);
}

.faq__plus::after { transform: translate(-50%, -50%) rotate(90deg); }

.faq__item[open] .faq__plus {
  transform: rotate(45deg);
  opacity: 0.9;
}

.faq__item p {
  margin: 0;
  padding: 0 22px 20px;
  max-width: 92%;
  font-size: 13.5px;
  line-height: 1.66;
  color: var(--muted);
}

/* ---------- Footer ---------- */

.footer {
  margin-top: 20px;
  padding: 38px 0 46px;
  border-top: 1px solid var(--line);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand__mark--small {
  width: 38px;
  height: 38px;
  filter: drop-shadow(0 6px 14px rgba(110, 240, 120, 0.24));
}

.footer__name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.footer__brand p {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--muted-2);
}

.footer__right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted-2);
}

/* ---------- Toasts ---------- */

.toasts {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 370px;
  width: calc(100% - 40px);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 16px;
  border-radius: 15px;
  border: 1px solid var(--glass-border);
  border-left: 3px solid var(--accent-2);
  background: var(--glass-a);
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  backdrop-filter: blur(26px) saturate(180%);
  box-shadow: 0 22px 50px -18px rgba(0, 0, 0, 0.55), var(--inner);
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
  pointer-events: auto;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.toast.is-error { border-left-color: var(--danger); }

.toast svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--accent-2);
}

.toast.is-error svg { color: var(--danger); }

/* ---------- Reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: var(--d, 0s);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .features { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .step { padding: 22px 24px; }
}

@media (max-width: 860px) {
  .nav__links { display: none; }
  .hero { padding-top: 132px; }
  .section { padding: 76px 0; }
}

@media (max-width: 720px) {
  .container { padding: 0 16px; }
  .site-header { padding: 10px 12px 0; }
  .nav { padding: 7px 8px 7px 13px; gap: 10px; }
  .brand__name { font-size: 16px; }
  .brand__mark { width: 30px; height: 30px; }
  .nav__cta { padding: 8px 13px; font-size: 12px; }
  .theme-toggle { width: 38px; height: 38px; }

  .hero { padding-top: 118px; }
  .hero__copy { gap: 16px; }
  .lead { font-size: 15.5px; }
  .hero__meta { gap: 9px; font-size: 11.5px; }

  .editor { padding: 16px; border-radius: 26px; margin-top: 32px; }
  .editor__bar { margin-bottom: 12px; }
  .engine-badge { display: none; }

  .dropzone { min-height: 280px; padding: 28px 16px; border-radius: 20px; }
  .dropzone__icon { width: 64px; height: 64px; border-radius: 20px; }
  .dropzone__icon svg { width: 27px; height: 27px; }
  .dropzone h2 { font-size: 19px; }
  .dropzone p { font-size: 13.5px; }

  .preview { border-radius: 16px; min-height: 160px; }
  .preview video { max-height: 340px; }
  .bigplay { width: 64px; height: 64px; }
  .bigplay svg { width: 24px; height: 24px; }

  .controls { gap: 7px; }
  .icon-btn { width: 38px; height: 38px; }
  .icon-btn svg { width: 16px; height: 16px; }
  .timecode { font-size: 12px; }
  .chip-btn { padding: 7px 10px; font-size: 11px; }

  .timeline { height: 62px; }
  .timeline__handle { width: 17px; height: 46px; }
  .timeline__hint { font-size: 10.5px; }
  .kbd-hint { display: none; }

  .trim {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 13px;
  }
  .clip-length { text-align: left; padding: 0; min-width: 0; }
  .clip-length__label { display: inline; margin-right: 8px; }
  .clip-length strong { font-size: 14px; }
  .time-field__box span { display: none; }
  .time-field__box input { font-size: 16px; }

  .options { gap: 10px; }
  .option--format { display: none; }
  .btn--cta { min-height: 56px; border-radius: 16px; font-size: 15px; }
  .cta__meta { font-size: 10.5px; padding-left: 9px; }

  .result__stats { gap: 6px; }
  .result__stats > div { padding: 11px 6px; }
  .result__stats strong { font-size: 13.5px; }
  .result__actions .btn--cta { width: 100%; min-width: 0; }
  .result__actions .btn { flex: 1 1 auto; }

  .section__head { margin-bottom: 30px; }
  .features { grid-template-columns: 1fr; }
  .feature { padding: 20px; }
  .faq__item summary { padding: 16px 17px; font-size: 13.5px; }
  .faq__item p { padding: 0 17px 17px; max-width: 100%; }

  .footer__inner { flex-direction: column; align-items: flex-start; gap: 16px; }
  .toasts { right: 12px; bottom: 12px; width: calc(100% - 24px); }
}

@media (max-width: 420px) {
  h1 { font-size: 42px; }
  .eyebrow { font-size: 10.5px; padding: 7px 11px; }
  .nav__cta { display: none; }
  .hero__meta { font-size: 10.5px; gap: 7px; }
  .timecode__total,
  .timecode__sep { display: none; }
  .file-pill--muted { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}
