/* ================================================================
   LINKNOVA PREMIUM — styles.css
   Design Direction: Luxury Editorial Dark
   Fonts: Playfair Display (display) + Plus Jakarta Sans (body)
   Philosophy: Every pixel intentional. Conversion-first.
================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;0,800;0,900;1,700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* ── RESET & BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: #080810;
  color: #f0f0f5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── DESIGN TOKENS ── */
:root {
  /* Core palette */
  --bg:          #080810;
  --bg2:         #0e0e1a;
  --surface:     #13131f;
  --surface2:    #1a1a2a;
  --surface3:    #22223a;
  --border:      rgba(255,255,255,0.06);
  --border2:     rgba(255,255,255,0.12);
  --border3:     rgba(255,255,255,0.20);

  /* Accent system */
  --accent:      #7c6ffd;
  --accent-alt:  #a78bfa;
  --accent-glow: rgba(124,111,253,0.30);
  --gold:        #f0c060;
  --gold-glow:   rgba(240,192,96,0.20);
  --rose:        #f472b6;

  /* Text */
  --text:        #f0f0f5;
  --text-sub:    #a0a0b8;
  --text-muted:  #60607a;
  --text-faint:  #35354f;

  /* Radius */
  --r-sm:   10px;
  --r-md:   16px;
  --r-lg:   24px;
  --r-xl:   32px;
  --r-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.4);
  --shadow-md:  0 8px 32px rgba(0,0,0,0.5);
  --shadow-lg:  0 24px 64px rgba(0,0,0,0.6);
  --shadow-glow: 0 0 40px var(--accent-glow);

  /* Transitions */
  --ease:       cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring:cubic-bezier(0.34, 1.56, 0.64, 1);
  --t-fast:     0.15s var(--ease);
  --t-base:     0.25s var(--ease);
  --t-slow:     0.4s  var(--ease);
}

/* ── PAGE SYSTEM ── */
.page { display: none; min-height: 100vh; }
.page.active { display: block; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface3); border-radius: 2px; }

/* ================================================================
   LANDING PAGE
================================================================ */

