/* ── Aivon - Main Stylesheet ── */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:    #a672fb;
  --primary-h:  #b282fc;
  --primary-s:  #8a5dee;
  --primary-bg: rgba(166,114,251,0.12);
  --primary-bd: rgba(166,114,251,0.25);

  --bg:       #121212;
  --s1:       #201b25;
  --s2:       #353039;
  --s3:       #4b464f;
  --b1:       #353039;
  --b2:       #4b464f;

  --text:     #ffffff;
  --muted:    #717171;
  --muted2:   #575757;

  --success:  #47d5a6;
  --danger:   #d94a4a;
  --warning:  #d7ac61;
  --info:     #4077d1;

  --sidebar-w: 220px;
  --topbar-h:  52px;
  --font:      'DM Sans', sans-serif;
  --r:         10px;
  --rl:        14px;
}

body { background: var(--bg); color: var(--text); font-family: var(--font); min-height: 100vh; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--b2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ── App layout ── */
.app-layout { display: flex; min-height: 100vh; }

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--s1);
  border-right: 1px solid var(--b1);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0;
  z-index: 200; transition: transform 0.25s ease;
}

.freestart {
	text-align: left
}

.cl-alternativeMethods .cl-alternativeMethodsBlockButton  {
	background-color: #9b05a5;
}

.cl-alternativeMethods .cl-alternativeMethodsBlockButton:hover {
	background-color: #9c4aa1;
}

.cl-alternativeMethods .cl-alternativeMethodsBlockButtonText {
	color: #fff;
}

.sb-logo { padding: 18px 20px 14px; border-bottom: 1px solid var(--b1); }
.sb-logo-text { font-size: 21px; font-weight: 700; color: var(--primary); letter-spacing: -0.5px; }

