:root {
  --bg: #ffffff;
  --bg-soft: #f6f4fb;
  --bg-card: #f8f6fd;
  --ink: #140f23;
  --ink-soft: #5d5873;
  --ink-faint: #9b95ad;
  --accent: #8b5cf6;
  --accent-dark: #7c3aed;
  --accent-2: #ec4899;
  --accent-soft: #f3eefe;
  --grad: linear-gradient(135deg, #8b5cf6, #ec4899);
  --line: #ebe7f4;
  --green: #16a34a;
  --red: #dc2626;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 10px 40px rgba(20, 15, 35, 0.09);
  --font: 'Inter', -apple-system, 'Segoe UI', system-ui, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; display: block; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; gap: 24px;
}
.logo {
  display: flex; align-items: center;
  font-family: var(--font-display);
  font-weight: 700; font-size: 20px; letter-spacing: -0.6px;
}
.logo .mark { width: 30px; height: 30px; display: block; margin-right: 9px; }
.logo .grad, .grad-text {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.nav-links { display: flex; gap: 26px; font-size: 14.5px; font-weight: 600; color: var(--ink-soft); }
.nav-links a:hover { color: var(--ink); }
.nav-actions { display: flex; gap: 10px; align-items: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font); font-weight: 700; font-size: 15px;
  border: none; border-radius: 999px; cursor: pointer;
  padding: 12px 24px; transition: all 0.15s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(236, 72, 153, 0.45); }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--ink-faint); }
