/* ============================================================
   Craftics Documentation — Shared Styles
   Dark stone/deepslate theme with amber + emerald accents
   ============================================================ */


:root {
  /* Force all text everywhere to be white for maximum readability */
  *, *::before, *::after {
    color: #fff !important;
    border-color: inherit;
  }

  /* Restore accent colors for links and special elements */
  a, a:visited { color: var(--accent) !important; }
  a:hover { color: #7bb8e8 !important; }
  .sidebar-nav a { color: var(--accent) !important; }
  .sidebar-nav a.active { color: #fff !important; border-left-color: var(--amber) !important; background: var(--amber-dim) !important; }
  .nav-logo { color: var(--accent) !important; }
  .nav-links a { color: #fff !important; }
  .nav-links a.active { color: #fff !important; background: var(--amber) !important; }
  .build-card-header .build-class { color: var(--amber) !important; background: var(--amber-dim) !important; }
  .card h3 { color: var(--amber) !important; }
  .dimension-card.overworld { border-top: 3px solid var(--overworld) !important; }
  .dimension-card.nether { border-top: 3px solid var(--nether) !important; }
  .dimension-card.end { border-top: 3px solid var(--end) !important; }
  .progression-map .ow { color: var(--overworld) !important; }
  .progression-map .nt { color: var(--nether) !important; }
  .progression-map .en { color: var(--end) !important; }
  .progression-map .boss { color: var(--amber) !important; }
  .marker-diagram .em { color: var(--emerald) !important; }
  .marker-diagram .go { color: var(--amber) !important; }
  .marker-diagram .ir { color: #fff !important; }
  .build-value strong { color: var(--amber) !important; }
  .build-value .green { color: var(--emerald) !important; }
  .footer .sep { color: var(--border) !important; }
  --bg: #2a2a2e;
  --surface: rgba(30, 30, 34, 0.92);
  --surface-alt: rgba(26, 26, 30, 0.92);
  --border: #4a4a52;
  --text: #fff;
  --muted: #fff;
  --accent: #5b9bd5;
  --accent-dim: rgba(91, 155, 213, 0.12);
  --amber: #e8a830;
  --amber-dim: rgba(232, 168, 48, 0.12);
  --emerald: #50c878;
  --emerald-dim: rgba(80, 200, 120, 0.12);
  --overworld: #50c878;
  --nether: #e05050;
  --end: #9b59b6;
  --code-bg: #1e1e22;
  --nav-height: 60px;
  --sidebar-width: 220px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-height) + 24px); }


body {
  /* Force strong contrast for badges/pills and hero/section subtitles on stone background */
  body .req-pill,
  body .badge,
  body .section-header p,
  body .hero .tagline,
  body .hero .sub-tagline {
    color: #fff !important;
    text-shadow: 0 1px 2px #0008, 0 0 1px #0004;
  }
  background-color: #555;
  background-image: url("../img/stone.png");
  background-size: 256px 256px;
  background-repeat: repeat;
  image-rendering: pixelated;
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}


a { color: var(--accent); text-decoration: underline; transition: color 0.15s; }
a:hover { color: #7bb8e8; }

/* ================================================================
   TOP NAVIGATION
   ================================================================ */

.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #1a1a1e;
  border-bottom: 2px solid #444;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  padding: 0 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

.nav-inner {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  gap: 32px;
}


.nav-logo {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 22px;
  color: var(--accent);
  text-decoration: none;
  font-weight: bold;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-logo:hover { color: #005fa3; opacity: 0.85; }

.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
  margin-left: auto;
}


.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  padding: 6px 12px;
  font-family: Arial, Helvetica, sans-serif;
  transition: color 0.15s, background 0.15s;
}

.nav-links a:hover { color: #fff; background: rgba(255,255,255,0.08); }
.nav-links a.active { color: #fff; background: var(--amber); border-radius: 6px; }

.nav-github {
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  margin-left: 8px;
}

.nav-github:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.nav-hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 22px;
  margin-left: auto;
  padding: 4px;
  line-height: 1;
}

/* ================================================================
   PAGE LAYOUT  (sidebar + content)
   ================================================================ */
.page-layout {
  display: flex;
  font-family: Arial, Helvetica, sans-serif;
  gap: 0;
  min-height: calc(100vh - var(--nav-height) - 80px);
}

/* ---- Sidebar ---- */
.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  font-family: Arial, Helvetica, sans-serif;
  position: sticky;
  top: var(--nav-height);
  height: calc(100vh - var(--nav-height));
  overflow-y: auto;
  padding: 24px 16px 24px 24px;
  border-right: 1px solid var(--border);
  background: rgba(22, 22, 26, 0.95);
}

.sidebar-label {
  font-size: 11px;
  font-weight: 600;
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0.08em;
  color: #fff;
  margin-bottom: 12px;
  padding-left: 12px;
}

.sidebar-nav { display: flex; flex-direction: column; gap: 1px; }

.sidebar-nav a {
  font-family: Arial, Helvetica, sans-serif;
  display: block;
  padding: 6px 12px;
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  border-left: 2px solid transparent;
  border-radius: 0 4px 4px 0;
  transition: all 0.15s;
}

.sidebar-nav a:hover {
  color: var(--text);
  background: rgba(255,255,255,0.03);
  border-left-color: var(--border);
}

.sidebar-nav a.sub {
  padding-left: 24px;
  font-size: 12px;
}

/* ---- Main content ---- */
.content {
  flex: 1;
  min-width: 0;
  padding: 40px 48px 60px 36px;
  max-width: 900px;
  background: rgba(22, 22, 26, 0.88);
}


.content > h1 {
  font-family: Arial, Helvetica, sans-serif;
  color: var(--accent);
  margin-bottom: 8px;
  font-weight: bold;
}

.content > .page-desc {
  color: #fff;
  font-size: 15px;
  margin-bottom: 36px;
}


.content h2 {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 22px;
  color: var(--accent);
  margin: 48px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.content h2::before { display: none; }

.content h2:first-of-type { margin-top: 0; }


.content h3 {
  font-size: 18px;
  font-weight: bold;
  color: var(--text);
  margin: 28px 0 10px;
}


.content h4 {
  font-size: 15px;
  font-weight: bold;
  color: #fff;
  margin: 20px 0 8px;
  text-transform: none;
  letter-spacing: 0.01em;
}

.content p {
  margin-bottom: 14px;
  line-height: 1.75;
}

.content ul, .content ol {
  margin: 8px 0 16px 20px;
}

.content li {
  margin-bottom: 6px;
  line-height: 1.65;
}


.content strong { color: #fff; }

/* ================================================================
   TABLES
   ================================================================ */
.table-wrap {
  overflow-x: auto;
  margin: 16px 0 28px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}


body {
  background-color: #555;
  background-image: url("../img/stone.png");
  background-size: 256px 256px;
  background-repeat: repeat;
  image-rendering: pixelated;
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* Improve contrast for muted/secondary text on stone background */
body .nav-links a,
body .sidebar-label,
body .sidebar-nav a,
body .content > .page-desc,
body .content h4,
body .card p,
body .dimension-card .dim-meta,
body .build-label,
body .build-strategy,
body .req-pill,
body .section-header p,
body footer,
body .footer,
body .infobox-subtitle,
body th,
body .marker-diagram,
body .dimension-card p,
body .sidebar-nav a.sub {
  color: #fff !important;
}

td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

tr:last-child td { border-bottom: none; }

tr:nth-child(even) td { background: var(--surface-alt); }
tr:hover td { background: rgba(245, 158, 11, 0.04); }

/* ================================================================
   CODE BLOCKS
   ================================================================ */

code {
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 14px;
  background: var(--code-bg);
  padding: 2px 7px;
  border-radius: 4px;
  color: #fff;
}


pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  overflow-x: auto;
  margin: 16px 0 24px;
  line-height: 1.6;
  color: #fff;
}

pre code {
  background: none;
  padding: 0;
  font-size: 13px;
  border-radius: 0;
}

/* ================================================================
   CARDS
   ================================================================ */
.card {
  background: rgba(22, 22, 26, 0.92);
  border: 1px solid var(--border);
  border-top: 3px solid var(--amber);
  border-radius: 8px;
  padding: 24px;
}

.card-icon {
  font-size: 24px;
  margin-bottom: 12px;
  display: block;
}

.card h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--amber);
  margin: 0 0 8px;
}

.card p {
  font-size: 14px;
  color: #fff;
  margin: 0;
  line-height: 1.6;
}

/* ================================================================
   BADGES / PILLS
   ================================================================ */

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  background: var(--accent-dim);
  color: var(--accent);
  vertical-align: middle;
}

/* ================================================================
   CALLOUT BOXES
   ================================================================ */

.callout {
  border: 1px solid var(--accent);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 16px 20px;
  margin: 20px 0 28px;
  background: rgba(91, 155, 213, 0.08);
}

.callout p { margin: 0; }

.callout-emerald, .callout-muted {
  border-color: var(--border);
  border-left-color: var(--accent);
  background: rgba(91, 155, 213, 0.08);
}

/* ================================================================
   FORMULA / DAMAGE CALC BLOCKS
   ================================================================ */
.formula {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: var(--amber);
  margin: 16px 0 24px;
  text-align: center;
  letter-spacing: 0.02em;
}

/* ================================================================
   HERO SECTION  (index.html only)
   ================================================================ */
.hero {
  text-align: center;
  padding: 80px 24px 48px;
  max-width: 800px;
  margin: 0 auto;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.6);
}

.hero h1 {
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(48px, 8vw, 80px);
  font-weight: 700;
  color: var(--amber);
  margin-bottom: 16px;
  letter-spacing: 0.04em;
  line-height: 1.1;
}

.hero .tagline {
  font-size: 20px;
  color: var(--text);
  margin-bottom: 8px;
  font-weight: 400;
}

.hero .sub-tagline {
  font-size: 15px;
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto 32px;
  line-height: 1.65;
}

.btn-group {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

/* Minecraft-style pixelated buttons */
.btn-primary, .btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.03em;
  image-rendering: pixelated;
  border: 3px solid;
  position: relative;
  transition: filter 0.1s, transform 0.1s;
}

.btn-primary {
  background: #4a8a3f;
  color: #fff;
  border-color: #366b2c #234a1c #234a1c #366b2c;
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.15), inset 0 -2px 0 rgba(0,0,0,0.2);
  text-shadow: 1px 1px 0 rgba(0,0,0,0.4);
}

.btn-primary:hover {
  filter: brightness(1.15);
  color: #fff;
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(1px);
  box-shadow: inset 0 2px 0 rgba(0,0,0,0.2), inset 0 -1px 0 rgba(255,255,255,0.1);
  border-color: #234a1c #366b2c #366b2c #234a1c;
}

.btn-outline {
  background: #555;
  color: #d4d4d8;
  border-color: #777 #444 #444 #777;
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.1), inset 0 -2px 0 rgba(0,0,0,0.2);
  text-shadow: 1px 1px 0 rgba(0,0,0,0.3);
}

