/* =========================================================================
   larpbin.net — black theme
   Layout: sticky footer via flex column body; header/main/footer stack.
   ========================================================================= */

:root {
  --bg: #060606;
  --bg-alt: #0a0a0a;
  --panel: #101010;
  --panel-2: #161616;
  --panel-3: #1e1e1e;
  --border: #262626;
  --border-soft: #1a1a1a;

  --accent: #eeeeee;
  --accent-bright: #ffffff;
  --accent-dim: #a8a8a8;
  --accent-soft: #161616;

  --danger: #e5484d;
  --danger-bright: #ff6b70;
  --success: #2fbf6f;
  --warn: #e0b93d;

  --text: #ededed;
  --text-dim: #9a9a9a;
  --text-faint: #666666;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow-1: 0 1px 2px rgba(0,0,0,.5);
  --shadow-2: 0 12px 32px rgba(0,0,0,.55);

  --font: 'Google Sans Flex Variable', 'Google Sans Flex', 'Google Sans', Roboto, system-ui, -apple-system, sans-serif;
  --font-mono: 'Courier New', Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* ---------- sticky footer skeleton ---------- */
html, body { height: 100%; }
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background:
    radial-gradient(900px 480px at 50% -14%, rgba(255,255,255,0.045), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  margin: 0;
  line-height: 1.6;
  opacity: 0;
  transition: opacity .25s ease;
  -webkit-font-smoothing: antialiased;
}
body.js-ready { opacity: 1; }

a { color: var(--text-dim); text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 3px; transition: color .15s ease, text-decoration-color .15s ease; }
a:hover { color: var(--text); text-decoration-color: var(--text-dim); }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; width: 100%; }

