/* ============================================================
   AI Influencer Studio — Stylesheet
   ============================================================ */
:root {
  --bg: #08080c;
  --bg-2: #0d0d14;
  --surface: #13131c;
  --surface-2: #1a1a26;
  --border: #26263a;
  --border-2: #333350;
  --text: #f0f0f5;
  --text-dim: #9494ab;
  --text-mute: #6a6a85;
  --accent: #7c5cff;
  --accent-2: #a78bfa;
  --accent-glow: rgba(124, 92, 255, 0.35);
  --pink: #f472b6;
  --green: #34d399;
  --orange: #fb923c;
  --cyan: #22d3ee;
  --red: #f87171;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --max: 1200px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent); color: #fff; }

/* ==== Animated BG ==== */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(124, 92, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 92, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  z-index: 0;
  pointer-events: none;
}
.bg-glow {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
  z-index: 0;
  pointer-events: none;
}
.bg-glow.a { top: -200px; left: -200px; background: var(--accent); }
.bg-glow.b { top: 40%; right: -200px; background: var(--pink); }
.bg-glow.c { bottom: -200px; left: 30%; background: var(--cyan); }

/* ==== Container ==== */
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ==== Navbar ==== */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 16px 0;
  background: rgba(8, 8, 12, 0.7);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.3px;
}
.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--pink));
  display: grid;
  place-items: center;
  font-size: 16px;
  box-shadow: 0 0 20px var(--accent-glow);
}
.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}
.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }
@media (max-width: 720px) { .nav-links { display: none; } }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 700;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-primary {
  padding: 12px 22px;
  font-size: 14px;
  background: linear-gradient(135deg, var(--accent), #6d4aff);
  color: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 24px var(--accent-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px var(--accent-glow);
}
.btn-ghost {
  padding: 11px 20px;
  font-size: 14px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-2);
  border-radius: 12px;
}
.btn-ghost:hover { background: var(--surface); border-color: var(--accent); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ==== Hero ==== */
.hero {
  padding: 80px 0 60px;
  text-align: center;
  position: relative;
}
.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(124, 92, 255, 0.1);
  border: 1px solid rgba(124, 92, 255, 0.25);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-2);
  margin-bottom: 24px;
}
.hero-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
h1 {
  font-size: clamp(36px, 6vw, 68px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -2px;
  margin-bottom: 24px;
}
h1 .grad {
  background: linear-gradient(135deg, var(--accent-2), var(--pink) 50%, var(--orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: clamp(15px, 1.8vw, 18px);
  color: var(--text-dim);
  max-width: 680px;
  margin: 0 auto 40px;
  line-height: 1.6;
}
.hero-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 64px;
}

/* ==== Stats Bar ==== */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 900px;
  margin: 0 auto;
  padding: 24px;
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
@media (max-width: 640px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat {
  text-align: center;
  padding: 8px;
}
.stat-num {
  font-size: 26px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-2), var(--pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -1px;
}
.stat-label {
  font-size: 12px;
  color: var(--text-mute);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

/* ==== Section ==== */
section { padding: 80px 0; position: relative; z-index: 1; }
.section-head {
  text-align: center;
  margin-bottom: 56px;
}
.eyebrow {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent-2);
  margin-bottom: 12px;
}
h2 {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.15;
  margin-bottom: 16px;
}
.section-sub {
  color: var(--text-dim);
  font-size: 16px;
  max-width: 620px;
  margin: 0 auto;
}

/* ==== Feature Cards (4 Skills) ==== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
@media (max-width: 800px) { .skills-grid { grid-template-columns: 1fr; } }

.skill-card {
  position: relative;
  padding: 28px;
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
  text-align: left;
  font-family: inherit;
}
.skill-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.skill-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-2);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.skill-card:hover::before { opacity: 1; }

.skill-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 24px;
  margin-bottom: 18px;
  position: relative;
}
.skill-icon.purple { background: rgba(124, 92, 255, 0.12); border: 1px solid rgba(124, 92, 255, 0.3); }
.skill-icon.pink   { background: rgba(244, 114, 182, 0.12); border: 1px solid rgba(244, 114, 182, 0.3); }
.skill-icon.cyan   { background: rgba(34, 211, 238, 0.12); border: 1px solid rgba(34, 211, 238, 0.3); }
.skill-icon.orange { background: rgba(251, 146, 60, 0.12); border: 1px solid rgba(251, 146, 60, 0.3); }

.skill-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}
.skill-card p {
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.65;
  margin-bottom: 16px;
}
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-dim);
}
.skill-arrow {
  position: absolute;
  top: 28px;
  right: 28px;
  font-size: 18px;
  color: var(--text-mute);
  transition: all 0.3s;
}
.skill-card:hover .skill-arrow {
  color: var(--accent-2);
  transform: translate(4px, -4px);
}

/* ==== Playground (Interactive) ==== */
.playground {
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.pg-tabs {
  display: flex;
  gap: 6px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  max-width: 720px;
  margin: 0 auto 32px;
  overflow-x: auto;
  scrollbar-width: none;
}
.pg-tabs::-webkit-scrollbar { display: none; }
.pg-tab {
  flex: 1;
  min-width: 140px;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  background: transparent;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.pg-tab:hover { color: var(--text); }
.pg-tab.active {
  background: linear-gradient(135deg, var(--accent), #6d4aff);
  color: #fff;
  box-shadow: 0 4px 16px var(--accent-glow);
}

.pg-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 900px) { .pg-grid { grid-template-columns: 1fr; } }

.pg-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.pg-panel-head {
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0,0,0,0.15);
  gap: 12px;
}
.pg-panel-head h3 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-dim);
}
.pg-panel-body { padding: 22px; }

.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 11px 14px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
  transition: all 0.2s;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.15);
}
.field textarea { resize: vertical; min-height: 60px; line-height: 1.5; }
.field input::placeholder,
.field textarea::placeholder { color: var(--text-mute); }

