/* ============================================================
   ReelPilot — Design System
   Heller Canvas · Gold + Lila Akzente · Mobile-First
   ============================================================ */

:root {
  /* Canvas */
  --bg: #ffffff;
  --surface: #faf9fc;
  --surface-2: #f3f1f8;
  --card: #ffffff;

  /* Lila (Primär) */
  --violet: #7c3aed;
  --violet-600: #6d28d9;
  --violet-700: #5b21b6;
  --violet-50: #f5f0ff;
  --violet-100: #ede4ff;

  /* Gold (Sekundär) */
  --gold: #c99a3b;
  --gold-500: #d4a843;
  --gold-300: #e7c873;
  --gold-50: #fdf8ec;

  /* Text */
  --ink: #17141f;
  --ink-soft: #2e2a3a;
  --muted: #6b6477;
  --muted-2: #9890a6;

  /* Linien & States */
  --border: #eceaf1;
  --border-strong: #ddd8e6;
  --success: #16a34a;
  --success-bg: #ecfdf3;
  --warning: #d97706;
  --warning-bg: #fff7ed;
  --danger: #dc2626;
  --danger-bg: #fef2f2;

  /* Verläufe */
  --grad-brand: linear-gradient(135deg, var(--violet) 0%, var(--violet-700) 55%, var(--gold) 140%);
  --grad-soft: linear-gradient(135deg, var(--violet-50) 0%, var(--gold-50) 100%);
  --grad-gold: linear-gradient(135deg, var(--gold-300) 0%, var(--gold) 100%);

  /* Form */
  --radius: 14px;
  --radius-lg: 20px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(23, 20, 31, 0.05);
  --shadow: 0 4px 18px rgba(23, 20, 31, 0.07);
  --shadow-lg: 0 18px 50px rgba(91, 33, 182, 0.14);
  --ring: 0 0 0 3px rgba(124, 58, 237, 0.18);

  --maxw: 1140px;
  --nav-h: 64px;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.15; letter-spacing: -0.02em; color: var(--ink); }
p { margin: 0 0 1em; color: var(--ink-soft); }
a { color: var(--violet-600); text-decoration: none; }
a:hover { color: var(--violet-700); }
img { max-width: 100%; display: block; }
button { font-family: inherit; }
ul { margin: 0; padding: 0; list-style: none; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 20px; }
.section { padding: 56px 0; }
.section-sm { padding: 36px 0; }
.center { text-align: center; }
.muted { color: var(--muted); }
.eyebrow {
  display: inline-block; font-size: .76rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--violet-600);
  background: var(--violet-50); padding: 6px 12px; border-radius: 999px; margin-bottom: 16px;
}
.grad-text {
  background: var(--grad-brand);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px; border: 1px solid transparent;
  font-size: .95rem; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--grad-brand); color: #fff; box-shadow: 0 8px 22px rgba(124, 58, 237, .28); }
.btn-primary:hover { color: #fff; box-shadow: 0 10px 30px rgba(124, 58, 237, .38); transform: translateY(-1px); }
.btn-gold { background: var(--grad-gold); color: #4a370f; box-shadow: 0 8px 22px rgba(201, 154, 59, .28); }
.btn-gold:hover { color: #4a370f; transform: translateY(-1px); box-shadow: 0 10px 30px rgba(201, 154, 59, .38); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--border-strong); }
.btn-ghost:hover { color: var(--ink); border-color: var(--violet); background: var(--violet-50); }
.btn-soft { background: var(--violet-50); color: var(--violet-700); }
.btn-soft:hover { color: var(--violet-700); background: var(--violet-100); }
.btn-block { width: 100%; }
.btn-lg { padding: 15px 28px; font-size: 1.02rem; }
.btn-sm { padding: 9px 15px; font-size: .85rem; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* ---------- Cards ---------- */
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 24px; box-shadow: var(--shadow-sm);
}
.card-hover { transition: transform .18s ease, box-shadow .2s ease, border-color .2s ease; }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--violet-100); }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .76rem; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  background: var(--surface-2); color: var(--muted);
}
.badge-violet { background: var(--violet-50); color: var(--violet-700); }
.badge-gold { background: var(--gold-50); color: var(--gold); }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge-pulse .dot { animation: pulse 1.4s ease-in-out infinite; }