.btn-soft { background: var(--accent-soft); color: var(--accent-dark); }
.btn-soft:hover { background: #e2e9ff; }
.btn-danger { background: #fee2e2; color: var(--red); }
.btn-lg { padding: 16px 34px; font-size: 17px; }
.btn-sm { padding: 8px 16px; font-size: 13.5px; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.lang-select {
  font-family: var(--font); font-weight: 700; font-size: 13px;
  padding: 7px 10px; border-radius: 999px; border: 1.5px solid var(--line);
  background: #fff; color: var(--ink-soft); cursor: pointer; outline: none;
}
.lang-select:hover { border-color: var(--ink-faint); }

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 84px 0 40px; position: relative; }
.hero::before {
  content: ''; position: absolute; inset: -60px -10% auto;
  height: 420px; z-index: -1; pointer-events: none;
  background:
    radial-gradient(420px 260px at 28% 30%, rgba(139, 92, 246, 0.14), transparent 70%),
    radial-gradient(420px 260px at 72% 24%, rgba(236, 72, 153, 0.12), transparent 70%);
}
.hero .trust {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13.5px; font-weight: 600; color: var(--ink-soft);
  background: var(--bg-soft); border: 1px solid var(--line);
  padding: 7px 16px; border-radius: 999px; margin-bottom: 28px;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(40px, 6.5vw, 68px);
  line-height: 1.04; letter-spacing: -2.5px; font-weight: 700;
}
.hero h1 .accent {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.hero .sub {
  max-width: 560px; margin: 22px auto 30px;
  font-size: 18px; color: var(--ink-soft);
}

/* ---------- Phone mockups ---------- */
.phone-row {
  display: flex; justify-content: center; gap: 18px;
  padding: 44px 20px 70px; overflow: hidden;
}
.phone {
  width: 150px; aspect-ratio: 9 / 16; border-radius: 22px;
  position: relative; overflow: hidden; flex-shrink: 0;
  box-shadow: 0 18px 44px rgba(11, 13, 18, 0.22);
  display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 26px;
}
.phone .cap {
  font-weight: 900; font-size: 15px; color: #fff; text-align: center;
  text-transform: uppercase; letter-spacing: -0.3px; line-height: 1.15;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.55), 0 0 14px rgba(0, 0, 0, 0.4);
  padding: 0 10px;
}
.phone .cap em { font-style: normal; color: #ffd84d; }
.phone:nth-child(1) { background: linear-gradient(160deg, #ff8a5c, #d64550); transform: rotate(-6deg) translateY(16px); }
.phone:nth-child(2) { background: linear-gradient(160deg, #a78bfa, #6d28d9); transform: rotate(-2deg); }
.phone:nth-child(3) { background: linear-gradient(160deg, #2b2440, #140f23); transform: translateY(-10px); width: 170px; }
.phone:nth-child(4) { background: linear-gradient(160deg, #38c788, #147a53); transform: rotate(2deg); }
.phone:nth-child(5) { background: linear-gradient(160deg, #f472b6, #be185d); transform: rotate(6deg) translateY(16px); }
.phone .playbar {
  position: absolute; left: 12px; right: 12px; bottom: 10px; height: 3px;
  background: rgba(255, 255, 255, 0.3); border-radius: 2px;
}
.phone .playbar::after {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 55%;
  background: #fff; border-radius: 2px;
}

/* ---------- Sections ---------- */
.section { padding: 80px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section-head h2 { font-family: var(--font-display); font-size: clamp(30px, 4.5vw, 44px); font-weight: 700; letter-spacing: -1.5px; line-height: 1.1; }
.section-head p { color: var(--ink-soft); font-size: 17px; margin-top: 12px; }

.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.feature-card {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 34px;
}
.feature-card .icon {
  width: 46px; height: 46px; border-radius: 14px;
  background: var(--accent-soft); color: var(--accent-dark);
  display: grid; place-items: center; font-size: 22px; margin-bottom: 18px;
}
.feature-card .tag { color: var(--accent); font-weight: 700; font-size: 13.5px; margin-bottom: 6px; }
.feature-card h3 { font-size: 22px; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 8px; }
.feature-card p { color: var(--ink-soft); font-size: 15.5px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: step; }
.step-card { text-align: center; padding: 30px 22px; }
.step-card .num {
  width: 44px; height: 44px; margin: 0 auto 16px; border-radius: 50%;
  background: var(--grad); color: #fff;
  display: grid; place-items: center; font-weight: 900; font-size: 18px;
}
.step-card h3 { font-size: 19px; font-weight: 800; margin-bottom: 6px; }
.step-card p { color: var(--ink-soft); font-size: 15px; }

.cta-band {
  background:
    radial-gradient(500px 280px at 20% 0%, rgba(139, 92, 246, 0.35), transparent 70%),
    radial-gradient(500px 280px at 85% 100%, rgba(236, 72, 153, 0.3), transparent 70%),
    linear-gradient(135deg, #221a3d, #140f23);
  border-radius: 28px; text-align: center;
  padding: 70px 30px; color: #fff; margin-bottom: 80px;
}
.cta-band h2 { font-family: var(--font-display); font-size: clamp(28px, 4vw, 42px); font-weight: 700; letter-spacing: -1px; margin-bottom: 12px; }
.cta-band p { color: #b6aed0; margin-bottom: 28px; font-size: 17px; }

.footer { border-top: 1px solid var(--line); padding: 32px 0 44px; color: var(--ink-faint); font-size: 14px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; }

/* ---------- Auth ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; background: var(--bg-soft); padding: 24px; }
.auth-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); width: 100%; max-width: 420px; padding: 38px;
}
.auth-card .logo { justify-content: center; margin-bottom: 26px; }
.tabs { display: flex; background: var(--bg-soft); border-radius: 999px; padding: 4px; margin-bottom: 26px; }
.tabs button {
  flex: 1; border: none; background: transparent; font-family: var(--font);
  font-weight: 700; font-size: 14.5px; padding: 9px; border-radius: 999px;
  cursor: pointer; color: var(--ink-soft); transition: all 0.15s;
}
.tabs button.active { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(11, 13, 18, 0.1); }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13.5px; font-weight: 700; margin-bottom: 6px; color: var(--ink-soft); }
.field input, .field select {
  width: 100%; font-family: var(--font); font-size: 15px;
  padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; color: var(--ink); outline: none; transition: border-color 0.15s;
}
.field input:focus, .field select:focus { border-color: var(--accent); }
.form-error {
  background: #fee2e2; color: var(--red); font-size: 14px; font-weight: 600;
  border-radius: var(--radius-sm); padding: 10px 14px; margin-bottom: 16px; display: none;
}
.form-error.show { display: block; }

/* ---------- App ---------- */
.app-body { background: var(--bg-soft); min-height: 100vh; }
.topbar { background: #fff; border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.userchip { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--grad); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 14px;
}

.app-grid { display: grid; grid-template-columns: 420px 1fr; gap: 24px; padding: 28px 0 60px; align-items: start; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.panel h2 { font-size: 19px; font-weight: 800; letter-spacing: -0.4px; margin-bottom: 18px; }

.seg { display: flex; background: var(--bg-soft); border-radius: var(--radius-sm); padding: 4px; margin-bottom: 18px; }
.seg button {
  flex: 1; border: none; background: transparent; font-family: var(--font);
  font-weight: 700; font-size: 14px; padding: 10px; border-radius: 11px;
  cursor: pointer; color: var(--ink-soft);
}
.seg button.active { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(11, 13, 18, 0.1); }

.dropzone {
  border: 2px dashed var(--line); border-radius: var(--radius-sm);
  padding: 30px 20px; text-align: center; color: var(--ink-soft);
  font-size: 14.5px; cursor: pointer; transition: all 0.15s; margin-bottom: 4px;
}
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-dark); }
.dropzone .big { font-size: 26px; display: block; margin-bottom: 6px; }
.dropzone strong { color: var(--ink); }

.opt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 18px 0; }
.toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 14px; background: var(--bg-soft); border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600;
}
.switch { position: relative; width: 42px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute; inset: 0; background: #cdd3de; border-radius: 999px;
  cursor: pointer; transition: background 0.15s;
}
.switch .slider::before {
  content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: transform 0.15s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}
.switch input:checked + .slider { background: var(--accent); }
.switch input:checked + .slider::before { transform: translateX(18px); }

/* Projekt-Karten */
.project-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; margin-bottom: 14px; display: block; transition: all 0.15s;
}
.project-card:hover { border-color: var(--ink-faint); box-shadow: var(--shadow); transform: translateY(-1px); }
.project-card .row { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.project-card h3 { font-size: 16px; font-weight: 800; letter-spacing: -0.3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-card .meta { color: var(--ink-faint); font-size: 13px; margin-top: 3px; }

.chip {
  font-size: 12px; font-weight: 800; padding: 5px 12px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: 0.4px; white-space: nowrap;
}
.chip.queued, .chip.downloading, .chip.analyzing, .chip.rendering { background: var(--accent-soft); color: var(--accent-dark); }
.chip.done { background: #dcfce7; color: var(--green); }
.chip.error { background: #fee2e2; color: var(--red); }

.progress { height: 7px; background: var(--bg-soft); border-radius: 99px; overflow: hidden; margin-top: 14px; }
.progress .bar {
  height: 100%; border-radius: 99px;
  background: var(--grad);
  transition: width 0.6s ease;
}

.empty {
  text-align: center; color: var(--ink-faint); padding: 60px 20px;
  border: 2px dashed var(--line); border-radius: var(--radius); font-size: 15px;
}

/* Projektseite */
.clips-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.clip-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.clip-card video { width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #0b0d12; }
.clip-card.wide video { aspect-ratio: 16 / 9; }
.clip-card.square video { aspect-ratio: 1 / 1; }
.clip-card .body { padding: 14px 16px 16px; }
.clip-card h3 { font-size: 15px; font-weight: 800; letter-spacing: -0.3px; margin-bottom: 2px; }
.clip-card .meta { color: var(--ink-faint); font-size: 12.5px; margin-bottom: 12px; }

.log-box {
  background: #0b0d12; color: #aab2c5; font-size: 13px; border-radius: var(--radius-sm);
  padding: 16px 18px; font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
  max-height: 220px; overflow-y: auto; line-height: 1.7;
}
.log-box .t { color: #4d566b; margin-right: 8px; }

.back-link { color: var(--ink-soft); font-weight: 600; font-size: 14px; display: inline-flex; gap: 6px; align-items: center; }
.back-link:hover { color: var(--ink); }

@media (max-width: 900px) {
  .app-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .phone-row .phone:nth-child(1), .phone-row .phone:nth-child(5) { display: none; }
}