.btn-generate {
  width: 100%;
  padding: 13px;
  font-size: 14px;
  background: linear-gradient(135deg, var(--accent), #6d4aff);
  color: #fff;
  border-radius: 12px;
  margin-top: 8px;
  box-shadow: 0 8px 24px var(--accent-glow);
}
.btn-generate:hover { transform: translateY(-2px); }

.output-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  font-size: 12px;
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 480px;
  min-height: 200px;
  overflow-y: auto;
  color: var(--text-dim);
}
.output-box.filled { color: var(--text); }
.output-box .empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-mute);
}
.output-box .empty .icon { font-size: 32px; margin-bottom: 12px; opacity: 0.4; display: block; }

.output-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.btn-sm {
  padding: 8px 16px;
  font-size: 12px;
  font-family: inherit;
  font-weight: 600;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-sm:hover { background: var(--border); }
.btn-sm:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-sm.success { background: var(--green); color: #000; border-color: var(--green); }
.btn-sm.danger:hover { background: rgba(248,113,113,0.15); border-color: var(--red); color: var(--red); }

/* ==== Library ==== */
.lib-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 24px;
}
.lib-toolbar input[type="search"],
.lib-toolbar select {
  padding: 10px 14px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
  min-width: 180px;
}
.lib-toolbar input[type="search"] { flex: 1; }
.lib-toolbar input:focus, .lib-toolbar select:focus { border-color: var(--accent); }

.lib-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.lib-card {
  padding: 20px;
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.25s;
}
.lib-card:hover { border-color: var(--border-2); transform: translateY(-2px); }
.lib-card.fav { border-color: rgba(244,114,182,0.45); }
.lib-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.lib-card h4 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.2px;
  word-break: break-word;
}
.lib-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 3px 9px;
  border-radius: 100px;
  background: rgba(124,92,255,0.14);
  border: 1px solid rgba(124,92,255,0.3);
  color: var(--accent-2);
  white-space: nowrap;
}
.lib-preview {
  font-size: 12px;
  font-family: 'SF Mono','Fira Code','Consolas',monospace;
  color: var(--text-mute);
  line-height: 1.6;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  max-height: 96px;
  overflow: hidden;
  white-space: pre-wrap;
  word-break: break-word;
}
.lib-date { font-size: 11px; color: var(--text-mute); }
.lib-actions { display: flex; gap: 6px; margin-top: auto; flex-wrap: wrap; }

.state-msg {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 20px;
  color: var(--text-mute);
  font-size: 14px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}
.state-msg .icon { font-size: 30px; display: block; margin-bottom: 10px; opacity: 0.5; }

/* ==== How it works ==== */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; } }
.step {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  position: relative;
}
.step-num {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -2px;
  background: linear-gradient(135deg, var(--accent-2), var(--pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  margin-bottom: 16px;
}
.step h4 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}
.step p {
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.65;
}

/* ==== CTA ==== */
.cta-box {
  padding: 64px 40px;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.15), rgba(244, 114, 182, 0.1));
  border: 1px solid var(--border-2);
  border-radius: var(--radius-lg);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-box::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 50%, var(--accent-glow), transparent 60%);
  pointer-events: none;
}
.cta-box > * { position: relative; z-index: 1; }
.cta-box h2 {
  font-size: clamp(26px, 3.5vw, 40px);
  margin-bottom: 16px;
}
.cta-box p {
  color: var(--text-dim);
  font-size: 16px;
  max-width: 540px;
  margin: 0 auto 32px;
}
.cta-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ==== Footer ==== */
footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-mute);
  font-size: 13px;
}
footer .logo { justify-content: center; margin-bottom: 12px; }
footer a { color: var(--accent-2); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ==== Toast ==== */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--green);
  color: #000;
  font-size: 13px;
  font-weight: 700;
  padding: 12px 28px;
  border-radius: 100px;
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: 999;
  box-shadow: 0 8px 32px rgba(52, 211, 153, 0.4);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.error { background: var(--red); box-shadow: 0 8px 32px rgba(248,113,113,0.4); }

/* ==== Scroll Reveal ==== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ==== Skeleton ==== */
.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 10px;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
