:root {
  --bg: #080810;
  --surface: #10101e;
  --surface2: #18182a;
  --surface3: #20203a;
  --border: #2a2a45;
  --border2: #3a3a5a;
  --accent: #7c6bff;
  --accent2: #00e5a0;
  --accent3: #ff6b6b;
  --accent-glow: rgba(124,107,255,.25);
  --text: #eaeaf8;
  --text-muted: #7272a0;
  --text-dim: #404068;
  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'DM Mono', monospace;
  --radius: 10px;
  --radius-lg: 16px;
  --transition: 0.18s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.6;
}

/* ── HEADER ─────────────────────────────────── */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  height: 60px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 1rem;
}
.logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: .4rem;
  flex-shrink: 0;
}
.logo > span:first-child { color: var(--accent); }
.pro-badge {
  font-size: .6rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  color: #fff;
  padding: .15rem .45rem;
  border-radius: 4px;
  letter-spacing: .08em;
  font-family: var(--font-body);
  margin-left: .1rem;
}
.tabs {
  display: flex;
  gap: .2rem;
  background: var(--bg);
  padding: 4px;
  border-radius: var(--radius);
  flex: 1;
  max-width: 580px;
}
.tab {
  font-family: var(--font-display);
  font-size: .75rem;
  font-weight: 600;
  padding: .4rem .9rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: .01em;
  flex: 1;
  white-space: nowrap;
}
.tab:hover { color: var(--text); background: var(--surface2); }
.tab.active { background: var(--accent); color: #fff; box-shadow: 0 2px 12px var(--accent-glow); }
.header-right { flex-shrink: 0; }
.page-count-badge {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: .75rem;
  font-weight: 600;
  padding: .3rem .75rem;
  border-radius: 999px;
}

/* ── MAIN ───────────────────────────────────── */
main { padding: 1.5rem 2rem; max-width: 1500px; margin: 0 auto; }

/* ── TWO-COL LAYOUT ─────────────────────────── */
.two-col { display: grid; grid-template-columns: 1fr 380px; gap: 2rem; align-items: start; }
.form-panel { display: flex; flex-direction: column; gap: 1.5rem; }

/* ── STEP BLOCKS ─────────────────────────────── */
.step-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.step-label {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: .65rem;
  margin-bottom: .25rem;
}
.step-num {
  background: var(--accent);
  color: #fff;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: .75rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.step-desc { font-size: .85rem; color: var(--text-muted); margin-top: -.5rem; }

/* ── WEBSITE TYPE GRID ──────────────────────── */
.website-type-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .75rem;
}
.wtype-card {
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem .75rem;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
}
.wtype-card:hover { border-color: var(--border2); background: var(--surface3); }
.wtype-card.active { border-color: var(--accent); background: rgba(124,107,255,.08); box-shadow: 0 0 0 2px var(--accent-glow); }
.wtype-icon { font-size: 1.5rem; }
.wtype-label { font-size: .8rem; font-weight: 700; color: var(--text); }
.wtype-hint { font-size: .7rem; color: var(--text-muted); line-height: 1.3; }

/* ── THEME GRID ─────────────────────────────── */
.theme-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .65rem; }
.theme-card {
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: .75rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-muted);
}
.theme-card:hover { border-color: var(--border2); }
.theme-card.active { border-color: var(--accent); color: var(--text); }
.theme-preview {
  width: 100%;
  height: 36px;
  border-radius: 6px;
  background: #111;
}
.dark-preview { background: linear-gradient(135deg, #111827, #1e1b4b); }
.light-preview { background: linear-gradient(135deg, #f9fafb, #fff); border: 1px solid #e5e7eb; }
.bold-preview { background: linear-gradient(135deg, #5b4fff, #8b5cf6); }
.minimal-preview { background: #fff; border: 1px solid #e5e7eb; position: relative; }
.minimal-preview::after { content: ''; position: absolute; bottom: 6px; left: 8px; right: 8px; height: 2px; background: #111; border-radius: 1px; }
.warm-preview { background: linear-gradient(135deg, #78350f, #b45309); }
.neon-preview { background: linear-gradient(135deg, #000, #0a0a0f); border: 1px solid #00ff9f44; box-shadow: inset 0 0 12px rgba(0,255,160,.1); }

/* ── COLOR ROW ──────────────────────────────── */
.color-row { display: flex; align-items: center; gap: 1rem; }
.color-row input[type="color"] { width: 48px; height: 40px; border-radius: 8px; border: 1.5px solid var(--border); cursor: pointer; background: none; padding: 2px; }
.color-presets { display: flex; gap: .5rem; flex-wrap: wrap; }
.cp {
  width: 28px; height: 28px; border-radius: 50%; cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
}
.cp:hover { transform: scale(1.15); border-color: var(--text); }
.cp.selected { border-color: #fff; box-shadow: 0 0 0 3px var(--accent); }

/* ── FORM FIELDS ────────────────────────────── */
.field-group { display: flex; flex-direction: column; gap: .45rem; }
.field-group label { font-size: .82rem; font-weight: 600; color: var(--text); }
.field-group input[type="text"],
.field-group input[type="email"],
.field-group input[type="date"],
.field-group textarea,
.field-group select {
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: .9rem;
  padding: .65rem 1rem;
  transition: var(--transition);
  outline: none;
  width: 100%;
}
.field-group input:focus,
.field-group textarea:focus,
.field-group select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.field-group select option { background: var(--surface2); }
.field-group textarea { resize: vertical; }
.field-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.hint { font-size: .75rem; color: var(--text-muted); }
.required { color: var(--accent3); }
.char-count { font-size: .75rem; color: var(--text-muted); display: flex; justify-content: flex-end; }
.char-count.warn span, .char-count.warn { color: #f59e0b; }
.char-count.over span, .char-count.over { color: var(--accent3); }

/* ── RADIO + CHECKBOX ────────────────────────── */
.radio-group { display: flex; gap: .75rem; flex-wrap: wrap; }
.radio-option {
  display: flex; align-items: center; gap: .5rem;
  font-size: .85rem; color: var(--text-muted); cursor: pointer;
  background: var(--surface2); border: 1.5px solid var(--border);
  border-radius: 8px; padding: .45rem .9rem; transition: var(--transition);
}
.radio-option:hover { border-color: var(--border2); color: var(--text); }
.radio-option input:checked + span, .radio-option input[type="radio"]:checked ~ * { color: var(--accent); }
.radio-option:has(input:checked) { border-color: var(--accent); color: var(--text); background: rgba(124,107,255,.07); }
.radio-option input { accent-color: var(--accent); }
.checkbox-row { display: flex; gap: .75rem; flex-wrap: wrap; }
.check-opt {
  display: flex; align-items: center; gap: .4rem; font-size: .85rem;
  color: var(--text-muted); cursor: pointer;
  background: var(--surface2); border: 1.5px solid var(--border);
  border-radius: 8px; padding: .4rem .8rem; transition: var(--transition);
}
.check-opt:has(input:checked) { border-color: var(--accent); color: var(--text); }
.check-opt input { accent-color: var(--accent); }

/* ── IMAGE UPLOAD ───────────────────────────── */
.image-upload-label {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--surface2);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  transition: var(--transition);
}
.image-upload-label:hover { border-color: var(--accent); background: rgba(124,107,255,.05); }
.upload-icon { font-size: 1.5rem; flex-shrink: 0; }
.upload-text { font-size: .85rem; color: var(--text-muted); }
.upload-text span { font-size: .75rem; }

/* ── AUTH TOGGLES ────────────────────────────── */
.auth-option-row { display: flex; flex-direction: column; gap: .75rem; }
.auth-toggle-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  cursor: pointer;
  transition: var(--transition);
}
.auth-toggle-card:has(input:checked) { border-color: var(--accent); background: rgba(124,107,255,.07); }
.auth-icon { font-size: 1.4rem; flex-shrink: 0; }
.auth-info { flex: 1; }
.auth-info strong { display: block; font-size: .9rem; font-weight: 700; color: var(--text); }
.auth-info span { font-size: .78rem; color: var(--text-muted); }
.auth-toggle-card input[type="checkbox"] { display: none; }
.toggle-switch {
  width: 44px; height: 24px; background: var(--border2); border-radius: 999px;
  position: relative; flex-shrink: 0; transition: var(--transition);
}
.toggle-switch::after {
  content: '';
  position: absolute;
  left: 3px; top: 3px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: var(--transition);
}
.auth-toggle-card:has(input:checked) .toggle-switch { background: var(--accent); }
.auth-toggle-card:has(input:checked) .toggle-switch::after { left: 23px; background: #fff; }
.auth-sub-options {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

/* ── SECTION CARDS ──────────────────────────── */
.section-card {
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: .75rem;
}
.section-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .75rem;
}
.section-header select {
  flex: 1;
  background: var(--surface3);
  border: 1px solid var(--border2);
  color: var(--text);
  font-family: var(--font-body);
  font-size: .85rem;
  padding: .45rem .75rem;
  border-radius: 8px;
  outline: none;
}
.section-header select:focus { border-color: var(--accent); }
.remove-section {
  background: rgba(239,68,68,.1);
  border: 1px solid rgba(239,68,68,.25);
  color: #ef4444;
  border-radius: 6px;
  width: 28px; height: 28px;
  font-size: .85rem;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}
.remove-section:hover { background: rgba(239,68,68,.2); }
.section-card textarea {
  width: 100%;
  background: var(--surface3);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: .85rem;
  padding: .65rem .9rem;
  resize: vertical;
  outline: none;
  transition: var(--transition);
}
.section-card textarea:focus { border-color: var(--accent); }
.section-card .section-image-upload {
  margin-top: .65rem;
}
.section-card .section-image-upload label.mini-upload {
  display: flex; align-items: center; gap: .6rem;
  background: var(--surface3); border: 1.5px dashed var(--border2);
  border-radius: 8px; padding: .55rem .9rem;
  cursor: pointer; font-size: .8rem; color: var(--text-muted);
  transition: var(--transition);
}
.section-card .section-image-upload label.mini-upload:hover { border-color: var(--accent); color: var(--text); }
.section-card .section-image-upload .mini-thumb {
  max-height: 60px; border-radius: 6px; margin-top: .5rem;
  border: 1px solid var(--border); display: none;
}

/* ── GENERATE BUTTON ─────────────────────────── */
.generate-block { display: flex; flex-direction: column; align-items: center; gap: .75rem; padding: .5rem 0; }
.btn-generate {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1rem 2.5rem;
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 6px 30px var(--accent-glow);
  letter-spacing: -.01em;
}
.btn-generate:hover { transform: translateY(-2px); box-shadow: 0 10px 40px var(--accent-glow); }
.btn-generate:active { transform: translateY(0); }
.gen-icon { font-size: 1.3rem; }
.generate-hint { font-size: .78rem; color: var(--text-dim); text-align: center; }

/* ── BUTTONS ─────────────────────────────────── */
.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: .65rem 1.4rem;
  font-family: var(--font-body);
  font-size: .875rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}
.btn-primary:hover { background: #6558ef; }
.btn-secondary {
  background: var(--surface2);
  color: var(--text);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: .6rem 1.25rem;
  font-family: var(--font-body);
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-secondary.small { padding: .45rem 1rem; font-size: .8rem; }
.btn-danger {
  background: rgba(239,68,68,.1);
  color: #ef4444;
  border: 1px solid rgba(239,68,68,.25);
  border-radius: var(--radius);
  padding: .5rem 1rem;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.btn-danger:hover { background: rgba(239,68,68,.2); }

/* ── TIPS PANEL ─────────────────────────────── */
.tips-panel { position: sticky; top: 76px; }
.tips-sticky {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}
.tips-sticky h3 { font-family: var(--font-display); font-size: .9rem; font-weight: 700; }
.tips-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.tips-list li { font-size: .78rem; color: var(--text-muted); line-height: 1.5; padding-left: .75rem; position: relative; }
.tips-list li::before { content: '→'; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.tip-box {
  background: rgba(124,107,255,.06);
  border: 1px solid rgba(124,107,255,.2);
  border-radius: var(--radius);
  padding: 1rem;
  font-size: .82rem;
  color: var(--text-muted);
}
.tip-box strong { display: block; color: var(--accent); margin-bottom: .4rem; font-size: .85rem; }

/* ── PAGES TAB ──────────────────────────────── */
.pages-layout { display: flex; flex-direction: column; gap: 2rem; }
.pages-header { display: flex; align-items: flex-start; justify-content: space-between; }
.pages-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.page-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  transition: var(--transition);
  position: relative;
}
.page-card:hover { border-color: var(--border2); }
.page-card.active-page { border-color: var(--accent); }
.page-card-head { display: flex; align-items: center; gap: .75rem; }
.page-card-icon { font-size: 1.4rem; width: 40px; height: 40px; background: var(--surface2); border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.page-card-title { font-weight: 700; font-size: .9rem; }
.page-card-url { font-size: .75rem; color: var(--text-muted); font-family: var(--font-mono); }
.page-card-actions { display: flex; gap: .5rem; margin-top: auto; }
.page-status { font-size: .7rem; font-weight: 700; padding: .2rem .55rem; border-radius: 4px; }
.page-status.required { background: rgba(0,229,160,.1); color: var(--accent2); border: 1px solid rgba(0,229,160,.2); }
.page-status.optional { background: var(--surface2); color: var(--text-muted); border: 1px solid var(--border); }
.page-status.enabled { background: rgba(124,107,255,.1); color: var(--accent); border: 1px solid rgba(124,107,255,.25); }
.page-toggle-btn {
  font-size: .78rem;
  font-weight: 600;
  padding: .3rem .75rem;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text-muted);
}
.page-toggle-btn.on { background: rgba(124,107,255,.1); color: var(--accent); border-color: var(--accent); }

.section-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.template-section { margin-top: 1rem; }
.template-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .75rem; }
.template-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.template-card:hover { border-color: var(--accent); background: rgba(124,107,255,.05); }
.template-card-icon { font-size: 1.2rem; }
.template-card-name { font-size: .85rem; font-weight: 700; color: var(--text); }
.template-card-desc { font-size: .75rem; color: var(--text-muted); line-height: 1.4; }
.template-tag {
  font-size: .65rem;
  font-weight: 700;
  padding: .15rem .45rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: .05em;
  width: fit-content;
}
.template-tag.business { background: rgba(0,229,160,.1); color: var(--accent2); }
.template-tag.blog { background: rgba(245,158,11,.1); color: #f59e0b; }
.template-tag.saas { background: rgba(124,107,255,.1); color: var(--accent); }
.template-tag.all { background: rgba(100,100,100,.15); color: var(--text-muted); }

/* ── PAGE EDITOR MODAL ───────────────────────── */
.page-editor-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(6px);
  z-index: 500;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem;
  overflow-y: auto;
}
.page-editor-modal.open { display: flex; }
.page-editor-card {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 2rem;
  width: 100%;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  animation: slideIn .22s ease;
}
@keyframes slideIn { from { opacity:0; transform: translateY(16px); } to { opacity:1; transform: translateY(0); } }
.page-editor-head { display: flex; align-items: center; justify-content: space-between; }
.page-editor-title { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; }
.modal-close-btn {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: .85rem;
  transition: var(--transition);
}
.modal-close-btn:hover { background: var(--surface3); color: var(--text); }

/* ── PREVIEW ─────────────────────────────────── */
.preview-toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}
.page-switcher { display: flex; gap: .4rem; flex-wrap: wrap; flex: 1; }
.page-switch-btn {
  font-size: .78rem;
  font-weight: 600;
  padding: .4rem .9rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.page-switch-btn:hover { border-color: var(--accent); color: var(--text); }
.page-switch-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.device-switcher { display: flex; gap: .3rem; }
.device-btn {
  font-size: .78rem; font-weight: 600;
  padding: .4rem .8rem; border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface2); color: var(--text-muted);
  cursor: pointer; transition: var(--transition);
}
.device-btn:hover { border-color: var(--border2); color: var(--text); }
.device-btn.active { background: var(--surface3); border-color: var(--border2); color: var(--text); }

.serp-preview {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  max-width: 600px;
}
.serp-preview.hidden { display: none; }
.serp-label { font-size: .7rem; font-weight: 700; color: #666; text-transform: uppercase; margin-bottom: .75rem; }
.serp-url { font-size: .8rem; color: #006621; margin-bottom: .2rem; }
.serp-title { font-size: 1.1rem; color: #1a0dab; font-weight: 400; margin-bottom: .3rem; cursor: pointer; }
.serp-title:hover { text-decoration: underline; }
.serp-desc { font-size: .85rem; color: #545454; line-height: 1.5; }

.preview-frame-wrapper {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 600px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1rem;
}
.preview-frame {
  border: none;
  background: #fff;
  border-radius: var(--radius);
  transition: width var(--transition);
}
.preview-frame.desktop { width: 100%; height: 700px; }
.preview-frame.tablet { width: 768px; height: 700px; box-shadow: 0 8px 40px rgba(0,0,0,.4); }
.preview-frame.mobile { width: 375px; height: 700px; box-shadow: 0 8px 40px rgba(0,0,0,.4); }
.empty-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 4rem;
  text-align: center;
  color: var(--text-muted);
  min-height: 400px;
}
.empty-icon { font-size: 3rem; }

/* ── SCORE ───────────────────────────────────── */
.score-layout { display: grid; grid-template-columns: 300px 1fr; gap: 2rem; }
.score-hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}
.score-ring { position: relative; width: 140px; height: 140px; }
.ring-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--surface3); stroke-width: 10; }
.ring-fill { fill: none; stroke: var(--accent2); stroke-width: 10; stroke-linecap: round; transition: stroke-dasharray 1s ease; }
.score-number {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text);
}
.score-label { display: block; margin-top: -1rem; font-size: .7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.score-meta { display: flex; flex-direction: column; gap: .5rem; width: 100%; }
.score-grade {
  font-size: 1.4rem;
  font-weight: 800;
  font-family: var(--font-display);
}
.score-summary { font-size: .82rem; color: var(--text-muted); line-height: 1.5; }

.score-breakdown { display: flex; flex-direction: column; gap: .75rem; }
.score-check-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.score-check-item.pass { border-left: 3px solid var(--accent2); }
.score-check-item.warn { border-left: 3px solid #f59e0b; }
.score-check-item.fail { border-left: 3px solid var(--accent3); }
.check-icon { font-size: 1rem; flex-shrink: 0; }
.check-body { flex: 1; }
.check-title { font-size: .85rem; font-weight: 700; color: var(--text); }
.check-detail { font-size: .78rem; color: var(--text-muted); margin-top: .2rem; }
.check-pts {
  font-size: .75rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-muted);
  background: var(--surface2);
  padding: .2rem .55rem;
  border-radius: 5px;
  flex-shrink: 0;
}
.empty-score { color: var(--text-muted); font-size: .9rem; text-align: center; padding: 3rem; }

/* ── EXPORT ─────────────────────────────────── */
.export-layout { display: flex; flex-direction: column; gap: 2rem; }
.export-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.export-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .65rem;
  transition: var(--transition);
}
.export-card:hover { border-color: var(--border2); }
.export-icon { font-size: 1.75rem; }
.export-card h3 { font-size: .9rem; font-weight: 700; color: var(--text); }
.export-card p { font-size: .8rem; color: var(--text-muted); line-height: 1.55; flex: 1; }

.code-preview-section { display: flex; flex-direction: column; gap: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.code-tabs { display: flex; border-bottom: 1px solid var(--border); }
.code-tab {
  padding: .75rem 1.25rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border-right: 1px solid var(--border);
}
.code-tab:hover { color: var(--text); background: var(--surface2); }
.code-tab.active { color: var(--accent); background: rgba(124,107,255,.05); }
.code-wrapper { position: relative; }
.copy-btn {
  position: absolute;
  top: .75rem;
  right: .75rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: .75rem;
  font-weight: 600;
  padding: .3rem .75rem;
  border-radius: 6px;
  cursor: pointer;
  z-index: 1;
  transition: var(--transition);
}
.copy-btn:hover { color: var(--text); border-color: var(--accent); }
pre {
  padding: 1.25rem;
  overflow-x: auto;
  max-height: 400px;
  overflow-y: auto;
}
code {
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--text-muted);
  line-height: 1.8;
  white-space: pre;
}

/* ── TOAST ───────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--accent2);
  color: #000;
  font-weight: 700;
  font-size: .85rem;
  padding: .75rem 1.5rem;
  border-radius: 999px;
  z-index: 9999;
  transition: transform .3s cubic-bezier(.34,1.56,.64,1), opacity .3s;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 4px 20px rgba(0,0,0,.3);
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* ── TAB CONTENT ─────────────────────────────── */
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── SCROLLBAR ───────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

/* ── RESPONSIVE ──────────────────────────────── */
@media (max-width: 1100px) {
  .two-col { grid-template-columns: 1fr; }
  .tips-panel { position: static; }
  .tips-sticky { max-height: none; }
  .export-grid { grid-template-columns: repeat(2, 1fr); }
  .score-layout { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  main { padding: 1rem; }
  .website-type-grid { grid-template-columns: repeat(2, 1fr); }
  .theme-grid { grid-template-columns: repeat(2, 1fr); }
  .export-grid { grid-template-columns: 1fr; }
  .field-row-2 { grid-template-columns: 1fr; }
  .tabs { display: none; }
}

/* ── PAGES MANAGER ───────────────────────────── */
.pages-section-label { display:flex; align-items:center; justify-content:space-between; font-size:.75rem; font-weight:700; text-transform:uppercase; letter-spacing:.1em; color:var(--text-muted); margin-bottom:.75rem; }
.badge { display:inline-flex; align-items:center; justify-content:center; min-width:20px; height:20px; padding:0 6px; background:var(--accent); color:#fff; font-size:.7rem; border-radius:99px; font-weight:700; margin-left:.4rem; }
.badge.secondary { background:var(--surface2); color:var(--text-dim); }
.badge-required { font-size:.65rem; color:var(--accent); border:1px solid var(--accent); border-radius:99px; padding:2px 8px; }
.pages-active, .pages-inactive { display:flex; flex-direction:column; gap:.5rem; }
.page-card { display:flex; align-items:center; gap:.75rem; background:var(--surface); border:1px solid var(--border); border-radius:12px; padding:.75rem 1rem; transition:.2s; }
.page-card.inactive { opacity:.55; }
.page-card:hover { border-color:var(--border2); opacity:1; }
.page-card .page-icon { font-size:1.2rem; flex-shrink:0; }
.page-card-info { flex:1; min-width:0; }
.page-card-info strong { display:block; font-size:.85rem; font-weight:600; }
.page-card-info span { font-size:.72rem; color:var(--text-muted); font-family:var(--font-mono); }
.page-card-actions { display:flex; align-items:center; gap:.4rem; flex-shrink:0; }
.btn-icon { background:var(--surface2); border:1px solid var(--border); color:var(--text-dim); border-radius:6px; padding:4px 8px; font-size:.75rem; cursor:pointer; transition:.15s; }
.btn-icon:hover:not(:disabled) { background:var(--surface3, #3a3a4a); color:var(--text); }
.btn-icon:disabled { opacity:.35; cursor:default; }
.btn-icon.danger:hover { background:#ef444422; color:#ef4444; border-color:#ef4444; }
.btn-sm { background:var(--accent); color:#fff; border:none; border-radius:8px; padding:5px 12px; font-size:.75rem; font-weight:600; cursor:pointer; transition:.15s; }
.btn-sm:hover { filter:brightness(1.1); }
.btn-sm.secondary { background:var(--surface2); color:var(--text-dim); border:1px solid var(--border); }
.btn-sm.secondary:hover { background:var(--surface3,#3a3a4a); color:var(--text); }
.toggle-sm { position:relative; display:inline-block; width:38px; height:22px; flex-shrink:0; }
.toggle-sm input { opacity:0; width:0; height:0; }
.slider-sm { position:absolute; inset:0; background:var(--surface2); border-radius:99px; cursor:pointer; transition:.3s; border:1px solid var(--border); }
.slider-sm:before { content:''; position:absolute; width:14px; height:14px; left:3px; top:3px; background:var(--text-dim); border-radius:50%; transition:.3s; }
.toggle-sm input:checked ~ .slider-sm { background:var(--accent); border-color:var(--accent); }
.toggle-sm input:checked ~ .slider-sm:before { transform:translateX(16px); background:#fff; }

/* ── TEMPLATE LIBRARY ────────────────────────── */
.tpl-group { margin-bottom:1.5rem; }
.tpl-group-label { font-size:.7rem; font-weight:700; text-transform:uppercase; letter-spacing:.1em; color:var(--text-muted); margin-bottom:.6rem; }
.tpl-grid { display:flex; flex-direction:column; gap:.4rem; }
.tpl-card { display:flex; align-items:center; gap:.75rem; background:var(--surface); border:1px solid var(--border); border-radius:10px; padding:.65rem 1rem; transition:.2s; }
.tpl-card.added { opacity:.6; }
.tpl-card .tpl-icon { font-size:1.2rem; flex-shrink:0; }
.tpl-info { flex:1; min-width:0; }
.tpl-info strong { display:block; font-size:.82rem; font-weight:600; }
.tpl-info span { font-size:.72rem; color:var(--text-muted); }

/* ── SEO SCORE DISPLAY ───────────────────────── */
.seo-score-display { }
.score-hero { display:flex; align-items:center; gap:1.5rem; background:var(--surface); border:1px solid var(--border); border-radius:16px; padding:1.5rem; margin-bottom:1.5rem; }
.score-ring { flex-shrink:0; }
.score-summary h3 { font-size:1.3rem; font-weight:700; margin-bottom:.25rem; }
.score-summary p { color:var(--text-dim); font-size:.9rem; margin-bottom:.15rem; }
.score-sub { font-size:.8rem !important; color:var(--text-muted) !important; }
.score-rows { display:flex; flex-direction:column; gap:.5rem; }
.score-row { display:flex; align-items:center; gap:.75rem; background:var(--surface); border:1px solid var(--border); border-radius:10px; padding:.75rem 1rem; }
.score-row.pass { border-left:3px solid #22c55e; }
.score-row.warn { border-left:3px solid #f59e0b; }
.score-row.fail { border-left:3px solid #ef4444; }
.score-icon { font-size:1rem; width:22px; text-align:center; flex-shrink:0; }
.score-row.pass .score-icon { color:#22c55e; }
.score-row.warn .score-icon { color:#f59e0b; }
.score-row.fail .score-icon { color:#ef4444; }
.score-info { flex:1; }
.score-info strong { display:block; font-size:.82rem; font-weight:600; }
.score-info span { font-size:.75rem; color:var(--text-muted); }
.score-bar-wrap { width:60px; height:6px; background:var(--surface2); border-radius:3px; overflow:hidden; flex-shrink:0; }
.score-bar { height:100%; background:var(--accent); border-radius:3px; transition:width .5s ease; }
.score-row.pass .score-bar { background:#22c55e; }
.score-row.warn .score-bar { background:#f59e0b; }
.score-row.fail .score-bar { background:#ef4444; }
.score-pts { font-size:.72rem; color:var(--text-muted); font-family:var(--font-mono); flex-shrink:0; min-width:32px; text-align:right; }

/* ── SERP PREVIEW ────────────────────────────── */
.serp-card { background:#fff; border-radius:8px; padding:1rem 1.25rem; font-family:Arial,sans-serif; max-width:560px; }
.serp-url { font-size:.75rem; color:#202124; margin-bottom:.2rem; }
.serp-title { font-size:1.1rem; color:#1a0dab; margin-bottom:.3rem; cursor:pointer; }
.serp-title:hover { text-decoration:underline; }
.serp-desc { font-size:.82rem; color:#4d5156; line-height:1.5; }

/* ── SECTION BUILDER ─────────────────────────── */
.section-block { background:var(--surface); border:1px solid var(--border); border-radius:12px; padding:1rem; }
.section-block-header { display:flex; align-items:center; gap:.75rem; margin-bottom:.75rem; }
.section-type-select { flex:1; background:var(--surface2); border:1px solid var(--border); color:var(--text); padding:.45rem .75rem; border-radius:8px; font-size:.85rem; cursor:pointer; }
.section-block-body { display:flex; flex-direction:column; gap:.5rem; }
.section-content { background:var(--surface2); border:1px solid var(--border); color:var(--text); border-radius:8px; padding:.65rem .75rem; font-size:.85rem; resize:vertical; font-family:var(--font-mono); }
.section-hint { font-size:.72rem; color:var(--text-muted); }

/* ── PAGE TABS ───────────────────────────────── */
.page-tab-btn { background:var(--surface); border:1px solid var(--border); color:var(--text-dim); padding:.4rem .9rem; border-radius:8px; font-size:.78rem; cursor:pointer; transition:.15s; white-space:nowrap; }
.page-tab-btn.active { background:var(--accent); border-color:var(--accent); color:#fff; }
.page-tab-btn:hover:not(.active) { border-color:var(--border2); color:var(--text); }

/* ── SPINNER ─────────────────────────────────── */
@keyframes spin { to { transform:rotate(360deg); } }
.spinner { display:inline-block; width:14px; height:14px; border:2px solid rgba(255,255,255,.3); border-top-color:#fff; border-radius:50%; animation:spin .7s linear infinite; vertical-align:middle; }

/* ── HERO DROP ZONE ──────────────────────────── */
.hero-drop-zone { border:2px dashed var(--border2); border-radius:16px; padding:2rem; text-align:center; cursor:pointer; transition:.2s; position:relative; }
.hero-drop-zone:hover, .hero-drop-zone.drag-over { border-color:var(--accent); background:rgba(99,102,241,.05); }
.hero-drop-zone.has-image { border-style:solid; border-color:var(--accent); }
#hero-preview { max-width:100%; max-height:180px; object-fit:cover; border-radius:10px; display:none; }

/* ── SCORE ITEMS (used by ui.js score renderer) ── */
.score-item { display:flex; gap:.75rem; background:var(--surface); border:1px solid var(--border); border-radius:10px; padding:.75rem 1rem; }
.score-item.pass { border-left:3px solid #22c55e; }
.score-item.warn { border-left:3px solid #f59e0b; }
.score-item.fail { border-left:3px solid #ef4444; }
.score-item-icon { font-size:1rem; width:20px; text-align:center; flex-shrink:0; margin-top:2px; }
.score-item-body { flex:1; }
.score-item-title { font-size:.82rem; font-weight:600; display:flex; justify-content:space-between; margin-bottom:.2rem; }
.score-item-pts { font-family:var(--font-mono); color:var(--text-muted); font-weight:400; }
.score-item-msg { font-size:.75rem; color:var(--text-muted); margin-bottom:.4rem; }
.score-item-bar { height:4px; background:var(--surface2); border-radius:2px; overflow:hidden; }
.score-item-bar div { height:100%; border-radius:2px; transition:width .5s ease; }
