:root {
  --bg: #0b0c10; --card: #15171e; --ink: #eef1f6; --muted: #9aa3b2;
  --accent: #6c5ce7; --accent2: #00d1b2; --line: #262a35;
}
* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
a { color: inherit; text-decoration: none; }
.muted { color: var(--muted); }

/* topbar */
.topbar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center;
  justify-content: space-between; padding: 14px 22px;
  background: rgba(11,12,16,.85); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { font-weight: 800; letter-spacing: .3px; color: var(--accent2); text-transform: uppercase; font-size: 15px; }
.wallet { display: flex; align-items: center; gap: 10px; }
.wlabel { color: var(--muted); font-size: 13px; }
button.ghost {
  padding: 9px 14px; border: 1px solid var(--line); border-radius: 10px;
  background: #1b1e27; color: var(--ink); cursor: pointer; font-size: 14px;
}
button.ghost:hover { border-color: var(--accent); }

/* hero */
.hero { padding: 40px 22px 10px; max-width: 1080px; margin: 0 auto; }
.hero h1 { font-size: 30px; margin: 0 0 6px; }
.hero p { color: var(--muted); margin: 0; }

/* feed grid */
.grid {
  max-width: 1080px; margin: 0 auto; padding: 20px 22px 60px;
  display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}
.tile {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  overflow: hidden; cursor: pointer; transition: transform .08s, border-color .2s;
}
.tile:hover { transform: translateY(-2px); border-color: var(--accent); }
.thumb { position: relative; aspect-ratio: 4/3; background: #0f1117; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb.locked img { filter: blur(14px) brightness(.6); transform: scale(1.1); }
.lockbadge {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 30px; pointer-events: none;
}
.unlockbadge {
  position: absolute; top: 8px; right: 8px; background: var(--accent2); color: #06231f;
  font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px;
}
.tmeta { padding: 12px 14px 14px; }
.tcreator { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.tcreator img { width: 24px; height: 24px; border-radius: 50%; background: #222; }
.tcreator span { font-size: 13px; color: var(--muted); }
.ttitle { font-weight: 600; font-size: 15px; }
.tprice { margin-top: 6px; font-size: 13px; color: var(--accent2); font-weight: 600; }

/* creator header */
.chead { max-width: 1080px; margin: 0 auto; padding: 34px 22px 6px; display: flex; gap: 18px; align-items: center; }
.chead img { width: 76px; height: 76px; border-radius: 50%; background: #222; }
.chead h1 { margin: 0; font-size: 24px; }
.chead p { margin: 4px 0 0; color: var(--muted); }

/* modal */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: grid; place-items: center; z-index: 50; padding: 20px; }
.sheet {
  position: relative; width: 100%; max-width: 520px; background: var(--card);
  border: 1px solid var(--line); border-radius: 18px; padding: 26px;
  box-shadow: 0 30px 80px rgba(0,0,0,.5); max-height: 88vh; overflow: auto;
}
.sheet.sm { max-width: 380px; }
.x { position: absolute; top: 10px; right: 14px; background: none; border: 0; color: var(--muted); font-size: 26px; cursor: pointer; }
.sheet h2 { margin-top: 4px; }
.sheet .price { font-size: 18px; font-weight: 600; margin: 14px 0; }
.sheet .price span { color: var(--accent2); }
button.primary {
  width: 100%; padding: 14px 18px; border: 0; border-radius: 12px; margin-top: 8px;
  background: linear-gradient(135deg, var(--accent), #8e7bff);
  color: #fff; font-size: 16px; font-weight: 600; cursor: pointer;
}
button.primary:disabled { opacity: .5; cursor: not-allowed; }
.status { color: var(--muted); font-size: 14px; min-height: 20px; margin-top: 12px; }
.status.err { color: #ff6b6b; } .status.ok { color: var(--accent2); }
.preview-lg { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 12px; }
.preview-lg.locked { filter: blur(16px) brightness(.6); }

/* wallet picker list */
.wallets { display: grid; gap: 8px; margin: 14px 0 4px; }
.wallets button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 12px; background: #1b1e27;
  color: var(--ink); cursor: pointer; font-size: 15px;
}
.wallets button:hover { border-color: var(--accent); }
.wallets img { width: 22px; height: 22px; border-radius: 6px; }
.sm-note { font-size: 12px; margin: 8px 0 0; }

.navlink { color: var(--muted); font-size: 14px; padding: 8px 6px; }
.navlink:hover { color: var(--accent2); }
#upForm input { width: 100%; margin: 6px 0; padding: 11px 12px; border: 1px solid var(--line);
  border-radius: 10px; background: #1b1e27; color: var(--ink); font-size: 14px; }
#upForm input[type=file] { padding: 8px; }
.flbl { display: block; font-size: 12px; color: var(--muted); margin-top: 10px; }
#upForm button { margin-top: 12px; }

.foot { color: var(--muted); font-size: 12px; text-align: center; padding: 30px 0 40px; border-top: 1px solid var(--line); }
/* age gate */
.agegate { position: fixed; inset: 0; z-index: 100; background: rgba(8,9,12,.97);
  display: grid; place-items: center; padding: 24px; }
.agebox { max-width: 440px; background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; padding: 32px; text-align: center; }
.agebox h2 { margin: 14px 0 8px; }
.agebox .brand { color: var(--accent2); }

/* compliance chips in dashboard */
.chip { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 9px;
  border-radius: 999px; }
.chip.ok { background: var(--accent2); color: #06231f; }
.chip.warn { background: #4a3a12; color: #ffcf6b; }
.chip.bad { background: #4a1620; color: #ff8b9a; }

.hidden { display: none !important; }
