/* Lazy Reels — design system */

:root {
  --bg:          #fffaf2;
  --bg-soft:     #fff3e3;
  --ink:         #1a1428;
  --ink-soft:    #5a5468;
  --line:        #ece4d6;
  --line-strong: #d8cfbd;
  --primary:     #ff6b35;
  --primary-dk:  #e95a2a;
  --accent:      #6e45e2;
  --accent-soft: #efeaff;
  --peach:       #ffd8c2;
  --mint:        #c8f0d9;
  --lemon:       #fff2a8;
  --danger:      #d8423d;
  --ok:          #2e9a5a;
  --radius:      18px;
  --radius-sm:   12px;
  --shadow-sm:   0 1px 2px rgba(26,20,40,.06), 0 2px 6px rgba(26,20,40,.04);
  --shadow:      0 6px 24px rgba(26,20,40,.08), 0 2px 6px rgba(26,20,40,.04);
  --shadow-lg:   0 20px 50px rgba(26,20,40,.12), 0 6px 16px rgba(26,20,40,.06);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, .display {
  font-family: 'Bricolage Grotesque', 'Plus Jakarta Sans', system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.4rem, 5.5vw, 4.2rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); }
h3 { font-size: 1.25rem; letter-spacing: -0.01em; }

p { margin: 0 0 1em; color: var(--ink-soft); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- Layout ---- */
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 720px; margin: 0 auto; padding: 0 24px; }

/* ---- Navbar ---- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 250, 242, 0.85);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px; max-width: 1280px; margin: 0 auto;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800; font-size: 1.3rem; color: var(--ink);
  letter-spacing: -0.02em;
}
.brand:hover { text-decoration: none; }
.brand-dot {
  width: 28px; height: 28px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: var(--shadow-sm);
  display: inline-block; position: relative;
}
.brand-dot::after {
  content: '▶';
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: white; font-size: 11px; padding-left: 2px;
}
.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-links a:not(.btn) { color: var(--ink); font-weight: 500; font-size: 0.95rem; }
.nav-links a:not(.btn):hover { color: var(--primary); text-decoration: none; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px;
  border-radius: 12px; border: 0;
  font-family: inherit; font-weight: 600; font-size: 0.95rem;
  cursor: pointer; transition: transform .12s ease, box-shadow .15s ease, background .15s ease;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--ink); color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: #000; box-shadow: var(--shadow); text-decoration: none; }
.btn-accent {
  background: var(--primary); color: #fff;
  box-shadow: 0 4px 14px rgba(255, 107, 53, .35);
}
.btn-accent:hover { background: var(--primary-dk); text-decoration: none; }
.btn-ghost {
  background: transparent; color: var(--ink);
  border: 1px solid var(--line-strong);
}
.btn-ghost:hover { background: var(--bg-soft); text-decoration: none; }
.btn-lg { padding: 16px 28px; font-size: 1.05rem; border-radius: 14px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

/* ---- Cards ---- */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.card-lg { padding: 36px; border-radius: 22px; box-shadow: var(--shadow); }

/* ---- Form ---- */
.field { display: block; margin-bottom: 20px; }
.label {
  display: block;
  font-weight: 600; font-size: 0.9rem; color: var(--ink);
  margin-bottom: 8px;
}
.help { font-size: 0.82rem; color: var(--ink-soft); margin-top: 6px; }
.input, .textarea, .select {
  width: 100%;
  font: inherit; color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(255, 107, 53, .12);
}
.textarea { min-height: 110px; resize: vertical; }

.row { display: grid; gap: 16px; }
.row-2 { grid-template-columns: 1fr 1fr; }
.row-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 720px) {
  .row-2, .row-3 { grid-template-columns: 1fr; }
}