.landing-wrap {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Animated mesh background */
.mesh-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.mesh-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.4;
  animation: meshFloat 12s ease-in-out infinite alternate;
}
.mesh-orb-1 { width: 600px; height: 600px; background: #7c6ffd; top: -200px; right: -150px; animation-delay: 0s; }
.mesh-orb-2 { width: 400px; height: 400px; background: #f472b6; bottom: 0;   left: -150px;  animation-delay: -4s; }
.mesh-orb-3 { width: 300px; height: 300px; background: #f0c060; top: 40%;    left: 35%;     animation-delay: -8s; }
@keyframes meshFloat {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(30px, 50px) scale(1.15); }
}
/* Noise grain overlay */
.mesh-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.05'/%3E%3C/svg%3E");
  opacity: 0.6;
}

/* Topnav */
.l-nav {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 48px;
}
@media (max-width: 640px) { .l-nav { padding: 20px 24px; } }

.wordmark {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: 26px;
  letter-spacing: -0.5px;
  color: var(--text);
}
.wordmark em {
  font-style: italic;
  background: linear-gradient(135deg, var(--accent-alt), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-pill {
  display: flex;
  gap: 8px;
  align-items: center;
}
.btn-nav {
  padding: 9px 22px;
  border-radius: var(--r-full);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--t-base);
  border: none;
}
.btn-nav.ghost {
  background: none;
  border: 1px solid var(--border2);
  color: var(--text-sub);
}
.btn-nav.ghost:hover { border-color: var(--border3); color: var(--text); }
.btn-nav.filled {
  background: linear-gradient(135deg, var(--accent), #6c5ffc);
  color: #fff;
  box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-nav.filled:hover { transform: translateY(-1px); box-shadow: 0 8px 30px var(--accent-glow); }

/* Hero */
.l-hero {
  position: relative;
  z-index: 5;
  max-width: 620px;
  margin: 0 auto;
  padding: 70px 24px 48px;
  text-align: center;
  animation: heroIn 0.8s var(--ease) both;
}
@keyframes heroIn { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }

.l-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  border-radius: var(--r-full);
  background: rgba(124,111,253,0.12);
  border: 1px solid rgba(124,111,253,0.30);
  color: var(--accent-alt);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  margin-bottom: 32px;
}
.l-eyebrow-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-alt);
  animation: eyebrowPulse 2s infinite;
}
@keyframes eyebrowPulse { 0%,100%{opacity:1} 50%{opacity:.4} }

.l-h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(48px, 8vw, 72px);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -2px;
  margin-bottom: 24px;
}
.l-h1 .gradient-text {
  display: block;
  background: linear-gradient(135deg, var(--gold) 0%, var(--rose) 50%, var(--accent-alt) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.l-sub {
  font-size: 18px;
  color: var(--text-sub);
  line-height: 1.65;
  margin-bottom: 36px;
  font-weight: 400;
}

/* Social proof row */
.l-proof {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 44px;
  animation: heroIn 0.9s var(--ease) 0.1s both;
}
.l-avatars { display: flex; }
.l-av {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 2.5px solid var(--bg);
  font-size: 13px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  margin-left: -8px;
}
.l-av:first-child { margin-left: 0; }
.l-proof-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.l-proof-main { font-size: 14px; font-weight: 700; color: var(--text); }
.l-proof-sub  { font-size: 12px; color: var(--text-muted); }
.l-stars { color: var(--gold); font-size: 13px; letter-spacing: 1px; }

/* Capture card */
.l-card {
  background: rgba(19,19,31,0.80);
  backdrop-filter: blur(24px);
  border: 1px solid var(--border2);
  border-radius: var(--r-xl);
  padding: 40px 36px;
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,0.06);
  animation: heroIn 0.9s var(--ease) 0.15s both;
}
@media (max-width: 480px) { .l-card { padding: 28px 20px; border-radius: var(--r-lg); } }
.l-card-title {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 24px;
  text-align: center;
}

/* Features bar */
.l-features {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 760px;
  margin: 0 auto 80px;
  padding: 0 24px;
  animation: heroIn 1s var(--ease) 0.3s both;
}
@media (max-width: 640px) { .l-features { grid-template-columns: 1fr; } }
.l-feat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px 20px;
  text-align: center;
  transition: var(--t-base);
}
.l-feat:hover { border-color: var(--border2); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.l-feat-icon { font-size: 28px; margin-bottom: 12px; }
.l-feat h4 { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.l-feat p  { font-size: 13px; color: var(--text-muted); line-height: 1.5; }

/* ── FORM ELEMENTS (shared) ── */
.f-group { margin-bottom: 16px; }
.f-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.f-input, .f-textarea, .f-select {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 13px 16px;
  border-radius: var(--r-sm);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 15px;
  outline: none;
  transition: var(--t-base);
  resize: none;
}
.f-input::placeholder, .f-textarea::placeholder { color: var(--text-faint); }
.f-input:focus, .f-textarea:focus, .f-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background: var(--surface3);
}
.f-select { appearance: none; cursor: pointer; }

/* ── PRIMARY BUTTON ── */
.btn-cta {
  width: 100%;
  padding: 17px 24px;
  border: none;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--accent) 0%, #6c5ffc 50%, #a78bfa 100%);
  background-size: 200% auto;
  color: #fff;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.2px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: var(--t-base);
  box-shadow: 0 8px 32px var(--accent-glow);
}
.btn-cta::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 60%);
  transition: var(--t-fast);
}
.btn-cta:hover { background-position: right center; transform: translateY(-2px); box-shadow: 0 16px 48px var(--accent-glow); }
.btn-cta:active { transform: translateY(0); }

.btn-fine { font-size: 12px; color: var(--text-muted); text-align: center; margin-top: 10px; }

