/* BellerCreatives Studio — Shared Layout System
   Used by all 5 studios: Writers, Cover, Audiobook, Documentary, Animation
   Purple accent (#7c3aed), Inter font, white background
*/

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6; color: #1a1a2e; background: #fff;
}
a { color: #7c3aed; text-decoration: none; }
a:hover { color: #6d28d9; }

/* ── Variables ── */
:root {
  --bc-accent: #7c3aed;
  --bc-accent-hover: #6d28d9;
  --bc-accent-light: rgba(124, 58, 237, 0.08);
  --bc-accent-glow: rgba(124, 58, 237, 0.15);
  --bc-bg: #ffffff;
  --bc-bg-alt: #faf8f5;
  --bc-border: #e5e2dd;
  --bc-text: #1a1a2e;
  --bc-text-muted: #6b6b80;
  --bc-success: #10b981;
  --bc-warning: #f59e0b;
  --bc-error: #ef4444;
  --bc-radius: 10px;
  --bc-shadow: 0 2px 12px rgba(0,0,0,0.06);
  --bc-shadow-lg: 0 8px 30px rgba(0,0,0,0.1);
}

/* ── Skip to Content ── */
.bc-skip { position: absolute; top: -100px; left: 0; background: var(--bc-accent); color: #fff; padding: 0.5rem 1rem; z-index: 9999; border-radius: 0 0 8px 0; }
.bc-skip:focus { top: 0; }

/* ── Top Navigation ── */
.bc-topbar {
  background: #fff; border-bottom: 1px solid var(--bc-border);
  padding: 0 1.5rem; height: 56px;
  display: flex; align-items: center; position: sticky; top: 0; z-index: 100;
}
.bc-topbar-inner { max-width: 1280px; width: 100%; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; }
.bc-brand { font-weight: 800; font-size: 1.1rem; color: var(--bc-text); }
.bc-brand span { color: var(--bc-accent); }
.bc-nav { display: flex; gap: 0.25rem; list-style: none; }
.bc-nav a {
  padding: 0.4rem 0.75rem; border-radius: 6px; font-size: 0.85rem; font-weight: 500;
  color: var(--bc-text-muted); transition: all 0.15s;
}
.bc-nav a:hover, .bc-nav a.active { color: var(--bc-accent); background: var(--bc-accent-light); }
.bc-nav-cta {
  background: var(--bc-accent) !important; color: #fff !important;
  padding: 0.4rem 1rem !important; border-radius: 6px;
}
.bc-nav-cta:hover { background: var(--bc-accent-hover) !important; }
.bc-hamburger { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; }
.bc-hamburger span { display: block; width: 22px; height: 2px; background: var(--bc-text); margin: 5px 0; transition: 0.2s; }

@media (max-width: 768px) {
  .bc-hamburger { display: block; }
  .bc-nav { display: none; flex-direction: column; position: absolute; top: 56px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--bc-border); padding: 0.5rem; box-shadow: var(--bc-shadow-lg); }
  .bc-nav.open { display: flex; }
  .bc-nav a { padding: 0.75rem 1rem; }
}

/* ── Studio Header ── */
.bc-studio-header {
  padding: 3rem 1.5rem 2rem; text-align: center;
  background: linear-gradient(180deg, var(--bc-accent-light), transparent);
}
.bc-studio-header h1 { font-size: 2rem; font-weight: 800; margin-bottom: 0.5rem; }
.bc-studio-header p { color: var(--bc-text-muted); font-size: 1.05rem; max-width: 600px; margin: 0 auto; }
.bc-studio-badge {
  display: inline-block; background: var(--bc-accent); color: #fff;
  padding: 0.2rem 0.75rem; border-radius: 20px; font-size: 0.7rem;
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.75rem;
}

/* ── Container ── */
.bc-container { max-width: 1080px; margin: 0 auto; padding: 0 1.5rem; }
.bc-container-narrow { max-width: 720px; margin: 0 auto; padding: 0 1.5rem; }

/* ── Step Wizard ── */
.bc-steps {
  display: flex; justify-content: center; gap: 0; margin: 2rem auto;
  max-width: 700px; position: relative;
}
.bc-step {
  display: flex; flex-direction: column; align-items: center; flex: 1;
  position: relative; cursor: default;
}
.bc-step-num {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem;
  background: #f0ede8; color: var(--bc-text-muted);
  border: 2px solid var(--bc-border); transition: all 0.3s; z-index: 2;
}
.bc-step-label { font-size: 0.72rem; color: var(--bc-text-muted); margin-top: 0.4rem; font-weight: 500; }
.bc-step.active .bc-step-num { background: var(--bc-accent); color: #fff; border-color: var(--bc-accent); box-shadow: 0 0 0 4px var(--bc-accent-glow); }
.bc-step.active .bc-step-label { color: var(--bc-accent); font-weight: 600; }
.bc-step.done .bc-step-num { background: var(--bc-success); color: #fff; border-color: var(--bc-success); }
.bc-step.done .bc-step-label { color: var(--bc-success); }
.bc-step:not(:last-child)::after {
  content: ''; position: absolute; top: 18px; left: calc(50% + 22px);
  width: calc(100% - 44px); height: 2px; background: var(--bc-border); z-index: 1;
}
.bc-step.done:not(:last-child)::after { background: var(--bc-success); }

@media (max-width: 600px) {
  .bc-step-label { display: none; }
  .bc-step-num { width: 30px; height: 30px; font-size: 0.75rem; }
}

/* ── Step Panels ── */
.bc-panel { display: none; animation: bcFadeIn 0.3s ease; }
.bc-panel.active { display: block; }
@keyframes bcFadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ── Cards ── */
.bc-card {
  background: var(--bc-bg); border: 1px solid var(--bc-border);
  border-radius: var(--bc-radius); padding: 1.5rem;
  box-shadow: var(--bc-shadow); transition: border-color 0.2s, box-shadow 0.2s;
}
.bc-card:hover { border-color: var(--bc-accent); box-shadow: var(--bc-shadow-lg); }
.bc-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }

/* ── Option Selector (radio cards) ── */
.bc-option-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.bc-option {
  border: 2px solid var(--bc-border); border-radius: var(--bc-radius);
  padding: 1.25rem; cursor: pointer; transition: all 0.2s; text-align: center;
}
.bc-option:hover { border-color: var(--bc-accent); background: var(--bc-accent-light); }
.bc-option.selected { border-color: var(--bc-accent); background: var(--bc-accent-light); box-shadow: 0 0 0 3px var(--bc-accent-glow); }
.bc-option-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.bc-option-title { font-weight: 700; font-size: 0.95rem; }
.bc-option-desc { font-size: 0.8rem; color: var(--bc-text-muted); margin-top: 0.25rem; }

/* ── Form Elements ── */
.bc-form-group { margin-bottom: 1.25rem; }
.bc-form-group label { display: block; font-weight: 600; font-size: 0.85rem; margin-bottom: 0.4rem; color: var(--bc-text); }
.bc-input, .bc-select, .bc-textarea {
  width: 100%; padding: 0.65rem 0.9rem; border: 1px solid var(--bc-border);
  border-radius: 8px; font-size: 0.9rem; font-family: inherit;
  background: var(--bc-bg); color: var(--bc-text); transition: border-color 0.2s;
}
.bc-input:focus, .bc-select:focus, .bc-textarea:focus { border-color: var(--bc-accent); outline: none; box-shadow: 0 0 0 3px var(--bc-accent-glow); }
.bc-textarea { min-height: 120px; resize: vertical; }

/* ── Buttons ── */
.bc-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.6rem 1.25rem; border-radius: 8px; font-weight: 600; font-size: 0.9rem;
  cursor: pointer; border: none; transition: all 0.15s; font-family: inherit;
}
.bc-btn-primary { background: var(--bc-accent); color: #fff; }
.bc-btn-primary:hover { background: var(--bc-accent-hover); }
.bc-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.bc-btn-outline { background: transparent; border: 1px solid var(--bc-border); color: var(--bc-text); }
.bc-btn-outline:hover { border-color: var(--bc-accent); color: var(--bc-accent); }
.bc-btn-lg { padding: 0.8rem 2rem; font-size: 1rem; }
.bc-btn-sm { padding: 0.35rem 0.75rem; font-size: 0.8rem; }
.bc-btn-block { width: 100%; }

/* ── Action Bar (bottom of step panels) ── */
.bc-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--bc-border); }
.bc-actions-right { display: flex; gap: 0.75rem; }

/* ── Preview / Result Cards ── */
.bc-preview-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1.5rem 0; }
.bc-preview-card {
  border: 2px solid var(--bc-border); border-radius: var(--bc-radius);
  overflow: hidden; cursor: pointer; transition: all 0.2s; position: relative;
}
.bc-preview-card:hover { border-color: var(--bc-accent); transform: translateY(-2px); }
.bc-preview-card.selected { border-color: var(--bc-accent); box-shadow: 0 0 0 3px var(--bc-accent-glow); }
.bc-preview-card img { width: 100%; aspect-ratio: 2/3; object-fit: cover; display: block; }
.bc-preview-label {
  position: absolute; bottom: 0; left: 0; right: 0; padding: 0.5rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.7)); color: #fff;
  font-size: 0.75rem; font-weight: 600; text-align: center;
}

