/* LiveClip AI — standalone website styles.
   Design tokens copied from the LiveClip AI app:
   bg #08080d, surfaces #12121c / #1a1a28, text #f4f4f8, dim #9b97ad,
   border #23232f, accent #c084fc, gradient #a855f7 -> #ec4899 (120deg),
   orange #fb923c (processing), green #34d399 (done), radius 16px.
   Fonts: Outfit (headings/numbers), JetBrains Mono (data), system-ui body. */
:root {
  --bg: #08080d;
  --surface: #12121c;
  --surface-2: #1a1a28;
  --text: #f4f4f8;
  --dim: #9b97ad;
  --border: #23232f;
  --accent: #c084fc;
  --gradient: linear-gradient(120deg, #a855f7, #ec4899);
  --orange: #fb923c;
  --green: #34d399;
  --red: #f87171;
  --radius: 16px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  padding-bottom: 84px;
}
h1, h2, h3, .num { font-family: "Outfit", system-ui, sans-serif; }
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; }
a { color: var(--accent); }
button { font-family: inherit; cursor: pointer; }
input, select { font-family: inherit; }

.container { max-width: 720px; margin: 0 auto; padding: 0 16px; }

/* Header */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 16px 0 8px; }
.topbar .hello { font-size: 15px; font-weight: 600; }
.topbar .hello small { display: block; color: var(--dim); font-weight: 400; font-size: 12px; margin-top: 2px; }
.ai-pill { font-size: 11px; font-weight: 700; letter-spacing: .04em; padding: 5px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); color: var(--accent); }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin: 12px 0; }
.card h2 { font-size: 17px; margin-bottom: 4px; }
.card p { color: var(--dim); font-size: 13.5px; line-height: 1.55; }
.card p b, .card p strong { color: var(--text); }
.row { display: flex; align-items: center; gap: 10px; }
.row.space { justify-content: space-between; }
.muted { color: var(--dim); font-size: 12.5px; }
.small { font-size: 12.5px; }
.mt { margin-top: 12px; }
.mb { margin-bottom: 12px; }
.hidden { display: none !important; }