/* ================================================================
   EDITOR LAYOUT
================================================================ */

.editor-layout {
  display: grid;
  grid-template-columns: 400px 1fr;
  min-height: 100vh;
  background: var(--bg);
}
@media (max-width: 960px) { .editor-layout { grid-template-columns: 1fr; } }

/* ── SIDEBAR ── */
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  overflow: hidden;
}

.sidebar-top {
  padding: 18px 20px 0;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sidebar-brand {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.sidebar-slug {
  font-size: 12px;
  color: var(--accent-alt);
  background: rgba(124,111,253,0.12);
  border: 1px solid rgba(124,111,253,0.25);
  padding: 4px 12px;
  border-radius: var(--r-full);
  font-weight: 600;
}

/* Tabs */
.sidebar-tabs {
  display: flex;
  gap: 2px;
}
.s-tab {
  flex: 1;
  padding: 10px 8px;
  border: none;
  background: none;
  color: var(--text-muted);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: var(--t-base);
  white-space: nowrap;
}
.s-tab:hover { color: var(--text-sub); }
.s-tab.active { color: var(--text); border-bottom-color: var(--accent); }

/* Scrollable body */
.sidebar-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}
.sidebar-body::-webkit-scrollbar { width: 2px; }
.sidebar-body::-webkit-scrollbar-thumb { background: var(--surface3); }

/* Tab panes */
.tab-pane { display: none; }
.tab-pane.active { display: flex; flex-direction: column; gap: 8px; }

/* Section headers inside sidebar */
.s-section-title {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 16px 0 10px;
}

/* ── PHOTO UPLOAD AREA ── */
.photo-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px;
  border: 2px dashed var(--border2);
  border-radius: var(--r-lg);
  cursor: pointer;
  transition: var(--t-base);
  position: relative;
  overflow: hidden;
}
.photo-drop:hover { border-color: var(--accent); background: rgba(124,111,253,0.04); }
.photo-drop.has-photo { border-style: solid; border-color: var(--border2); padding: 12px; }

.photo-ring {
  width: 96px; height: 96px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface3);
  display: flex; align-items: center; justify-content: center;
  font-size: 36px;
  position: relative;
  flex-shrink: 0;
  border: 3px solid var(--surface3);
  transition: var(--t-base);
}
.photo-ring img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  transform-origin: center;
}
.photo-ring:hover { border-color: var(--accent); }
.photo-meta { text-align: center; }
.photo-meta strong { display: block; font-size: 14px; font-weight: 600; }
.photo-meta span   { font-size: 12px; color: var(--text-muted); }

/* Photo adjust controls */
.photo-controls {
  display: none;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  background: var(--surface2);
  border-radius: var(--r-md);
  border: 1px solid var(--border);
}
.photo-controls.visible { display: flex; }
.ctrl-row { display: flex; align-items: center; gap: 10px; }
.ctrl-label { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.6px; min-width: 40px; }
.ctrl-slider {
  flex: 1;
  -webkit-appearance: none;
  height: 4px;
  border-radius: 2px;
  background: var(--surface3);
  outline: none;
  cursor: pointer;
}
.ctrl-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
  cursor: pointer;
  transition: var(--t-fast);
}
.ctrl-slider::-webkit-slider-thumb:hover { transform: scale(1.2); }
.ctrl-val { font-size: 12px; color: var(--text-sub); min-width: 32px; text-align: right; }

/* ── CHIP SUGGESTIONS ── */
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip {
  padding: 5px 12px;
  border-radius: var(--r-full);
  background: var(--surface2);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-sub);
  cursor: pointer;
  transition: var(--t-fast);
}
.chip:hover { border-color: var(--accent); color: var(--accent-alt); background: rgba(124,111,253,0.08); }