.btn-outline:hover {
  filter: brightness(1.15);
  color: #fff;
  transform: translateY(-1px);
}

.btn-outline:active {
  transform: translateY(1px);
  box-shadow: inset 0 2px 0 rgba(0,0,0,0.2), inset 0 -1px 0 rgba(255,255,255,0.1);
  border-color: #444 #777 #777 #444;
}

.req-pills {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.req-pill {
  display: inline-block;
  padding: 4px 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 99px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

/* ---- Feature grid ---- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  max-width: 1000px;
  margin: 0 auto;
  padding: 48px 24px;
}

/* ---- Section headings on landing ---- */
.section-header {
  text-align: center;
  padding: 48px 24px 0;
  max-width: 700px;
  margin: 0 auto;
}

.section-header h2 {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 24px;
  color: var(--text);
  margin-bottom: 8px;
  border: none;
  padding: 0;
}

.section-header h2::before { display: none; }

.section-header p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 0;
}

/* ---- Dimension cards ---- */
.dimension-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  max-width: 920px;
  margin: 0 auto;
  padding: 32px 24px 60px;
}

.dimension-card {
  background: rgba(22, 22, 26, 0.92);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
}

.dimension-card.overworld { border-top: 3px solid var(--overworld); }
.dimension-card.nether    { border-top: 3px solid var(--nether); }
.dimension-card.end       { border-top: 3px solid var(--end); }