/* ---- Segmented control (for tabs / source type / format) ---- */
.segmented {
  display: inline-flex;
  padding: 4px;
  background: var(--bg-soft);
  border-radius: 12px;
  gap: 4px;
}
.segmented button {
  background: transparent; border: 0;
  font: inherit; font-weight: 600; font-size: .9rem;
  color: var(--ink-soft);
  padding: 8px 16px;
  border-radius: 9px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.segmented button.active {
  background: #fff; color: var(--ink);
  box-shadow: var(--shadow-sm);
}

/* ---- Chips / characters list ---- */
.character-row {
  display: grid;
  grid-template-columns: 1fr 2fr auto;
  gap: 12px;
  margin-bottom: 12px;
  align-items: start;
}
.character-row .input { padding: 10px 12px; }
.character-row .icon-btn {
  background: transparent; border: 1px solid var(--line-strong);
  width: 44px; height: 44px; border-radius: 10px;
  cursor: pointer; color: var(--ink-soft);
  display: grid; place-items: center; font-size: 1.1rem;
}
.character-row .icon-btn:hover { color: var(--danger); border-color: var(--danger); }
@media (max-width: 720px) {
  .character-row { grid-template-columns: 1fr; }
  .character-row .icon-btn { width: auto; justify-self: end; }
}

/* ---- Hero ---- */
.hero {
  padding: 80px 0 100px;
  text-align: center;
  background:
    radial-gradient(ellipse at top, var(--peach) 0%, transparent 50%),
    radial-gradient(ellipse at bottom right, var(--accent-soft) 0%, transparent 55%),
    var(--bg);
}
.hero .eyebrow {
  display: inline-block;
  padding: 6px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.82rem; font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.hero h1 {
  max-width: 900px; margin: 0 auto 20px;
}
.hero .sub {
  max-width: 620px; margin: 0 auto 36px;
  font-size: 1.15rem; color: var(--ink-soft);
}
.hero-ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---- Feature grid ---- */
.features {
  padding: 80px 0;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
}
@media (max-width: 880px) { .feature-grid { grid-template-columns: 1fr; } }
.feature {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.feature .emoji {
  display: inline-grid; place-items: center;
  width: 48px; height: 48px;
  background: var(--bg-soft);
  border-radius: 14px;
  font-size: 1.5rem;
  margin-bottom: 16px;
}
.feature h3 { margin-bottom: 8px; }
.feature p { margin: 0; font-size: 0.95rem; }

/* ---- Steps strip ---- */
.steps { padding: 80px 0; background: var(--bg-soft); }
.step-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 40px; }
@media (max-width: 880px) { .step-grid { grid-template-columns: 1fr; } }
.step .num {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--ink); color: #fff;
  font-weight: 700; margin-bottom: 12px;
}

/* ---- CTA strip ---- */
.cta-strip {
  padding: 80px 0 100px;
  text-align: center;
}
.cta-card {
  background: linear-gradient(135deg, var(--ink) 0%, #2d1f4a 100%);
  color: #fff;
  padding: 56px 32px;
  border-radius: 28px;
  position: relative;
  overflow: hidden;
}
.cta-card::before {
  content: '';
  position: absolute; inset: -50% -10% auto auto;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(255,107,53,.4) 0%, transparent 70%);
  pointer-events: none;
}
.cta-card h2 { color: #fff; margin-bottom: 14px; }
.cta-card p { color: rgba(255,255,255,0.75); margin-bottom: 28px; }

/* ---- Footer ---- */
.footer {
  border-top: 1px solid var(--line);
  padding: 28px 0;
  font-size: .9rem;
  color: var(--ink-soft);
}
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }

/* ---- Auth pages ---- */
.auth-shell {
  min-height: calc(100vh - 70px);
  display: grid; place-items: center;
  padding: 40px 24px;
}
.auth-card { width: 100%; max-width: 440px; }
.auth-card h1 { font-size: 2rem; margin-bottom: 6px; }
.auth-card .sub { color: var(--ink-soft); margin-bottom: 28px; }

/* ---- App / wizard ---- */
.app-shell { padding: 40px 0 80px; }
.app-header { margin-bottom: 32px; }
.app-header h1 { font-size: 2.4rem; margin-bottom: 6px; }
.app-header p { margin: 0; }

/* ---- Watch page ---- */
.watch-shell { padding: 40px 0; }
.video-frame {
  width: 100%;
  background: #000;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 16/9;
}
.video-frame.vertical { aspect-ratio: 9/16; max-width: 380px; margin: 0 auto; }
.video-frame video { width: 100%; height: 100%; display: block; }
.status-bar {
  display: flex; align-items: center; gap: 14px;
  background: #fff; border: 1px solid var(--line);
  padding: 14px 18px; border-radius: 14px;
  margin-bottom: 20px;
}
.spinner {
  width: 18px; height: 18px;
  border: 2.5px solid var(--line-strong);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Toast / banner ---- */
.banner {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.92rem;
  margin-bottom: 16px;
}
.banner.error { background: #fdecec; color: var(--danger); border: 1px solid #f5c8c6; }
.banner.ok    { background: #e6f6ec; color: var(--ok);     border: 1px solid #c0e5cd; }
.banner.info  { background: var(--accent-soft); color: var(--accent); border: 1px solid #d8ceff; }

/* ---- Admin ---- */
.admin-shell { display: grid; grid-template-columns: 220px 1fr; gap: 32px; padding: 32px 0; }
@media (max-width: 880px) { .admin-shell { grid-template-columns: 1fr; } }
.admin-nav { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 80px; align-self: start; }
.admin-nav a {
  padding: 10px 14px; border-radius: 10px;
  color: var(--ink-soft); font-weight: 500;
}
.admin-nav a.active { background: var(--ink); color: #fff; }
.admin-nav a:hover { text-decoration: none; background: var(--bg-soft); color: var(--ink); }
.admin-nav a.active:hover { background: var(--ink); color: #fff; }

.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 0.92rem; }
.table th { background: var(--bg-soft); font-weight: 600; }

.tag {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 0.75rem; font-weight: 600;
}
.tag.done    { background: #e6f6ec; color: var(--ok); }
.tag.error   { background: #fdecec; color: var(--danger); }
.tag.pending { background: var(--bg-soft); color: var(--ink-soft); }

/* ---- Hosts (app page) ---- */
.host-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}
.host-card {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.host-avatar {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent-soft), var(--peach));
  display: grid;
  place-items: center;
  color: var(--ink-soft);
  overflow: hidden;
  position: relative;
}
.host-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.host-avatar .placeholder {
  text-align: center; padding: 18px;
  font-size: .92rem; line-height: 1.35;
}
.host-avatar .placeholder .face { font-size: 2.6rem; display: block; margin-bottom: 6px; }
.host-avatar .loading {
  position: absolute; inset: 0;
  background: rgba(26,20,40,.55); color: #fff;
  display: grid; place-items: center; gap: 8px;
  font-size: .9rem; font-weight: 600;
}
.host-card .input.host-name { font-weight: 600; }
.host-card textarea.input { min-height: 92px; resize: vertical; font-family: inherit; }
.host-card .host-actions {
  display: flex; gap: 8px; justify-content: space-between; align-items: center;
}
.host-card .icon-btn {
  background: transparent; border: 1px solid var(--line-strong);
  width: 36px; height: 36px; border-radius: 10px;
  cursor: pointer; color: var(--ink-soft);
  display: grid; place-items: center; font-size: 1rem;
}
.host-card .icon-btn:hover { color: var(--danger); border-color: var(--danger); }

.host-add-row {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.host-add-row .premium-hint {
  color: var(--ink-soft); font-size: .92rem;
}
.host-add-row .premium-hint a { color: var(--primary); font-weight: 600; }

/* ---- Tier badge ---- */
.tier-badge {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  font-weight: 700; font-size: .8rem; letter-spacing: .02em; text-transform: uppercase;
}
.tier-badge.free    { background: var(--bg-soft); color: var(--ink-soft); border: 1px solid var(--line-strong); }
.tier-badge.premium { background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; }

/* ---- Pricing page ---- */
.pricing-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px; margin-top: 32px; align-items: stretch;
}
.price-card {
  background: #fff; border: 1px solid var(--line);
  border-radius: 22px; padding: 32px; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
}
.price-card.featured {
  border: 2px solid var(--primary);
  box-shadow: var(--shadow);
  position: relative;
}
.price-card .price {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800; font-size: 3rem; margin: 12px 0 4px; line-height: 1;
}
.price-card .price-unit { color: var(--ink-soft); font-size: 1rem; }
.price-card .save-tag {
  display: inline-block; background: var(--mint); color: #135f30;
  padding: 4px 10px; border-radius: 999px; font-weight: 700; font-size: .8rem;
  margin-bottom: 8px;
}
.price-card ul { padding-left: 18px; margin: 18px 0; flex-grow: 1; }
.price-card li { margin: 8px 0; }

/* ---- Usage cards ---- */
.usage-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px; margin: 24px 0;
}
.usage-stat {
  background: var(--bg-soft); border-radius: 14px; padding: 18px;
  border: 1px solid var(--line);
}
.usage-stat .label { color: var(--ink-soft); font-size: .85rem; font-weight: 600; }
.usage-stat .value {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.9rem; font-weight: 700; margin-top: 4px;
}
.usage-stat .sub { color: var(--ink-soft); font-size: .8rem; margin-top: 2px; }

/* ---- Saved hosts row (app page) ---- */
.saved-hosts-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 6px 2px;
  scrollbar-width: thin;
}
.saved-host-pill {
  position: relative;
  flex: 0 0 auto;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 4px 14px 4px 4px;
  display: flex; align-items: center; gap: 10px;
  cursor: pointer;
  font: inherit;
  color: var(--ink);
  transition: border-color .15s, transform .05s;
}
.saved-host-pill:hover { border-color: var(--primary); }
.saved-host-pill:active { transform: scale(.98); }
.saved-host-pill img {
  width: 32px; height: 32px; border-radius: 50%; object-fit: cover;
  display: block;
}
.saved-host-name { font-weight: 600; font-size: .92rem; }
.saved-host-del {
  margin-left: 4px;
  color: var(--ink-soft);
  font-size: .85rem;
  padding: 0 4px;
  border-radius: 6px;
  line-height: 1;
}
.saved-host-pill:hover .saved-host-del { color: var(--danger); }
.saved-host-del:hover { background: rgba(216,66,61,.08); }
