/* LexiVue — dark luxury design system */
:root {
  --bg: #0a0a0f;
  --bg-soft: #101018;
  --bg-card: #14141e;
  --bg-raise: #1a1a28;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f2f0eb;
  --text-dim: #a8a49c;
  --text-faint: #6b675f;
  --gold: #d4af6a;
  --gold-bright: #eccb8b;
  --gold-deep: #9a7b3f;
  --teal: #3fd4c0;
  --danger: #e2604f;
  --ok: #5fc77e;
  --radius: 14px;
  --radius-sm: 9px;
  --font: 'Inter', 'Helvetica Neue', system-ui, -apple-system, sans-serif;
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-bright); }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; }

img { max-width: 100%; display: block; }

/* ---------- layout ---------- */
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 10, 15, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-size: 22px; letter-spacing: 0.04em;
  color: var(--text);
}
.logo:hover { color: var(--text); }
.logo .mark { width: 28px; height: 28px; }
.logo b { color: var(--gold); font-weight: 600; }
.logo .wordmark { height: 30px; width: auto; display: block; }
.nav-links { display: flex; align-items: center; gap: 26px; font-size: 14.5px; }
.nav-links a { color: var(--text-dim); }
.nav-links a:hover { color: var(--text); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 15px var(--font);
  padding: 12px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}
.btn-gold {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold-deep));
  color: #14110a;
}
.btn-gold:hover { filter: brightness(1.1); color: #14110a; transform: translateY(-1px); }
.btn-ghost {
  background: transparent; color: var(--text);
  border-color: var(--line-strong);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-bright); }
.btn-danger { background: transparent; color: var(--danger); border-color: rgba(226, 96, 79, 0.4); }
.btn-danger:hover { background: rgba(226, 96, 79, 0.12); }
.btn-sm { padding: 8px 16px; font-size: 13.5px; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: 90px 0 70px;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: -40% -20% auto;
  height: 130%;
  background:
    radial-gradient(ellipse 60% 50% at 70% 20%, rgba(212, 175, 106, 0.13), transparent 60%),
    radial-gradient(ellipse 50% 40% at 20% 80%, rgba(63, 212, 192, 0.07), transparent 60%);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center;
}
.hero h1 {
  font-size: clamp(38px, 5vw, 58px);
  margin-bottom: 22px;
}
.hero h1 em { color: var(--gold); font-style: normal; }
.hero p.lead { font-size: 19px; color: var(--text-dim); margin-bottom: 34px; max-width: 34em; }
.hero-cta { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.hero-note { font-size: 13.5px; color: var(--text-faint); margin-top: 16px; }
.hero-visual {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.55);
}
.hero-visual img { width: 100%; }

.eyebrow {
  display: inline-block;
  font: 600 12px var(--font);
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 18px;
}

/* ---------- sections ---------- */
section { padding: 72px 0; }
.section-tight { padding-top: 24px; }
.section-head { max-width: 640px; margin-bottom: 48px; }

/* ---------- idea chips ---------- */
.idea-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.idea-chips .chip {
  font: inherit; font-size: 13px; text-align: left; cursor: pointer;
  color: var(--gold); background: rgba(212, 175, 106, 0.07);
  border: 1px solid rgba(212, 175, 106, 0.35); border-radius: 999px;
  padding: 7px 13px; transition: all .15s ease; line-height: 1.3;
}
.idea-chips .chip:hover {
  color: var(--bg); background: var(--gold); border-color: var(--gold);
}
.idea-chips .chip.active {
  color: var(--bg); background: var(--gold); border-color: var(--gold);
  box-shadow: 0 0 18px rgba(212, 175, 106, 0.45);
}

