:root {
  --bg: #0e0e10;
  --bg-2: #141417;
  --bg-card: #161619;
  --bg-card-hov: #1c1c20;
  --border: rgba(255,255,255,.07);
  --border-2: rgba(255,255,255,.12);
  --border-hov: rgba(255,255,255,.2);
  --text: #ededef;
  --text-2: rgba(255,255,255,.62);
  --muted: rgba(255,255,255,.4);
  --dim: rgba(255,255,255,.24);
  --accent: #7c6cf6;
  --accent-2: #9d8dff;
  --accent-dim: rgba(124,108,246,.14);
  --modrinth: #1bd96a;
  --curseforge: #f16436;
  --spigot: #ed8106;
  --r: 14px;
  --r-sm: 9px;
  --nav-h: 58px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
body::before {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(900px 500px at 50% -10%, rgba(124,108,246,.08), transparent 70%);
}
a { text-decoration: none; color: inherit; }
.icon { display: block; flex-shrink: 0; }
button { font-family: inherit; }
img { display: block; max-width: 100%; }

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center; gap: 4px;
  padding: 0 18px;
  background: rgba(14,14,16,.72);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
}
.nav-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px; font-weight: 500; letter-spacing: -.5px;
  margin-right: 22px; flex-shrink: 0; color: var(--text);
}
.nav-logo strong { font-weight: 700; color: var(--accent-2); }

/* On desktop the menu wrapper is transparent — its children (search, links,
   drawer-auth) participate directly in the nav flex layout. */
.nav-menu { display: contents; }
.nav-drawer-auth { display: none; }
.nav-scrim { display: none; }
.btn-block { display: none; }

.nav-burger {
  display: none; flex-direction: column; gap: 4px;
  width: 34px; height: 34px; padding: 8px 7px;
  background: transparent; border: 1px solid var(--border); border-radius: 8px;
  cursor: pointer; margin-left: auto;
}
.nav-burger span { height: 1.5px; background: var(--text-2); border-radius: 2px; transition: .2s; }

.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 6px;
  padding: 7px 11px; border-radius: 9px;
  font-size: 13px; color: var(--text-2);
  cursor: pointer; transition: color .14s, background .14s;
  white-space: nowrap; user-select: none;
}
.nav-item:hover, .nav-item.open { color: var(--text); background: rgba(255,255,255,.05); }
.nav-link-plain { text-decoration: none; }
.nav-item .arrow { transition: transform .2s; opacity: .55; }
.nav-item.open .arrow { transform: rotate(180deg); }

.nav-dropdown {
  position: absolute; top: calc(100% + 10px); left: 0;
  min-width: 200px; background: var(--bg-2);
  border: 1px solid var(--border-2); border-radius: 12px;
  padding: 7px; opacity: 0; pointer-events: none;
  transform: translateY(-6px) scale(.98); transform-origin: top left;
  transition: opacity .16s, transform .16s;
  box-shadow: 0 24px 50px -12px rgba(0,0,0,.6);
}
.nav-item.open .nav-dropdown { opacity: 1; pointer-events: auto; transform: translateY(0) scale(1); }
.nav-dropdown a {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 11px; border-radius: 8px;
  font-size: 13px; color: var(--text-2); transition: color .12s, background .12s;
}
.nav-dropdown a:hover { color: var(--text); background: rgba(255,255,255,.06); }
.nav-dropdown a .icon { color: var(--muted); }
.nav-dropdown a:hover .icon { color: var(--accent-2); }
.src-dot { width: 9px; height: 9px; border-radius: 3px; flex-shrink: 0; }
.src-dot.modrinth { background: var(--modrinth); }
.src-dot.curseforge { background: var(--curseforge); }
.src-dot.spigot { background: var(--spigot); }

.nav-search {
  position: relative; flex: 1; max-width: 380px; margin-left: 10px;
  display: flex; align-items: center;
}
.nav-search input {
  width: 100%; height: 36px;
  background: rgba(255,255,255,.04); border: 1px solid var(--border);
  border-radius: 9px; padding: 0 38px 0 36px;
  color: var(--text); font-family: inherit; font-size: 13px; outline: none;
  transition: border-color .15s, background .15s;
}
.nav-search input::placeholder { color: var(--dim); }
.nav-search input:focus { border-color: var(--border-hov); background: rgba(255,255,255,.06); }
.s-icon { position: absolute; left: 11px; color: var(--dim); pointer-events: none; display: flex; }
.kbd {
  position: absolute; right: 9px;
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  color: var(--dim); background: rgba(255,255,255,.05);
  border: 1px solid var(--border); border-radius: 5px; padding: 2px 6px;
}
.nav-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.lang-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 11px; border-radius: 100px;
  border: 1px solid var(--border); background: transparent;
  color: var(--text-2); font-size: 12px; cursor: pointer;
  transition: color .12s, border-color .12s; text-transform: uppercase; letter-spacing: .4px;
}
.lang-btn:hover { color: var(--text); border-color: var(--border-hov); }
.lang-btn .icon { color: var(--muted); }

.nav-discord {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 100px;
  border: 1px solid var(--border); color: var(--text-2);
  transition: color .14s, border-color .14s, background .14s;
}
.nav-discord:hover { color: #fff; border-color: #5865F2; background: #5865F2; }
.nav-discord .icon { display: block; }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 15px; border-radius: 100px;
  border: 1px solid var(--border-2); background: transparent;
  color: var(--text-2); font-size: 13px; cursor: pointer;
  transition: color .14s, border-color .14s, background .14s;
}
.btn-ghost:hover { color: var(--text); border-color: var(--border-hov); background: rgba(255,255,255,.03); }
.btn-primary {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 17px; border-radius: 100px;
  background: var(--accent); border: 1px solid var(--accent);
  color: #fff; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: background .14s, transform .1s;
}
.btn-primary:hover { background: var(--accent-2); }
.btn-primary:active { transform: scale(.97); }
.btn-lg { padding: 11px 20px; font-size: 14px; }
.btn-sm { padding: 6px 9px; }

/* ── MAIN ── */
main { position: relative; z-index: 1; padding-top: var(--nav-h); flex: 1 0 auto; width: 100%; }