/* ---------- Navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 50; height: var(--nav-h);
  background: rgba(255, 255, 255, .82); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.18rem; letter-spacing: -.02em; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px; background: var(--grad-brand);
  display: grid; place-items: center; color: #fff; box-shadow: 0 4px 12px rgba(124, 58, 237, .35);
}
.nav-links { display: none; align-items: center; gap: 4px; }
.nav-links a {
  padding: 8px 14px; border-radius: 999px; color: var(--muted); font-weight: 500; font-size: .94rem;
  transition: color .15s ease, background .15s ease;
}
.nav-links a:hover { color: var(--ink); background: var(--surface-2); }
.nav-links a.active { color: var(--violet-700); background: var(--violet-50); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-credits {
  display: none; align-items: center; gap: 7px; font-size: .85rem; font-weight: 600; color: var(--ink-soft);
  background: var(--gold-50); border: 1px solid #f0e3c4; padding: 7px 13px; border-radius: 999px;
}
.nav-credits b { color: var(--gold); }
.burger {
  display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px;
  background: #fff; border: 1px solid var(--border-strong); cursor: pointer;
}
.burger svg { width: 20px; height: 20px; stroke: var(--ink); }
.mobile-menu {
  display: none; flex-direction: column; gap: 4px; padding: 14px 20px 22px;
  border-bottom: 1px solid var(--border); background: #fff;
}
.mobile-menu.open { display: flex; }
.mobile-menu a { padding: 12px 14px; border-radius: 12px; color: var(--ink-soft); font-weight: 500; }
.mobile-menu a.active { background: var(--violet-50); color: var(--violet-700); }
.mobile-menu .btn { margin-top: 8px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); background: var(--surface); padding: 40px 0 28px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 28px; }
.footer h5 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-2); margin: 0 0 12px; }
.footer ul li { margin-bottom: 8px; }
.footer ul a { color: var(--muted); font-size: .92rem; }
.footer ul a:hover { color: var(--violet-700); }
.footer-bottom { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); color: var(--muted-2); font-size: .85rem; display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 56px 0 40px; }
.hero::before {
  content: ""; position: absolute; inset: -40% -10% auto -10%; height: 520px; z-index: -1;
  background: radial-gradient(60% 60% at 30% 20%, rgba(124, 58, 237, .14), transparent 70%),
              radial-gradient(50% 50% at 85% 10%, rgba(201, 154, 59, .14), transparent 70%);
}
.hero h1 { font-size: clamp(1.8rem, 7vw, 3.4rem); font-weight: 800; overflow-wrap: break-word; hyphens: auto; }
h1, h2 { overflow-wrap: break-word; }
.hero .sub { font-size: clamp(1.02rem, 2.6vw, 1.22rem); color: var(--muted); max-width: 640px; margin-inline: auto; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 26px; }
.hero-note { margin-top: 16px; font-size: .85rem; color: var(--muted-2); }

/* Mock app preview (hero) */
.app-shot {
  margin-top: 44px; border-radius: var(--radius-lg); border: 1px solid var(--border);
  background: var(--card); box-shadow: var(--shadow-lg); overflow: hidden;
}
.app-shot-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--surface); }
.app-shot-bar i { width: 11px; height: 11px; border-radius: 50%; background: #e3def0; }
.app-shot-body { padding: 20px; display: grid; gap: 14px; grid-template-columns: 1fr; }

/* ---------- Feature grid ---------- */
.grid { display: grid; gap: 18px; grid-template-columns: 1fr; }
.grid-2 { display: grid; gap: 18px; grid-template-columns: 1fr; }
.grid-3 { display: grid; gap: 18px; grid-template-columns: 1fr; }
.feature-ico {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; margin-bottom: 14px;
  background: var(--violet-50); color: var(--violet-600);
}
.feature-ico.gold { background: var(--gold-50); color: var(--gold); }
.feature-ico svg { width: 23px; height: 23px; }
.feature h3 { font-size: 1.1rem; }
.feature p { color: var(--muted); margin: 0; font-size: .95rem; }

/* ---------- Steps ---------- */
.step { display: flex; gap: 16px; align-items: flex-start; }
.step-num {
  flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--grad-brand); color: #fff; font-weight: 700; box-shadow: 0 6px 16px rgba(124,58,237,.3);
}

/* ---------- Stats (dashboard) ---------- */
.stat-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
.stat { display: flex; align-items: center; gap: 18px; }
.stat-label { font-size: .85rem; color: var(--muted); font-weight: 500; margin: 0; }
.stat-value { font-size: 1.9rem; font-weight: 800; line-height: 1; margin: 4px 0 0; letter-spacing: -.02em; }
.stat-value small { font-size: .95rem; font-weight: 600; color: var(--muted); }