/* ── AI BUTTON ── */
.btn-ai-suggest {
  width: 100%;
  padding: 11px 16px;
  border-radius: var(--r-sm);
  background: linear-gradient(135deg, rgba(124,111,253,0.12), rgba(167,139,250,0.08));
  border: 1px solid rgba(124,111,253,0.25);
  color: var(--accent-alt);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--t-base);
  margin-top: 8px;
}
.btn-ai-suggest:hover { border-color: rgba(124,111,253,0.5); background: rgba(124,111,253,0.18); }

/* ── LINKS LIST ── */
.links-container { display: flex; flex-direction: column; gap: 10px; }
.link-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: start;
  transition: var(--t-base);
}
.link-card:hover { border-color: var(--border2); }
.link-card-icon { font-size: 22px; padding-top: 4px; }
.link-card-fields { display: flex; flex-direction: column; gap: 8px; }
.link-card-fields .f-input { padding: 9px 12px; font-size: 13px; background: var(--surface3); }
.link-card-del {
  background: none;
  border: none;
  color: var(--text-faint);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  line-height: 1;
  transition: var(--t-fast);
}
.link-card-del:hover { color: #f87171; background: rgba(248,113,113,0.12); }

.btn-add-link {
  width: 100%;
  padding: 13px;
  border: 2px dashed var(--border2);
  border-radius: var(--r-md);
  background: none;
  color: var(--text-muted);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--t-base);
}
.btn-add-link:hover { border-color: var(--accent); color: var(--accent-alt); background: rgba(124,111,253,0.05); }

/* Quick-add chips */
.quick-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.quick-chip {
  padding: 7px 14px;
  border-radius: var(--r-full);
  background: var(--surface2);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
  cursor: pointer;
  transition: var(--t-fast);
  display: flex;
  align-items: center;
  gap: 6px;
}
.quick-chip:hover { background: rgba(124,111,253,0.1); border-color: rgba(124,111,253,0.3); color: var(--accent-alt); }

/* Socials grid */
.socials-grid { display: flex; flex-direction: column; gap: 10px; }
.social-row {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: center;
}
.social-row-icon { font-size: 18px; text-align: center; }
.social-row .f-input { padding: 10px 14px; font-size: 13px; }

/* ── DESIGN TAB ── */

/* Theme cards */
.theme-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.theme-card {
  border: 2px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  cursor: pointer;
  transition: var(--t-base);
  position: relative;
}
.theme-card.active { border-color: var(--accent); box-shadow: 0 0 16px var(--accent-glow); }
.theme-card:hover:not(.active) { border-color: var(--border3); }
.theme-thumb {
  height: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
}
.theme-thumb-dot { width: 22px; height: 22px; border-radius: 50%; }
.theme-thumb-line { height: 5px; border-radius: 3px; }
.theme-thumb-line.w80 { width: 70%; }
.theme-thumb-line.w50 { width: 45%; }
.theme-label { font-size: 12px; font-weight: 700; text-align: center; padding: 8px; background: var(--surface2); color: var(--text-sub); }
.theme-card.active .theme-label { color: var(--accent-alt); }

/* Background type */
.bg-type-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.bg-type-btn {
  padding: 10px 8px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text-muted);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: var(--t-base);
}
.bg-type-btn:hover, .bg-type-btn.active { border-color: var(--accent); color: var(--accent-alt); background: rgba(124,111,253,0.10); }

/* Color swatches */
.swatch-row { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch {
  width: 36px; height: 36px;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid transparent;
  transition: var(--t-fast);
  position: relative;
}
.swatch.active, .swatch:hover { transform: scale(1.15); }
.swatch.active::after {
  content: '✓';
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: #fff; font-weight: 700;
}

/* Gradient preset row */
.gradient-row { display: flex; gap: 8px; flex-wrap: wrap; }
.gradient-swatch {
  width: 44px; height: 44px;
  border-radius: var(--r-sm);
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--t-fast);
}
.gradient-swatch.active, .gradient-swatch:hover { transform: scale(1.1); border-color: var(--text); }

/* Overlay slider */
.overlay-ctrl { display: flex; align-items: center; gap: 10px; }