/* ── HERO ── */
.hero { padding: 88px 24px 60px; max-width: 840px; margin: 0 auto; text-align: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 6px 16px; border-radius: 100px;
  flex-wrap: wrap; justify-content: center; max-width: 100%;
  border: 1px solid var(--border); background: var(--bg-card);
  font-size: 12.5px; margin-bottom: 26px; letter-spacing: .1px;
}
.hb-label { color: var(--muted); }
.hb-src { font-weight: 600; letter-spacing: .1px; }
.hb-src.modrinth { color: var(--modrinth); }
.hb-src.curseforge { color: var(--curseforge); }
.hb-src.spigot { color: var(--spigot); }
.hb-src.github { color: #c9c9d4; }
.hb-sep { color: var(--dim); }
.hero-h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(46px, 7vw, 88px); font-weight: 700;
  letter-spacing: -3px; line-height: .98; margin-bottom: 22px;
  display: flex; flex-direction: column; align-items: center;
}
.hero-h1 em {
  font-style: normal;
  background: linear-gradient(120deg, var(--accent-2), #c4b5fd);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-sub { font-size: 16px; color: var(--text-2); max-width: 460px; margin: 0 auto 34px; line-height: 1.65; }

.hero-search-wrap { position: relative; display: flex; align-items: center; max-width: 560px; margin: 0 auto 18px; }
.hero-search-wrap .hs-icon { position: absolute; left: 18px; color: var(--dim); pointer-events: none; display: flex; }
.hero-search-wrap input {
  flex: 1; height: 54px;
  background: var(--bg-card); border: 1px solid var(--border-2);
  border-radius: 100px; padding: 0 138px 0 50px;
  color: var(--text); font-family: inherit; font-size: 15px; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.hero-search-wrap input::placeholder { color: var(--dim); }
.hero-search-wrap input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-dim); }
.hero-search-wrap button {
  position: absolute; right: 7px; height: 42px; padding: 0 24px;
  background: var(--accent); color: #fff; border: none; border-radius: 100px;
  font-size: 13px; font-weight: 600; cursor: pointer; transition: background .14s;
}
.hero-search-wrap button:hover { background: var(--accent-2); }

.hero-tags { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.tags-label { font-size: 12px; color: var(--dim); }
.hero-tags a {
  font-size: 12px; color: var(--text-2); padding: 4px 12px;
  border: 1px solid var(--border); border-radius: 100px; transition: color .12s, border-color .12s, background .12s;
}
.hero-tags a:hover { color: var(--text); border-color: var(--border-hov); background: rgba(255,255,255,.03); }

/* ── STATS ── */
.section { max-width: 1120px; margin: 0 auto; padding: 0 24px 60px; }
.section.narrow { max-width: 760px; }
.stats-bar { display: flex; border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; background: var(--bg-card); }
.stat { flex: 1; padding: 22px 16px; text-align: center; border-right: 1px solid var(--border); }
.stat:last-child { border-right: none; }
.stat-n { display: block; font-family: 'Space Grotesk', sans-serif; font-size: 24px; font-weight: 600; letter-spacing: -.5px; }
.stat-l { display: block; font-size: 11px; color: var(--muted); margin-top: 4px; }

/* ── SECTION HEAD ── */
.sec-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.sec-head h2 { font-family: 'Space Grotesk', sans-serif; font-size: 18px; font-weight: 600; letter-spacing: -.4px; }
.sec-link { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--muted); transition: color .12s, gap .12s; }
.sec-link:hover { color: var(--accent-2); gap: 8px; }

/* ── CATEGORIES ── */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.cat-item {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r); padding: 20px 18px;
  display: flex; flex-direction: column; gap: 10px;
  transition: border-color .15s, transform .15s, background .15s;
}
.cat-item:hover { border-color: var(--border-hov); background: var(--bg-card-hov); transform: translateY(-3px); }
.cat-ico { color: var(--accent-2); display: flex; }
.cat-name { font-size: 14px; font-weight: 500; }
.cat-cnt { font-size: 12px; color: var(--dim); font-variant-numeric: tabular-nums; }

/* ── MOD GRID ── */
.mod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 10px; }
.mod-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r); padding: 17px;
  display: flex; flex-direction: column; gap: 12px;
  transition: border-color .15s, transform .15s, background .15s;
}
.mod-card:hover { border-color: var(--border-hov); background: var(--bg-card-hov); transform: translateY(-3px); }
.mc-top { display: flex; align-items: center; gap: 12px; }
.mc-icon {
  width: 44px; height: 44px; border-radius: 11px;
  border: 1px solid var(--border); background: rgba(255,255,255,.03);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  color: var(--accent-2); flex-shrink: 0;
}
.mc-icon img { width: 100%; height: 100%; object-fit: cover; }
.mc-meta { flex: 1; min-width: 0; }
.mc-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-type { font-size: 12px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-desc { font-size: 12.5px; color: var(--text-2); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 38px; }
.mc-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.mc-dl { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--dim); }
.mc-dl .icon { color: var(--muted); }

.badge {
  font-size: 10px; padding: 3px 8px; border-radius: 6px;
  font-family: 'JetBrains Mono', monospace; letter-spacing: .2px;
  border: 1px solid var(--border); color: var(--dim);
}
.badge.modrinth { border-color: rgba(27,217,106,.28); color: var(--modrinth); background: rgba(27,217,106,.08); }
.badge.curseforge { border-color: rgba(241,100,54,.28); color: var(--curseforge); background: rgba(241,100,54,.08); }
.badge.spigot { border-color: rgba(237,129,6,.28); color: var(--spigot); background: rgba(237,129,6,.08); }

/* ── CHANGELOG ── */
.cl-list { display: flex; flex-direction: column; gap: 8px; }
.cl-item {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 14px 18px; display: flex; align-items: center; gap: 15px;
  transition: border-color .15s, background .15s;
}
.cl-item:hover { border-color: var(--border-hov); background: var(--bg-card-hov); }
.cl-ico { color: var(--accent-2); flex-shrink: 0; display: flex; }
.cl-body { flex: 1; min-width: 0; }
.cl-title { font-size: 13.5px; font-weight: 500; }
.cl-sub { font-size: 12px; color: var(--dim); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex-shrink: 0; }
.cl-ver {
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  color: var(--accent-2); border: 1px solid rgba(124,108,246,.3);
  border-radius: 5px; padding: 2px 7px; background: var(--accent-dim);
}
.cl-date { font-size: 11px; color: var(--dim); }