::selection { background: rgba(255,255,255,.18); color: #fff; }

/* ---------- header / nav ---------- */
.site-header {
  background: rgba(6, 6, 6, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
  position: sticky;
  top: 0;
  z-index: 40;
}
.site-header .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  gap: 12px;
}
.logo {
  font-size: 1.3em;
  font-weight: 700;
  color: var(--text);
  letter-spacing: .1px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  text-decoration: none;
}
.logo:hover { text-decoration: none; color: var(--text); }
.logo span { color: var(--text-dim); font-weight: 500; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 1.1em;
  cursor: pointer;
}

nav { display: flex; align-items: center; gap: 4px; }
nav a {
  color: var(--text-dim);
  border: 1px solid transparent;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.92em;
  font-weight: 500;
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .1s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
nav a:hover { background: var(--panel-2); border-color: var(--border); color: var(--text); text-decoration: none; }
nav a:active { transform: scale(0.97); }
nav a.nav-cta {
  background: var(--accent);
  color: #0a0a0a;
  font-weight: 700;
}
nav a.nav-cta:hover { background: var(--accent-bright); color: #000; }

.nav-pill {
  background: var(--danger);
  color: #fff;
  font-size: .72em;
  font-weight: 800;
  line-height: 1;
  padding: 3px 6px;
  border-radius: 999px;
  min-width: 16px;
  text-align: center;
}

@media (max-width: 760px) {
  .nav-toggle { display: inline-block; }
  nav {
    display: none;
    position: absolute;
    right: 20px;
    left: 20px;
    top: 62px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    flex-direction: column;
    align-items: stretch;
    padding: 8px;
    box-shadow: var(--shadow-2);
  }
  nav.open { display: flex; }
  nav a { width: 100%; }
}

/* ---------- main / headings ---------- */
main { padding: 32px 0 56px; flex: 1 0 auto; width: 100%; }

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
  flex-wrap: wrap;
}

h1, h2, h3 { color: var(--text); font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 1.55em; margin: 0 0 6px; }
h2 { font-size: 1.15em; margin: 0 0 14px; }
h3 { font-size: 1.02em; }

/* ---------- search bar (homepage) ---------- */
.search-bar { margin-bottom: 18px; }
.search-bar input {
  margin-bottom: 0;
  background: var(--panel);
}

/* ---------- panels & forms ---------- */
.panel {
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-1);
}
.form-panel { max-width: 480px; }
.empty-state { text-align: center; padding: 48px 20px; }

.danger-zone { border-color: #3a1e20; background: #120c0d; }

.table-scroll { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
table.paste-list { width: 100%; border-collapse: collapse; }
table.paste-list th, table.paste-list td {
  text-align: left;
  padding: 10px 10px;
  border-bottom: 1px solid var(--border-soft);
  white-space: nowrap;
}
table.paste-list th { color: var(--text-faint); font-weight: 600; font-size: 0.78em; text-transform: uppercase; letter-spacing: .06em; }
table.paste-list tr:last-child td { border-bottom: none; }

label { color: var(--text-dim); font-size: 0.85em; font-weight: 500; display: block; margin-bottom: 6px; margin-top: 2px; }

input[type=text], input[type=password], textarea, select {
  width: 100%;
  background: #0c0c0c;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 11px 13px;
  font-family: var(--font);
  font-size: 0.95em;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input[type=text]:focus, input[type=password]:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--text-dim);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.08);
}
input[type=file] {
  width: 100%;
  color: var(--text-dim);
  margin-bottom: 16px;
  font-family: var(--font);
  font-size: 0.9em;
}
input[type=color] {
  width: 60px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: none;
  padding: 2px;
  margin-bottom: 6px;
  cursor: pointer;
}
input[type=color]:disabled,
input[type=color].is-locked {
  opacity: .35;
  filter: grayscale(1);
  cursor: not-allowed;
}
.color-lock-hint { margin-top: 0; margin-bottom: 16px; }

.captcha-input { max-width: 160px; }

textarea { min-height: 220px; resize: vertical; }
.char-counter { color: var(--text-faint); font-size: 0.78em; margin-top: -12px; margin-bottom: 14px; text-align: right; }
.char-counter.warn { color: var(--danger-bright); }

button, .btn, input[type=submit] {
  background: var(--accent);
  color: #0a0a0a;
  border: none;
  padding: 11px 20px;
  font-family: var(--font);
  font-weight: 700;
  cursor: pointer;
  border-radius: var(--radius-sm);
  font-size: 0.95em;
  text-decoration: none;
  transition: background .15s ease, transform .1s ease, box-shadow .15s ease;
  display: inline-block;
  box-shadow: 0 4px 14px rgba(0,0,0,.4);
}
button:hover, .btn:hover, input[type=submit]:hover { background: var(--accent-bright); color: #000; text-decoration: none; }
button:active, .btn:active { transform: scale(0.97); }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  box-shadow: none;
  text-decoration: none;
}
.btn-ghost:hover { background: var(--panel-2); border-color: var(--text-dim); color: var(--text); text-decoration: none; }

.btn-danger { background: rgba(229,72,77,.12); color: #ffb3b5; border: 1px solid rgba(229,72,77,.35); box-shadow: none; }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-sm { padding: 4px 11px; font-size: 0.8em; box-shadow: none; }

/* ---------- paste cards (whole card clickable) ---------- */
.paste-grid { display: flex; flex-direction: column; gap: 12px; }

.paste-card {
  --accent-c: #7a7a7a;
  display: block;
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--accent, var(--accent-c));
  border-radius: var(--radius);
  padding: 18px 20px;
  color: var(--text);
  text-decoration: none;
  transition: transform .12s ease, border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.paste-card:hover {
  text-decoration: none;
  transform: translateY(-2px);
  background: var(--panel-2);
  border-color: var(--border);
  box-shadow: var(--shadow-2);
}
.paste-card-pinned { background: linear-gradient(180deg, #141414, var(--panel) 60%); }
.pin-icon { font-size: .82em; filter: saturate(1.3); }
.paste-card-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.paste-card-top h3 { margin: 0 0 8px; font-size: 1.08em; color: var(--text); }
.paste-snippet { margin: 0 0 12px; color: var(--text-dim); font-size: 0.9em; }
.paste-card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.paste-card-right { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.view-count { white-space: nowrap; }

.author-chip { display: inline-flex; align-items: center; gap: 6px; color: var(--accent, var(--text-dim)); font-weight: 600; font-size: 0.88em; text-decoration: none; }
.mini-avatar { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }

.paste-detail { border-left: 3px solid var(--accent, var(--border)); }
.paste-detail-head h1 { display: flex; align-items: center; gap: 8px; }
.author-link { display: inline-flex; align-items: center; gap: 6px; color: var(--accent, var(--text)); font-weight: 600; text-decoration: none; }
.author-link:hover { text-decoration: underline; }

.paste-actions { display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

pre.paste-body {
  white-space: pre-wrap;
  word-wrap: break-word;
  background: #050505;
  border: 1px solid var(--border-soft);
  padding: 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.92em;
}

.meta { color: var(--text-dim); font-size: 0.85em; }

/* ---------- badges ---------- */
.badges { display: inline-flex; gap: 5px; flex-wrap: wrap; margin-left: 4px; }
.badge {
  display: inline-block;
  font-size: 0.66em;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 2px 7px;
  border-radius: 5px;
  text-transform: uppercase;
  vertical-align: middle;
}
.badge-admin { background: #2a2a2a; color: #f5f5f5; }
.badge-god { background: #2a1c3d; color: #dcc4ff; }
.badge-mvp { background: #3d1618; color: #ff9a9d; }
.badge-vip { background: #3a2e0c; color: #ffd873; }
.badge-early { background: #14202b; color: #9fd6ff; }
.badge-first1k { background: #0f2a20; color: #8fffb0; }
.badge-active { background: #1a1a1a; color: #d6d6d6; }

.rank-pill {
  display: inline-block;
  font-size: .78em;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 999px;
  text-transform: capitalize;
  background: var(--panel-3);
  color: var(--text-dim);
}
.rank-pill-admin { background: #2a2a2a; color: #f5f5f5; }
.rank-pill-god { background: #2a1c3d; color: #dcc4ff; }
.rank-pill-mvp { background: #3d1618; color: #ff9a9d; }
.rank-pill-vip { background: #3a2e0c; color: #ffd873; }

/* ---------- rank accent flavour (profile card / paste borders / usernames) ---------- */
.rank-admin.profile-card, .rank-admin.paste-card, .rank-admin.paste-detail { border-color: #3a3a3a; }

/* ---------- comments ---------- */
.comment { --accent-c: #555; border-top: 1px solid var(--border-soft); padding: 16px 0; border-left: 2px solid var(--accent, var(--accent-c)); padding-left: 14px; margin-left: -14px; scroll-margin-top: 90px; }
.comment:first-of-type { border-top: none; }
.comment .meta { margin-bottom: 8px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.comment-text { color: var(--text); }
.comment:target { background: var(--accent-soft); border-radius: var(--radius-sm); padding: 14px; margin-left: 0; }

/* ---------- report system (native <details>, no JS required) ---------- */
.report-details { display: inline-block; position: relative; }
.report-summary, .report-summary-sm {
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.report-summary::-webkit-details-marker, .report-summary-sm::-webkit-details-marker { display: none; }
.report-summary-sm {
  color: var(--text-faint);
  font-size: .85em;
  font-weight: 500;
}
.report-summary-sm:hover { color: var(--danger-bright); }
.report-details[open] .report-summary { background: var(--panel-2); border-color: var(--danger); color: var(--danger-bright); }
.report-form {
  margin-top: 10px;
  padding: 14px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  max-width: 360px;
}
.report-form textarea { min-height: 70px; margin-bottom: 10px; }
.report-details-inline { display: block; margin-top: 8px; }

.report-queue { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.report-row {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--danger);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.report-row-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.report-type-badge {
  font-size: .68em;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 2px 8px;
  border-radius: 5px;
  background: var(--panel-3);
  color: var(--text-dim);
}
.report-type-paste { background: #1a1a1a; color: #d6d6d6; }
.report-type-comment { background: #2a1c3d; color: #dcc4ff; }
.report-reason { margin: 0 0 10px; color: var(--text); white-space: pre-wrap; }
.report-row-actions { display: flex; gap: 8px; }

/* ---------- admin tabs ---------- */
.admin-tabs { display: flex; gap: 6px; margin-bottom: 18px; border-bottom: 1px solid var(--border-soft); }
.admin-tab {
  padding: 10px 16px;
  color: var(--text-dim);
  font-weight: 600;
  font-size: .92em;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.admin-tab:hover { color: var(--text); text-decoration: none; }
.admin-tab.active { color: var(--text); border-bottom-color: var(--text); }

/* ---------- profile ---------- */
.profile-card {
  --accent-c: #555;
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: var(--shadow-1);
}
.profile-banner {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent, var(--accent-c)) 30%, var(--panel-2)), var(--panel-2));
}
.profile-banner-blank { background: linear-gradient(135deg, color-mix(in srgb, var(--accent, var(--accent-c)) 30%, var(--panel-2)), var(--panel-2)); }
.profile-head {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin-top: -44px;
  padding: 0 20px;
}
.avatar {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--panel);
  background: var(--panel-2);
}
.avatar-blank {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8em;
  font-weight: 700;
  color: var(--accent, var(--accent-c));
  background: color-mix(in srgb, var(--accent, var(--accent-c)) 20%, var(--panel-2));
}
.profile-head-info { padding-bottom: 10px; }
.profile-head-info h1 { margin: 0 0 8px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.uid { color: var(--text-faint); font-size: 0.55em; font-weight: 500; }
.profile-body { padding: 18px 20px 22px; }
.profile-body .bio { white-space: pre-wrap; }
.profile-actions { margin-top: 14px; }

.upload-preview { max-width: 100%; margin-bottom: 14px; }
img.avatar.upload-preview { width: 86px; height: 86px; }
img.profile-banner.upload-preview { height: 150px; }

/* ---------- rules / tos page ---------- */
.rules-panel h2 { margin-top: 26px; font-size: 1.02em; color: var(--text); }
.rules-panel h2:first-of-type { margin-top: 10px; }
.rules-panel ul { margin: 0 0 6px; padding-left: 20px; color: var(--text); }
.rules-panel li { margin-bottom: 6px; }
.rules-panel p { color: var(--text); }

/* ---------- toasts ---------- */
.toast-host {
  position: fixed;
  bottom: 18px;
  right: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 100;
}
.toast {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--text-dim);
  color: var(--text);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-2);
  font-size: 0.9em;
  max-width: 320px;
  animation: toast-in .2s ease;
}
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger-bright); }
.toast.fade-out { animation: toast-out .2s ease forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }

.flash { padding: 11px 15px; border-radius: var(--radius-sm); margin-bottom: 16px; border: 1px solid var(--border); }
.flash.error { background: rgba(229,72,77,.1); border-color: var(--danger); }
.flash.success { background: rgba(47,191,111,.1); border-color: var(--success); }
.flash.info { background: var(--accent-soft); border-color: var(--border); }

/* ---------- modal ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}
.modal-backdrop[hidden] { display: none; }
.modal-box {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  max-width: 360px;
  width: 90%;
  box-shadow: var(--shadow-2);
  animation: toast-in .15s ease;
}
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.inline-form { display: inline; }
.hint { color: var(--text-dim); font-size: 0.85em; }

/* ---------- footer (sticky at bottom via flex column body) ---------- */
footer {
  flex-shrink: 0;
  border-top: 1px solid var(--border-soft);
  background: var(--bg-alt);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 18px 20px;
  color: var(--text-faint);
  font-size: 0.85em;
}
.footer-nav { display: flex; gap: 16px; }
.footer-nav a { color: var(--text-dim); text-decoration: none; }
.footer-nav a:hover { color: var(--text); text-decoration: underline; }