.dimension-card h3 {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 17px;
  margin: 0 0 6px;
  color: var(--text);
}

.dimension-card .dim-meta {
  font-size: 13px;
  color: #fff;
  margin-bottom: 10px;
}

.dimension-card p {
  font-size: 14px;
  color: #fff;
  margin: 0;
  line-height: 1.55;
}

/* ================================================================
   SLIDESHOW
   ================================================================ */
.slideshow-container {
  position: relative;
  max-width: 900px;
  margin: 0 auto 32px;
  padding: 0 24px;
}

.slideshow {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 3px solid #555;
  border-color: #777 #444 #444 #777;
  background: #1a1a1e;
}

.slideshow .slide {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.slideshow .slide.active { opacity: 1; }

.slide-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  color: #d4d4d8;
  border: 2px solid;
  border-color: #666 #333 #333 #666;
  padding: 10px 14px;
  font-size: 18px;
  cursor: pointer;
  z-index: 2;
  transition: background 0.15s;
}

.slide-btn:hover { background: rgba(0,0,0,0.75); color: #fff; }
.slide-btn.prev { left: 32px; }
.slide-btn.next { right: 32px; }

.slide-dots {
  text-align: center;
  padding: 12px 0 0;
}

.slide-dots .dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin: 0 4px;
  background: #555;
  border: 1px solid #777;
  cursor: pointer;
  transition: background 0.2s;
}