/* Button style picker */
.btn-style-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.btn-style-opt {
  padding: 12px 8px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text-muted);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: var(--t-base);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.btn-style-opt .mini-btn { width: 100%; height: 22px; border-radius: 5px; }
.btn-style-opt:hover, .btn-style-opt.active { border-color: var(--accent); color: var(--accent-alt); }

/* Background image upload */
.bg-img-area {
  border: 2px dashed var(--border2);
  border-radius: var(--r-md);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: var(--t-base);
  position: relative;
  overflow: hidden;
}
.bg-img-area:hover { border-color: var(--accent); background: rgba(124,111,253,0.04); }
.bg-img-preview {
  width: 100%;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  display: none;
  margin-bottom: 10px;
}
.bg-img-area.has-img .bg-img-preview { display: block; }
.bg-img-area span { font-size: 13px; color: var(--text-muted); }
.bg-img-area small { display: block; font-size: 11px; color: var(--text-faint); margin-top: 4px; }

/* bg fit controls */
.bg-adjust-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bg-adjust-btn {
  padding: 9px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: var(--t-fast);
}
.bg-adjust-btn.active, .bg-adjust-btn:hover { border-color: var(--accent); color: var(--accent-alt); }

/* ── SIDEBAR FOOTER ── */
.sidebar-footer {
  flex-shrink: 0;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.slug-field {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--r-sm);
  overflow: hidden;
}
.slug-prefix {
  padding: 11px 10px 11px 14px;
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.slug-text {
  flex: 1;
  background: none;
  border: none;
  color: var(--text);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  outline: none;
  padding: 11px 0;
}
.slug-copy-btn {
  padding: 11px 14px;
  background: none;
  border: none;
  border-left: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 15px;
  transition: var(--t-fast);
}
.slug-copy-btn:hover { color: var(--accent-alt); background: rgba(124,111,253,0.08); }

.btn-publish {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--accent) 0%, #6c5ffc 100%);
  color: #fff;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.2px;
  cursor: pointer;
  transition: var(--t-base);
  box-shadow: 0 6px 24px var(--accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-publish:hover { transform: translateY(-2px); box-shadow: 0 12px 36px var(--accent-glow); }
.btn-publish:active { transform: translateY(0); }

/* ── PREVIEW PANEL ── */
.preview-panel {
  background: var(--bg2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 40px 24px;
  position: relative;
  overflow: hidden;
}
.preview-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(124,111,253,0.08), transparent 60%);
  pointer-events: none;
}
@media (max-width: 960px) { .preview-panel { display: none; } }

.preview-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
}
.preview-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: previewPulse 2s infinite;
}
@keyframes previewPulse { 0%,100%{opacity:1;box-shadow:0 0 0 0 var(--accent-glow)} 50%{opacity:.8;box-shadow:0 0 0 6px transparent} }
.preview-label-text { font-size: 12px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; color: var(--text-muted); }

/* Phone frame */
.phone {
  width: 330px;
  flex-shrink: 0;
  position: relative;
}
.phone-frame {
  border-radius: 44px;
  border: 10px solid var(--surface3);
  box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(255,255,255,0.06);
  overflow: hidden;
  height: 660px;
  background: #0a0a12;
  position: relative;
}
.phone-notch {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 110px; height: 28px;
  background: var(--surface3);
  border-radius: 0 0 20px 20px;
  z-index: 10;
}
.phone-screen {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
}
.phone-screen::-webkit-scrollbar { display: none; }

/* ================================================================
   BIO PAGE RENDERED OUTPUT
================================================================ */

.bio-page {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 56px 22px 48px;
  position: relative;
  overflow: hidden;
  transition: background 0.4s var(--ease);
}