/* Score ring (conic) */
.ring {
  --val: 60; --size: 78px; --col: var(--violet);
  width: var(--size); height: var(--size); border-radius: 50%; flex: none;
  background: conic-gradient(var(--col) calc(var(--val) * 1%), var(--surface-2) 0);
  display: grid; place-items: center;
}
.ring::after {
  content: attr(data-label); width: calc(var(--size) - 16px); height: calc(var(--size) - 16px);
  background: #fff; border-radius: 50%; display: grid; place-items: center;
  font-weight: 800; font-size: .95rem; color: var(--ink);
}
.ring-sm { --size: 54px; }
.ring-sm::after { font-size: .8rem; }

/* ---------- Progress bar ---------- */
.progress { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.progress > span { display: block; height: 100%; width: 0%; border-radius: 999px; background: var(--grad-brand); transition: width .35s ease; }
.progress-gold > span { background: var(--grad-gold); }

/* ---------- Upload zone ---------- */
.dropzone {
  border: 2px dashed var(--border-strong); border-radius: var(--radius-lg); background: var(--surface);
  padding: 48px 24px; text-align: center; cursor: pointer; transition: border-color .2s, background .2s;
}
.dropzone:hover { border-color: var(--violet); background: var(--violet-50); }
.dropzone.drag { border-color: var(--violet); background: var(--violet-50); box-shadow: var(--ring); }
.dropzone-ico {
  width: 64px; height: 64px; border-radius: 18px; margin: 0 auto 16px; display: grid; place-items: center;
  background: #fff; border: 1px solid var(--border); color: var(--violet-600); box-shadow: var(--shadow-sm);
}
.dropzone-ico svg { width: 30px; height: 30px; }

/* ---------- Reel cards ---------- */
.reel-grid { display: grid; gap: 18px; grid-template-columns: 1fr; }
.reel-thumb {
  position: relative; aspect-ratio: 9 / 16; border-radius: var(--radius); overflow: hidden;
  display: grid; place-items: center;
}
.reel-thumb .play {
  width: 54px; height: 54px; border-radius: 50%; background: rgba(255,255,255,.92); display: grid; place-items: center;
  color: var(--violet-700); box-shadow: 0 8px 22px rgba(0,0,0,.2);
}
.reel-thumb .play svg { width: 22px; height: 22px; margin-left: 3px; }
.reel-thumb .dur {
  position: absolute; bottom: 10px; right: 10px; background: rgba(23,20,31,.78); color: #fff;
  font-size: .76rem; font-weight: 600; padding: 3px 8px; border-radius: 7px;
}
.reel-thumb .rank {
  position: absolute; top: 10px; left: 10px; background: rgba(255,255,255,.92); color: var(--violet-700);
  font-size: .72rem; font-weight: 700; padding: 4px 9px; border-radius: 999px;
}
.reel-thumb .cap {
  position: absolute; left: 8px; right: 8px; bottom: 44px; text-align: center;
  color: #fff; font-weight: 800; font-size: .92rem; line-height: 1.25;
  text-shadow: 0 2px 8px rgba(0,0,0,.55); padding: 0 4px;
}
.reel-body { padding-top: 14px; }
.reel-scores { display: flex; gap: 18px; align-items: center; margin: 14px 0; }
.reel-score { text-align: center; }
.reel-score .lbl { font-size: .72rem; color: var(--muted); font-weight: 600; margin-top: 4px; }

/* ---------- Auth ---------- */
.auth-wrap { min-height: calc(100vh - var(--nav-h)); display: grid; place-items: center; padding: 32px 20px; background: var(--grad-soft); }
.auth-card { width: 100%; max-width: 420px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface-2); border-radius: 999px; padding: 4px; margin-bottom: 22px; }
.tabs button { border: 0; background: transparent; padding: 10px; border-radius: 999px; font-weight: 600; color: var(--muted); cursor: pointer; transition: .15s; }
.tabs button.active { background: #fff; color: var(--violet-700); box-shadow: var(--shadow-sm); }

/* ---------- Forms ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 7px; color: var(--ink-soft); }
.input {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  font-size: .95rem; font-family: inherit; color: var(--ink); background: #fff; transition: border-color .15s, box-shadow .15s;
}
.input:focus { outline: none; border-color: var(--violet); box-shadow: var(--ring); }
.input.invalid { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: .8rem; margin-top: 6px; display: none; }
.field.show-error .field-error { display: block; }
.field.show-error .input { border-color: var(--danger); }

/* ---------- Pricing ---------- */
.price-grid { display: grid; gap: 18px; grid-template-columns: 1fr; align-items: stretch; }
.price-card { display: flex; flex-direction: column; position: relative; }
.price-card.featured { border-color: var(--violet); box-shadow: var(--shadow-lg); }
.price-card.featured::before {
  content: "Beliebt"; position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--grad-brand); color: #fff; font-size: .72rem; font-weight: 700; padding: 5px 14px; border-radius: 999px;
}
.price-amt { font-size: 2.4rem; font-weight: 800; letter-spacing: -.02em; }
.price-amt small { font-size: .95rem; font-weight: 600; color: var(--muted); }
.price-feat { margin: 18px 0; display: grid; gap: 10px; }
.price-feat li { display: flex; gap: 10px; align-items: flex-start; font-size: .93rem; color: var(--ink-soft); }
.price-feat svg { width: 18px; height: 18px; color: var(--success); flex: none; margin-top: 2px; }