.slide-dots .dot.active { background: var(--amber); border-color: var(--amber); }
.slide-dots .dot:hover { background: #888; }

/* ---- No-new-items callout ---- */
.philosophy-callout {
  max-width: 700px;
  margin: 0 auto 48px;
  padding: 0 24px;
}

/* ================================================================
   PROGRESSION MAP (biomes.html)
   ================================================================ */
.progression-map {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  overflow-x: auto;
  white-space: pre;
  color: var(--text);
  margin: 16px 0 28px;
  line-height: 1.6;
}

.progression-map .ow { color: var(--overworld); }
.progression-map .nt { color: var(--nether); }
.progression-map .en { color: var(--end); }
.progression-map .boss { color: var(--amber); font-weight: 600; }

/* ================================================================
   MARKER DIAGRAM (modding.html)
   ================================================================ */
.marker-diagram {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px 24px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  overflow-x: auto;
  white-space: pre;
  color: var(--muted);
  margin: 16px 0 24px;
  line-height: 1.5;
}

.marker-diagram .em { color: var(--emerald); font-weight: 600; }
.marker-diagram .go { color: var(--amber); font-weight: 600; }
.marker-diagram .ir { color: #fff; font-weight: 600; }

/* ================================================================
   BUILD CARDS  (Terraria-style class guide)
   ================================================================ */
.build-stage {
  margin: 32px 0 20px;
  padding: 10px 16px;
  background: var(--surface);
  border-left: 3px solid var(--amber);
  border-radius: 0 6px 6px 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 17px;
  color: var(--amber);
  font-weight: 600;
}

.build-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.build-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.build-card-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.build-card-header h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  text-transform: none;
  letter-spacing: 0;
}

.build-card-header .build-class {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--amber-dim);
  color: var(--amber);
  margin-left: auto;
}

.build-card-body {
  padding: 0;
}

.build-row {
  display: flex;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  gap: 8px;
}

.build-row:last-child { border-bottom: none; }

.build-row:nth-child(even) { background: var(--surface-alt); }

.build-label {
  color: #fff;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.06em;
  min-width: 70px;
  flex-shrink: 0;
  padding-top: 2px;
}

.build-value {
  color: var(--text);
  line-height: 1.5;
}

.build-value strong { color: var(--amber); font-weight: 600; }
.build-value .green { color: var(--emerald); }

.build-strategy {
  padding: 10px 16px;
  background: rgba(245, 158, 11, 0.03);
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: #fff;
  line-height: 1.55;
}

.build-strategy strong { color: var(--text); font-weight: 500; }

/* ================================================================
   FOOTER
   ================================================================ */
footer {
  border-top: 1px solid var(--border);
  padding: 28px 24px;
  text-align: center;
  color: #fff;
  font-size: 13px;
  background: rgba(22, 22, 26, 0.9);
  text-shadow: 1px 1px 2px rgba(0,0,0,0.4);
}

footer a {
  color: #fff;
  text-decoration: none;
  margin: 0 12px;
  transition: color 0.15s;
}

footer a:hover { color: var(--amber); }
footer .sep { color: var(--border); margin: 0 4px; }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 900px) {
  .sidebar { display: none; }
  .content { padding: 24px 16px 40px; max-width: 100%; }
  .dimension-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .page-layout { padding: 0 16px; }
  .nav-links { display: none; }
  .nav-hamburger { display: block; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--nav-height);
    left: 0; right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 12px 24px 16px;
    gap: 2px;
  }
  .nav-links.open a { padding: 10px 12px; }
  .nav-github { margin-left: 0 !important; }
  .hero { padding: 48px 16px 32px; }
  .hero h1 { font-size: 40px; }
  .feature-grid { padding: 32px 16px; }
  .dimension-grid { padding: 24px 16px 40px; }
  .philosophy-callout { padding: 0 16px; }
  .section-header { padding: 32px 16px 0; }
}