/* Background layer */
.bio-bg-layer {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
  transition: all 0.4s var(--ease);
}
.bio-overlay-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* All bio content above background */
.bio-content-layer {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/* Avatar */
.bio-avatar-wrap {
  margin-bottom: 18px;
  position: relative;
}
.bio-avatar {
  width: 96px; height: 96px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  object-position: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  border: 3px solid rgba(255,255,255,0.15);
  transform-origin: center;
}
.bio-avatar-placeholder {
  width: 96px; height: 96px;
  border-radius: 50%;
  background: var(--surface3);
  border: 3px dashed var(--border3);
  display: flex; align-items: center; justify-content: center;
  font-size: 36px;
}
.bio-avatar-ring {
  position: absolute; inset: -4px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--accent);
  border-right-color: var(--accent);
  animation: ringRotate 3s linear infinite;
}
@keyframes ringRotate { to { transform: rotate(360deg); } }

/* Name & title */
.bio-name {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.5px;
  text-align: center;
  margin-bottom: 4px;
  line-height: 1.1;
}
.bio-title {
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  opacity: 0.65;
  margin-bottom: 14px;
  letter-spacing: 0.3px;
}
.bio-desc {
  font-size: 14px;
  line-height: 1.7;
  text-align: center;
  opacity: 0.75;
  margin-bottom: 28px;
  max-width: 290px;
  font-weight: 400;
}

/* Bio links */
.bio-links { display: flex; flex-direction: column; gap: 10px; width: 100%; }

.bio-btn {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 15px 20px;
  border-radius: 16px;
  text-decoration: none;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s var(--ease-spring), box-shadow 0.2s var(--ease);
  animation: btnIn 0.5s var(--ease) both;
  border: none;
  text-align: left;
}
.bio-btn:nth-child(1){animation-delay:.05s}
.bio-btn:nth-child(2){animation-delay:.10s}
.bio-btn:nth-child(3){animation-delay:.15s}
.bio-btn:nth-child(4){animation-delay:.20s}
.bio-btn:nth-child(5){animation-delay:.25s}
@keyframes btnIn { from{opacity:0;transform:translateY(16px)} to{opacity:1;transform:none} }

.bio-btn:hover { transform: translateY(-3px) scale(1.01); }
.bio-btn:active { transform: translateY(-1px) scale(0.99); }

.bio-btn-icon { font-size: 20px; margin-right: 12px; flex-shrink: 0; }
.bio-btn-label { flex: 1; }
.bio-btn-arrow { font-size: 14px; opacity: 0.6; margin-left: 8px; transition: transform 0.2s var(--ease); }
.bio-btn:hover .bio-btn-arrow { transform: translateX(3px); opacity: 1; }

