/* Musebox prelander — visual tokens mirror client/src/styles/globals.css */
:root {
  --bg: #0a0b0c;
  --card: #111214;
  --elevated: #1a1b1e;
  --input: #242528;
  --border: #26272b;
  --fg: #f0f0f0;
  --muted: #a0a0a0;
  --dim: #666666;
  --accent: #4361ee;
  --accent-hover: #3a56d4;
  --accent-light: #5b7bf7;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { color-scheme: dark; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
a { color: inherit; text-decoration: none; cursor: pointer; }
svg { display: block; }

/* ---------- Header ---------- */
.header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 40;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo { width: 32px; height: 32px; border-radius: 8px; }
.brand-name { font-size: 18px; font-weight: 700; }
.header-right { display: flex; align-items: center; gap: 10px; }
.credits-badge {
  display: flex; align-items: center; gap: 6px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 6px 14px;
  font-weight: 600; font-size: 14px;
  background: rgba(67, 97, 238, 0.08);
}
.star-ico { width: 14px; height: 14px; color: #ffd23e; }
.avatar-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--elevated);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
}
.avatar-ico { width: 18px; height: 18px; color: var(--muted); }

/* ---------- Layout ---------- */
.main { width: 100%; max-width: 720px; margin: 0 auto; padding: 20px 14px 40px; flex: 1; }

/* ---------- Inline AD banner ---------- */
.ad-banner {
  position: relative;
  display: flex;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(105deg, #0d1526 0%, #101a30 55%, #0b1322 100%);
  border: 1px solid #1c2740;
  cursor: pointer;
  min-height: 130px;
}
.ad-banner-text { padding: 16px 20px; flex: 1; z-index: 2; }
.ad-label { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; color: var(--accent-light); }
.ad-banner-text h3 { font-size: 19px; font-weight: 700; margin-top: 6px; }
.ad-banner-text p { font-size: 13px; color: var(--muted); margin-top: 4px; }
.dot { margin: 0 4px; }
.btn-try {
  margin-top: 12px;
  background: rgba(91, 123, 247, 0.25);
  border: 1px solid var(--accent-light);
  color: #cdd9ff;
  font-weight: 700; font-size: 13px; letter-spacing: 0.04em;
  padding: 8px 18px; border-radius: 999px;
}
.chev { margin-left: 4px; }
.ad-banner-media { width: 42%; position: relative; }
.ad-banner-media video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 30%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 30%);
}

/* ---------- Hero ---------- */
.hero { margin: 26px 2px 18px; }
.hero-kicker { color: var(--accent-light); font-size: 17px; font-weight: 500; }
.hero h1 { font-size: 34px; font-weight: 800; margin-top: 2px; }

/* ---------- Generator ---------- */
.tabs {
  display: flex; gap: 6px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
}
.tab {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 0;
  border-radius: 999px;
  font-weight: 600; font-size: 14px;
  color: var(--muted);
}
.tab svg { width: 16px; height: 16px; }
.tab.active { background: var(--accent); color: #fff; }
.prompt-box {
  margin-top: 12px;
  background: var(--card);
  border: 1px solid #2a3a6e;
  border-radius: 14px;
  padding: 12px 14px 10px;
  box-shadow: 0 0 24px rgba(67, 97, 238, 0.12);
}
#prompt {
  width: 100%; resize: none; background: none; border: none; outline: none;
  color: var(--fg); font: inherit; font-size: 14px;
}
#prompt::placeholder { color: var(--dim); }
.prompt-tools { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.prompt-icons { display: flex; gap: 8px; }
.ico-btn {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--elevated);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
}
.ico-btn svg { width: 15px; height: 15px; }
.undress-chip {
  display: flex; align-items: center; gap: 7px;
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px; font-weight: 600;
}
.undress-chip svg { width: 14px; height: 14px; }
.undress-chip sup { font-size: 9px; color: var(--dim); }
.btn-generate {
  margin-top: 12px;
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(135deg, #4361ee 0%, #5b7bf7 100%);
  border-radius: 12px;
  padding: 14px 0;
  font-weight: 600; font-size: 15px; color: #fff;
  transition: filter 0.15s;
}
.btn-generate:hover { filter: brightness(1.1); }

/* ---------- Nav + filters ---------- */
.site-nav { display: flex; gap: 22px; margin: 30px 2px 0; border-bottom: 1px solid var(--border); padding-bottom: 10px; }
.nav-link { font-weight: 600; font-size: 15px; color: var(--muted); position: relative; }
.nav-link.active { color: var(--fg); }
.nav-pill {
  margin-left: 6px;
  background: linear-gradient(90deg, #f5576c, #f39c3d);
  color: #fff; font-size: 10px; font-weight: 700;
  border-radius: 999px; padding: 2px 7px;
  vertical-align: 2px;
}
.filter-bar { display: flex; gap: 8px; margin-top: 14px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.filter-bar::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0;
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px; font-weight: 600;
  color: var(--muted);
}
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip-ico { padding: 8px 10px; }
.chip-ico svg { width: 15px; height: 15px; }

/* ---------- Grid ---------- */
.grid { columns: 2; column-gap: 8px; margin-top: 14px; }
@media (min-width: 560px) { .grid { columns: 3; } }
.card {
  position: relative;
  break-inside: avoid;
  margin-bottom: 8px;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  background: var(--card);
}
.card img { width: 100%; display: block; }
.card video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; transition: opacity 0.25s;
}
.card video.playing { opacity: 1; }
.card-overlay {
  position: absolute; inset: auto 0 0 0;
  padding: 26px 10px 9px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.82));
  z-index: 2;
}
.card-name { font-size: 13px; font-weight: 700; line-height: 1.25; }
.card-author { font-size: 11px; color: var(--muted); margin-top: 2px; }
.card-badges { position: absolute; top: 8px; left: 8px; display: flex; gap: 5px; z-index: 2; }
.badge {
  background: rgba(67, 97, 238, 0.9);
  color: #fff; font-size: 9px; font-weight: 700; letter-spacing: 0.04em;
  border-radius: 5px; padding: 3px 6px;
  text-transform: uppercase;
}
.card-gen {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  background: rgba(67, 97, 238, 0.95);
  color: #fff; font-weight: 700; font-size: 13px;
  border-radius: 999px; padding: 9px 22px;
  opacity: 0; transition: opacity 0.15s;
  z-index: 3;
}
.card:hover .card-gen { opacity: 1; }