/* ---------- Empty state ---------- */
.empty-state { text-align: center; padding: 48px 24px; }
.empty-ico {
  width: 68px; height: 68px; border-radius: 20px; margin: 0 auto 18px; display: grid; place-items: center;
  background: var(--surface-2); color: var(--muted-2);
}
.empty-ico svg { width: 32px; height: 32px; }

/* ---------- Loading: spinner & skeleton ---------- */
.spinner {
  width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--violet-100);
  border-top-color: var(--violet); animation: spin .7s linear infinite; display: inline-block; vertical-align: middle;
}
.spinner-lg { width: 40px; height: 40px; border-width: 3.5px; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

.skeleton { position: relative; overflow: hidden; background: var(--surface-2); border-radius: 8px; }
.skeleton::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.7), transparent);
  transform: translateX(-100%); animation: shimmer 1.3s infinite;
}
@keyframes shimmer { 100% { transform: translateX(100%); } }
.sk-line { height: 12px; border-radius: 6px; margin-bottom: 8px; }
.sk-thumb { aspect-ratio: 9/16; border-radius: var(--radius); }

/* ---------- Analysis phases ---------- */
.phase { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.phase:last-child { border-bottom: 0; }
.phase-dot { width: 26px; height: 26px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--surface-2); color: var(--muted-2); }
.phase-dot svg { width: 15px; height: 15px; }
.phase.active .phase-dot { background: var(--violet-50); color: var(--violet); }
.phase.done .phase-dot { background: var(--success-bg); color: var(--success); }
.phase-text { font-weight: 600; color: var(--muted); }
.phase.active .phase-text, .phase.done .phase-text { color: var(--ink); }

/* ---------- Upload list (dashboard) ---------- */
.ulist { display: grid; gap: 10px; }
.urow { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; transition: border-color .15s, box-shadow .15s; }
.urow:hover { border-color: var(--violet-100); box-shadow: var(--shadow-sm); }
.urow-thumb { width: 52px; height: 52px; border-radius: 11px; flex: none; }
.urow-main { flex: 1; min-width: 0; }
.urow-title { font-weight: 600; font-size: .96rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.urow-meta { font-size: .82rem; color: var(--muted); }

/* ---------- Toast ---------- */
.toast-wrap { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 10px; width: calc(100% - 32px); max-width: 380px; }
.toast {
  display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: var(--radius);
  background: var(--ink); color: #fff; box-shadow: var(--shadow-lg); font-size: .9rem;
  animation: toast-in .25s ease;
}
.toast.success { background: #14532d; }
.toast.error { background: #7f1d1d; }
.toast .t-ico { flex: none; margin-top: 1px; }
.toast .t-ico svg { width: 18px; height: 18px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

/* ---------- Page header ---------- */
.page-head { padding: 32px 0 8px; }
.page-head h1 { font-size: clamp(1.6rem, 4vw, 2.1rem); }
.page-head p { color: var(--muted); margin: 0; }

/* ---------- Utilities ---------- */
.row { display: flex; gap: 12px; align-items: center; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 36px; }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.hidden { display: none !important; }
.text-sm { font-size: .88rem; } .text-xs { font-size: .8rem; }
.fw-700 { font-weight: 700; }

/* ============================================================
   Responsive
   ============================================================ */
@media (min-width: 600px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .reel-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
  .app-shot-body { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 768px) {
  .section { padding: 76px 0; }
  .nav-links { display: flex; }
  .nav-credits { display: inline-flex; }
  .burger { display: none; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .price-grid { grid-template-columns: repeat(3, 1fr); }
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
  .reel-grid { grid-template-columns: repeat(3, 1fr); }
  .hero { padding: 84px 0 56px; }
  .app-shot-body { grid-template-columns: repeat(3, 1fr); }
}