.sb-user { padding: 12px 16px; border-bottom: 1px solid var(--b1); display: flex; align-items: center; gap: 10px; }
.sb-avatar { width: 32px; height: 32px; background: var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: #fff; flex-shrink: 0; }
.sb-uname { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-ucredits { font-size: 11px; color: var(--muted); }
.sb-ucredits span { color: var(--primary); font-weight: 600; }

.sb-nav { flex: 1; padding: 10px 8px; overflow-y: auto; }
.cl-socialButtonsRoot,.cl-dividerRow { display: none; }

.landing-logo {
	display: flex;
	align-items: center;
	flex: 1 1 0;
	min-width: 0;
}

.landing-logo img {
	max-width: 200px;
	margin-top:5px;
}

.whitetitle {
	color: #fff !important;
}

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: var(--r);
  color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 500;
  transition: background 0.15s, color 0.15s; margin-bottom: 1px;
  border: none; background: transparent; width: 100%; cursor: pointer; font-family: var(--font);
}
.nav-item:hover { background: var(--s2); color: var(--text); }
.nav-item.active { background: var(--s2); color: #fff; }
.nav-item svg { width: 15px; height: 15px; flex-shrink: 0; }
.nav-item.logout:hover { color: var(--danger); background: rgba(217,74,74,0.08); }

.sb-bottom { padding: 10px 8px; border-top: 1px solid var(--b1); }
.btn-topup {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; background: var(--primary); color: #fff; font-size: 13px; font-weight: 700;
  padding: 9px 0; border-radius: var(--r); text-decoration: none;
  transition: background 0.2s; margin-bottom: 5px; font-family: var(--font); border: none; cursor: pointer;
}
.btn-topup:hover { background: var(--primary-h); color: #fff; }

/* ── Main ── */
.main-content { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; min-height: 100vh; }

/* ── Topbar ── */
.topbar {
  height: var(--topbar-h); background: var(--s1); border-bottom: 1px solid var(--b1);
  display: flex; align-items: center; padding: 0 24px; gap: 12px; position: sticky; top: 0; z-index: 100;
}

.topbar-nav { display: flex; align-items: center; gap: 4px; }
.topbar-nav-btn { background: transparent; border: none; color: var(--muted); cursor: pointer; padding: 6px; border-radius: 6px; transition: background 0.15s, color 0.15s; }
.topbar-nav-btn:hover { background: var(--s2); color: var(--text); }
.topbar-nav-btn svg { width: 16px; height: 16px; display: block; }

.topbar-title { font-size: 14px; font-weight: 600; color: var(--text); }
.topbar-spacer { flex: 1; }

/* Language selector */
.lang-selector { position: relative; }
.lang-btn {
  display: flex; align-items: center; gap: 6px;
  background: var(--s2); border: 1px solid var(--b1); border-radius: var(--r);
  color: var(--text); font-size: 13px; font-weight: 500; padding: 6px 12px;
  cursor: pointer; font-family: var(--font); transition: background 0.15s;
}
.lang-btn:hover { background: var(--s3); }
.lang-current-flag, .lang-flag { font-size: 15px; }

.lang-dropdown {
  position: absolute; top: calc(100% + 6px); right: 0;
  background: var(--s1); border: 1px solid var(--b1); border-radius: var(--rl);
  padding: 6px; min-width: 160px; z-index: 500;
  display: none; flex-direction: column; gap: 2px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.lang-dropdown.open { display: flex; }

.lang-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: 7px; background: transparent; border: none;
  color: var(--muted); font-size: 13px; cursor: pointer; font-family: var(--font);
  text-align: left; width: 100%; transition: background 0.15s, color 0.15s;
}
.lang-item:hover { background: var(--s2); color: var(--text); }
.lang-item.active { color: var(--primary); background: var(--primary-bg); }

/* Landing page lang btn */
.landing-page .lang-btn {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
  color: var(--text);
}
.landing-page .lang-btn:hover { background: rgba(255,255,255,0.1); }
.landing-page .lang-dropdown { background: #1a1a2e; border-color: var(--b2); }

/* Footer lang dropdown opens upward */
.lf-bottom .lang-selector .lang-dropdown {
  top: auto;
  bottom: calc(100% + 6px);
}

.nav-item.logout {
	justify-content: center;
}

.mobile-toggle { display: none; background: transparent; border: none; color: var(--text); cursor: pointer; padding: 6px; }

/* ── Page content ── */
.page-wrap { padding: 28px; flex: 1; }
.page-wrap .billing-wrap:parent {
	justify-content: center;
}
/* ── Alerts ── */
.alert { padding: 11px 15px; border-radius: var(--r); font-size: 13px; margin-bottom: 16px; }
.alert-error   { background: rgba(217,74,74,0.1);   border: 1px solid rgba(217,74,74,0.3);   color: #eb9e9e; }
.alert-success { background: rgba(71,213,166,0.1);  border: 1px solid rgba(71,213,166,0.3);  color: #9ae8ce; }
.flashes { margin-bottom: 20px; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; border-radius: var(--r); font-family: var(--font);
  font-size: 13px; font-weight: 600; cursor: pointer; border: none;
  transition: background 0.2s; text-decoration: none;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-h); color: #fff; }
.btn-secondary { background: var(--s2); color: var(--text); border: 1px solid var(--b2); }
.btn-secondary:hover { background: var(--s3); }
.btn-danger { background: rgba(217,74,74,0.1); color: var(--danger); border: 1px solid rgba(217,74,74,0.25); }
.btn-danger:hover { background: rgba(217,74,74,0.18); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-sm { padding: 6px 12px; font-size: 12px; }

/* ── Forms ── */
input, textarea, select {
  background: var(--s2); border: 1px solid var(--b1); border-radius: var(--r);
  color: var(--text); font-family: var(--font); font-size: 14px; padding: 10px 14px;
  outline: none; width: 100%; transition: border-color 0.2s;
}
input:focus, textarea:focus, select:focus { border-color: var(--primary); }
input::placeholder, textarea::placeholder { color: var(--muted2); }
select option { background: var(--s2); }
label { font-size: 11px; color: var(--muted); display: block; margin-bottom: 5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }

/* ── Cards ── */
.card { background: var(--s1); border: 1px solid var(--b1); border-radius: var(--rl); padding: 20px; }

/* ── Page header ── */
.page-header { margin-bottom: 24px; }
.page-header h1 { font-size: 24px; font-weight: 700; margin-bottom: 4px; }
.page-header p  { font-size: 13px; color: var(--muted); }
div:has(.page-header.contactpg){height:80vh !important}

/* ── Dashboard hero ── */
.hero-banner {
  background: linear-gradient(135deg, var(--s1), var(--s2));
  border: 1px solid var(--b2); border-radius: var(--rl);
  padding: 36px 32px; margin-bottom: 24px; position: relative; overflow: hidden;
}
.hero-banner::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-h));
}
.hero-banner h1 { font-size: 26px; font-weight: 700; margin-bottom: 6px; }
.hero-banner p  { color: var(--muted); font-size: 14px; margin-bottom: 22px; }

/* ── Quick action cards ── */
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 24px; }
.quick-card {
  background: var(--s1); border: 1px solid var(--b1); border-radius: var(--rl);
  padding: 16px; display: flex; align-items: center; gap: 12px;
  text-decoration: none; transition: border-color 0.2s, background 0.2s;
}
.quick-card:hover { border-color: var(--primary); background: var(--s2); }
.quick-card-icon { width: 38px; height: 38px; background: var(--primary-bg); border-radius: var(--r); display: flex; align-items: center; justify-content: center; font-size: 17px; color: var(--primary); flex-shrink: 0; }
.quick-card-title { font-size: 13px; font-weight: 600; margin-bottom: 2px; color:#fff;}
.quick-card-count { font-size: 11px; color: var(--muted); }

/* ── Section header ── */
.section-hdr { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.section-hdr h2 { font-size: 15px; font-weight: 700; }
.section-hdr a  { font-size: 12px; color: var(--primary); text-decoration: none; }

/* ── Image grids ── */
.creations-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.creation-thumb { border-radius: var(--r); overflow: hidden; aspect-ratio: 1; background: var(--s2); border: 1px solid var(--b1); }
.creation-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.gallery-item { background: var(--s1); border: 1px solid var(--b1); border-radius: var(--rl); overflow: hidden; }
.gallery-img { aspect-ratio: 1; overflow: hidden; background: var(--s2); }
.gallery-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s; }
.gallery-item:hover .gallery-img img { transform: scale(1.04); }
.gallery-meta { padding: 10px 12px; }
.gallery-label { font-size: 10px; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 3px; }
.gallery-prompt { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 8px; }
.gallery-actions { display: flex; gap: 6px; }
.gallery-actions a, .gallery-actions button {
  flex: 1; padding: 5px 0; text-align: center; font-size: 11px; font-weight: 600;
  border-radius: 6px; cursor: pointer; font-family: var(--font); text-decoration: none; border: none; transition: background 0.15s;
}
.btn-dl  { background: var(--s2); color: var(--text); border: 1px solid var(--b1); }
.btn-dl:hover { background: var(--s3); }
.btn-del { background: rgba(217,74,74,0.08); color: var(--danger); border: 1px solid rgba(217,74,74,0.2); }
.btn-del:hover { background: rgba(217,74,74,0.15); }

/* ── Empty state ── */
.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-icon { width: 52px; height: 52px; background: var(--primary-bg); border-radius: var(--rl); display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; font-size: 22px; color: var(--primary); }
.empty-state h3 { font-size: 15px; color: var(--text); margin-bottom: 5px; }
.empty-state p  { font-size: 13px; margin-bottom: 18px; }

/* ── Generate page ── */
.gen-layout { display: grid; grid-template-columns: 320px 1fr; gap: 18px; height: calc(100vh - var(--topbar-h) - 56px); }
.gen-panel { background: var(--s1); border: 1px solid var(--b1); border-radius: var(--rl); display: flex; flex-direction: column; overflow: hidden; }
.gen-tabs { display: flex; border-bottom: 1px solid var(--b1); }
.gen-tab { flex: 1; padding: 11px 0; text-align: center; font-size: 12px; font-weight: 600; color: var(--muted); cursor: pointer; background: transparent; border: none; font-family: var(--font); transition: color 0.15s; display: flex; align-items: center; justify-content: center; gap: 5px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.gen-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.gen-tab:hover:not(.active) { color: var(--text); }
.gen-form { padding: 18px; flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
textarea { resize: vertical; min-height: 100px; line-height: 1.6; }
.char-count { font-size: 11px; color: var(--muted2); text-align: right; }
.aspect-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.aspect-btn { padding: 7px 0; border: 1px solid var(--b1); border-radius: 7px; background: var(--s2); color: var(--muted); font-family: var(--font); font-size: 12px; font-weight: 600; cursor: pointer; text-align: center; transition: all 0.15s; }
.aspect-btn:hover, .aspect-btn.active { border-color: var(--primary); color: var(--primary); background: var(--primary-bg); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; }
.toggle-lbl { font-size: 13px; color: var(--text); }
.toggle-sub { font-size: 11px; color: var(--muted); }
.toggle { width: 40px; height: 22px; background: var(--b2); border-radius: 11px; position: relative; cursor: pointer; transition: background 0.2s; flex-shrink: 0; }
.toggle.on { background: var(--primary); }
.toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; background: #fff; border-radius: 50%; transition: transform 0.2s; }
.toggle.on::after { transform: translateX(18px); }
.gen-footer { padding: 12px 18px; border-top: 1px solid var(--b1); display: flex; align-items: center; gap: 10px; }
.credits-pill { background: var(--primary-bg); border: 1px solid var(--primary-bd); border-radius: 20px; padding: 4px 12px; font-size: 12px; color: var(--primary); font-weight: 600; white-space: nowrap; }
.btn-generate { flex: 1; padding: 11px; background: var(--primary); color: #fff; font-family: var(--font); font-size: 13px; font-weight: 700; border: none; border-radius: var(--r); cursor: pointer; align-items: center; transition: background 0.2s; }
.btn-generate:hover:not(:disabled) { background: var(--primary-h); }
.btn-generate:disabled { opacity: 0.5; cursor: not-allowed; }

/* Output area */
.gen-output { background: var(--s1); border: 1px solid var(--b1); border-radius: var(--rl); position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.output-placeholder { text-align: center; padding: 32px 20px; color: var(--muted); }
.output-placeholder-icon { width: 64px; height: 64px; background: var(--primary-bg); border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 28px; margin: 0 auto 14px; color: var(--primary); }
.output-placeholder h3 { font-size: 18px; color: var(--text); margin-bottom: 6px; }
.output-placeholder p  { font-size: 13px; line-height: 1.6; }
.spinner-overlay { display: none; position: absolute; inset: 0; background: rgba(18,18,18,0.88); flex-direction: column; align-items: center; justify-content: center; gap: 14px; z-index: 10; }
.spinner { width: 44px; height: 44px; border: 3px solid var(--b2); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.spinner-text { font-size: 13px; color: var(--muted); }
.output-result { display: none; width: 100%; height: 100%; position: absolute; inset: 0; flex-direction: column; }
.output-result img { width: 100%; height: calc(100% - 52px); object-fit: contain; display: block; }
.output-bar { height: 52px; background: var(--s2); border-top: 1px solid var(--b1); display: flex; align-items: center; padding: 0 14px; gap: 10px; }
.output-prompt { font-size: 12px; color: var(--muted); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.err-banner { display: none; position: absolute; bottom: 14px; left: 14px; right: 14px; background: rgba(217,74,74,0.1); border: 1px solid rgba(217,74,74,0.3); border-radius: var(--r); padding: 9px 13px; font-size: 13px; color: #eb9e9e; z-index: 20; }

/* Remove BG page */
.rmbg-layout { max-width: 800px; margin: 0 auto; }
.upload-zone { border: 2px dashed var(--b2); border-radius: var(--rl); padding: 48px 32px; text-align: center; cursor: pointer; transition: border-color 0.2s; background: var(--s1); }
.upload-zone:hover, .upload-zone.drag-over { border-color: var(--primary); background: var(--primary-bg); }
.upload-zone-icon { font-size: 40px; margin-bottom: 14px; color: var(--primary); }
.upload-zone h3 { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.upload-zone p  { font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.upload-zone-note { font-size: 11px; color: var(--muted2); margin-top: 12px; }
.rmbg-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 20px; }
.rmbg-feature { background: var(--s1); border: 1px solid var(--b1); border-radius: var(--r); padding: 16px; text-align: center; }
.rmbg-feature-icon { font-size: 22px; margin-bottom: 8px; color: var(--primary); }
.rmbg-feature h4 { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.rmbg-feature p  { font-size: 12px; color: var(--muted); }
.how-it-works { margin-top: 20px; background: var(--s1); border: 1px solid var(--b1); border-radius: var(--rl); padding: 24px; text-align: center; }
.how-it-works h3 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.how-it-works p  { font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.how-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;}
.how-step { text-align: center; }
.how-step2 { text-align: left; }
.how-step-num { width: 36px; height: 36px; background: var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; color: #fff; margin: 0 auto 10px; }
.how-step h4 { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.how-step p  { font-size: 12px; color: var(--muted); }
.rmbg-result { display: none; margin-top: 20px; }
.rmbg-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rmbg-compare-item { background: var(--s1); border: 1px solid var(--b1); border-radius: var(--r); overflow: hidden; }
.rmbg-compare-label { padding: 8px 12px; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid var(--b1); }
.rmbg-compare-img { background: repeating-conic-gradient(var(--s2) 0% 25%, transparent 0% 50%) 0 0 / 20px 20px; }
.rmbg-compare-img img { width: 100%; display: block; max-height: 300px; object-fit: contain; }

/* Billing */
.page-wrap:has(.billing-wrap) {justify-items:center;}
.billing-wrap { max-width: 900px; }
.balance-card { background: linear-gradient(135deg, var(--s1), var(--s2)); border: 1px solid var(--b2); border-radius: var(--rl); padding: 24px 28px; margin-bottom: 24px; display: flex; align-items: center; justify-content: space-between; position: relative; overflow: hidden; }
.balance-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--primary), var(--primary-h)); }
.balance-icon { width: 48px; height: 48px; background: var(--primary-bg); border-radius: var(--r); display: flex; align-items: center; justify-content: center; font-size: 22px; margin-right: 16px; flex-shrink: 0; }
.balance-info { flex: 1; }
.balance-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.balance-value { font-size: 36px; font-weight: 700; color: #fff; line-height: 1; }
.balance-sub   { font-size: 12px; color: var(--muted); margin-top: 4px; }

.billing-section-title { font-size: 16px; font-weight: 700; margin-bottom: 16px; }
.plans-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.plan-card { background: var(--s1); border: 1px solid var(--b1); border-radius: var(--rl); padding: 20px 16px; text-align: center; position: relative; transition: border-color 0.2s; }
.plan-card:hover { border-color: var(--primary); }
.plan-card.featured { border-color: var(--primary); background: var(--s2); }
.plan-badge { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: var(--primary); color: #fff; font-size: 10px; font-weight: 700; padding: 3px 10px; border-radius: 20px; white-space: nowrap; }
.plan-credits { font-size: 26px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.plan-price { font-size: 22px; font-weight: 700; color: var(--primary); margin-bottom: 3px; }
.plan-per { font-size: 11px; color: var(--muted); margin-bottom: 16px; }


/* Billing custom slider */
.custom-box { background: var(--s1); border: 1px solid var(--b1); border-radius: var(--rl); padding: 28px 32px; margin-bottom: 20px; text-align: center; }
.custom-box h3 { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.slider-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-bottom: 8px; }
input[type=range] { width: 100%; accent-color: var(--primary); margin-bottom: 24px; cursor: pointer; -webkit-appearance: none; appearance: none; height: 4px; background: var(--b2); border-radius: 2px; outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--primary); cursor: pointer; }
input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--primary); cursor: pointer; border: none; }
.custom-bottom { display: flex; align-items: center; justify-content: center; gap: 20px; flex-wrap: wrap; }
.amount-val { font-size: 28px; font-weight: 700; color: var(--text); }
.tokens-val { font-size: 14px; color: var(--muted); }
.tokens-val span { color: var(--primary); font-weight: 700; }

/* Landing pricing slider */
.lp-slider-box { background: var(--s1); border: 1px solid var(--b1); border-radius: var(--rl); padding: 32px; margin-top: 20px; text-align: center; }
.lp-slider-box h3 { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.lp-slider-box > p { font-size: 13px; color: var(--muted); margin-bottom: 24px; }
.lp-slider-wrap { max-width: 640px; margin: 0 auto; }
.lp-slider-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-bottom: 8px; }
.lp-slider-wrap input[type=range] { width: 100%; accent-color: var(--primary); cursor: pointer; margin-bottom: 24px; -webkit-appearance: none; appearance: none; height: 4px; background: var(--b2); border-radius: 2px; outline: none; }
.lp-slider-wrap input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--primary); cursor: pointer; margin-top: 0; }
.lp-slider-wrap input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--primary); cursor: pointer; border: none; }
.lp-slider-bottom { display: flex; align-items: center; justify-content: center; gap: 20px; flex-wrap: wrap; margin-bottom: 12px; }
.lp-slider-credits { font-size: 28px; font-weight: 700; color: var(--text); min-width: 140px; text-align: right; }
.lp-slider-eq { font-size: 22px; color: var(--muted2); }
.lp-slider-price { font-size: 28px; font-weight: 700; color: var(--primary); min-width: 110px; text-align: left; }
.lp-slider-note { font-size: 11px; color: var(--muted2); margin-top: 8px; }

@media (max-width: 600px) {
  .lp-slider-bottom { gap: 12px; }
  .lp-slider-credits, .lp-slider-price { min-width: auto; text-align: center; }
  .plans-grid { grid-template-columns: repeat(2, 1fr); }
}
.billing-note { background: var(--s2); border: 1px solid var(--b1); border-radius: var(--r); padding: 12px 16px; font-size: 12px; color: var(--muted); line-height: 1.7; }

/* KYC */
.kyc-card { max-width: 560px; margin: 60px auto; background: #180a0a; border: 1px solid rgba(156,33,33,0.4); border-left: 3px solid #9c2121; border-radius: var(--rl); padding: 32px; text-align: left; }
.kyc-icon { font-size: 32px; margin-bottom: 16px; }
.kyc-card h2 { font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.kyc-card p  { font-size: 14px; color: #aaa; line-height: 1.8; margin-bottom: 14px; }
.kyc-amount-row { background: #110505; border: 1px solid rgba(90,0,0,0.3); border-radius: var(--r); padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.kyc-amount-label { font-size: 13px; color: #555; }
.kyc-amount-value { font-size: 16px; font-weight: 700; color: var(--primary); }
.kyc-steps { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.kyc-step { display: flex; gap: 12px; align-items: flex-start; }
.kyc-step-num { width: 24px; height: 24px; background: var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #fff; flex-shrink: 0; margin-top: 1px; }
.kyc-step-text strong { display: block; font-size: 13px; color: var(--text); margin-bottom: 2px; }
.kyc-step-text span   { font-size: 12px; color: #666; }

/* Settings */
.settings-layout { display: grid; grid-template-columns: 200px 1fr; gap: 24px; max-width: 860px; }
.settings-nav { display: flex; flex-direction: column; gap: 2px; }
.settings-nav-item { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: var(--r); color: var(--muted); font-size: 13px; font-weight: 500; cursor: pointer; background: transparent; border: none; font-family: var(--font); transition: background 0.15s, color 0.15s; text-align: left; width: 100%; }
.settings-nav-item:hover { background: var(--s2); color: var(--text); }
.settings-nav-item.active { background: var(--s2); color: var(--primary); }
.settings-section { display: none; }
.settings-section.active { display: block; }
.settings-card { background: var(--s1); border: 1px solid var(--b1); border-radius: var(--rl); overflow: hidden; margin-bottom: 16px; }
.settings-card-hdr { padding: 16px 20px; border-bottom: 1px solid var(--b1); display: flex; align-items: center; gap: 10px; }
.settings-card-hdr-icon { font-size: 18px; color: var(--primary); }
.settings-card-hdr h3 { font-size: 14px; font-weight: 700; }
.settings-card-hdr p  { font-size: 12px; color: var(--muted); margin-top: 2px; }
.settings-card-body  { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.settings-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--b1); }
.settings-row:last-child { border-bottom: none; }
.settings-row-info h4 { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.settings-row-info p  { font-size: 12px; color: var(--muted); }
.settings-row-action select { width: auto; min-width: 120px; }
.user-profile-card { display: flex; align-items: center; gap: 16px; }
.user-profile-avatar { width: 56px; height: 56px; background: var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; color: #fff; flex-shrink: 0; }
.user-profile-info h3 { font-size: 16px; font-weight: 700; }
.user-profile-info p  { font-size: 13px; color: var(--muted); }
.settings-link-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: var(--s2); border: 1px solid var(--b1); border-radius: var(--r); cursor: pointer; transition: background 0.15s; text-decoration: none; color: var(--text); }
.settings-link-row:hover { background: var(--s3); }
.danger-card { background: rgba(156,33,33,0.08); border-color: rgba(156,33,33,0.3); }
.danger-card .settings-card-hdr h3 { color: var(--danger); }

/* FAQ */
.faq-layout { max-width: 820px; margin: 0 auto; text-align: center; margin-top: 60px; margin-bottom: 70px;}
.faq-hero { text-align: center; margin-bottom: 32px; }
.faq-hero-badge { display: inline-block; background: var(--primary-bg); border: 1px solid var(--primary-bd); color: var(--primary); font-size: 12px; font-weight: 700; padding: 4px 14px; border-radius: 20px; margin-bottom: 14px; }
.faq-hero h1 { font-size: 28px; font-weight: 700; margin-bottom: 8px; }
.faq-hero p  { font-size: 14px; color: var(--muted); }
.faq-cats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 32px; }
.faq-cat { background: var(--s1); border: 1px solid var(--b1); border-radius: var(--rl); padding: 16px; display: flex; align-items: center; gap: 12px; cursor: pointer; transition: border-color 0.2s; text-decoration: none; }
.faq-cat:hover { border-color: var(--primary); }
.faq-cat-icon { width: 36px; height: 36px; background: var(--primary-bg); border-radius: var(--r); display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.faq-cat-title { font-size: 13px; font-weight: 700; margin-bottom: 2px; }
.faq-cat-desc  { font-size: 12px; color: var(--muted); }
.faq-section-title { font-size: 16px; font-weight: 700; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.faq-items {text-align: left; display: flex; flex-direction: column; gap: 8px; margin-bottom: 28px; }
.faq-item { background: var(--s1); border: 1px solid var(--b1); border-radius: var(--r); overflow: hidden; }
.faq-q { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; cursor: pointer; font-size: 14px; font-weight: 600; gap: 12px; }
.faq-q svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--muted); transition: transform 0.2s; }
.faq-item.open .faq-q svg { transform: rotate(180deg); }
.faq-a { display: none; padding: 0 16px 14px; font-size: 13px; color: var(--muted); line-height: 1.7; border-top: 1px solid var(--b1); padding-top: 12px; }
.faq-item.open .faq-a { display: block; }
.faq-contact-box { background: linear-gradient(135deg, var(--s1), var(--s2)); border: 1px solid var(--b2); border-radius: var(--rl); padding: 32px; text-align: center; }
.faq-contact-icon { width: 52px; height: 52px; background: var(--primary-bg); border-radius: var(--rl); display: flex; align-items: center; justify-content: center; font-size: 22px; margin: 0 auto 14px; color: var(--primary); }
.faq-contact-box h3 { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.faq-contact-box p  { font-size: 13px; color: var(--muted); margin-bottom: 18px; }

/* Contact */
.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 900px; }
.contact-info-card { background: var(--s1); border: 1px solid var(--b1); border-radius: var(--rl); padding: 28px; }
.contact-info-card h2 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.contact-info-card p  { font-size: 14px; color: var(--muted); margin-bottom: 24px; line-height: 1.7; }
.contact-items { display: flex; flex-direction: column; gap: 16px; }
.contact-item { display: flex; align-items: flex-start; gap: 12px; }
.contact-item-icon { width: 36px; height: 36px; background: var(--primary-bg); border-radius: var(--r); display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; color: var(--primary); }
.contact-item-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 3px; font-weight: 600; }
.contact-item-val { font-size: 14px; color: var(--text); }
.contact-form-card { background: var(--s1); border: 1px solid var(--b1); border-radius: var(--rl); padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.contact-success { display: none; text-align: center; padding: 40px 20px; }
.contact-success-icon { width: 60px; height: 60px; background: rgba(71,213,166,0.12); border: 2px solid var(--success); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; font-size: 26px; }
.btn-contact { width: 100%; padding: 12px; background: var(--primary); color: #fff; font-family: var(--font); font-size: 14px; font-weight: 700; border: none; border-radius: var(--r); cursor: pointer; transition: background 0.2s; }
.btn-contact:hover { background: var(--primary-h); }

/* Legal pages */
.legal-wrap { max-width: 820px; margin: 0 auto; }
.legal-wrap h1 { font-size: 32px; font-weight: 700; margin-bottom: 8px; }
.legal-meta { font-size: 13px; color: var(--muted); margin-bottom: 36px; padding-bottom: 20px; }
.legal-wrap h2 { font-size: 18px; font-weight: 700; margin-top: 36px; margin-bottom: 10px; color: var(--text); }
.legal-wrap h3 { font-size: 15px; font-weight: 700; margin-top: 22px; margin-bottom: 8px; color: #ccc; }
.legal-wrap p  { font-size: 14px; color: #aaa; line-height: 1.8; margin-bottom: 12px; }
.legal-wrap ul { color: #aaa; padding-left: 22px; margin-bottom: 12px; font-size: 14px; }
.legal-wrap ul li { margin-bottom: 5px; line-height: 1.7; }
.legal-wrap a  { color: var(--primary); text-decoration: none; }
.legal-wrap a:hover { text-decoration: underline; }
.legal-divider { border: none; border-top: 1px solid var(--b1); margin: 28px 0; }
.legal-highlight { background: var(--s1); border: 1px solid var(--b1); border-left: 3px solid var(--primary); border-radius: var(--r); padding: 14px 18px; margin: 16px 0; font-size: 14px; color: #aaa; }
.legal-highlight strong { color: var(--text); display: block; margin-bottom: 4px; }
.legal-warning { background: rgba(156,33,33,0.08); border: 1px solid rgba(156,33,33,0.25); border-left: 3px solid #9c2121; border-radius: var(--r); padding: 14px 18px; margin: 16px 0; font-size: 14px; color: #aaa; }
.legal-warning strong { color: #d94a4a; display: block; margin-bottom: 4px; }
.legal-contact-box { background: var(--s1); border: 1px solid var(--b1); border-radius: var(--rl); padding: 24px; margin-top: 36px; }
.legal-contact-box h2 { margin-top: 0; }

/* ── App footer (dashboard) ── */
.page-footer { padding: 14px 28px; border-top: 1px solid var(--b1); display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.page-footer a { color: var(--muted); text-decoration: none; transition: color 0.15s; }
.page-footer a:hover { color: var(--primary); }
.page-footer-sep { color: var(--b2); }

/* ── Landing footer ── */
.landing-footer-full { border-top: 1px solid var(--b1); }

.lf-top {
  display: flex;
  gap: 80px;
  padding: 48px;
  align-items: center;
}

.lf-brand { flex: 0 0 240px; }

.lf-logo { margin-bottom: 14px; }

.lf-brand p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
  max-width: 220px;
}

.lf-cols { display: flex; gap: 48px; flex: 1; }

.lf-col { display: flex; flex-direction: column; gap: 10px; }

.lf-col-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.lf-col a {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}

.lf-col a:hover { color: var(--primary); }

.lf-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 48px;
  border-top: 1px solid var(--b1);
  font-size: 12px;
  color: var(--muted2);
  gap: 12px;
  flex-wrap: wrap;
}

.lf-bottom-links { display: flex; gap: 20px; }
.lf-bottom-links a { color: var(--muted2); text-decoration: none; font-size: 12px; transition: color 0.15s; }
.lf-bottom-links a:hover { color: var(--primary); }

@media (max-width: 900px) {
  .lf-top { flex-direction: column; gap: 28px; padding: 32px 20px; }
  .lf-brand { flex: none; }
  .lf-cols { gap: 28px; flex-wrap: wrap; }
  .lf-bottom { flex-direction: column; gap: 10px; text-align: center; padding: 16px 20px; }
}

/* ── Auth pages ── */
.auth-page { background: var(--bg); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }

/* ── Landing page ── */
.landing-page { background: var(--bg); min-height: 100vh; font-family: var(--font); color: var(--text); overflow-x: hidden; }

.landing-nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; padding: 16px 48px; display: flex; align-items: center; gap: 24px; background: rgba(18,18,18,0.85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--b1); justify-content: space-between; }

.landing-nav-right { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex: 1 1 0; min-width: 0; }

.landing-hamburger {
  display: none;
  flex-direction: column; justify-content: center; align-items: center;
  width: 38px; height: 38px; background: transparent; border: 1px solid var(--b2);
  border-radius: 8px; cursor: pointer; gap: 5px; padding: 6px;
}
.landing-hamburger span {
  display: block; width: 18px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}
.landing-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.landing-hamburger.open span:nth-child(2) { opacity: 0; }
.landing-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.landing-nav-actions-mobile { display: none; }


.landing-nav-links { display: flex; justify-content: center; gap: 24px; flex: 0 1 auto; }
.landing-nav-links a { font-size: 13px; color: var(--muted); text-decoration: none; transition: color 0.15s; }
.landing-nav-links a:hover { color: var(--text); }
.landing-nav-spacer { flex: 1; }
.landing-nav-actions { display: flex; gap: 10px; align-items: center; }

.landing-hero { padding: 160px 48px 100px; text-align: center; position: relative; }
.landing-hero-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--primary-bg); border: 1px solid var(--primary-bd); color: var(--primary); font-size: 12px; font-weight: 600; padding: 6px 14px; border-radius: 20px; margin-bottom: 24px; }
.landing-hero h1 { font-size: clamp(36px, 6vw, 68px); font-weight: 700; line-height: 1.1; margin-bottom: 20px; }
.landing-hero h1 span { color: var(--primary); }
.landing-hero p  { font-size: 18px; color: var(--muted); max-width: 560px; margin: 0 auto 36px; line-height: 1.7; }
.landing-hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn-hero-primary { background: var(--primary); color: #fff; padding: 14px 32px; border-radius: var(--r); font-size: 15px; font-weight: 700; text-decoration: none; transition: background 0.2s; border: none; cursor: pointer; font-family: var(--font); }
.btn-hero-primary:hover { background: var(--primary-h); color: #fff; }
.btn-hero-secondary { background: transparent; color: var(--text); padding: 14px 32px; border-radius: var(--r); font-size: 15px; font-weight: 600; text-decoration: none; border: 1px solid var(--b2); transition: background 0.2s; }
.btn-hero-secondary:hover { background: var(--s2); }

/* Scroll gallery */
.scroll-gallery { padding: 60px 0; overflow: hidden; position: relative; }
.scroll-gallery-inner { display: flex; gap: 20px; animation: scrollGallery 40s linear infinite; width: max-content; }
.scroll-gallery-inner:hover { animation-play-state: paused; }
.scroll-gallery-img { width: 260px; height: 260px; border-radius: var(--rl); overflow: hidden; flex-shrink: 0; background: var(--s2); border: 1px solid var(--b1); }
.scroll-gallery-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
@keyframes scrollGallery { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* Features */
.landing-features { padding: 80px 48px; max-width: 1200px; margin: 0 auto; }
.landing-section-badge { display: inline-block; background: var(--primary-bg); border: 1px solid var(--primary-bd); color: var(--primary); font-size: 11px; font-weight: 700; padding: 4px 12px; border-radius: 20px; margin-bottom: 12px; letter-spacing: 0.5px; text-transform: uppercase; }
.landing-section-title { font-size: 32px; font-weight: 700; margin-bottom: 8px; }
.landing-section-sub   { font-size: 15px; color: var(--muted); margin-bottom: 40px; }
.features-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.feature-card { background: var(--s1); border: 1px solid var(--b1); border-radius: var(--rl); padding: 24px; display: flex; gap: 16px; }
.feature-icon { width: 44px; height: 44px; background: var(--primary-bg); border-radius: var(--r); display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; color: var(--primary); }
.feature-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.feature-card p  { font-size: 13px; color: var(--muted); line-height: 1.6; }
.feature-link { font-size: 12px; color: var(--primary); text-decoration: none; margin-top: 8px; display: inline-block; font-weight: 600; }

/* Landing pricing */
.landing-pricing { padding: 80px 48px; max-width: 1000px; margin: 0 auto; text-align: center; }

/* CTA */
.landing-cta { padding: 80px 48px; text-align: center; background: linear-gradient(135deg, var(--s1), var(--s2)); border-top: 1px solid var(--b1); border-bottom: 1px solid var(--b1); }
.landing-cta h2 { font-size: 32px; font-weight: 700; margin-bottom: 12px; }
.landing-cta p  { font-size: 15px; color: var(--muted); margin-bottom: 28px; }

/* Landing footer */
.landing-footer { padding: 32px 48px; border-top: 1px solid var(--b1); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.landing-footer-logo { font-size: 18px; font-weight: 700; color: var(--primary); }
.landing-footer-links { display: flex; gap: 20px; }
.landing-footer-links a { font-size: 13px; color: var(--muted); text-decoration: none; }
.landing-footer-links a:hover { color: var(--primary); }
.landing-footer-copy { font-size: 12px; color: var(--muted2); }

/* ── Mobile ── */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .mobile-toggle { display: flex; }
  .page-wrap { padding: 16px; }
  .gen-layout { grid-template-columns: 1fr; height: auto; }
  .gen-output { min-height: 300px; }
  .plans-grid { grid-template-columns: repeat(2, 1fr); }
  .settings-layout { grid-template-columns: 1fr; }
  .contact-layout { grid-template-columns: 1fr; }
  .faq-cats { grid-template-columns: 1fr; }
  .quick-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .rmbg-features { grid-template-columns: 1fr; }
  .how-steps { grid-template-columns: 1fr; }
  .landing-nav { padding: 14px 20px; }
  .landing-nav-links {
    display: none;
    position: fixed; top: 65px; left: 0; right: 0;
    background: rgba(18,18,18,0.98); backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--b1);
    flex-direction: column; gap: 0; padding: 12px 0 20px;
    z-index: 99;
  }
  .landing-nav-links.open { display: flex; }
  .landing-nav-links a {
    padding: 13px 24px; font-size: 15px; border-bottom: 1px solid var(--b1);
  }
  .landing-nav-actions { display: none; }
  .landing-nav-actions-mobile {
    display: flex; flex-direction: column; gap: 10px; padding: 16px 24px 4px;
  }
  .landing-nav-actions-mobile a { text-align: center; justify-content: center; }
  .landing-hamburger { display: flex; }
  .landing-hero { padding: 120px 20px 60px; }
  .landing-features, .landing-pricing, .landing-cta { padding: 60px 20px; }
  .landing-footer { padding: 24px 20px; flex-direction: column; text-align: center; }
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* ── landing.html extracted styles ── */
.flyby-section {
    padding: 40px 0 60px;
    overflow: hidden;
    position: relative;
  }
  .flyby-track {
    display: flex;
    gap: 16px;
    animation: flyby 35s linear infinite;
    width: max-content;
  }
  .flyby-track:hover { animation-play-state: paused; }
  .flyby-track-2 { animation-direction: reverse; animation-duration: 45s; }
  @keyframes flyby {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
  }
  .flyby-img {
    width: 220px; height: 220px;
    border-radius: 14px; overflow: hidden; flex-shrink: 0;
    border: 1px solid var(--b1); background: var(--s2);
    transition: transform 0.3s, box-shadow 0.3s;
  }
  .flyby-img:hover { transform: scale(1.05); box-shadow: 0 8px 32px rgba(166,114,251,0.2); }
  .flyby-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .flyby-row { margin-bottom: 16px; }
  .flyby-section::before, .flyby-section::after {
    content: ''; position: absolute; top: 0; bottom: 0; width: 120px; z-index: 2; pointer-events: none;
  }
  .flyby-section::before { left: 0;  background: linear-gradient(to right, var(--bg), transparent); }
  .flyby-section::after  { right: 0; background: linear-gradient(to left,  var(--bg), transparent); }

  .bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 36px;
  }
  .bento-card {
    background: var(--s1); border: 1px solid var(--b1); border-radius: 16px;
    padding: 24px; transition: border-color 0.2s;
  }
  .bento-card:hover { border-color: var(--primary); }
  .bento-card.wide { grid-column: span 3; }
  .bento-icon { font-size: 28px; margin-bottom: 14px; }
  .bento-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
  .bento-card p  { font-size: 13px; color: var(--muted); line-height: 1.7; }
  .bento-visual {
    margin-top: 16px; background: var(--s2); border-radius: 10px; overflow: hidden;
    aspect-ratio: 16/9; display: flex; align-items: center; justify-content: center; font-size: 40px;
  }

  /* Model showcase section */
  .model-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 48px;
  }
  .model-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
    margin-top: 48px;
  }
  .model-cards { display: flex; flex-direction: column; gap: 16px; }
  .model-feature-card {
    background: var(--s1);
    border: 1px solid var(--b1);
    border-radius: 14px;
    padding: 20px 22px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    transition: border-color 0.2s;
  }
  .model-feature-card:hover { border-color: var(--primary); }
  .mf-icon {
    width: 42px; height: 42px; border-radius: 10px;
    background: var(--primary-bg); display: flex; align-items: center;
    justify-content: center; font-size: 18px; flex-shrink: 0; color: var(--primary);
  }
  .mf-title { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
  .mf-desc  { font-size: 13px; color: var(--muted); line-height: 1.6; }
  .model-img-side { position: relative; }
  .model-img-side img {
    width: 100%; border-radius: 16px;
    border: 1px solid var(--b1); display: block;
    object-fit: cover; aspect-ratio: 3/4;
  }
  .model-img-badge {
    position: absolute; bottom: 14px; left: 14px; right: 14px;
    background: rgba(18,18,18,0.82);
    backdrop-filter: blur(8px);
    border: 1px solid var(--b2);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 12px; color: var(--muted);
  }
  .model-img-badge strong { display: block; font-size: 13px; color: var(--text); margin-bottom: 2px; }

  .lp-plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 32px; }
  .lp-plan {
    background: var(--s1); border: 1px solid var(--b1); border-radius: 14px;
    padding: 22px 16px; text-align: center; position: relative; transition: border-color 0.2s;
  }
  .lp-plan:hover { border-color: var(--primary); }
  .lp-plan.pop   { border-color: var(--primary); background: var(--s2); }
  .lp-badge  { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: var(--primary); color: #fff; font-size: 10px; font-weight: 700; padding: 3px 10px; border-radius: 20px; white-space: nowrap; }
  .lp-credits { font-size: 24px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
  .lp-price   { font-size: 20px; font-weight: 700; color: var(--primary); margin-bottom: 3px; }
  .lp-per     { font-size: 11px; color: var(--muted); margin-bottom: 16px; }

  .stats-row { display: flex; gap: 32px; justify-content: center; flex-wrap: wrap; margin: 48px 0; }
  .stat-item { text-align: center; }
  .stat-val  { font-size: 36px; font-weight: 700; color: var(--primary); line-height: 1; margin-bottom: 6px; }
  .stat-lbl  { font-size: 13px; color: var(--muted); }

  @media (max-width: 900px) {
    .bento-grid { grid-template-columns: 1fr 1fr; }
    .bento-card.wide { grid-column: span 1; }
    .lp-plans { grid-template-columns: repeat(2, 1fr); }
    .flyby-img { width: 160px; height: 160px; }
    .model-grid { grid-template-columns: 1fr; }
    .model-img-side { order: -1; }
    .model-section { padding: 60px 20px; }
  }
  @media (max-width: 600px) {
    .bento-grid { grid-template-columns: 1fr; }
    .bento-card.wide { grid-column: span 1; }
    .lp-plans { grid-template-columns: 1fr 1fr; }
    .stats-row { gap: 20px; }
  }

/* ── base.html extracted styles ── */
/* ── Lightbox ── */
.lightbox-overlay {
  display: none; position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.88); backdrop-filter: blur(4px);
  align-items: center; justify-content: center;
}
.lightbox-overlay.open { display: flex; }
.lightbox-box {
  background: var(--s1); border: 1px solid var(--b2); border-radius: 16px;
  max-width: 860px; width: 95vw; max-height: 90vh;
  display: flex; overflow: hidden;
}
.lightbox-img-side {
  flex: 1; background: var(--s2); min-width: 0;
  display: flex; align-items: center; justify-content: center;
}
.lightbox-img-side img { max-width: 100%; max-height: 80vh; object-fit: contain; display: block; }
.lightbox-info-side {
  width: 240px; flex-shrink: 0; border-left: 1px solid var(--b1);
  display: flex; flex-direction: column; padding: 20px;
  gap: 14px; overflow-y: auto;
}
.lightbox-close {
  position: absolute; top: 20px; right: 20px; width: 36px; height: 36px;
  background: var(--s2); border: 1px solid var(--b1); border-radius: 50%;
  color: var(--text); font-size: 18px; cursor: pointer; display: flex;
  align-items: center; justify-content: center; z-index: 1001;
}
.lightbox-close:hover { background: var(--s3); }
.lb-label { font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.lb-value { font-size: 13px; color: var(--text); line-height: 1.5; word-break: break-word; }
.lb-type  { display: inline-block; background: var(--primary-bg); border: 1px solid var(--primary-bd); color: var(--primary); font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 20px; }
.lb-actions { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
@media (max-width: 600px) {
  .lightbox-box { flex-direction: column; }
  .lightbox-info-side { width: 100%; border-left: none; border-top: 1px solid var(--b1); }
}
/* ── billing.html extracted styles ── */
@keyframes spin{to{transform:rotate(360deg)}}

/* ── docs.html extracted styles ── */
.doc-layout { display: grid; grid-template-columns: 220px 1fr; gap: 40px; align-items: start; }
.doc-sidebar { position: sticky; top: 100px; }
.doc-nav { display: flex; flex-direction: column; gap: 2px; }
.doc-nav-section { font-size: 10px; font-weight: 700; color: var(--muted2); text-transform: uppercase; letter-spacing: 0.8px; padding: 12px 12px 4px; }
.doc-nav-item { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: var(--r); color: var(--muted); font-size: 13px; text-decoration: none; transition: background 0.15s, color 0.15s; border-left: 2px solid transparent; }
.doc-nav-item:hover { background: var(--s2); color: var(--text); }
.doc-nav-item.active { color: var(--primary); border-left-color: var(--primary); background: var(--primary-bg); }
.doc-content { min-width: 0; }
.doc-section { margin-bottom: 56px; scroll-margin-top: 100px; }
.doc-section-badge { display: inline-block; background: var(--primary-bg); border: 1px solid var(--primary-bd); color: var(--primary); font-size: 11px; font-weight: 700; padding: 3px 12px; border-radius: 20px; margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.doc-section h2 { font-size: 26px; font-weight: 700; margin-bottom: 10px; }
.doc-section > p { font-size: 14px; color: var(--muted); line-height: 1.8; margin-bottom: 20px; }
.doc-divider { border: none; border-top: 1px solid var(--b1); margin: 48px 0; }

/* Tool cards */
.tool-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 32px; }
.tool-card { background: var(--s1); border: 1px solid var(--b1); border-radius: var(--rl); padding: 20px; }
.tool-card-icon { font-size: 28px; margin-bottom: 12px; }
.tool-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.tool-card p  { font-size: 13px; color: var(--muted); line-height: 1.6; }
.tool-card-tag { display: inline-block; background: var(--s2); border: 1px solid var(--b1); color: var(--muted); font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 4px; margin-top: 10px; text-transform: uppercase; letter-spacing: 0.3px; }

/* How to use steps */
.how-card { background: var(--s1); border: 1px solid var(--b1); border-radius: var(--rl); overflow: hidden; margin-bottom: 16px; }
.how-card-header { padding: 16px 20px; border-bottom: 1px solid var(--b1); display: flex; align-items: center; gap: 12px; cursor: pointer; user-select: none; }
.how-card-header-icon { font-size: 20px; }
.how-card-header h3 { font-size: 15px; font-weight: 700; flex: 1; }
.how-card-header svg { color: var(--muted); transition: transform 0.2s; flex-shrink: 0; }
.how-card.open .how-card-header svg { transform: rotate(180deg); }
.how-card-body { display: none; padding: 20px; }
.how-card.open .how-card-body { display: block; }
.how-steps-list { display: flex; flex-direction: column; gap: 14px; }
.how-step { display: flex; gap: 14px; align-items: flex-start; text-align:left;}
.how-step-num { width: 26px; height: 26px; background: var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #fff; flex-shrink: 0; margin-top: 1px; }
.how-step-content h4 { font-size: 13px; font-weight: 700; margin-bottom: 3px; }
.how-step-content p  { font-size: 13px; color: var(--muted); line-height: 1.6; }
.how-tip { background: var(--primary-bg); border: 1px solid var(--primary-bd); border-radius: var(--r); padding: 12px 16px; font-size: 13px; color: var(--muted); line-height: 1.6; margin-top: 16px; }
.how-tip strong { color: var(--primary); }
.how-step-content{width:100%;}

/* Model info */
.model-card { background: var(--s1); border: 1px solid var(--b1); border-radius: var(--rl); padding: 24px; display: flex; gap: 20px; align-items: flex-start; margin-bottom: 14px; }
.model-icon { width: 48px; height: 48px; background: var(--primary-bg); border-radius: var(--r); display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.model-info h3 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.model-info p  { font-size: 13px; color: var(--muted); line-height: 1.6; margin-bottom: 10px; }
.model-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.model-tag { background: var(--s2); border: 1px solid var(--b1); color: var(--muted); font-size: 11px; padding: 3px 10px; border-radius: 20px; }
.model-tag.highlight { background: var(--primary-bg); border-color: var(--primary-bd); color: var(--primary); }

/* Styles grid */
.styles-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.style-item { background: var(--s1); border: 1px solid var(--b1); border-radius: var(--r); padding: 14px 16px; display: flex; align-items: flex-start; gap: 12px; }
.style-emoji { font-size: 22px; flex-shrink: 0; margin-top: 1px; }
.style-name { font-size: 13px; font-weight: 700; margin-bottom: 3px; }
.style-desc { font-size: 12px; color: var(--muted); line-height: 1.5; }

/* Best practices */
.practice-cards { display: grid; gap: 12px; }
.practice-card { background: var(--s1); border: 1px solid var(--b1); border-radius: var(--r); padding: 18px 20px; display: flex; gap: 14px; align-items: flex-start; }
.practice-icon { width: 36px; height: 36px; border-radius: var(--r); display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.practice-icon.green  { background: rgba(71,213,166,0.12); }
.practice-icon.purple { background: var(--primary-bg); }
.practice-icon.yellow { background: rgba(215,172,97,0.12); }
.practice-icon.red    { background: rgba(217,74,74,0.1); }
.practice-card h4 { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.practice-card p  { font-size: 13px; color: var(--muted); line-height: 1.6; }

/* Prompt tips */
.prompt-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.prompt-table th { text-align: left; padding: 10px 14px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); border-bottom: 1px solid var(--b1); }
.prompt-table td { padding: 11px 14px; border-bottom: 1px solid var(--b1); vertical-align: top; line-height: 1.6; }
.prompt-table tr:last-child td { border-bottom: none; }
.prompt-table td:first-child { color: var(--danger); font-family: monospace; font-size: 12px; }
.prompt-table td:last-child  { color: var(--success); font-family: monospace; font-size: 12px; }
.prompt-table td:nth-child(2) { color: var(--muted); font-family: inherit; font-size: 13px; }
.prompt-table-wrap { background: var(--s1); border: 1px solid var(--b1); border-radius: var(--rl); overflow: hidden; }

/* Credits table */
.credits-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.credits-table th { text-align: left; padding: 10px 16px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); background: var(--s2); }
.credits-table td { padding: 12px 16px; border-bottom: 1px solid var(--b1); }
.credits-table tr:last-child td { border-bottom: none; }
.credits-table-wrap { background: var(--s1); border: 1px solid var(--b1); border-radius: var(--rl); overflow: hidden; margin-bottom: 20px; }
.credit-cost { display: inline-block; background: var(--primary-bg); border: 1px solid var(--primary-bd); color: var(--primary); font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 20px; }

@media (max-width: 900px) {
  .doc-layout { grid-template-columns: 1fr; }
  .doc-sidebar { display: none; }
  .tool-cards { grid-template-columns: 1fr; }
  .styles-grid { grid-template-columns: 1fr; }
  
}

@media (min-width: 1200px) {
	.billing-wrap {width:900px;}
}

/* ── gallery.html extracted styles ── */
.gallery-tabs { display: flex; gap: 8px; margin-bottom: 20px; }
.gallery-tab-btn { padding: 7px 18px; border-radius: 20px; font-size: 12px; font-weight: 600; cursor: pointer; border: 1px solid var(--b1); background: var(--s2); color: var(--muted); font-family: var(--font); transition: all 0.15s; }
.gallery-tab-btn.active { border-color: var(--primary); color: var(--primary); background: var(--primary-bg); }
.gallery-section { display: none; }
.gallery-section.active { display: block; }
.placeholder-img { background: var(--s2); aspect-ratio: 1; border-radius: var(--r); overflow: hidden; }
.placeholder-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ── settings.html extracted styles ── */
.settings-layout { display: grid; grid-template-columns: 200px 1fr; gap: 24px; max-width: 860px;  }
/* ── Legal / Policy pages ── */
.legal-page { max-width: 780px; margin: 0 auto; }

.legal-header { margin-bottom: 48px; padding-bottom: 32px;  }
.legal-badge {
  display: inline-block; background: var(--primary-bg); border: 1px solid var(--primary-bd);
  color: var(--primary); font-size: 11px; font-weight: 700; padding: 3px 12px;
  border-radius: 20px; letter-spacing: 0.5px; margin-bottom: 16px;
}
.legal-header h1 { font-size: 32px; font-weight: 700; margin-bottom: 10px; }
.legal-meta { font-size: 13px; color: var(--muted); }

.legal-body h2 {
  font-size: 18px; font-weight: 700; margin-top: 48px; margin-bottom: 14px;
  padding-bottom: 10px; border-bottom: 1px solid var(--b1); color: var(--text);
}
.legal-body h3 { font-size: 15px; font-weight: 700; margin-top: 28px; margin-bottom: 10px; color: var(--text); }
.legal-body p { font-size: 14px; color: var(--muted); line-height: 1.8; margin-bottom: 14px; }
.legal-body ul { margin: 0 0 16px 20px; }
.legal-body ul li { font-size: 14px; color: var(--muted); line-height: 1.8; margin-bottom: 6px; }
.legal-body a { color: var(--primary); text-decoration: none; }
.legal-body a:hover { text-decoration: underline; }
.legal-body strong { color: var(--text); font-weight: 600; }
.legal-body pre {
  background: var(--s2); border: 1px solid var(--b1); border-radius: 8px;
  padding: 14px 18px; font-size: 13px; color: var(--text); overflow-x: auto; margin: 16px 0;
}
.legal-body code { font-family: 'JetBrains Mono', 'Fira Code', monospace; }

.legal-table-wrap { overflow-x: auto; margin: 20px 0; }
.legal-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.legal-table th {
  background: var(--s2); color: var(--text); font-weight: 700;
  padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--b1);
}
.legal-table td {
  padding: 10px 14px; color: var(--muted); border-bottom: 1px solid var(--b1);
  vertical-align: top; line-height: 1.6;
}
.legal-table tr:last-child td { border-bottom: none; }