/* ---------- Pagination ---------- */
.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 22px; }
.page {
  min-width: 34px; height: 34px; border-radius: 8px;
  background: var(--elevated);
  border: 1px solid var(--border);
  font-size: 13px; font-weight: 600; color: var(--muted);
}
.page.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.page-dots { color: var(--dim); }

/* ---------- Footer ---------- */
.footer {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px;
  padding: 24px 16px;
  font-size: 12px; color: var(--dim);
}
.footer a:hover { color: var(--muted); }

/* ---------- Overlays / modals ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.overlay.hidden { display: none; }

/* AD modal card */
.ad-card {
  position: relative;
  width: min(92vw, 360px);
  aspect-ratio: 10 / 13;
  max-height: 82vh;
  border-radius: 22px;
  overflow: hidden;
  background: var(--card);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  cursor: pointer;
}
.ad-card video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ad-card-top {
  position: absolute; inset: 0 0 auto 0;
  padding: 12px 14px 40px;
  background: linear-gradient(rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.55) 55%, transparent);
}
.ad-card-bar { display: flex; align-items: center; justify-content: space-between; }
.x-btn { color: var(--accent-light); padding: 4px; margin: -4px; }
.x-btn svg { width: 16px; height: 16px; }
.x-btn:hover { color: #fff; }
.ad-card-top h2 { text-align: center; font-size: 21px; font-weight: 800; margin-top: 8px; }
.ad-card-top p { text-align: center; font-size: 14px; color: #cfcfcf; margin-top: 5px; }
.ad-card-cta { position: absolute; inset: auto 0 24px 0; display: flex; justify-content: center; }
.btn-cta {
  background: var(--accent-light);
  color: #fff; font-weight: 700; font-size: 14px; letter-spacing: 0.05em;
  border-radius: 999px;
  padding: 14px 38px;
  box-shadow: 0 8px 28px rgba(67, 97, 238, 0.45);
  transition: filter 0.15s;
}
.btn-cta:hover { filter: brightness(1.08); }

/* Sign-up modal */
.auth-card {
  position: relative;
  width: min(92vw, 400px);
  background: #0d0e10;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px 26px 22px;
}
.auth-x { position: absolute; top: 16px; right: 16px; color: var(--muted); }
.auth-brand { display: flex; align-items: center; justify-content: center; gap: 10px; }
.auth-brand img { width: 34px; height: 34px; border-radius: 8px; }
.auth-brand span { font-size: 20px; font-weight: 800; }
.auth-card h3 { text-align: center; font-size: 17px; font-weight: 600; margin: 16px 0 18px; }
.btn-social {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  border-radius: 999px;
  padding: 12px 0;
  font-weight: 600; font-size: 14px;
  margin-bottom: 10px;
  transition: filter 0.15s;
}
.btn-social:hover { filter: brightness(1.08); }
.btn-social svg { width: 18px; height: 18px; }
.btn-telegram { background: #54a9eb; color: #fff; }
.btn-google { background: #fff; color: #1a1a1a; }
.btn-discord { background: #5865f2; color: #fff; }
.auth-divider {
  display: flex; align-items: center; gap: 12px;
  color: var(--dim); font-size: 13px;
  margin: 14px 0;
}
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
#signup-email {
  width: 100%;
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 14px;
  color: var(--fg); font: inherit; font-size: 14px;
  outline: none;
}
#signup-email:focus { border-color: var(--accent); }
#signup-email::placeholder { color: var(--dim); }
.btn-email {
  width: 100%;
  margin-top: 12px;
  background: #fff; color: #111;
  font-weight: 700; font-size: 14px;
  border-radius: 999px;
  padding: 13px 0;
  transition: filter 0.15s;
}
.btn-email:hover { filter: brightness(0.92); }
.auth-terms { text-align: center; font-size: 11px; color: var(--dim); margin-top: 14px; }
.auth-terms a { text-decoration: underline; }

@media (max-width: 480px) {
  .hero h1 { font-size: 26px; }
  .ad-banner-media { width: 36%; }
}
