/* Desert Forge Hub v3 — Wiki / Forum */
:root {
  --white: #fff;
  --bg: #f5f5f5;
  --surface: #fff;
  --surface2: #fafafa;
  --border: #e0e0e0;
  --border2: #ccc;
  --accent: #b45309;
  --accent-bg: #fffbeb;
  --accent-border: #fde68a;
  --accent-light: #fef3c7;
  --link: #1d4ed8;
  --link-hover: #1e40af;
  --text: #1f1f1f;
  --text2: #555;
  --muted: #888;
  --green: #16a34a;
  --green-bg: #f0fdf4;
  --red: #dc2626;
  --red-bg: #fef2f2;
  --blue: #2563eb;
  --blue-bg: #eff6ff;
  --radius: 4px;
  --max-w: 1080px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

/* ── Dark Mode ── */
html.dark {
  --white: #1a1a1e;
  --bg: #111114;
  --surface: #1a1a1e;
  --surface2: #222226;
  --border: #2e2e34;
  --border2: #3a3a42;
  --accent: #e2a633;
  --accent-bg: rgba(226,166,51,.1);
  --accent-border: rgba(226,166,51,.25);
  --accent-light: rgba(226,166,51,.15);
  --link: #60a5fa;
  --link-hover: #93bbfd;
  --text: #e0ddd8;
  --text2: #9a979f;
  --muted: #6b6872;
  --green: #4ade80;
  --green-bg: rgba(74,222,128,.08);
  --red: #f87171;
  --red-bg: rgba(248,113,113,.08);
  --blue: #60a5fa;
  --blue-bg: rgba(96,165,250,.08);
}
html.dark .topbar { background: #0a0a0c; }
html.dark .nav { background: var(--surface); }
html.dark .nav-tabs a:hover { background: var(--surface2); }
html.dark img { opacity: .9; }

/* ── Theme Toggle ── */
.theme-toggle {
  display: flex; align-items: center;
  background: none; border: 1px solid var(--border); border-radius: 14px;
  cursor: pointer; padding: 3px;
  width: 44px; height: 24px;
  position: relative;
  transition: border-color .2s;
}
.theme-toggle:hover { border-color: var(--border2); }
.theme-toggle .toggle-thumb {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform .2s, background .2s;
  display: grid; place-items: center;
}
.theme-toggle .toggle-thumb svg { width: 10px; height: 10px; }
html.dark .theme-toggle .toggle-thumb {
  transform: translateX(20px);
  background: var(--accent);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--link-hover); }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
strong { font-weight: 600; }
code { font-family: var(--mono); font-size: 13px; background: #f0f0f0; padding: 2px 5px; border-radius: 3px; }
hr { border: none; border-top: 1px solid var(--border); margin: 16px 0; }

/* ── Layout ── */
.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 16px; }
.content-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

/* ── Top Bar (site-wide banner) ── */
.topbar {
  background: #292524;
  color: #d6d3d1;
  font-size: 12px;
  padding: 6px 0;
}
.topbar-inner {
  max-width: var(--max-w);
  margin: 0 auto; padding: 0 16px;
  display: flex; justify-content: space-between; align-items: center;
}
.topbar a { color: #fbbf24; text-decoration: none; font-weight: 600; }
.topbar a:hover { text-decoration: underline; color: #fde68a; }

/* ── Nav ── */
.nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto; padding: 0 16px;
  display: flex; align-items: stretch; gap: 0;
  height: 42px;
}
.logo {
  display: flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 700; color: var(--text);
  margin-right: 24px; text-decoration: none; white-space: nowrap;
}
.logo:hover { text-decoration: none; color: var(--text); }
.logo-mark {
  width: 24px; height: 24px;
  background: var(--accent);
  border-radius: 4px;
  display: grid; place-items: center;
}
.logo-mark svg { width: 14px; height: 14px; }
.nav-tabs {
  display: flex; align-items: stretch; gap: 0;
  flex: 1;
}
.nav-tabs a {
  display: flex; align-items: center;
  padding: 0 14px;
  font-size: 13px; font-weight: 500;
  color: var(--text2);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color .1s, border-color .1s;
}
.nav-tabs a:hover { color: var(--text); text-decoration: none; background: var(--bg); }
.nav-tabs a.active {
  color: var(--text);
  border-bottom-color: var(--accent);
  font-weight: 600;
}
.nav-right {
  display: flex; align-items: center; gap: 10px; margin-left: auto;
}
.nav-btn {
  font-size: 12px; font-weight: 600;
  padding: 5px 12px; border-radius: var(--radius);
  background: var(--accent); color: #fff;
  text-decoration: none; white-space: nowrap;
}
.nav-btn:hover { background: #92400e; color: #fff; text-decoration: none; }

.nav-toggle {
  display: none; background: none; border: none; cursor: pointer; padding: 8px;
  flex-direction: column; gap: 3px; justify-content: center;
}
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--text); border-radius: 1px; transition: transform .2s, opacity .2s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

@media (max-width: 700px) {
  .nav-toggle { display: flex; }
  .nav-tabs {
    display: none; position: absolute; top: 42px; left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--border);
    flex-direction: column; padding: 8px 0; z-index: 99;
  }
  .nav-tabs.open { display: flex; }
  .nav-tabs a { padding: 10px 16px; border-bottom: none; }
  .nav-tabs a.active { background: var(--accent-bg); }
}

/* ── Page Header ── */
.page-head {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 20px 0 16px;
}
.page-head h1 { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.page-head p { color: var(--text2); font-size: 13px; max-width: 560px; }
.breadcrumb { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.breadcrumb a { color: var(--text2); }
.breadcrumb a:hover { color: var(--link); }
.breadcrumb span { margin: 0 4px; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 14px; border-radius: var(--radius);
  font-size: 13px; font-weight: 600; font-family: var(--font);
  border: 1px solid var(--border); cursor: pointer;
  background: var(--surface); color: var(--text);
  text-decoration: none; transition: background .1s;
}
.btn:hover { background: var(--bg); text-decoration: none; color: var(--text); }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: #92400e; color: #fff; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-lg { padding: 8px 18px; font-size: 14px; }

/* ── Badges ── */
.badge {
  display: inline-block; padding: 1px 8px;
  border-radius: 3px; font-size: 11px; font-weight: 600;
}
.badge--terraria { background: #dcfce7; color: #166534; }
.badge--minecraft { background: #dbeafe; color: #1e40af; }
.badge--accent { background: var(--accent-light); color: var(--accent); }
.badge--muted { background: #f0f0f0; color: var(--muted); }

/* ── Pills / Filters ── */
.pill {
  display: inline-block; padding: 4px 10px;
  border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 12px; font-weight: 500; cursor: pointer;
  background: var(--surface); color: var(--text2);
  font-family: var(--font); transition: all .1s;
}
.pill:hover { border-color: var(--border2); color: var(--text); }
.pill.active { background: var(--accent-bg); border-color: var(--accent-border); color: var(--accent); }

/* ── Forms ── */
.input, .select, .textarea {
  width: 100%; padding: 7px 10px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text);
  font-size: 13px; font-family: var(--font);
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-light); }
.textarea { resize: vertical; min-height: 80px; }
.form-group { margin-bottom: 12px; }
.form-label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 4px; color: var(--text2); }

/* ── Stars ── */
.stars { display: inline-flex; gap: 0; font-size: 12px; }
.star { color: #ddd; }
.star.filled { color: #f59e0b; }

/* ── Callout Boxes (DF CTAs) ── */
.callout {
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 12px 16px;
  background: var(--accent-bg);
  margin: 16px 0;
}
.callout--green { border-left-color: var(--green); background: var(--green-bg); }
.callout strong { display: block; font-size: 13px; margin-bottom: 2px; }
.callout p { font-size: 13px; color: var(--text2); margin-bottom: 8px; }
.callout .btn { font-size: 12px; }

/* ── Toggle Group ── */
.toggle-group {
  display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
.toggle-btn {
  padding: 6px 14px; font-size: 12px; font-weight: 600;
  background: var(--surface); color: var(--text2);
  border: none; border-right: 1px solid var(--border);
  cursor: pointer; font-family: var(--font);
}
.toggle-btn:last-child { border-right: none; }
.toggle-btn.active { background: var(--accent); color: #fff; }
.toggle-btn:hover:not(.active) { background: var(--bg); }

/* ── Table ── */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; padding: 8px 12px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); background: var(--surface2); border-bottom: 1px solid var(--border); }
td { padding: 10px 12px; border-bottom: 1px solid var(--border); color: var(--text2); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--surface2); }
tr.featured td { background: var(--accent-bg); }
.host-name { font-weight: 600; color: var(--text); }
.featured-tag { font-size: 10px; font-weight: 700; background: var(--accent-light); color: var(--accent); padding: 1px 6px; border-radius: 3px; margin-left: 6px; }
.check { color: var(--green); font-weight: 700; }
.cross { color: #ccc; }

/* ── Seed List Item (wiki style) ── */
.seed-item {
  display: flex; gap: 16px; padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  text-decoration: none; color: var(--text);
  transition: background .1s;
}
.seed-item:hover { background: var(--surface2); text-decoration: none; }
.seed-item:last-child { border-bottom: none; }
.seed-icon {
  width: 56px; height: 56px; flex-shrink: 0;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  display: grid; place-items: center;
}
.seed-icon svg { width: 24px; height: 24px; color: var(--muted); }
.seed-info { flex: 1; min-width: 0; }
.seed-info h3 { font-size: 14px; font-weight: 600; margin-bottom: 2px; color: var(--link); }
.seed-item:hover .seed-info h3 { text-decoration: underline; }
.seed-info .seed-code { font-family: var(--mono); font-size: 12px; color: var(--accent); background: var(--accent-bg); padding: 1px 6px; border-radius: 3px; }
.seed-info .desc { font-size: 12px; color: var(--text2); margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.seed-side { text-align: right; flex-shrink: 0; font-size: 12px; color: var(--muted); white-space: nowrap; }
.seed-side .votes { font-weight: 600; color: var(--text2); }

/* ── Challenge Result ── */
.challenge-result {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; max-width: 480px; margin: 0 auto;
}
.challenge-label { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); font-weight: 700; }
.modifier-list { display: flex; flex-wrap: wrap; gap: 4px; margin: 10px 0; }
.modifier-tag { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 3px; background: var(--red-bg); color: var(--red); border: 1px solid #fecaca; }

/* ── Split Layout ── */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 700px) { .split { grid-template-columns: 1fr; } }
.sticky-panel { position: sticky; top: 58px; }

/* ── Slider ── */
input[type="range"] { -webkit-appearance: none; width: 100%; height: 4px; background: var(--border); border-radius: 2px; outline: none; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; background: var(--accent); border-radius: 50%; cursor: pointer; }
input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; background: var(--accent); border-radius: 50%; cursor: pointer; border: none; }

/* ── Review Card ── */
.review-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
.review-card h3 { font-size: 15px; margin-bottom: 4px; }
.review-card .rating-row { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.review-card .rating-num { font-weight: 700; color: var(--accent); font-size: 13px; }
.review-card p { font-size: 13px; color: var(--text2); line-height: 1.5; }
.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 10px; }
@media (max-width: 600px) { .pros-cons { grid-template-columns: 1fr; } }
.pros-cons h4 { font-size: 11px; font-weight: 700; text-transform: uppercase; margin-bottom: 6px; }
.pros h4 { color: var(--green); }
.cons h4 { color: var(--red); }
.pros-cons li { font-size: 12px; color: var(--text2); padding: 2px 0; }

/* ── Copy ── */
.copy-btn {
  font-family: var(--font); font-size: 11px; font-weight: 600;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text2); padding: 2px 8px; border-radius: 3px;
  cursor: pointer;
}
.copy-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ── Footer ── */
.footer { background: var(--surface); border-top: 1px solid var(--border); padding: 32px 0 16px; margin-top: 48px; }
.footer-grid { max-width: var(--max-w); margin: 0 auto; padding: 0 16px; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer-brand { font-size: 12px; color: var(--text2); line-height: 1.5; }
.footer-brand .logo { margin-bottom: 6px; font-size: 14px; }
.footer-col h4 { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 8px; }
.footer-col a { display: block; font-size: 12px; color: var(--text2); padding: 2px 0; text-decoration: none; }
.footer-col a:hover { color: var(--link); text-decoration: underline; }
.footer-bottom { max-width: var(--max-w); margin: 24px auto 0; padding: 12px 16px 0; border-top: 1px solid var(--border); font-size: 11px; color: var(--muted); text-align: center; }

@media (max-width: 700px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ── Ad Placeholder ── */
.ad-slot { min-height: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.hidden { display: none !important; }