/* ---------- usage / activity ---------- */
.usage-list { max-height: 60vh; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; margin: 14px 0 4px; }
.usage-row {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg-raise); border: 1px solid var(--line);
  border-radius: 10px; padding: 8px 14px 8px 8px;
}
.usage-thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 7px; flex: none; }
.usage-thumb-credit {
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; color: var(--gold); background: rgba(212, 175, 106, 0.1);
}
.usage-info { flex: 1; min-width: 0; }
.usage-title { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.usage-sub { color: var(--text-faint); font-size: 12.5px; margin-top: 2px; }
.usage-cost { font-variant-numeric: tabular-nums; color: var(--text-dim); font-size: 14px; flex: none; }
.usage-cost-credit { color: var(--gold); }

/* ---------- how-it-works detail ---------- */
.how-detail {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center;
  margin-top: 56px; padding-top: 56px; border-top: 1px solid var(--line);
}
.how-detail-img { padding-bottom: 12px; }
.how-detail-copy h3 { font-size: 24px; margin-bottom: 18px; }
.how-detail-copy ol { margin: 0 0 18px; padding-left: 20px; color: var(--text-dim); }
.how-detail-copy ol li { margin-bottom: 12px; line-height: 1.55; }
.how-detail-copy code {
  background: var(--bg-raise); color: var(--gold); padding: 2px 7px;
  border-radius: 5px; font-size: 0.92em;
}
@media (max-width: 920px) {
  .how-detail { grid-template-columns: 1fr; gap: 28px; }
  .how-detail-img { padding-bottom: 0; margin-bottom: 8px; }
}

/* ---------- TV mockup ---------- */
.tv-mock { max-width: 560px; margin: 0 auto; }
.tv-screen {
  background: #0a0a0c; border: 3px solid #2a2a30; border-radius: 14px;
  overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}
.tv-browser {
  display: flex; align-items: center; gap: 6px;
  background: #1b1b20; padding: 10px 14px; border-bottom: 1px solid #2a2a30;
}
.tv-dot { width: 9px; height: 9px; border-radius: 50%; background: #3a3a42; }
.tv-url {
  flex: 1; margin-left: 8px; background: #101014; border: 1px solid #2e2e36;
  border-radius: 999px; padding: 6px 14px; font-size: 14px; color: var(--text-dim);
}
.tv-url b { color: var(--gold); font-weight: 600; }
.tv-typing { border-right: 2px solid var(--gold); animation: tvCaret 1s steps(1) infinite; padding-right: 1px; }
@keyframes tvCaret { 50% { border-color: transparent; } }
.tv-art {
  aspect-ratio: 16/9;
  background:
    radial-gradient(ellipse 70% 90% at 25% 75%, rgba(212,175,106,0.55), transparent 60%),
    radial-gradient(ellipse 60% 70% at 75% 25%, rgba(63,212,192,0.25), transparent 60%),
    linear-gradient(160deg, #15151a, #0a0a0c);
}
.tv-stand {
  width: 120px; height: 10px; margin: 0 auto;
  background: #2a2a30; border-radius: 0 0 8px 8px;
}
.section-head h2 { font-size: clamp(28px, 3.4vw, 40px); margin-bottom: 14px; }
.section-head p { color: var(--text-dim); font-size: 17px; }

/* ---------- gallery / environment cards ---------- */
.env-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.env-card {
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-card);
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.env-card:hover { transform: translateY(-4px); border-color: var(--gold-deep); }
.env-card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.env-card .cap { padding: 16px 18px; }
.env-card .cap h3 { font-size: 17px; font-family: var(--font); font-weight: 600; margin-bottom: 4px; }
.env-card .cap p { font-size: 13.5px; color: var(--text-dim); }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: step; }
.step {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px 26px;
}
.step .num {
  display: inline-flex; width: 38px; height: 38px; align-items: center; justify-content: center;
  border-radius: 50%; border: 1px solid var(--gold-deep); color: var(--gold);
  font: 600 16px var(--font-display); margin-bottom: 18px;
}
.step h3 { font-size: 19px; margin-bottom: 8px; font-family: var(--font); font-weight: 600; }
.step p { font-size: 14.5px; color: var(--text-dim); }

/* ---------- live demo panel ---------- */
.demo-panel {
  display: grid; grid-template-columns: 1fr 1fr; gap: 36px;
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 36px;
}
.demo-panel label { display: block; font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 8px; }
.demo-frame {
  position: relative;
  border-radius: var(--radius-sm); overflow: hidden;
  background: #000; border: 1px solid var(--line-strong);
  aspect-ratio: 16/9;
  display: flex; align-items: center; justify-content: center;
}
.demo-frame img { width: 100%; height: 100%; object-fit: contain; }
.demo-frame .placeholder { color: var(--text-faint); font-size: 14px; padding: 20px; text-align: center; }
.demo-meta { font-size: 13px; color: var(--text-faint); margin-top: 10px; min-height: 20px; }

/* ---------- forms ---------- */
textarea, input[type="text"], input[type="email"], input[type="password"], input[type="number"], select {
  width: 100%;
  background: var(--bg-soft);
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font: 400 15px var(--font);
  outline: none;
  transition: border-color 0.15s ease;
}
textarea:focus, input:focus, select:focus { border-color: var(--gold-deep); }
textarea { resize: vertical; min-height: 110px; line-height: 1.5; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; color: var(--text-dim); margin-bottom: 7px; }
.field .hint { font-size: 12.5px; color: var(--text-faint); margin-top: 6px; }
.form-error { color: var(--danger); font-size: 14px; min-height: 20px; margin: 10px 0; }
.form-ok { color: var(--ok); font-size: 14px; }

/* ---------- auth card ---------- */
.auth-wrap { min-height: calc(100vh - 64px); display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.auth-card {
  width: 100%; max-width: 420px;
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 40px 36px;
}
.auth-card h1 { font-size: 28px; margin-bottom: 6px; }
.auth-card .sub { color: var(--text-dim); font-size: 14.5px; margin-bottom: 28px; }
.auth-alt { text-align: center; font-size: 14px; color: var(--text-dim); margin-top: 22px; }

/* ---------- app ---------- */
.app-main { padding: 40px 0 80px; }
.app-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 30px; flex-wrap: wrap; gap: 16px; }
.app-head h1 { font-size: 30px; }
.badge {
  display: inline-block; font: 600 11.5px var(--font);
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 4px 11px; border-radius: 999px;
}
.badge-gold { background: rgba(212, 175, 106, 0.14); color: var(--gold); border: 1px solid rgba(212, 175, 106, 0.35); }
.badge-dim { background: rgba(255,255,255,0.06); color: var(--text-dim); border: 1px solid var(--line); }
.badge-ok { background: rgba(95, 199, 126, 0.12); color: var(--ok); border: 1px solid rgba(95,199,126,0.3); }
.badge-err { background: rgba(226, 96, 79, 0.12); color: var(--danger); border: 1px solid rgba(226,96,79,0.3); }

.display-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 22px; }
.display-card {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
}
.display-card .thumb {
  background: #000; aspect-ratio: 16/9; position: relative;
  display: flex; align-items: center; justify-content: center;
}
.display-card .thumb img { width: 100%; height: 100%; object-fit: contain; }
.display-card .thumb .none { color: var(--text-faint); font-size: 13px; }
.display-card .body { padding: 18px 20px; flex: 1; }
.display-card .body h3 { font-size: 18px; font-family: var(--font); font-weight: 600; margin-bottom: 4px; }
.display-card .meta { font-size: 13px; color: var(--text-dim); margin-bottom: 12px; }
.display-card .tv-url {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 8px 12px;
  font: 500 14px ui-monospace, 'SF Mono', Menlo, monospace;
  color: var(--gold-bright);
}
.display-card .tv-url button { margin-left: auto; }
.display-card .actions { display: flex; gap: 8px; padding: 14px 20px 18px; flex-wrap: wrap; }

.new-display-card {
  border: 1px dashed var(--line-strong); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  min-height: 280px; cursor: pointer; color: var(--text-dim);
  font-size: 15.5px; gap: 10px;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.new-display-card:hover { border-color: var(--gold); color: var(--gold-bright); }

/* ---------- modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(5, 5, 8, 0.78); backdrop-filter: blur(6px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 5vh 20px 40px; overflow-y: auto;
}
.modal {
  width: 100%; max-width: 660px;
  background: var(--bg-raise); border: 1px solid var(--line-strong);
  border-radius: var(--radius); padding: 34px 36px;
}
.modal h2 { font-size: 24px; margin-bottom: 22px; }
.modal .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.modal-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 26px; }
.hidden { display: none !important; }

.estimate-box {
  background: rgba(212, 175, 106, 0.07); border: 1px solid rgba(212, 175, 106, 0.25);
  border-radius: var(--radius-sm); padding: 14px 16px;
  font-size: 14px; color: var(--text-dim);
}
.estimate-box b { color: var(--gold-bright); }

/* ---------- history ---------- */
.history-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin-top: 18px; }
.history-grid figure {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-sm);
  overflow: hidden;
}
.history-grid img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.history-grid figcaption { padding: 8px 10px; font-size: 12px; color: var(--text-dim); }

