/* flexsite — app design system */
:root {
  --bg: #07070d;
  --bg-2: #0e0e1a;
  --panel: rgba(22, 22, 38, 0.72);
  --panel-solid: #14141f;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #ececf5;
  --muted: #9a9ab0;
  --muted-2: #6d6d85;
  --accent: #7c5cff;
  --accent-2: #b06bff;
  --accent-glow: rgba(124, 92, 255, 0.45);
  --good: #45d18f;
  --bad: #ff5c72;
  --warn: #ffb648;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  --font: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: radial-gradient(1200px 700px at 50% -10%, #1a1030 0%, var(--bg) 55%) fixed;
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button { font-family: inherit; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 22px; }
.narrow { max-width: 460px; }

/* nav */
.nav {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(7, 7, 13, 0.7);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: -0.5px; }
.brand .dot { width: 12px; height: 12px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 0 16px var(--accent-glow); }
.brand b { background: linear-gradient(135deg, #fff, #b9a9ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav-links { display: flex; gap: 6px; margin-left: auto; align-items: center; }
.nav-links a { padding: 8px 14px; border-radius: 10px; color: var(--muted); font-size: 14px; font-weight: 500; transition: .15s; }
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,0.05); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 12px; border: 1px solid transparent;
  font-weight: 600; font-size: 14.5px; cursor: pointer; transition: .16s; white-space: nowrap;
  background: rgba(255,255,255,0.06); color: var(--text); text-decoration: none;
}
.btn:hover { background: rgba(255,255,255,0.1); transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 26px var(--accent-glow); color: #fff; border: none;
}
.btn-primary:hover { box-shadow: 0 10px 34px var(--accent-glow); }
.btn-ghost { background: transparent; border: 1px solid var(--border-strong); }
.btn-ghost:hover { background: rgba(255,255,255,0.05); }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 9px; }
.btn-danger { background: rgba(255,92,114,.14); color: #ff8b9b; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* cards / panels */
.card {
  background: var(--panel); backdrop-filter: blur(16px);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 26px;
}
.panel { background: var(--panel-solid); border: 1px solid var(--border); border-radius: var(--radius); }

/* forms */
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; font-weight: 600; letter-spacing: .2px; }
input, textarea, select {
  width: 100%; padding: 11px 13px; border-radius: 11px;
  background: rgba(0,0,0,0.3); border: 1px solid var(--border-strong);
  color: var(--text); font-size: 14.5px; font-family: inherit; transition: .15s; outline: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
textarea { resize: vertical; min-height: 80px; }
input[type=color] { padding: 4px; height: 42px; cursor: pointer; }
input[type=range] { padding: 0; accent-color: var(--accent); cursor: pointer; }
input[type=checkbox] { width: auto; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239a9ab0' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }

.help { font-size: 12px; color: var(--muted-2); margin-top: 4px; }
.error-box { background: rgba(255,92,114,.12); border: 1px solid rgba(255,92,114,.35); color: #ffb0bb; padding: 10px 13px; border-radius: 10px; font-size: 13.5px; margin-bottom: 14px; }
.ok-box { background: rgba(69,209,143,.12); border: 1px solid rgba(69,209,143,.35); color: #a6f0cf; padding: 10px 13px; border-radius: 10px; font-size: 13.5px; }

/* badges */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: .3px; }
.badge-vip { background: rgba(79,140,255,.16); color: #7fb0ff; border: 1px solid rgba(79,140,255,.4); }
.badge-svip { background: rgba(201,107,255,.16); color: #d19bff; border: 1px solid rgba(201,107,255,.45); }

/* hero */
.hero { text-align: center; padding: 90px 0 60px; }
.hero h1 { font-size: clamp(38px, 6vw, 66px); line-height: 1.03; letter-spacing: -2px; margin: 0 0 18px; font-weight: 800; }
.hero h1 .grad { background: linear-gradient(120deg, #fff 20%, var(--accent-2) 60%, var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { font-size: clamp(16px, 2vw, 20px); color: var(--muted); max-width: 620px; margin: 0 auto 30px; }
.claim { display: flex; max-width: 440px; margin: 0 auto; background: var(--panel-solid); border: 1px solid var(--border-strong); border-radius: 14px; overflow: hidden; padding: 5px 5px 5px 16px; align-items: center; }
.claim .prefix { color: var(--muted); font-size: 15px; white-space: nowrap; }
.claim input { border: none; background: transparent; box-shadow: none; padding: 10px 8px; }
.claim input:focus { box-shadow: none; }

.eyebrow { display: inline-flex; align-items:center; gap:8px; font-size: 13px; color: var(--accent-2); background: rgba(124,92,255,.1); border: 1px solid rgba(124,92,255,.28); padding: 6px 14px; border-radius: 999px; margin-bottom: 22px; font-weight: 600; }

.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin: 50px 0; }
.feature { padding: 22px; }
.feature .ico { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: rgba(124,92,255,.14); margin-bottom: 14px; font-size: 20px; }
.feature h3 { margin: 0 0 6px; font-size: 16.5px; }
.feature p { margin: 0; color: var(--muted); font-size: 14px; }

.section-title { text-align: center; margin: 60px 0 8px; font-size: 30px; letter-spacing: -1px; }
.section-sub { text-align: center; color: var(--muted); margin: 0 0 34px; }

/* plans */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; max-width: 900px; margin: 0 auto; }
.plan { position: relative; display: flex; flex-direction: column; padding: 28px; border: 1px solid var(--border); }
.plan.pop { border-color: rgba(124,92,255,.5); box-shadow: 0 0 0 1px rgba(124,92,255,.3), 0 20px 60px rgba(124,92,255,.15); }
.plan .tag { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-size: 11.5px; font-weight: 700; padding: 4px 14px; border-radius: 999px; }
.plan h3 { margin: 0 0 4px; font-size: 20px; }
.plan .price { font-size: 40px; font-weight: 800; letter-spacing: -1px; }
.plan .price small { font-size: 15px; color: var(--muted); font-weight: 500; }
.plan .lifetime { color: var(--good); font-size: 13px; font-weight: 600; margin-bottom: 18px; }
.plan ul { list-style: none; padding: 0; margin: 8px 0 22px; display: grid; gap: 10px; }
.plan li { font-size: 14px; color: var(--text); display: flex; gap: 9px; align-items: flex-start; }
.plan li.off { color: var(--muted-2); }
.plan li .ck { color: var(--good); flex-shrink: 0; }
.plan li .x { color: var(--muted-2); flex-shrink: 0; }
.plan .btn { margin-top: auto; }

/* footer */
.footer { border-top: 1px solid var(--border); margin-top: 80px; padding: 34px 0; color: var(--muted); font-size: 13.5px; }
.footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; }

/* dashboard */
.dash { display: grid; grid-template-columns: 320px 1fr; gap: 22px; align-items: start; padding: 24px 0 60px; }
.editor { display: grid; gap: 16px; }
.acc { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--panel-solid); }
.acc > summary { list-style: none; cursor: pointer; padding: 15px 18px; font-weight: 650; font-size: 15px; display: flex; align-items: center; gap: 10px; user-select: none; }
.acc > summary::-webkit-details-marker { display: none; }
.acc > summary .chev { margin-left: auto; transition: .2s; color: var(--muted); }
.acc[open] > summary .chev { transform: rotate(180deg); }
.acc .body { padding: 4px 18px 18px; border-top: 1px solid var(--border); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.inline { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.inline > span { font-size: 13.5px; color: var(--text); }
.lock { font-size: 11px; color: var(--warn); background: rgba(255,182,72,.12); padding: 2px 8px; border-radius: 6px; font-weight: 600; }

/* preview pane */
.preview-wrap { position: sticky; top: 84px; }
.phone { border-radius: 26px; overflow: hidden; border: 1px solid var(--border-strong); background: #000; box-shadow: var(--shadow); aspect-ratio: 10/17; max-height: 78vh; }
.phone iframe { width: 100%; height: 100%; border: none; display: block; }
.preview-bar { display: flex; gap: 8px; margin-bottom: 12px; align-items: center; flex-wrap: wrap; }
/* Save sits at the right edge of the preview bar and only lights up when
   there is something to save, so unsaved work is never invisible. */
#saveBtn { transition: .18s; }
#saveBtn.clean { background: transparent; color: var(--muted-2); border: 1px solid var(--border); cursor: default; }
#saveBtn.dirty {
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; border: none;
  box-shadow: 0 6px 22px var(--accent-glow); animation: save-pulse 2.2s ease-in-out infinite;
}
#saveBtn.dirty::before { content: '●'; font-size: 9px; margin-right: 6px; opacity: .9; }
@keyframes save-pulse { 0%,100% { box-shadow: 0 6px 22px var(--accent-glow); } 50% { box-shadow: 0 6px 30px var(--accent-glow), 0 0 0 4px rgba(124,92,255,.12); } }

/* list editors (socials/links) */
.item-list { display: grid; gap: 10px; }
.item-row { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; background: rgba(0,0,0,.22); padding: 8px; border-radius: 10px; border: 1px solid var(--border); }
.item-row select, .item-row input { padding: 8px 10px; font-size: 13px; }
.item-row .grip { color: var(--muted-2); cursor: grab; padding: 0 2px; }
.icon-btn { background: rgba(255,255,255,.06); border: 1px solid var(--border); color: var(--muted); width: 34px; height: 34px; border-radius: 9px; cursor: pointer; display: grid; place-items: center; }
.icon-btn:hover { color: #fff; background: rgba(255,92,114,.16); }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--panel-solid); border: 1px solid var(--border-strong); padding: 12px 20px; border-radius: 12px; box-shadow: var(--shadow); opacity: 0; transition: .25s; z-index: 100; font-size: 14px; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.ok { border-color: rgba(69,209,143,.5); }
.toast.err { border-color: rgba(255,92,114,.5); }

.avatar-edit { display: flex; align-items: center; gap: 14px; margin-bottom: 4px; }
.avatar-edit .av { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border-strong); background: #1a1a2a; }

.explore-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: 16px; }
.ex-card { padding: 18px; text-align: center; transition: .18s; display: block; }
.ex-card:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.ex-card .av { width: 66px; height: 66px; border-radius: 50%; object-fit: cover; margin: 0 auto 10px; border: 2px solid var(--border-strong); background: #1a1a2a; }
.ex-card .uname { font-weight: 700; }
.ex-card .views { color: var(--muted); font-size: 12.5px; margin-top: 3px; }

/* toggle switch */
.switch { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch::after { content: ''; }
.switch { background: rgba(255,255,255,.12); border-radius: 999px; transition: .2s; cursor: pointer; border: 1px solid var(--border); }
.switch::before { content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%; background: #fff; top: 2px; left: 2px; transition: .2s; }
.switch:has(input:checked) { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-color: transparent; }
.switch:has(input:checked)::before { transform: translateX(18px); }
.switch:has(input:disabled) { opacity: .4; cursor: not-allowed; }

/* locked (gated) controls */
[data-feature].locked { position: relative; opacity: .55; }
[data-feature].locked input, [data-feature].locked select, [data-feature].locked textarea, [data-feature].locked button { pointer-events: none; }
[data-feature].locked .switch { pointer-events: none; }
.feature-lock { display:inline-flex; align-items:center; gap:4px; font-size:10.5px; color: var(--warn); background: rgba(255,182,72,.14); padding: 1px 7px; border-radius: 6px; font-weight: 700; margin-left: 6px; cursor: pointer; pointer-events: auto !important; text-decoration: none; }

.chip-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.chip { padding: 6px 12px; border-radius: 8px; font-size: 13px; background: rgba(255,255,255,.05); border: 1px solid var(--border); cursor: pointer; color: var(--muted); }
.chip.active { background: rgba(124,92,255,.18); color: #fff; border-color: rgba(124,92,255,.4); }

@media (max-width: 860px) {
  .dash { grid-template-columns: 1fr; }
  .preview-wrap { position: static; order: -1; }
  .phone { max-width: 320px; margin: 0 auto; }
  .nav-links a.hide-sm { display: none; }
}

/* email verification banner */
.verify-banner {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: rgba(255,182,72,.1); border: 1px solid rgba(255,182,72,.35);
  color: #ffd79a; padding: 14px 18px; border-radius: 14px; margin: 20px 0 -4px; font-size: 14px;
}
/* display:flex above would otherwise beat the UA's [hidden]{display:none} */
.verify-banner[hidden] { display: none; }
.verify-banner b { color: #fff; }
.verify-banner .grow { flex: 1; min-width: 220px; }
