:root {
  --bg: #0a0a0b;
  --panel: #111113;
  --panel-2: #161619;
  --text: #f2f2f3;
  --muted: #a3a3aa;
  --border: #27272c;
  --accent: #8b5cf6;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
  background: #0c0c0f;
  position: sticky;
  top: 0;
}

.logo {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.3px;
}

nav a {
  color: var(--muted);
  margin: 0 10px;
  text-decoration: none;
  font-size: 0.95rem;
}

nav a:hover { color: var(--text); }

.page {
  max-width: 980px;
  margin: 26px auto;
  padding: 0 14px;
}

.hero,
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.hero { padding: 28px; }
.hero h1 { margin-top: 0; font-weight: 600; }
.hero p { color: var(--muted); }

.btn {
  display: inline-block;
  padding: 9px 13px;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 500;
  margin-right: 8px;
  border: 1px solid var(--accent);
  color: #e9e0ff;
  background: transparent;
}

.btn.secondary {
  border-color: var(--border);
  color: var(--text);
}

.panel {
  padding: 14px;
  margin-bottom: 12px;
}

.form label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.95rem;
}

input,
textarea,
select,
button {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
}

button {
  background: #121216;
  border: 1px solid var(--accent);
  color: #efe7ff;
  font-weight: 500;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

img,
iframe {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  max-height: 320px;
  object-fit: cover;
  background: #0f0f12;
}

.site-footer {
  padding: 26px;
  text-align: center;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

.account-menu { position: relative; }

.avatar-button {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--accent);
  background: #131118;
}

.avatar-button img {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  border: 0;
}

.dropdown {
  position: absolute;
  right: 0;
  top: 50px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  min-width: 190px;
  z-index: 10;
}

.dropdown a {
  display: block;
  color: var(--text);
  text-decoration: none;
  padding: 6px 0;
}

.dropdown a:hover { color: #d9c9ff; }

.hidden { display: none; }
.error { color: #f2b2b2; }
code { color: #d9c9ff; }


.hint { color: var(--muted); font-size: 0.92rem; }
.eyebrow { color: #d9c9ff; text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.78rem; }
.market-hero { border-bottom: 1px solid var(--border); margin-bottom: 18px; padding-bottom: 18px; }
.market-hero h1 { max-width: 720px; font-size: clamp(2rem, 5vw, 4rem); line-height: 1; margin: 0 0 12px; }
.marketplace-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.listing-card { display: flex; flex-direction: column; gap: 10px; }
.listing-cover { min-height: 180px; border: 1px solid var(--border); border-radius: 8px; display: grid; place-items: center; color: var(--muted); text-decoration: none; background: #0f0f12; overflow: hidden; }
.listing-cover img, .listing-card > img { height: 190px; max-height: 190px; object-fit: cover; }
.listing-meta { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 0.85rem; }
.listing-meta span { border: 1px solid var(--border); border-radius: 999px; padding: 3px 8px; }
.inline-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline-actions form { margin: 0; }
.inline-actions button, .inline-actions .btn { width: auto; margin: 0; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.tabs a { color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 7px 10px; text-decoration: none; }
.tabs a.active, .tabs a:hover { color: var(--text); border-color: var(--accent); }
.feed-list { display: grid; gap: 14px; }
.post-card { max-width: 760px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; }
.photo-grid img { height: 180px; max-height: 180px; object-fit: cover; }
.compact-form { margin-top: 10px; border-top: 1px solid var(--border); padding-top: 10px; }
.listing-detail iframe, .unlock-box iframe { min-height: 560px; max-height: none; }
.unlock-box { margin-top: 18px; border-top: 1px solid var(--border); padding-top: 14px; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stats-grid .panel strong { display: block; font-size: 1.8rem; }
.stats-grid .panel span { color: var(--muted); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { border-bottom: 1px solid var(--border); padding: 10px; text-align: left; vertical-align: top; }
hr { border: 0; border-top: 1px solid var(--border); margin: 18px 0; }
.photo-thumb {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: zoom-in;
}
.photo-thumb img { display: block; }
.photo-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: minmax(44px, 72px) minmax(0, 1fr) minmax(44px, 72px);
  grid-template-rows: 1fr auto;
  gap: 12px;
  align-items: center;
  justify-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.9);
}
.photo-modal.hidden { display: none; }
.photo-modal img {
  grid-column: 2;
  max-width: min(1100px, 100%);
  max-height: 84vh;
  object-fit: contain;
  border-color: var(--accent);
}
.photo-modal-close,
.photo-modal-prev,
.photo-modal-next {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  background: rgba(17, 17, 19, 0.95);
}
.photo-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
}
.photo-modal-prev { grid-column: 1; }
.photo-modal-next { grid-column: 3; }
.photo-modal-count {
  grid-column: 1 / -1;
  color: var(--muted);
  margin: 0;
}