/* ---------- pricing ---------- */
.pricing-card {
  max-width: 520px;
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 34px 36px;
}
.pricing-card ul { list-style: none; margin: 18px 0; }
.pricing-card li { padding: 8px 0; color: var(--text-dim); font-size: 15px; display: flex; gap: 10px; }
.pricing-card li::before { content: '◆'; color: var(--gold); font-size: 11px; line-height: 2; }

/* ---------- footer ---------- */
footer {
  border-top: 1px solid var(--line);
  padding: 36px 0; margin-top: 40px;
  font-size: 13.5px; color: var(--text-faint);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}

/* ---------- toast ---------- */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  background: var(--bg-raise); border: 1px solid var(--gold-deep);
  color: var(--text); padding: 13px 26px; border-radius: 999px;
  font-size: 14.5px; z-index: 200;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}

/* ---------- spinner ---------- */
.spinner {
  width: 26px; height: 26px; border-radius: 50%;
  border: 3px solid rgba(212, 175, 106, 0.25);
  border-top-color: var(--gold);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- generating animation ---------- */
.generating {
  position: relative; width: 100%; height: 100%; min-height: 220px;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.generating .shimmer {
  position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(212,175,106,0.16) 50%, transparent 70%);
  background-size: 200% 100%;
  animation: shimmerMove 1.8s linear infinite;
}
@keyframes shimmerMove { to { background-position: -200% 0; } }
.generating .gen-label {
  position: relative; text-align: center; color: var(--gold);
  font-size: 16px; line-height: 1.6; animation: genPulse 2s ease-in-out infinite;
}
.generating .gen-label small { color: var(--text-dim); font-size: 13px; }
.generating .gen-label .spinner { display: inline-block; vertical-align: -4px; margin-right: 10px; }
@keyframes genPulse { 50% { opacity: 0.55; } }

/* ---------- responsive ---------- */
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; }
  .env-grid, .steps { grid-template-columns: 1fr; }
  .demo-panel { grid-template-columns: 1fr; }
  .modal .row { grid-template-columns: 1fr; }
  .nav-links { gap: 16px; }
  .nav-links .hide-mobile { display: none; }
}

/* top-up success toast */
.topup-toast {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
  background: var(--gold); color: #141414; font-weight: 600; font-size: 14px;
  padding: 10px 22px; border-radius: 999px; z-index: 200;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}
