/* Magic & Blocks — wiki */
:root {
  --bg: #0d0f17;
  --panel: #151a26;
  --card: #1b2130;
  --line: #2a3347;
  --text: #e8ecf5;
  --soft: #a9b3c7;
  --gold: #ffb52e;
  --gold2: #ff8a1e;
  --cyan: #7fe6ff;
  --slot: #8b8b8b;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: radial-gradient(1100px 500px at 50% -15%, #1d2a44 0%, var(--bg) 60%) fixed, var(--bg);
  color: var(--text);
  font-family: "Nunito", system-ui, sans-serif;
  line-height: 1.6;
}
a { color: var(--cyan); }
img { image-rendering: pixelated; }
b { color: #fff; }

/* ===== Barra de cima ===== */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 18px; padding: 0 20px; height: 64px;
  background: rgba(13, 15, 23, .9); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--gold); text-decoration: none;
  font-family: "Press Start 2P", monospace; font-size: 11px; white-space: nowrap; }
.brand img { width: 40px; height: 40px; image-rendering: auto; }
.brand small { color: var(--soft); font-size: 9px; }
.tabs { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
.tabs a { color: var(--soft); text-decoration: none; font-weight: 800; padding: 8px 12px; border-radius: 10px; white-space: nowrap; }
.tabs a:hover { color: var(--text); background: var(--card); }
.tabs a.on { color: #1a1204; background: linear-gradient(180deg, var(--gold), var(--gold2)); }

.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 13px 24px; border-radius: 12px;
  font-weight: 900; font-size: 17px; text-decoration: none; color: #1a1204; white-space: nowrap;
  background: linear-gradient(180deg, var(--gold), var(--gold2)); box-shadow: 0 5px 0 #9c4f07;
  transition: transform .08s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn.small { padding: 8px 14px; font-size: 14px; box-shadow: 0 3px 0 #9c4f07; }

/* ===== Layout das categorias ===== */
.layout { display: grid; grid-template-columns: 250px 1fr; gap: 28px; max-width: 1200px; margin: 0 auto; padding: 24px 20px 40px; }
.side { position: sticky; top: 84px; align-self: start; max-height: calc(100vh - 100px); overflow-y: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 12px; }
.side input { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg);
  color: var(--text); font: inherit; margin-bottom: 8px; }
.side-list a { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; color: var(--soft);
  text-decoration: none; font-weight: 700; font-size: 15px; }
.side-list a:hover, .side-list a.on { background: var(--card); color: var(--text); }
.side-list img { width: 24px; height: 24px; }
main h1 { font-family: "Press Start 2P", monospace; font-size: 22px; color: var(--gold); margin: 6px 0 4px; line-height: 1.4; }
main .sub { color: var(--soft); margin: 0 0 20px; }
.callout { background: #1d2b46; border: 1px solid #2e4a78; border-radius: 14px; padding: 14px 18px; margin-bottom: 20px; }

@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .side { position: static; max-height: none; }
  .brand small, .top .btn { display: none; }
}

/* ===== Entradas ===== */
.entry { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 22px; margin-bottom: 20px; }
.entry .head { display: flex; gap: 18px; align-items: flex-start; }
.entry h3 { margin: 0 0 4px; font-size: 22px; }
.entry .head p { margin: 0; color: var(--soft); }
.entry h4 { margin: 20px 0 6px; color: var(--gold); }
.entry p { color: var(--soft); }
.tip { font-size: 14px; font-style: italic; }
.pieces { display: flex; gap: 6px; margin-top: 16px; }

/* ===== Slots e receitas (estilo inventario do Minecraft) ===== */
.slot { width: 40px; height: 40px; display: inline-grid; place-items: center; flex: none;
  background: var(--slot); border: 2px solid; border-color: #373737 #fff #fff #373737; }
.slot img { width: 32px; height: 32px; }
.slot.big { width: 56px; height: 56px; }
.slot.big img { width: 44px; height: 44px; }
.recipe { display: inline-block; vertical-align: top; margin: 16px 16px 0 0; background: #c6c6c6; color: #3f3f3f;
  border-radius: 6px; padding: 10px 14px; border: 2px solid; border-color: #fff #555 #555 #fff; }
.recipe .label { font-weight: 900; font-size: 13px; margin-bottom: 6px; color: #404040; }
.craft { display: flex; align-items: center; gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 40px); gap: 0; }
.arrow { font-size: 30px; color: #6b6b6b; }
.plus { font-size: 22px; font-weight: 900; color: #6b6b6b; }
.count { font-weight: 900; margin-left: -6px; }
.infuse .col { display: flex; flex-direction: column; align-items: center; }
.infuse .col .plus { line-height: 1; }
.machine { width: 36px; height: 36px; }
.hint { font-size: 12px; color: #555; margin-top: 4px; }
.obtain { margin: 0; color: #3f3f3f !important; max-width: 520px; }

/* ===== Tabelas ===== */
table.abil { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 15px; border-radius: 12px; overflow: hidden; }
table.abil th, table.abil td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; }
table.abil th { background: #222a3c; color: var(--gold); }
table.abil td { background: #181e2b; }
table.abil td:last-child { white-space: nowrap; color: var(--cyan); font-weight: 800; }
img.mini { width: 22px; height: 22px; vertical-align: middle; margin-right: 8px; }

/* ===== Inicio ===== */
.home { max-width: 1000px; margin: 0 auto; padding: 30px 20px 40px; text-align: center; }
.home .logo { width: 260px; height: 260px; image-rendering: auto; filter: drop-shadow(0 16px 30px rgba(0, 0, 0, .6)); }
.lead { font-size: 19px; color: var(--soft); max-width: 700px; margin: 10px auto 18px; }
.pills { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 30px; }
.pills span { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px; font-weight: 700; color: var(--soft); font-size: 14px; }
.topics { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; text-align: left; }
.topic { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px; text-decoration: none; color: var(--text);
  transition: transform .1s ease, border-color .1s ease; }
.topic:hover { transform: translateY(-3px); border-color: var(--gold); }
.topic .icons { display: flex; gap: 4px; }
.topic .icons img { width: 32px; height: 32px; }
.topic h3 { margin: 12px 0 4px; font-size: 20px; }
.topic p { margin: 0 0 10px; color: var(--soft); font-size: 15px; }
.topic span { color: var(--gold); font-weight: 800; font-size: 14px; }
.support { margin-top: 36px; background: linear-gradient(135deg, #1f2b4a, #2a1f44); border: 1px solid var(--line); border-radius: 20px; padding: 34px 20px; }
.support h2 { font-family: "Press Start 2P", monospace; font-size: 18px; color: var(--gold); margin: 0; }
.support p { color: var(--soft); }

footer { border-top: 1px solid var(--line); padding: 22px 20px 36px; color: var(--soft); font-size: 14px; text-align: center; }

/* prints do jogo (montagem dos rituais) */
.prints { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 14px 0; }
.prints figure { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.prints img { display: block; width: 100%; height: auto; image-rendering: auto; }
.prints figcaption { padding: 8px 10px; font-size: 14px; color: var(--soft); }
.steps { margin: 8px 0 12px 20px; padding: 0; }
.steps li { margin: 4px 0; }
/* pagina de texto (Balanceamento) */
main.page-text { max-width: 980px; margin: 0 auto; padding: 28px 20px 40px; }
main.page-text h2 { font-family: "Press Start 2P", monospace; font-size: 15px; color: var(--cyan); margin: 30px 0 6px; }
main.page-text code { background: #222a3c; border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; color: var(--gold); }
table.tbl td:last-child { white-space: normal; color: var(--text); font-weight: 400; }