/* ================================================================
   WIKI INFOBOX  (boss pages — floats right in content)
   ================================================================ */
.infobox {
  float: right;
  clear: right;
  margin: 0 0 28px 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 230px;
  font-size: 13px;
  overflow: hidden;
}

.infobox-title {
  background: var(--surface-alt);
  padding: 10px 14px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--amber);
  text-align: center;
  border-bottom: 1px solid var(--border);
  line-height: 1.4;
}

.infobox-subtitle {
  font-size: 11px;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  display: block;
  margin-top: 2px;
}

.infobox-image {
  width: 100%;
  background: rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.infobox-image img {
  max-width: 130px;
  max-height: 130px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.infobox table {
  width: 100%;
  font-size: 12px;
  border-collapse: collapse;
}

.infobox th {
  background: none;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  width: 46%;
  padding: 7px 10px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  text-align: left;
}

.infobox td {
  padding: 7px 10px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.infobox tr:last-child th,
.infobox tr:last-child td { border-bottom: none; }

.infobox tr:nth-child(even) td { background: var(--surface-alt); }

/* ================================================================
   WIKI TOC  (floating table of contents)
   ================================================================ */
.wiki-toc {
  float: left;
  clear: left;
  margin: 4px 24px 16px 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  min-width: 150px;
  max-width: 190px;
  font-size: 13px;
  overflow: hidden;
}

.wiki-toc-title {
  background: var(--surface-alt);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  user-select: none;
  cursor: pointer;
}

.wiki-toc-title a {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

.wiki-toc ol {
  padding: 10px 12px 10px 30px;
  margin: 0;
  list-style: decimal;
}

.wiki-toc ol li {
  margin: 4px 0;
  line-height: 1.5;
}

.wiki-toc ol li a {
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
}

.wiki-toc ol li a:hover { color: var(--amber); }

/* ================================================================
   BOSS PAGE — breadcrumb, phase-2 callout, prev/next nav
   ================================================================ */
.breadcrumb {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 20px !important;
}

.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--amber); }
.breadcrumb .sep { color: var(--border); margin: 0 6px; }

.phase2-callout {
  border: 1px solid var(--nether);
  border-left: 4px solid var(--nether);
  border-radius: 8px;
  padding: 14px 18px;
  background: rgba(239, 68, 68, 0.05);
  margin: 16px 0 24px;
  clear: both;
}

.phase2-callout p { margin: 0; line-height: 1.7; }
.phase2-callout strong { color: #f87171; }

.boss-nav {
  display: flex;
  gap: 12px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  clear: both;
}

.boss-nav-link {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s;
  flex: 1;
}

.boss-nav-link:hover {
  border-color: var(--amber);
  color: var(--amber);
}

.boss-nav-link .nav-dir {
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
}

.boss-nav-link.next { text-align: right; }

/* Clearfix for floating infobox / toc */
.wiki-content::after {
  content: '';
  display: table;
  clear: both;
}

/* Sidebar active highlight */
.sidebar-nav a.active {
  color: var(--amber);
  border-left-color: var(--amber);
  background: var(--amber-dim);
}

/* Boss grid on hub page */
.boss-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin: 20px 0 32px;
}

.boss-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  transition: border-color 0.15s, transform 0.1s;
}

.boss-card:hover {
  border-color: var(--amber);
  transform: translateY(-2px);
  color: var(--text);
}

.boss-card-img {
  width: 100%;
  background: rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  height: 100px;
}

.boss-card-img img {
  max-height: 70px;
  max-width: 80px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.boss-card-body {
  padding: 12px 14px;
}

.boss-card-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--amber);
  margin-bottom: 2px;
}

.boss-card-biome {
  font-size: 12px;
  color: var(--muted);
}

.boss-card-stats {
  margin-top: 8px;
  font-size: 11px;
  color: var(--muted);
  display: flex;
  gap: 10px;
}

@media (max-width: 900px) {
  .infobox { float: none; width: 100%; margin: 0 0 24px; }
  .wiki-toc { float: none; max-width: 100%; margin: 0 0 20px; }
  .boss-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}