/* Pills */
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.pill.green { background: rgba(52, 211, 153, .14); color: var(--green); }
.pill.orange { background: rgba(251, 146, 60, .14); color: var(--orange); }
.pill.grey { background: var(--surface-2); color: var(--dim); border: 1px solid var(--border); }
.pill.purple { background: rgba(192, 132, 252, .14); color: var(--accent); }
.pill.red { background: rgba(248, 113, 113, .14); color: var(--red); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; }
.dot.pulse { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: none; border-radius: 12px; padding: 12px 18px; font-size: 15px; font-weight: 700; color: #fff; background: var(--gradient); text-decoration: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.ghost { background: var(--surface-2); border: 1px solid var(--border); color: var(--text); }
.btn.danger { background: #3a1520; border: 1px solid #5b2333; color: var(--red); }
.btn.block { width: 100%; }
.btn.small { padding: 8px 12px; font-size: 13.5px; border-radius: 10px; }

/* Inputs */
.input { width: 100%; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); border-radius: 12px; padding: 13px 14px; font-size: 15px; outline: none; }
.input:focus { border-color: var(--accent); }
.input::placeholder { color: #6d6a80; }
label.lbl { display: block; font-size: 13px; font-weight: 600; margin: 14px 0 6px; }

/* Hero */
.hero h1 { font-size: 26px; line-height: 1.25; margin: 18px 0 8px; }
.hero p { color: var(--dim); font-size: 14.5px; line-height: 1.6; }
.steps { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.steps span { font-size: 12px; color: var(--dim); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 6px 11px; }

/* Segmented controls */
.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg button { flex: 1; min-width: 64px; background: var(--surface-2); border: 1px solid var(--border); color: var(--dim); border-radius: 10px; padding: 10px 6px; font-size: 13.5px; font-weight: 600; }
.seg button.on { background: var(--gradient); color: #fff; border-color: transparent; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.toggle-row:first-of-type { border-top: none; }
.toggle-row .t-title { font-size: 14px; font-weight: 600; }
.toggle-row .t-sub { font-size: 12.5px; color: var(--dim); margin-top: 2px; line-height: 1.45; }
.switch { position: relative; width: 46px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track { position: absolute; inset: 0; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; transition: .2s; }
.switch .track:before { content: ""; position: absolute; width: 20px; height: 20px; left: 2px; top: 2px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + .track { background: var(--gradient); border-color: transparent; }
.switch input:checked + .track:before { transform: translateX(20px); }

/* Clip cards */
.clip { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; margin: 10px 0; }
.clip .thumb { width: 100%; border-radius: 12px; display: block; margin-bottom: 10px; background: var(--surface-2); }
.clip h3 { font-size: 15.5px; line-height: 1.4; }
.clip .window { font-size: 13px; color: var(--dim); margin-top: 4px; }
.clip .reason { font-size: 13px; color: var(--dim); margin-top: 6px; line-height: 1.5; }
.clip .badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.clip .actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.clip .note { font-size: 12.5px; color: var(--dim); margin-top: 10px; line-height: 1.5; }
.clip .note.warn { color: var(--orange); }
.progress { height: 6px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin-top: 10px; }
.progress > div { height: 100%; background: var(--gradient); width: 0%; transition: width .4s; }

/* Monitoring */
.gauge-wrap { text-align: center; padding: 8px 0 4px; }
.gauge-num { font-size: 40px; font-weight: 700; }
.stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: 12px; }
.stat { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 10px 8px; text-align: center; }
.stat .v { font-size: 19px; font-weight: 700; }
.stat .k { font-size: 11px; color: var(--dim); margin-top: 2px; }
.chart { width: 100%; height: 120px; display: block; margin-top: 12px; }
.feed { list-style: none; margin-top: 10px; }
.feed li { font-size: 13px; color: var(--dim); padding: 7px 0; border-top: 1px solid var(--border); line-height: 1.5; }
.feed li:first-child { border-top: none; }
.feed li b { color: var(--text); }
.viral { background: var(--gradient); border-radius: var(--radius); padding: 16px; margin: 12px 0; text-align: center; }
.viral h2 { font-size: 18px; }
.viral p { color: rgba(255,255,255,.85); font-size: 13.5px; margin-top: 4px; }
.viral .btn { background: #fff; color: #111; margin-top: 12px; }

/* Player */
.player-frame { width: 100%; border-radius: 12px; overflow: hidden; background: #000; position: relative; }
.player-frame.v916 { aspect-ratio: 9 / 16; max-width: 340px; margin: 0 auto; }
.player-frame.v169 { aspect-ratio: 16 / 9; }
.player-frame iframe, .player-frame video { width: 100%; height: 100%; border: 0; display: block; object-fit: cover; }
.hook-title { position: absolute; top: 10px; left: 0; right: 0; text-align: center; font-weight: 800; font-size: 15px; letter-spacing: .02em; text-shadow: 0 2px 8px rgba(0,0,0,.9); padding: 0 12px; }
.caption-line { position: absolute; bottom: 12px; left: 0; right: 0; text-align: center; font-size: 13.5px; font-weight: 600; text-shadow: 0 2px 8px rgba(0,0,0,.9); padding: 0 12px; }

/* Plans */
.plan-grid { display: grid; gap: 12px; margin-top: 12px; }
.plan { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.plan.current { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.plan h3 { font-size: 18px; }
.plan .price { font-size: 30px; font-weight: 700; margin: 8px 0; }
.plan .price small { font-size: 14px; color: var(--dim); font-weight: 400; }
.plan ul { list-style: none; margin: 10px 0 14px; }
.plan li { font-size: 13.5px; color: var(--dim); padding: 5px 0; line-height: 1.5; }
.plan li:before { content: "✓ "; color: var(--green); }

/* Toasts */
#toasts { position: fixed; left: 16px; right: 16px; bottom: 92px; z-index: 60; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; font-size: 13.5px; box-shadow: 0 8px 30px rgba(0,0,0,.5); }
.toast b { display: block; margin-bottom: 2px; }
.toast .muted { font-size: 12.5px; }

/* Bottom nav */
.bottomnav { position: fixed; left: 0; right: 0; bottom: 0; background: rgba(8,8,13,.96); border-top: 1px solid var(--border); display: flex; z-index: 50; }
.bottomnav button { flex: 1; background: none; border: none; color: var(--dim); padding: 10px 4px 12px; font-size: 11.5px; font-weight: 600; }
.bottomnav button.on { color: var(--accent); }
.bottomnav .ico { display: block; font-size: 19px; margin-bottom: 2px; }
.bottomnav .cnt { background: var(--gradient); color: #fff; border-radius: 999px; font-size: 10px; padding: 1px 6px; margin-left: 2px; }

/* Banner */
.banner { border-radius: 12px; padding: 12px 14px; font-size: 13.5px; line-height: 1.55; margin: 12px 0; }
.banner.orange { background: rgba(251,146,60,.12); border: 1px solid rgba(251,146,60,.4); color: #fdba74; }
.banner.green { background: rgba(52,211,153,.1); border: 1px solid rgba(52,211,153,.35); color: #6ee7b7; }
.banner.grey { background: var(--surface); border: 1px solid var(--border); color: var(--dim); }
.banner b { color: var(--text); }

/* Modal / sheet */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.65); z-index: 70; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--surface); border: 1px solid var(--border); border-bottom: none; border-radius: 20px 20px 0 0; padding: 18px 16px 26px; width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto; }
.sheet h2 { font-size: 18px; margin-bottom: 6px; }
.avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--gradient); display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; color: #fff; flex-shrink: 0; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--border); font-size: 13.5px; }
.kv:first-of-type { border-top: none; }
.kv span:first-child { color: var(--dim); }
.check-line { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--border); font-size: 13.5px; }
.check-line:first-of-type { border-top: none; }
.empty { text-align: center; color: var(--dim); padding: 28px 12px; font-size: 14px; line-height: 1.6; }
.footer-note { text-align: center; color: var(--dim); font-size: 12px; padding: 24px 0 8px; line-height: 1.6; }