@media (max-width: 600px) { .bc-preview-grid { grid-template-columns: 1fr 1fr; } }

/* ── Audio Player ── */
.bc-audio-player {
  display: flex; align-items: center; gap: 0.75rem;
  background: var(--bc-bg-alt); border: 1px solid var(--bc-border);
  border-radius: var(--bc-radius); padding: 0.75rem 1rem; margin: 0.5rem 0;
}
.bc-audio-play {
  width: 36px; height: 36px; border-radius: 50%; border: none;
  background: var(--bc-accent); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 1rem;
  flex-shrink: 0; transition: background 0.15s;
}
.bc-audio-play:hover { background: var(--bc-accent-hover); }
.bc-audio-info { flex: 1; }
.bc-audio-name { font-weight: 600; font-size: 0.85rem; }
.bc-audio-meta { font-size: 0.75rem; color: var(--bc-text-muted); }

/* ── Voice Grid ── */
.bc-voice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0.75rem; margin: 1.5rem 0; }

/* ── Progress Tracker ── */
.bc-progress { margin: 2rem 0; }
.bc-progress-bar { height: 8px; background: #f0ede8; border-radius: 4px; overflow: hidden; }
.bc-progress-fill { height: 100%; background: var(--bc-accent); border-radius: 4px; transition: width 0.5s ease; }
.bc-progress-label { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--bc-text-muted); margin-top: 0.4rem; }