/* Button style variants */
.bio-btn.style-solid {
  color: #fff;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.bio-btn.style-solid:hover { box-shadow: 0 12px 32px rgba(0,0,0,0.4); }

.bio-btn.style-outline {
  background: transparent !important;
  border: 2px solid rgba(255,255,255,0.25) !important;
  color: inherit;
  backdrop-filter: blur(4px);
}
.bio-btn.style-outline:hover { border-color: rgba(255,255,255,0.5) !important; background: rgba(255,255,255,0.06) !important; }

.bio-btn.style-glass {
  background: rgba(255,255,255,0.10) !important;
  border: 1px solid rgba(255,255,255,0.15) !important;
  backdrop-filter: blur(12px);
  color: inherit;
}
.bio-btn.style-glass:hover { background: rgba(255,255,255,0.18) !important; }

.bio-btn.style-shadow {
  background: rgba(0,0,0,0.35) !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  backdrop-filter: blur(16px);
  color: #fff;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.bio-btn.style-shadow:hover { background: rgba(0,0,0,0.5) !important; }

/* Bio socials */
.bio-socials {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}
.bio-social-icon {
  width: 46px; height: 46px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px;
  text-decoration: none;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.12);
  transition: transform 0.2s var(--ease-spring), background 0.2s var(--ease);
  animation: socialIn 0.5s var(--ease) 0.4s both;
}
@keyframes socialIn { from{opacity:0;transform:scale(0)} to{opacity:1;transform:scale(1)} }
.bio-social-icon:nth-child(2){animation-delay:.45s}
.bio-social-icon:nth-child(3){animation-delay:.5s}
.bio-social-icon:nth-child(4){animation-delay:.55s}
.bio-social-icon:hover { transform: translateY(-3px) scale(1.1); background: rgba(255,255,255,0.20); }

/* Bio page footer */
.bio-footer-brand {
  margin-top: 28px;
  font-size: 11px;
  opacity: 0.3;
  letter-spacing: 0.5px;
  text-align: center;
}

/* ── THEME COLOR OVERRIDES applied via JS ── */
.bio-page.theme-light { color: #1a1a2a; }
.bio-page.theme-light .bio-footer-brand { color: #1a1a2a; }
.bio-page.theme-light .bio-social-icon { background: rgba(0,0,0,0.08); border-color: rgba(0,0,0,0.12); }
.bio-page.theme-light .bio-social-icon:hover { background: rgba(0,0,0,0.14); }

/* ================================================================
   MODAL
================================================================ */
.modal-bg {
  position: fixed; inset: 0;
  background: rgba(8,8,16,0.85);
  backdrop-filter: blur(12px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
}
.modal-bg.open { display: flex; }
.modal-box {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--r-xl);
  padding: 44px 36px;
  max-width: 440px;
  width: 90%;
  text-align: center;
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,0.06);
  animation: modalPop 0.4s var(--ease-spring) both;
}
@keyframes modalPop { from{opacity:0;transform:scale(0.88) translateY(20px)} to{opacity:1;transform:none} }
.modal-emoji { font-size: 52px; margin-bottom: 16px; }
.modal-title {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 900;
  margin-bottom: 8px;
}
.modal-sub { font-size: 15px; color: var(--text-sub); line-height: 1.6; margin-bottom: 24px; }
.modal-link-box {
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--r-md);
  padding: 14px 18px;
  font-size: 14px;
  color: var(--accent-alt);
  font-weight: 700;
  word-break: break-all;
  margin-bottom: 20px;
}
.modal-actions { display: flex; gap: 10px; }
.modal-btn {
  flex: 1;
  padding: 13px;
  border-radius: var(--r-sm);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--t-base);
  border: none;
}
.modal-btn.primary { background: linear-gradient(135deg, var(--accent), #6c5ffc); color: #fff; box-shadow: 0 4px 20px var(--accent-glow); }
.modal-btn.primary:hover { transform: translateY(-1px); box-shadow: 0 8px 30px var(--accent-glow); }
.modal-btn.ghost { background: none; border: 1px solid var(--border2); color: var(--text-sub); }
.modal-btn.ghost:hover { border-color: var(--border3); color: var(--text); }
.modal-tip { margin-top: 14px; font-size: 12px; color: var(--text-faint); }

/* ================================================================
   TOAST
================================================================ */
.toast {
  position: fixed;
  bottom: 28px; left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--surface);
  border: 1px solid var(--border2);
  padding: 12px 22px;
  border-radius: var(--r-full);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: var(--shadow-md);
  z-index: 999;
  opacity: 0;
  transition: transform 0.35s var(--ease-spring), opacity 0.3s var(--ease);
  pointer-events: none;
}
.toast.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ================================================================
   BIO FULL PAGE (standalone view)
================================================================ */
#page-bio {
  background: #080810;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}
.bio-full-wrap {
  width: 100%;
  max-width: 440px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.bio-full-wrap .bio-page {
  flex: 1;
}

/* ================================================================
   RESPONSIVE
================================================================ */
@media (max-width: 960px) {
  .editor-layout { grid-template-columns: 1fr; }
  .sidebar { height: auto; position: relative; }
  .sidebar-footer { position: sticky; bottom: 0; background: var(--surface); z-index: 10; }
}
@media (max-width: 480px) {
  .phone { width: 100%; }
  .phone-frame { border-radius: 24px; height: auto; min-height: 500px; }
}
