:root {
  --bg: #0a0c12;
  --surface: #141824;
  --surface2: #1c2232;
  --accent: #e94560;
  --accent2: #7c6cf0;
  --accent3: #22d3a8;
  --text: #eef1f7;
  --dim: #9aa3b5;
  --border: #2a3144;
  --radius: 16px;
  --nav-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

.site-beta-banner {
  background: linear-gradient(90deg, #3d2e14, #5c4520);
  color: #f5e6c8;
  border-bottom: 1px solid #8b6914;
  padding: 10px 16px;
  font-size: 0.85rem;
  line-height: 1.45;
  text-align: center;
}
.site-beta-banner strong { color: #ffd966; }

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(233, 69, 96, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 0%, rgba(124, 108, 240, 0.2), transparent 50%),
    radial-gradient(ellipse 50% 30% at 50% 100%, rgba(34, 211, 168, 0.08), transparent 50%);
  pointer-events: none;
  z-index: -1;
}

a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ── Nav ── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(10, 12, 18, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-nav .wrap {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand img {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 4px 16px rgba(0,0,0,0.35);
}
.brand span {
  font-family: Literata, Georgia, serif;
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.nav-links a {
  color: var(--dim);
  font-size: 0.92rem;
  padding: 8px 14px;
  border-radius: 999px;
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}
.nav-links a:hover { color: var(--text); background: var(--surface2); text-decoration: none; }

.nav-user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--dim);
}
.nav-user-chip .pill {
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--text);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
  font-family: inherit;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  box-shadow: 0 8px 28px rgba(233, 69, 96, 0.35);
}
.btn-secondary {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost {
  background: transparent;
  color: var(--dim);
  border: 1px solid var(--border);
}
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

/* ── Hero ── */
.hero {
  padding: 56px 0 40px;
  text-align: center;
}
.hero h1 {
  font-family: Literata, Georgia, serif;
  font-size: clamp(2.2rem, 5.5vw, 3.4rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  background: linear-gradient(135deg, #fff 30%, #c4b8ff 70%, #ff8fa3);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero .tagline {
  color: var(--dim);
  font-size: 1.12rem;
  margin-top: 16px;
  max-width: 580px;
  margin-inline: auto;
}
.hero-cta {
  margin-top: 32px;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-badges {
  margin-top: 28px;
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.badge {
  font-size: 0.78rem;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--dim);
}
.badge.accent { border-color: rgba(124, 108, 240, 0.5); color: #c4b8ff; }

/* ── Sections ── */
section { padding: 52px 0; }
section h2 {
  font-family: Literata, serif;
  font-size: clamp(1.4rem, 3vw, 1.75rem);
  margin-bottom: 8px;
}
.section-lead {
  color: var(--dim);
  margin-bottom: 28px;
  max-width: 560px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.card h3 { font-size: 1rem; margin-bottom: 8px; }
.card p { color: var(--dim); font-size: 0.92rem; }

/* ── Theme previews (CSS app mockups) ── */
.theme-showcase {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.theme-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.theme-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.35);
}
.theme-card-info {
  padding: 16px 18px 18px;
}
.theme-card-info h3 { font-size: 0.95rem; margin-bottom: 4px; }
.theme-card-info p { color: var(--dim); font-size: 0.82rem; }
.theme-card-info .price {
  margin-top: 10px;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--accent3);
}

.app-mockup {
  aspect-ratio: 16 / 10;
  display: grid;
  grid-template-rows: 22px 1fr;
  font-size: 6px;
  border-bottom: 1px solid var(--border);
}
.mock-header {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 6px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.mock-dot { width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,0.2); }
.mock-brand { margin-left: 4px; font-weight: 600; opacity: 0.85; }
.mock-body {
  display: grid;
  grid-template-columns: 28% 1fr 26%;
  min-height: 0;
}
.mock-sidebar {
  padding: 6px 4px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.mock-line {
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.12);
}
.mock-line.active { opacity: 1; }
.mock-line.short { width: 70%; }
.mock-editor {
  margin: 5px;
  border-radius: 3px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.mock-prose { height: 3px; border-radius: 1px; opacity: 0.55; }
.mock-prose:nth-child(odd) { width: 92%; }
.mock-prose:nth-child(even) { width: 78%; }
.mock-ai {
  margin: 5px 5px 5px 0;
  border-radius: 3px;
  padding: 5px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.mock-ai-label { font-weight: 600; font-size: 5px; opacity: 0.7; margin-bottom: 2px; }
.mock-bubble { height: 8px; border-radius: 2px; background: rgba(255,255,255,0.1); }

/* ── Store page ── */
.store-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: start;
}
@media (max-width: 900px) {
  .store-layout { grid-template-columns: 1fr; }
}

.store-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
  align-items: center;
}
.store-search {
  flex: 1;
  min-width: 180px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
}
.store-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-chip {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--dim);
  cursor: pointer;
  font-size: 0.82rem;
  font-family: inherit;
}
.filter-chip.active {
  background: var(--accent2);
  border-color: var(--accent2);
  color: #fff;
}

.store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.store-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.store-item-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  background: var(--surface2);
}
.store-item h4 { font-size: 0.92rem; }
.store-item .meta { font-size: 0.78rem; color: var(--dim); text-transform: capitalize; }
.store-item .price { font-weight: 600; color: var(--accent3); font-size: 0.9rem; }
.store-item-actions { margin-top: auto; display: flex; gap: 6px; }

.cart-panel {
  position: sticky;
  top: calc(var(--nav-h) + 16px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.cart-panel h3 { font-size: 1rem; margin-bottom: 14px; }
.cart-empty { color: var(--dim); font-size: 0.88rem; }
.cart-line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.85rem;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.cart-line button {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 0.75rem;
}
.cart-total {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.gift-block {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.gift-block label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  cursor: pointer;
  margin-bottom: 10px;
}
.gift-fields { display: none; flex-direction: column; gap: 8px; }
.gift-fields.open { display: flex; }
.gift-fields input, .gift-fields textarea {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font-family: inherit;
  font-size: 0.85rem;
}
.gift-fields textarea { min-height: 60px; resize: vertical; }

.store-notice {
  background: rgba(124, 108, 240, 0.12);
  border: 1px solid rgba(124, 108, 240, 0.35);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 24px;
  font-size: 0.9rem;
  color: #c4b8ff;
}

/* ── Modal ── */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal[hidden] { display: none; }
.login-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.65);
}
.modal-card {
  position: relative;
  width: min(420px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}
.modal-card h2 {
  font-family: Literata, serif;
  font-size: 1.35rem;
  margin-bottom: 6px;
}
.modal-card .sub { color: var(--dim); font-size: 0.88rem; margin-bottom: 20px; }
.form-field { margin-bottom: 14px; }
.form-field label {
  display: block;
  font-size: 0.82rem;
  color: var(--dim);
  margin-bottom: 5px;
}
.form-field input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font-family: inherit;
}
.form-error { color: var(--accent); font-size: 0.85rem; margin-top: 10px; min-height: 1.2em; }
.modal-actions { display: flex; gap: 10px; margin-top: 18px; }

footer {
  padding: 40px 0 60px;
  text-align: center;
  color: var(--dim);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
  margin-top: 40px;
}
footer a { color: var(--accent2); }
.version { margin-top: 8px; font-size: 0.78rem; }