/* ── SEARCH PAGE ── */
.search-main { min-height: 70vh; }
.search-hero { max-width: 900px; margin: 0 auto; padding: 36px 24px 0; }
.search-filters { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.fsel { position: relative; display: inline-flex; align-items: center; }
.fsel select {
  appearance: none; -webkit-appearance: none;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 100px; padding: 8px 34px 8px 15px;
  color: var(--text-2); font-family: inherit; font-size: 13px; cursor: pointer; outline: none;
  transition: border-color .14s, color .14s;
}
.fsel select:hover { border-color: var(--border-hov); color: var(--text); }
.fsel-arrow { position: absolute; right: 12px; color: var(--muted); pointer-events: none; display: flex; }

.search-body { max-width: 900px; margin: 0 auto; padding: 28px 24px 60px; }
.result-count { font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.result-list { display: flex; flex-direction: column; gap: 8px; }
.result-row {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r);
  padding: 16px; display: flex; align-items: flex-start; gap: 16px;
  transition: border-color .15s, background .15s;
}
.result-row:hover { border-color: var(--border-hov); background: var(--bg-card-hov); }
.rr-icon {
  width: 56px; height: 56px; border-radius: 12px; flex-shrink: 0;
  border: 1px solid var(--border); background: rgba(255,255,255,.03);
  display: flex; align-items: center; justify-content: center; overflow: hidden; color: var(--accent-2);
}
.rr-icon img { width: 100%; height: 100%; object-fit: cover; }
.rr-main { flex: 1; min-width: 0; }
.rr-head { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.rr-title { font-size: 15px; font-weight: 600; }
.rr-author { font-size: 12px; color: var(--dim); }
.rr-desc { font-size: 13px; color: var(--text-2); margin-top: 4px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rr-tags { display: flex; gap: 6px; margin-top: 9px; flex-wrap: wrap; }
.rr-tag {
  font-size: 11px; padding: 2px 9px; border-radius: 100px;
  border: 1px solid var(--border-2); color: var(--text-2);
}
.rr-tag.ghost { color: var(--dim); border-color: var(--border); }
.rr-stats { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; }
.rr-stat { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); }
.rr-stat .icon { color: var(--dim); }

.empty-state {
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  padding: 80px 20px; color: var(--dim); text-align: center;
}
.empty-state .icon { color: var(--border-hov); }
.empty-state p { font-size: 14px; color: var(--muted); }

/* ── MOD DETAIL ── */
.mod-main { max-width: 1000px; margin: 0 auto; padding: calc(var(--nav-h) + 32px) 24px 60px; }
.mod-header { display: flex; gap: 22px; align-items: flex-start; flex-wrap: wrap; }
.mh-icon {
  width: 84px; height: 84px; border-radius: 18px; flex-shrink: 0;
  border: 1px solid var(--border-2); background: rgba(255,255,255,.03);
  display: flex; align-items: center; justify-content: center; overflow: hidden; color: var(--accent-2);
}
.mh-icon img { width: 100%; height: 100%; object-fit: cover; }
.mh-info { flex: 1; min-width: 240px; }
.mh-info h1 { font-family: 'Space Grotesk', sans-serif; font-size: 30px; font-weight: 700; letter-spacing: -1px; }
.mh-desc { font-size: 15px; color: var(--text-2); margin-top: 8px; line-height: 1.55; }
.mh-stats { display: flex; gap: 20px; margin-top: 14px; flex-wrap: wrap; }
.mh-stat { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); }
.mh-stat strong { color: var(--text); font-weight: 600; }
.mh-stat .icon { color: var(--dim); }
.mh-actions { display: flex; flex-direction: column; gap: 10px; align-items: stretch; min-width: 200px; }
.mh-version { text-align: center; font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--dim); }

.mod-meta-bar { display: flex; gap: 7px; margin: 26px 0; flex-wrap: wrap; padding-bottom: 26px; border-bottom: 1px solid var(--border); }

.mod-grid-layout { display: grid; grid-template-columns: 1fr 260px; gap: 28px; }
.sec-h { display: flex; align-items: center; gap: 9px; font-family: 'Space Grotesk', sans-serif; font-size: 16px; font-weight: 600; margin-bottom: 16px; }
.sec-h .icon { color: var(--accent-2); }
.ver-list { display: flex; flex-direction: column; gap: 8px; }
.ver-row {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 14px 16px; display: flex; gap: 14px; align-items: flex-start;
  transition: border-color .15s;
}
.ver-row:hover { border-color: var(--border-hov); }
.ver-tag-col { flex-shrink: 0; }
.ver-type { font-size: 10px; padding: 3px 9px; border-radius: 100px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.ver-type.release { color: var(--modrinth); background: rgba(27,217,106,.1); border: 1px solid rgba(27,217,106,.25); }
.ver-type.beta { color: #f5a623; background: rgba(245,166,35,.1); border: 1px solid rgba(245,166,35,.25); }
.ver-type.alpha { color: var(--curseforge); background: rgba(241,100,54,.1); border: 1px solid rgba(241,100,54,.25); }
.ver-main { flex: 1; min-width: 0; }
.ver-name { font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 500; }
.ver-meta { font-size: 11.5px; color: var(--dim); margin-top: 3px; }
.ver-changelog { font-size: 12.5px; color: var(--text-2); margin-top: 8px; line-height: 1.5; }
.ver-dl { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; }
.ver-dl-count { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); }

.mod-side .side-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r); padding: 18px; }
.side-card h3 { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 12px; text-transform: uppercase; letter-spacing: .5px; }
.side-link { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 13px; color: var(--text-2); transition: color .12s; }
.side-link:hover { color: var(--accent-2); }
.side-link .icon { color: var(--muted); }

/* ── FOOTER ── */
footer {
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  background: var(--bg-2);
  position: relative; z-index: 1;
  width: 100%;
}
.ft-inner {
  max-width: 1120px; margin: 0 auto; padding: 48px 24px 32px;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px;
}
.ft-brand { max-width: 280px; }
.ft-logo { font-family: 'Space Grotesk', sans-serif; font-size: 19px; font-weight: 500; }
.ft-logo strong { font-weight: 700; color: var(--accent-2); }
.ft-tagline { font-size: 12.5px; color: var(--muted); margin-top: 10px; line-height: 1.6; }
.ft-col h4 {
  font-size: 11px; text-transform: uppercase; letter-spacing: .6px;
  color: var(--dim); font-weight: 600; margin-bottom: 14px;
}
.ft-col a { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 9px; transition: color .12s; }
.ft-col a:hover { color: var(--accent-2); }
.ft-bottom {
  border-top: 1px solid var(--border);
  max-width: 1120px; margin: 0 auto; padding: 18px 24px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}
.ft-copy { font-size: 12px; color: var(--dim); }
.ft-srcs { display: flex; gap: 14px; align-items: center; font-size: 11.5px; color: var(--dim); }
.ft-srcs span { display: inline-flex; align-items: center; gap: 5px; }
.ft-links { display: flex; gap: 22px; flex-wrap: wrap; }
.ft-links a { font-size: 13px; color: var(--dim); transition: color .12s; }
.ft-links a:hover { color: var(--text-2); }
.ft-copy { font-size: 12px; color: var(--dim); }

/* ── LANG MODAL ── */
.overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.6); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.overlay.open { opacity: 1; pointer-events: auto; }
.lang-box {
  background: var(--bg-2); border: 1px solid var(--border-2); border-radius: 18px;
  padding: 26px; width: 380px; max-width: 100%;
  transform: scale(.96); transition: transform .2s;
}
.overlay.open .lang-box { transform: scale(1); }
.lang-title { font-family: 'Space Grotesk', sans-serif; font-size: 16px; font-weight: 600; margin-bottom: 16px; }
.lang-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lang-opt {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 13px; border-radius: 10px;
  border: 1px solid var(--border); color: var(--text-2);
  font-size: 13px; cursor: pointer; transition: color .12s, border-color .12s, background .12s;
}
.lang-opt:hover { color: var(--text); border-color: var(--border-hov); background: rgba(255,255,255,.03); }
.lang-opt.active { color: var(--accent-2); border-color: rgba(124,108,246,.4); background: var(--accent-dim); }
.lang-code {
  font-family: 'JetBrains Mono', monospace; font-size: 10px; text-transform: uppercase;
  color: var(--dim); border: 1px solid var(--border); border-radius: 5px; padding: 2px 5px; min-width: 26px; text-align: center;
}
.lang-opt.active .lang-code { color: var(--accent-2); border-color: rgba(124,108,246,.4); }

