/* ============================================================
   WIKI: peças da interface do Minecraft que o Bootstrap não tem
   (cores de texto do jogo, slot, janela de inventário, tooltip,
   brilho de encantamento, infobox, árvore lateral e visualizador 3D)
   ============================================================ */

/* ── Cores do texto do jogo (usadas pelos nomes e descrições gerados do plugin) ── */
.mc-color-black        { color: #000000; }
.mc-color-dark_blue    { color: #0000aa; }
.mc-color-dark_green   { color: #00aa00; }
.mc-color-dark_aqua    { color: #00aaaa; }
.mc-color-dark_red     { color: #aa0000; }
.mc-color-dark_purple  { color: #aa00aa; }
.mc-color-gold         { color: #ffaa00; }
.mc-color-gray         { color: #aaaaaa; }
.mc-color-dark_gray    { color: #555555; }
.mc-color-blue         { color: #5555ff; }
.mc-color-green        { color: #55ff55; }
.mc-color-aqua         { color: #55ffff; }
.mc-color-red          { color: #ff5555; }
.mc-color-light_purple { color: #ff55ff; }
.mc-color-yellow       { color: #ffff55; }
.mc-color-white        { color: #ffffff; }
.mc-bold          { font-weight: 700; }
.mc-italic        { font-style: italic; }
.mc-underlined    { text-decoration: underline; }
.mc-strikethrough { text-decoration: line-through; }

/* ── Slot de inventário (cinza afundado, como no jogo) ── */
.mc-slot {
  --slot-size: 44px;
  position: relative;
  width: var(--slot-size);
  height: var(--slot-size);
  background: #8b8b8b;
  border: 2px solid;
  border-color: #373737 #ffffff #ffffff #373737;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: default;
}
.mc-slot:hover { background: #a8a8a8; }
.mc-slot.mc-slot-empty:hover { background: #8b8b8b; }
.mc-slot-large { --slot-size: 64px; }
.mc-slot-icon {
  width: calc(var(--slot-size) - 8px);
  height: calc(var(--slot-size) - 8px);
  image-rendering: pixelated;
  pointer-events: none;
}
.mc-slot-amount {
  position: absolute;
  right: 1px;
  bottom: -2px;
  font-family: var(--mc-font);
  font-size: .85rem;
  color: #fff;
  text-shadow: 2px 2px 0 #3f3f3f;
  pointer-events: none;
}

/* Brilho roxo de item encantado: a cor passa por cima só onde o ícone tem pixel (máscara com o próprio ícone) */
.mc-glint::after {
  content: '';
  position: absolute;
  inset: 4px;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 20%, rgba(190, 120, 255, .55) 40%, transparent 60%) 0 0 / 300% 300%;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
  animation: mc-glint-move 3s linear infinite;
  mix-blend-mode: screen;
}
@keyframes mc-glint-move { from { background-position: 100% 100%; } to { background-position: 0 0; } }

/* ── Janela de inventário (fundo cinza-claro com borda em relevo) ── */
.mc-window {
  display: inline-block;
  background: #c6c6c6;
  border: 3px solid;
  border-color: #ffffff #555555 #555555 #ffffff;
  border-radius: 4px;
  box-shadow: 0 0 0 2px #000, var(--mc-ambient);
  padding: 10px 12px 12px;
  max-width: 100%;
}
.mc-window-title {
  font-family: var(--mc-font);
  font-size: .95rem;
  color: #404040;
  margin-bottom: 6px;
}
.mc-window-title span { text-shadow: none; }
.mc-window-grid {
  display: grid;
  grid-template-columns: repeat(9, var(--slot-size, 44px));
  gap: 0;
}
@media (max-width: 520px) {
  .mc-window .mc-slot { --slot-size: 34px; }
  .mc-window-grid { grid-template-columns: repeat(9, 34px); }
}
.mc-crafting { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.mc-crafting-grid { display: grid; grid-template-columns: repeat(3, 44px); }
.mc-arrow { font-family: var(--mc-font); font-size: 2rem; color: #8b8b8b; text-shadow: 2px 2px 0 #555; }

/* Troca de villager: ingredientes → resultado, numa linha */
.mc-trade { display: flex; align-items: center; gap: 6px; padding: 4px 6px; }
.mc-trade + .mc-trade { border-top: 1px solid #a5a5a5; }

/* ── Tooltip do Minecraft (fundo quase preto, borda roxa em degradê) ── */
.mc-tooltip {
  position: fixed;
  z-index: 3000;
  pointer-events: none;
  max-width: 360px;
  padding: 6px 9px 7px;
  background: rgba(16, 0, 16, .94);
  border: 2px solid transparent;
  border-image: linear-gradient(180deg, #5000ff, #28007f) 1;
  outline: 2px solid rgba(16, 0, 16, .94);
  font-family: var(--mc-font);
  font-size: .9rem;
  line-height: 1.35;
  color: #fff;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, .55);
  display: none;
}
.mc-tooltip.visible { display: block; }
.mc-tooltip-name { margin-bottom: 4px; }
.mc-tooltip-line { min-height: 1.1em; }

/* ── Infobox (quadro de atributos do boss) ── */
.mc-infobox {
  font-family: var(--mc-font);
  padding: 16px;
}
.mc-infobox-header {
  text-align: center;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 2px solid rgba(0, 0, 0, .3);
}
.mc-infobox-title { font-size: 1.15rem; font-weight: 700; text-shadow: 2px 2px 0 #000; margin: 0; }
.mc-infobox-subtitle {
  display: inline-block;
  margin-top: 6px;
  font-size: .75rem;
  background: rgba(0, 0, 0, .3);
  border: 1px solid rgba(0, 0, 0, .5);
  padding: 2px 6px;
}
.mc-stat-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 8px;
  margin-bottom: 4px;
  background: rgba(0, 0, 0, .3);
  border-left: 3px solid transparent;
  border-radius: 4px;
  font-size: .78rem;
}
.mc-stat-row:hover { background: rgba(0, 0, 0, .4); border-left-color: rgba(255, 255, 255, .25); }
.mc-stat-label { color: #cbd5e1; }
.mc-stat-value { color: #fff; font-weight: 700; text-align: right; }

/* ── Visualizador 3D ── */
.mc-model-viewer {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: radial-gradient(circle at 50% 40%, rgba(255, 255, 255, .12), rgba(0, 0, 0, .35));
  border-radius: 4px;
  cursor: grab;
  touch-action: none;
  overflow: hidden;
}
.mc-model-viewer:active { cursor: grabbing; }
.mc-model-viewer canvas { width: 100% !important; height: 100% !important; display: block; }
.mc-model-hint {
  position: absolute;
  bottom: 6px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--mc-font);
  font-size: .7rem;
  color: rgba(255, 255, 255, .6);
  pointer-events: none;
}

/* ── Árvore lateral da Wiki ── */
.wiki-sidebar {
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  font-family: var(--mc-font);
  font-size: .8rem;
}
.wiki-sidebar-group {
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  font-size: .72rem;
  letter-spacing: .04em;
  margin: 14px 0 4px;
  color: var(--mc-muted);
}
.wiki-sidebar a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 4px;
  color: var(--mc-text);
  text-decoration: none;
}
.wiki-sidebar a:hover { background: var(--mc-surface-2); color: #fff; }
.wiki-sidebar a.active { background: var(--mc-green); color: #fff; box-shadow: inset 0 -3px 0 var(--mc-green-dk); }
.wiki-sidebar img { width: 20px; height: 20px; image-rendering: pixelated; }

/* ── Cartões da página inicial da Wiki ── */
.wiki-card-icon {
  background: rgba(0, 0, 0, .2);
  padding: 14px 0;
  display: flex;
  justify-content: center;
}
.wiki-card-icon img { width: 64px; height: 64px; image-rendering: pixelated; }
.wiki-card-title {
  font-family: var(--mc-font);
  font-weight: 700;
  font-size: .9rem;
  text-transform: uppercase;
  text-shadow: 2px 2px 0 #000;
  color: #fff;
}
.wiki-card-meta { font-family: var(--mc-font); font-size: .75rem; color: rgba(255, 255, 255, .85); }

/* Linha da tabela de prêmios (ícone, nome, quantidade) */
.mc-loot-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 10px;
  background: rgba(0, 0, 0, .25);
  border-radius: 4px;
  font-family: var(--mc-font);
  font-size: .85rem;
}
.mc-loot-row + .mc-loot-row { margin-top: 6px; }

/* Texto em markdown dos guias */
.wiki-article h2, .wiki-article h3 { font-size: 1.1rem; margin-top: 1.5rem; color: #fff; text-shadow: 2px 2px 0 #000; }
.wiki-article table { width: 100%; margin: 1rem 0; border-collapse: collapse; font-size: .88rem; }
.wiki-article th, .wiki-article td { border: 1px solid var(--mc-border); padding: 6px 10px; }
.wiki-article th { background: var(--mc-surface-2); font-family: var(--mc-font); }
.wiki-article code { background: #11151f; color: var(--mc-green-light); padding: 1px 5px; border-radius: 3px; }