/* ── Status Badge ── */
.bc-badge { display: inline-block; padding: 0.15rem 0.6rem; border-radius: 20px; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; }
.bc-badge-live { background: rgba(16,185,129,0.1); color: #059669; }
.bc-badge-progress { background: rgba(245,158,11,0.1); color: #d97706; }
.bc-badge-new { background: var(--bc-accent-light); color: var(--bc-accent); }

/* ── Price Display ── */
.bc-price { font-size: 2rem; font-weight: 800; color: var(--bc-text); }
.bc-price-period { font-size: 0.85rem; font-weight: 400; color: var(--bc-text-muted); }
.bc-price-note { font-size: 0.8rem; color: var(--bc-text-muted); margin-top: 0.25rem; }

/* ── Feature List ── */
.bc-features { list-style: none; margin: 1rem 0; }
.bc-features li { padding: 0.4rem 0; font-size: 0.9rem; display: flex; align-items: baseline; gap: 0.5rem; }
.bc-features li::before { content: '\2713'; color: var(--bc-success); font-weight: 700; flex-shrink: 0; }

/* ── Footer ── */
.bc-footer {
  background: #0f0f1a; color: #a0a0b0; padding: 3rem 1.5rem 2rem;
  margin-top: 4rem; text-align: center; font-size: 0.82rem;
}
.bc-footer a { color: #d0d0e0; }
.bc-footer-links { display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap; list-style: none; margin: 1rem 0; }
.bc-footer-ecosystem { display: flex; gap: 0.5rem; justify-content: center; align-items: center; margin-top: 0.75rem; font-size: 0.78rem; }
.bc-footer-ecosystem span { color: #555; }

/* ── Loading / Empty States ── */
.bc-loading { text-align: center; padding: 3rem; color: var(--bc-text-muted); }
.bc-loading-spinner {
  width: 32px; height: 32px; border: 3px solid var(--bc-border);
  border-top-color: var(--bc-accent); border-radius: 50%;
  animation: bcSpin 0.8s linear infinite; margin: 0 auto 1rem;
}
@keyframes bcSpin { to { transform: rotate(360deg); } }
.bc-empty { text-align: center; padding: 3rem; color: var(--bc-text-muted); }
.bc-empty-icon { font-size: 3rem; margin-bottom: 0.75rem; }

/* ── Toast (reuse from bc-fetch.js) ── */

/* ── Responsive Utilities ── */
.bc-hide-mobile { }
@media (max-width: 768px) {
  .bc-hide-mobile { display: none !important; }
  .bc-studio-header h1 { font-size: 1.5rem; }
  .bc-studio-header { padding: 2rem 1rem 1.5rem; }
  .bc-card { padding: 1rem; }
  .bc-actions { flex-direction: column; gap: 0.75rem; }
  .bc-actions-right { width: 100%; justify-content: stretch; }
  .bc-actions-right .bc-btn { flex: 1; }
}