/* ── SOURCE TABS (search) ── */
.source-tabs { display: flex; gap: 6px; margin-top: 16px; flex-wrap: wrap; }
.src-tab {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px; border-radius: 100px;
  border: 1px solid var(--border); background: var(--bg-card);
  color: var(--text-2); font-size: 13px; transition: color .14s, border-color .14s, background .14s;
}
.src-tab:hover { color: var(--text); border-color: var(--border-hov); }
.src-tab.active { color: var(--text); border-color: var(--accent); background: var(--accent-dim); }
.src-tab .icon { color: var(--muted); }
.src-tab.active .icon { color: var(--accent-2); }
.src-soon {
  font-size: 9px; text-transform: uppercase; letter-spacing: .5px;
  color: var(--dim); border: 1px solid var(--border-2); border-radius: 100px;
  padding: 1px 6px; font-weight: 600;
}
.rc-src { color: var(--modrinth); font-weight: 500; }
.es-title { font-size: 16px; font-weight: 600; color: var(--text) !important; }

/* ── LANG FLAGS ── */
.lang-flag { font-size: 15px; line-height: 1; }
.lang-up { text-transform: uppercase; letter-spacing: .4px; }
.lang-name { flex: 1; }
.lang-btn { gap: 7px; padding: 6px 12px; }

/* ── BREADCRUMB ── */
.breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--dim); margin-bottom: 22px; flex-wrap: wrap;
}
.breadcrumb a { color: var(--muted); transition: color .12s; }
.breadcrumb a:hover { color: var(--accent-2); }
.breadcrumb .icon { color: var(--dim); }
.breadcrumb span { color: var(--text-2); }

/* ══════════ RESPONSIVE ══════════ */

/* Tablet: collapse the mod detail two-column layout. */
@media (max-width: 860px) {
  .mod-grid-layout { grid-template-columns: 1fr; }
}

/* ── MOBILE NAV + DRAWER (≤900px) ── */
@media (max-width: 900px) {
  nav { padding: 0 14px; gap: 8px; }
  .nav-burger { display: flex; order: 3; margin-left: 0; }

  /* burger → X animation */
  .nav-burger span { transform-origin: center; }
  body.menu-open .nav-burger span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
  body.menu-open .nav-burger span:nth-child(2) { opacity: 0; }
  body.menu-open .nav-burger span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

  /* logo stays left, nav-right (discord/lang) stays before burger */
  .nav-logo { margin-right: 0; order: 1; }
  .nav-right { order: 2; margin-left: auto; gap: 8px; }

  /* the menu becomes a slide-in drawer from the right */
  .nav-menu {
    display: flex; flex-direction: column; align-items: stretch; gap: 6px;
    position: fixed; top: 0; right: 0; z-index: 120;
    width: min(86vw, 340px); height: 100dvh;
    padding: calc(var(--nav-h) + env(safe-area-inset-top, 0px) + 12px) 16px
             calc(env(safe-area-inset-bottom, 0px) + 20px);
    background: var(--bg-2); border-left: 1px solid var(--border-2);
    box-shadow: -24px 0 60px -20px rgba(0,0,0,.7);
    transform: translateX(102%); transition: transform .26s cubic-bezier(.4,0,.2,1);
    overflow-y: auto; overscroll-behavior: contain;
  }
  body.menu-open .nav-menu { transform: translateX(0); }

  /* dim scrim behind the drawer */
  .nav-scrim {
    display: block; position: fixed; inset: 0; z-index: 110;
    background: rgba(0,0,0,.5); opacity: 0; pointer-events: none;
    transition: opacity .26s; backdrop-filter: blur(2px);
  }
  body.menu-open .nav-scrim { opacity: 1; pointer-events: auto; }

  /* search shown at the top of the drawer (full width, no shortcut hint) */
  .nav-search-drawer { display: flex; max-width: none; flex: 0 0 auto; margin: 0 0 6px; order: -1; }
  .nav-search-drawer input { height: 42px; }
  .nav-search-drawer .kbd { display: none; }

  .nav-links { flex-direction: column; align-items: stretch; gap: 2px; width: 100%; }
  .nav-item {
    padding: 13px 14px; border-radius: 10px; font-size: 14.5px;
    justify-content: flex-start; width: 100%;
  }
  .nav-item .arrow { margin-left: auto; }

  /* dropdowns expand inline (accordion) instead of floating */
  .nav-dropdown {
    position: static; min-width: 0; opacity: 1; pointer-events: auto;
    transform: none; box-shadow: none; border: none; background: transparent;
    padding: 2px 0 6px 14px; display: none; width: 100%;
  }
  .nav-item.open .nav-dropdown { display: flex; flex-direction: column; }
  .nav-dropdown a { padding: 11px 12px; font-size: 14px; }

  /* auth/community block at the bottom of the drawer */
  .nav-drawer-auth {
    display: flex; flex-direction: column; gap: 8px;
    margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border);
  }
  .btn-block { display: inline-flex; justify-content: center; width: 100%; padding: 12px; font-size: 14px; }
  .nav-auth-desktop { display: none; }

  /* keep discord + lang compact in the bar */
  .lang-btn span.lang-up { display: inline; }
  .nav-right .nav-discord { width: 36px; height: 36px; }
}

/* lock background scroll while the drawer is open */
body.menu-open { overflow: hidden; }

/* ── MOBILE CONTENT (≤760px) ── */
@media (max-width: 760px) {
  .hero { padding: 56px 18px 40px; }
  .hero-h1 { letter-spacing: -1.5px; }
  .hero-search-wrap input { padding-right: 52px; }
  .hero-search-wrap button { padding: 0 14px; font-size: 0; width: 44px; }
  .hero-search-wrap button::before { content: '→'; font-size: 18px; }

  .stats-bar { flex-wrap: wrap; }
  .stat { flex: 1 1 50%; border-right: none; border-bottom: 1px solid var(--border); }

  /* search results: stack icon + content, stats on their own row */
  .result-row { flex-wrap: wrap; row-gap: 8px; }
  .rr-main { min-width: 0; }
  .rr-desc { white-space: normal; }
  .rr-stats {
    flex-direction: row; flex-wrap: wrap; align-items: center;
    width: 100%; justify-content: flex-start; gap: 12px; margin-top: 2px;
  }

  /* source tabs scroll horizontally instead of wrapping/squishing */
  .source-tabs {
    flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch; scrollbar-width: none; gap: 6px;
    margin: 0 -18px; padding: 0 18px 4px;
  }
  .source-tabs::-webkit-scrollbar { display: none; }
  .src-tab { flex: 0 0 auto; }

  /* filters: full-width selects, two per row */
  .search-filters { flex-wrap: wrap; gap: 8px; }
  .search-filters .fsel { flex: 1 1 calc(50% - 4px); }
  .search-filters .fsel select { width: 100%; }

  /* mod header stacks; actions go full width */
  .mod-header { flex-direction: column; gap: 16px; }
  .mh-icon { width: 64px; height: 64px; }
  .mh-info h1 { font-size: 23px; }
  .mh-actions { width: 100%; flex-direction: row; flex-wrap: wrap; }
  .mh-actions .btn-lg { flex: 1 1 auto; justify-content: center; }
  .mh-version { width: 100%; text-align: center; }

  .ft-inner { grid-template-columns: 1fr 1fr; gap: 24px; }
  .ft-bottom { flex-direction: column; align-items: flex-start; gap: 10px; }

  /* hero aggregating badge: shrink + wrap so the long source list never overflows */
  .hero-badge { font-size: 11px; gap: 6px; padding: 6px 12px; line-height: 1.7; }
  .hero-badge .hb-sep { display: none; }

  /* ── COMMUNITY / FORUM (social) ── */
  .forum-main { padding: calc(var(--nav-h) + 20px) 16px 60px; }
  .forum-title { font-size: 26px; }
  .forum-head { gap: 12px; margin-bottom: 18px; }
  .forum-head .btn-lg { width: 100%; justify-content: center; }
  .forum-layout { grid-template-columns: 1fr; gap: 16px; }
  .forum-sidebar {
    flex-direction: row; overflow-x: auto; scrollbar-width: none;
    position: static; gap: 6px; margin: 0 -16px; padding: 0 16px 4px;
  }
  .forum-sidebar::-webkit-scrollbar { display: none; }
  .forum-sec { flex: 0 0 auto; padding: 8px 13px; font-size: 13px; }
  .forum-sec-divider { display: none; }

  /* post cards reflow */
  .post-card { padding: 15px 16px; border-radius: 14px; }
  .pc-title { font-size: 16px; }
  .pc-excerpt { font-size: 13px; }
  .pc-actions { gap: 2px; }
  .pc-action { padding: 7px 10px; }
  .feed-banner { font-size: 12px; padding: 10px 13px; }

  /* thread page */
  .thread-byline { flex-wrap: wrap; }
  .thread-byline .thread-mod { margin-left: 0; }
  .reply-form textarea { font-size: 16px; } /* avoid iOS zoom-on-focus */
}

/* ── SMALL PHONES (≤440px) ── */
@media (max-width: 440px) {
  .lang-grid { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: 1fr 1fr; }
  .ft-inner { grid-template-columns: 1fr; }
  .search-filters .fsel { flex: 1 1 100%; }
  .lang-btn .lang-up { display: none; }
  .hero-badge .hb-label { display: none; }
  .post-card { padding: 14px; }
  .pc-action span { font-size: 12px; }
  .forum-head .forum-title { font-size: 23px; }
  .mh-actions { flex-direction: column; }
  .mh-actions .btn-lg { width: 100%; }
}


/* ══════════ DOWNLOAD MODAL ══════════ */
.dl-box {
  width: 100%; max-width: 560px; max-height: 85vh; overflow-y: auto;
  background: var(--bg-2); border: 1px solid var(--border-2); border-radius: 18px;
  padding: 24px;
}
.dl-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.dl-head h3 { display: flex; align-items: center; gap: 9px; font-size: 17px; font-family: 'Space Grotesk', sans-serif; }
.dl-close { display: inline-flex; align-items: center; justify-content: center; color: var(--text-2); padding: 6px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-card); cursor: pointer; transition: all .14s; }
.dl-close:hover { color: var(--text); background: var(--bg-card-hov); border-color: var(--border-hov); }
.dl-step { margin-bottom: 18px; }
.dl-label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--dim); font-weight: 600; margin-bottom: 9px; }
.dl-srcs { display: flex; gap: 8px; }
.dl-src {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--bg-card);
  color: var(--text); font-size: 13.5px; font-weight: 500; transition: all .14s;
}
.dl-src.active { border-color: var(--accent); background: var(--accent-dim); }
.dl-src.disabled { opacity: .5; cursor: not-allowed; }
.dl-src-tag { font-size: 9px; text-transform: uppercase; letter-spacing: .4px; color: var(--modrinth); border: 1px solid var(--border-2); border-radius: 100px; padding: 1px 6px; }
.dl-src-tag.soon { color: var(--dim); }
.dl-src-alt { text-decoration: none; }
.dl-src-alt .dl-src-tag { color: var(--accent-2); border-color: rgba(124,108,246,.3); }
.dl-src-note { font-size: 11.5px; color: var(--dim); display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.dl-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.dl-chip {
  padding: 7px 13px; border: 1px solid var(--border); border-radius: 100px;
  background: var(--bg-card); color: var(--text-2); font-size: 12.5px; transition: all .14s;
}
.dl-chip:hover { color: var(--text); border-color: var(--border-hov); }
.dl-chip.active { color: var(--text); border-color: var(--accent); background: var(--accent-dim); }
.dl-versions { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; }
.dl-ver {
  display: grid; grid-template-columns: 28px 1fr auto auto auto 28px; align-items: center; gap: 10px;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg-card); transition: all .14s;
}
.dl-ver:hover { border-color: var(--accent); background: var(--bg-card-hov); }
.dl-ver-name { font-weight: 600; font-size: 13.5px; }
.dl-ver-mc { font-size: 11.5px; color: var(--text-2); font-family: 'JetBrains Mono', monospace; }
.dl-ver-ld { font-size: 11px; color: var(--muted); }
.dl-ver-size { font-size: 11px; color: var(--dim); font-family: 'JetBrains Mono', monospace; }
.dl-ver-dl { color: var(--accent-2); display: flex; justify-content: flex-end; }
.dl-empty { font-size: 13px; color: var(--muted); text-align: center; padding: 20px; }
.dl-note { font-size: 11.5px; color: var(--dim); display: flex; align-items: center; gap: 6px; margin-top: 16px; }
.dl-ver .ver-type { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 6px; font-size: 11px; font-weight: 700; padding: 0; }
.dl-ver .ver-type.release { background: rgba(74,222,128,.15); color: #4ade80; }
.dl-ver .ver-type.beta { background: rgba(251,191,36,.15); color: #fbbf24; }
.dl-ver .ver-type.alpha { background: rgba(248,113,113,.15); color: #f87171; }
.ver-type.beta { color: #fbbf24; background: rgba(251,191,36,.1); border: 1px solid rgba(251,191,36,.25); }
.ver-type.alpha { color: #f87171; background: rgba(248,113,113,.1); border: 1px solid rgba(248,113,113,.25); }

/* ── Comments ── */
.comments { max-width: 1000px; margin: 40px auto 0; }
.cmt-count { font-size: 13px; color: var(--muted); font-weight: 500; margin-left: 4px; }
.cmt-form { margin: 16px 0 28px; }
.cmt-form textarea {
  width: 100%; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 14px; color: var(--text); font-size: 14px;
  font-family: inherit; resize: vertical; min-height: 72px; transition: border-color .15s;
}
.cmt-form textarea:focus { outline: none; border-color: var(--accent); }
.cmt-form-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; gap: 12px; }
.cmt-hint { font-size: 11.5px; color: var(--dim); }
.cmt-login {
  display: flex; align-items: center; gap: 10px; margin: 16px 0 28px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 16px; color: var(--text-2); font-size: 13.5px;
}
.cmt-login a { color: var(--accent-2); }
.cmt-empty { color: var(--muted); font-size: 13.5px; padding: 8px 0 30px; }
.cmt-list { display: flex; flex-direction: column; gap: 16px; padding-bottom: 30px; }
.cmt { display: flex; gap: 12px; }
.cmt-avatar {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%;
  background: var(--accent-dim); color: var(--accent-2); font-weight: 700;
  display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.cmt-body { flex: 1; min-width: 0; }
.cmt-meta { display: flex; align-items: baseline; gap: 10px; margin-bottom: 3px; }
.cmt-author { font-weight: 600; font-size: 13.5px; color: var(--text); }
.cmt-author:hover { color: var(--accent-2); }
.cmt-time { font-size: 11.5px; color: var(--dim); }
.cmt-text { color: var(--text-2); font-size: 14px; line-height: 1.6; word-wrap: break-word; overflow-wrap: anywhere; }

/* ── Profiles ── */
.profile-main { max-width: 760px; }
.profile-head { display: flex; align-items: center; gap: 18px; margin-bottom: 22px; }
.profile-avatar {
  width: 72px; height: 72px; border-radius: 50%; flex-shrink: 0;
  background: var(--accent-dim); color: var(--accent-2); font-weight: 700;
  display: flex; align-items: center; justify-content: center; font-size: 30px;
}
.profile-id { flex: 1; min-width: 0; }
.profile-id h1 { margin: 0; font-size: 26px; }
.profile-joined { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--dim); margin-top: 4px; }
.profile-edit { flex-shrink: 0; }
.profile-bio { color: var(--text-2); font-size: 15px; line-height: 1.7; margin: 0 0 26px; }
.profile-bio.muted { color: var(--muted); }
.profile-bio a { color: var(--accent-2); }
.profile-cards { display: flex; flex-direction: column; gap: 14px; }
.profile-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; }
.profile-card h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 13px; color: var(--muted); font-weight: 600; }
.profile-mc { display: inline-block; font-family: 'JetBrains Mono', monospace; font-size: 14px; color: var(--accent-2); background: var(--accent-dim); padding: 6px 12px; border-radius: 8px; margin-right: 10px; }
.copy-btn { font-size: 12px; padding: 6px 12px; border: 1px solid var(--border); border-radius: 8px; background: transparent; color: var(--text-2); cursor: pointer; transition: all .14s; }
.copy-btn:hover { color: var(--text); border-color: var(--border-hov); }
.copy-btn.copied { color: #4ade80; border-color: rgba(74,222,128,.4); }

/* ── Settings form ── */
.settings-form { display: flex; flex-direction: column; gap: 20px; max-width: 560px; margin-top: 22px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field-label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.field input, .field textarea {
  width: 100%; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px; padding: 11px 13px; color: var(--text); font-size: 14px;
  font-family: inherit; resize: vertical; transition: border-color .15s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field-hint { font-size: 11.5px; color: var(--dim); }
.field-hint code { font-family: 'JetBrains Mono', monospace; font-size: 11px; background: var(--bg-card); padding: 1px 5px; border-radius: 4px; }
.settings-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 4px; }
.form-ok { display: flex; align-items: center; gap: 8px; color: #4ade80; background: rgba(74,222,128,.1); border: 1px solid rgba(74,222,128,.25); border-radius: 10px; padding: 10px 14px; font-size: 13.5px; margin: 16px 0; }

/* Download modal — mobile: bottom sheet, version rows reflow to 2 lines */
@media (max-width: 600px) {
  .overlay { padding: 0; align-items: flex-end; }
  .dl-box {
    max-width: 100%; max-height: 92dvh; border-radius: 18px 18px 0 0;
    padding: 20px 18px calc(env(safe-area-inset-bottom, 0px) + 20px);
  }
  .lang-box { width: 100%; border-radius: 18px 18px 0 0; }
  .dl-srcs { flex-wrap: wrap; }
  .dl-src { flex: 1 1 calc(50% - 4px); justify-content: center; }
  .dl-versions { max-height: 50dvh; }
  /* version row: type + name + size on row 1, mc/loader on row 2 */
  .dl-ver {
    grid-template-columns: 28px 1fr auto auto;
    grid-template-areas:
      "type name name size"
      "type mc   ld   dl";
    row-gap: 3px;
  }
  .dl-ver .ver-type { grid-area: type; }
  .dl-ver-name { grid-area: name; }
  .dl-ver-size { grid-area: size; text-align: right; }
  .dl-ver-mc { grid-area: mc; }
  .dl-ver-ld { grid-area: ld; }
  .dl-ver-dl { grid-area: dl; }
}

/* ══════════ AUTH PAGES ══════════ */
.auth-main { display: flex; align-items: center; justify-content: center; padding: 60px 20px; }
.auth-card { width: 100%; max-width: 420px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 18px; padding: 36px 32px; }
.auth-head { text-align: center; margin-bottom: 26px; }
.auth-logo { font-family: 'Space Grotesk', sans-serif; font-size: 22px; margin-bottom: 18px; }
.auth-logo strong { color: var(--accent-2); }
.auth-head h1 { font-size: 24px; font-family: 'Space Grotesk', sans-serif; margin-bottom: 8px; }
.auth-head p { font-size: 13.5px; color: var(--muted); }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field span { font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.field input, .field textarea, .thread-select {
  background: var(--bg-card); border: 1px solid var(--border-2); border-radius: 10px;
  padding: 11px 13px; color: var(--text); font-size: 14px; font-family: inherit; transition: border-color .14s;
}
.field input:focus, .field textarea:focus, .thread-select:focus { outline: none; border-color: var(--accent); }
.field small { font-size: 11.5px; color: var(--dim); }
.field textarea { resize: vertical; line-height: 1.6; }
.auth-submit { width: 100%; justify-content: center; margin-top: 4px; }
.auth-alt { text-align: center; font-size: 13px; color: var(--muted); margin-top: 20px; }
.auth-alt a { color: var(--accent-2); }
.auth-error { display: flex; align-items: center; gap: 8px; background: rgba(248,113,113,.12); border: 1px solid rgba(248,113,113,.3); color: #fca5a5; font-size: 13px; padding: 11px 14px; border-radius: 10px; margin-bottom: 18px; }

/* ══════════ DOC / STATIC PAGES ══════════ */
.doc-main { max-width: 760px; margin: 0 auto; padding: calc(var(--nav-h) + 48px) 24px 80px; }
.doc-eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--accent-2); font-weight: 600; }
.doc h1 { font-family: 'Space Grotesk', sans-serif; font-size: clamp(32px, 5vw, 44px); font-weight: 700; line-height: 1.1; margin: 14px 0 20px; }
.doc-lead { font-size: 17px; color: var(--text-2); line-height: 1.7; margin-bottom: 36px; }
.doc h2 { font-family: 'Space Grotesk', sans-serif; font-size: 22px; font-weight: 600; margin: 36px 0 14px; }
.doc p { color: var(--text-2); line-height: 1.75; margin-bottom: 16px; }
.doc-list { list-style: none; display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.doc-list li { position: relative; padding-left: 22px; color: var(--text-2); line-height: 1.7; }
.doc-list li::before { content: ''; position: absolute; left: 4px; top: 11px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.doc-list strong { color: var(--text); }
.doc-note { font-size: 13px; color: var(--dim); border-top: 1px solid var(--border); padding-top: 20px; margin-top: 36px; }

/* ══════════ FORUM ══════════ */
.forum-main { max-width: 1080px; margin: 0 auto; padding: calc(var(--nav-h) + 36px) 24px 70px; width: 100%; }
.forum-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.forum-title { font-family: 'Space Grotesk', sans-serif; font-size: 34px; font-weight: 700; }
.forum-sub { font-size: 14px; color: var(--muted); margin-top: 4px; }
.forum-layout { display: grid; grid-template-columns: 220px 1fr; gap: 28px; align-items: start; }
.forum-sidebar { display: flex; flex-direction: column; gap: 4px; position: sticky; top: calc(var(--nav-h) + 20px); }
.forum-sec { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; color: var(--text-2); font-size: 14px; transition: all .14s; white-space: nowrap; }
.forum-sec:hover { background: var(--bg-card); color: var(--text); }
.forum-sec.active { background: var(--accent-dim); color: var(--accent-2); }
.forum-sec .icon { flex-shrink: 0; }
.forum-feed { display: flex; flex-direction: column; gap: 10px; }
.thread-row { display: flex; gap: 16px; padding: 18px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg-card); transition: all .14s; }
.thread-row:hover { border-color: var(--border-hov); background: var(--bg-card-hov); transform: translateY(-1px); }
.tr-avatar { width: 42px; height: 42px; border-radius: 11px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--accent-dim); color: var(--accent-2); font-weight: 700; font-size: 17px; }
.tr-avatar.sm { width: 34px; height: 34px; font-size: 14px; border-radius: 9px; }
.tr-avatar.xs { width: 24px; height: 24px; font-size: 11px; border-radius: 7px; }
.tr-main { flex: 1; min-width: 0; }
.tr-head { display: flex; align-items: center; gap: 10px; margin-bottom: 5px; flex-wrap: wrap; }
.tr-section { font-size: 10.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--accent-2); background: var(--accent-dim); padding: 2px 8px; border-radius: 100px; font-weight: 600; }
.tr-title { font-weight: 600; font-size: 15.5px; color: var(--text); }
.tr-excerpt { font-size: 13px; color: var(--muted); line-height: 1.55; margin-bottom: 8px; }
.tr-meta { display: flex; gap: 16px; font-size: 12px; color: var(--dim); }
.tr-meta span { display: inline-flex; align-items: center; gap: 5px; }
.tr-stats { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; justify-content: center; flex-shrink: 0; }
.tr-stat { font-size: 12px; color: var(--muted); white-space: nowrap; }
.tr-stat strong { color: var(--text); }
.tr-views { display: inline-flex; align-items: center; gap: 4px; }

.new-thread-wrap, .thread-wrap { max-width: 760px; margin: 0 auto; }
.back-link { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.back-link:hover { color: var(--accent-2); }
.new-thread-wrap h1 { font-family: 'Space Grotesk', sans-serif; font-size: 28px; margin-bottom: 22px; }

.thread-op { border-bottom: 1px solid var(--border); padding-bottom: 28px; margin-bottom: 28px; }
.thread-h1 { font-family: 'Space Grotesk', sans-serif; font-size: 30px; font-weight: 700; line-height: 1.2; margin-bottom: 18px; }
.thread-byline { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.tb-author { font-weight: 600; font-size: 14px; }
.tb-meta { font-size: 12px; color: var(--dim); }
.thread-body { color: var(--text-2); line-height: 1.8; font-size: 15px; }
.replies-h { font-family: 'Space Grotesk', sans-serif; font-size: 18px; margin-bottom: 18px; }
.reply-list { display: flex; flex-direction: column; gap: 16px; margin-bottom: 28px; }
.reply { display: flex; gap: 12px; }
.reply-main { flex: 1; background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.reply-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.reply-author { font-weight: 600; font-size: 13.5px; }
.reply-time { font-size: 11.5px; color: var(--dim); }
.reply-body { color: var(--text-2); line-height: 1.7; font-size: 14px; }
.reply-form { display: flex; flex-direction: column; gap: 12px; }
.reply-form textarea { background: var(--bg-card); border: 1px solid var(--border-2); border-radius: 12px; padding: 14px; color: var(--text); font-size: 14px; font-family: inherit; line-height: 1.6; resize: vertical; }
.reply-form textarea:focus { outline: none; border-color: var(--accent); }
.reply-form button { align-self: flex-start; }
.reply-cta { text-align: center; background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 28px; }
.reply-cta p { color: var(--muted); margin-bottom: 14px; }
.rc-btns { display: flex; gap: 10px; justify-content: center; }
.thread-select { width: 100%; }

/* nav user dropdown */
.nav-user { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; padding: 5px 8px; border-radius: 9px; transition: background .14s; }
.nav-user:hover { background: var(--bg-card); }
.nav-user-name { font-size: 13.5px; font-weight: 500; }
.nav-dropdown-right { right: 0; left: auto; }

/* multi-source badge groups (unified results / cards / detail header) */
.mc-srcs, .rr-srcs, .mh-src-list { display: inline-flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.rr-srcs { justify-content: flex-end; }
.mh-src-list { gap: 6px; }

/* live updates indicator on the stats bar */
.stat-live { display: inline-flex; align-items: center; gap: 5px; color: var(--modrinth); }
.stat-live svg { color: var(--modrinth); animation: livePulse 2s ease-in-out infinite; }
@keyframes livePulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* ══════════════════════════════════════════════
   ROLE BADGES
   ══════════════════════════════════════════════ */
.role-badge {
  display: inline-block; vertical-align: middle; margin-left: 6px;
  font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
  padding: 1.5px 6px; border-radius: 100px; line-height: 1.4;
}
.role-badge.admin  { color: #fff; background: var(--accent); }
.role-badge.mod    { color: var(--accent-2); background: var(--accent-dim); border: 1px solid rgba(124,108,246,.3); }
.role-badge.banned { color: #ff6b6b; background: rgba(255,80,80,.12); border: 1px solid rgba(255,80,80,.3); }

/* ══════════════════════════════════════════════
   BUTTONS — danger variant
   ══════════════════════════════════════════════ */
.btn-danger {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 100px;
  border: 1px solid rgba(255,80,80,.3); background: rgba(255,80,80,.08);
  color: #ff8585; font-size: 13px; cursor: pointer; transition: all .14s;
}
.btn-danger:hover { background: rgba(255,80,80,.16); border-color: rgba(255,80,80,.5); color: #ff9d9d; }
.btn-danger.btn-sm { padding: 6px 11px; font-size: 12px; }

/* ══════════════════════════════════════════════
   SOCIAL FEED — post cards
   ══════════════════════════════════════════════ */
.forum-sec-divider { height: 1px; background: var(--border); margin: 8px 4px; }
.feed-banner {
  display: flex; align-items: center; gap: 9px;
  padding: 11px 15px; margin-bottom: 16px;
  background: var(--accent-dim); border: 1px solid rgba(124,108,246,.2);
  border-radius: 12px; color: var(--accent-2); font-size: 13px;
}
.feed-banner .icon { color: var(--accent-2); }

.post-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 16px; padding: 18px 20px; margin-bottom: 14px;
  transition: border-color .15s, background .15s;
}
.post-card:hover { border-color: var(--border-2); }
.pc-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.pc-author { display: flex; align-items: center; gap: 11px; }
.pc-author .tr-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-dim); color: var(--accent-2);
  font-weight: 600; font-size: 15px; flex-shrink: 0;
}
.pc-author-meta { display: flex; flex-direction: column; gap: 1px; }
.pc-name { font-weight: 600; color: var(--text); font-size: 14px; }
.pc-time { font-size: 12px; color: var(--muted); }
.pc-bodylink { display: block; }
.pc-title { font-size: 17px; font-weight: 650; color: var(--text); margin-bottom: 5px; font-family: 'Space Grotesk', sans-serif; line-height: 1.35; }
.post-card:hover .pc-title { color: var(--accent-2); }
.pc-excerpt { color: var(--text-2); font-size: 13.5px; line-height: 1.55; }
.pc-actions { display: flex; align-items: center; gap: 6px; margin-top: 14px; }
.thread-actions { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.pc-action {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 100px;
  border: 1px solid transparent; background: transparent;
  color: var(--muted); font-size: 13px; cursor: pointer; transition: all .14s;
}
.pc-action:hover { color: var(--text); background: var(--bg-card-hov); }
.pc-views { cursor: default; }
.pc-views:hover { color: var(--muted); background: transparent; }
.pc-like.liked { color: #ff5c8a; }
.pc-like.liked .icon { fill: #ff5c8a; color: #ff5c8a; }
.pc-like:hover { color: #ff5c8a; }
.pc-translate:hover { color: var(--accent-2); }
.pc-mod { line-height: 0; }
.pc-del {
  display: inline-flex; padding: 6px; border-radius: 8px;
  border: 1px solid var(--border); background: transparent;
  color: var(--muted); cursor: pointer; transition: all .14s;
}
.pc-del:hover { color: #ff8585; border-color: rgba(255,80,80,.4); background: rgba(255,80,80,.08); }

/* thread page: byline mod button + reply translate */
.thread-byline { display: flex; align-items: center; gap: 12px; }
.thread-byline .thread-mod { margin-left: auto; }
.reply-translate {
  display: inline-flex; padding: 3px; border-radius: 6px; border: none;
  background: transparent; color: var(--dim); cursor: pointer; transition: color .14s;
}
.reply-translate:hover { color: var(--accent-2); }
.reply-head { display: flex; align-items: center; gap: 9px; }

/* ══════════════════════════════════════════════
   ADMIN PANEL
   ══════════════════════════════════════════════ */
.admin-main { max-width: 1000px; margin: 0 auto; padding: 32px 20px 80px; position: relative; z-index: 1; width: 100%; }
.admin-head { margin-bottom: 22px; }
.admin-head h1 { display: flex; align-items: center; gap: 11px; font-size: 26px; font-family: 'Space Grotesk', sans-serif; }
.admin-head h1 .icon { color: var(--accent-2); }
.admin-sub { color: var(--muted); font-size: 13.5px; margin-top: 4px; }

.admin-tabs { display: flex; gap: 6px; margin-bottom: 26px; flex-wrap: wrap; border-bottom: 1px solid var(--border); padding-bottom: 14px; }
.admin-tab {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 15px; border-radius: 100px; font-size: 13px; color: var(--text-2);
  border: 1px solid var(--border); transition: all .14s;
}
.admin-tab:hover { color: var(--text); border-color: var(--border-hov); }
.admin-tab.active { color: #fff; background: var(--accent); border-color: var(--accent); }
.admin-tab.active .icon { color: #fff; }

.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 26px; }
.admin-stat {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px;
  padding: 18px; display: flex; flex-direction: column; gap: 4px;
}
.as-icon { color: var(--accent-2); }
.as-value { font-size: 26px; font-weight: 700; font-family: 'Space Grotesk', sans-serif; }
.as-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }

.admin-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.admin-quick-card {
  display: flex; align-items: center; gap: 14px; padding: 18px 20px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px;
  transition: border-color .15s, background .15s;
}
.admin-quick-card:hover { border-color: var(--border-2); background: var(--bg-card-hov); }
.admin-quick-card .icon { color: var(--accent-2); }
.admin-quick-card strong { display: block; font-size: 15px; }
.admin-quick-card span { font-size: 12.5px; color: var(--muted); }

.admin-search { display: flex; align-items: center; gap: 9px; margin-bottom: 18px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 6px 8px 6px 14px; }
.admin-search .s-icon { color: var(--muted); display: flex; }
.admin-search input { flex: 1; background: transparent; border: none; outline: none; color: var(--text); font-size: 14px; }

.admin-userlist { display: flex; flex-direction: column; gap: 8px; }
.admin-user {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 12px 16px;
}
.admin-user.banned { border-color: rgba(255,80,80,.25); background: rgba(255,80,80,.04); }
.au-id { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tr-avatar.xs { width: 34px; height: 34px; font-size: 13px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--accent-dim); color: var(--accent-2); font-weight: 600; flex-shrink: 0; }
.au-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.au-name { font-weight: 600; color: var(--text); }
.au-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.au-reason { font-size: 12px; color: #ff8585; }
.au-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.au-roleselect, .thread-select, .au-reason-input {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); font-size: 12.5px; padding: 6px 10px; outline: none;
}
.au-roleselect:focus, .au-reason-input:focus { border-color: var(--accent); }
.au-banbox { display: flex; align-items: center; gap: 6px; }
.au-reason-input { width: 130px; }
.au-you { font-size: 12px; color: var(--dim); padding: 0 8px; }

.admin-cmtlist { display: flex; flex-direction: column; gap: 8px; }
.admin-cmt {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px;
}
.ac-main { min-width: 0; }
.ac-head { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 5px; font-size: 12.5px; }
.ac-author { font-weight: 600; color: var(--text); }
.ac-on { color: var(--dim); }
.ac-project { color: var(--accent-2); }
.ac-time { color: var(--muted); }
.ac-body { color: var(--text-2); font-size: 13.5px; line-height: 1.5; word-break: break-word; }

@media (max-width: 760px) {
  .admin-quick { grid-template-columns: 1fr; }
  .admin-user { flex-direction: column; align-items: stretch; }
  .au-actions { flex-wrap: wrap; }
  .au-reason-input { width: 100%; }
  .pc-actions { flex-wrap: wrap; }
}
