/* ShinobIDLE — site oficial. Pixel art sempre em escala inteira e sem suavizar. */
@font-face { font-family: "Noto Sans"; src: url("../fontes/NotoSans-Variable.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Jersey 10"; src: url("../fontes/Jersey10.ttf") format("truetype"); font-display: swap; }

:root {
  --fundo: #0d0a13;
  --papel: #15121e;
  --papel2: #1c1828;
  --linha: #3a2f52;
  --texto: #e6ddf0;
  --suave: #a89cbc;
  --roxo: #c07cf4;
  --roxo-escuro: #6a3fa0;
  --ciano: #7fe0ee;
  --ouro: #f0c862;
  --vermelho: #e0584c;
  --verde: #7ce08a;
}
* { box-sizing: border-box; }
html { background: var(--fundo); }
body {
  margin: 0; color: var(--texto);
  font-family: "Noto Sans", system-ui, sans-serif; font-size: 15px; line-height: 1.55; font-weight: 450;
  background: var(--fundo) url("../img/ui/ceu.png?v=bf4aa2ae2f") center top / 1800px 1344px no-repeat;
  image-rendering: pixelated;
}
img, .sprite { image-rendering: pixelated; }
img.suave { image-rendering: auto; }
a { color: var(--ciano); text-decoration: none; }
a:hover { color: #fff; text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.25; }
h3 { color: var(--ouro); font-size: 18px; margin: 22px 0 8px; font-weight: 700; }
h4 { color: var(--roxo); font-size: 15px; margin: 16px 0 6px; font-weight: 700; }
p { margin: 0 0 12px; }
ul { margin: 0 0 12px; padding-left: 20px; }
li { margin: 3px 0; }
b, strong { color: #fff; font-weight: 700; }
.ouro { color: var(--ouro); } .roxo { color: var(--roxo); } .ciano { color: var(--ciano); } .suave { color: var(--suave); }

/* ---------- topo ---------- */
.topo {
  width: 1120px; height: 232px; margin: 0 auto; position: relative;
  background: url("../img/ui/fundo_lua.png?v=1d10ebbe5b") center -150px / 1440px 900px no-repeat;
  border-left: 2px solid #2a2038; border-right: 2px solid #2a2038;
}
.topo::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 60px; background: linear-gradient(transparent, var(--fundo)); }
.topo .logo { position: absolute; left: 40px; top: 46px; z-index: 2; display: block; }
.topo .logo img { width: 474px; height: 110px; display: block; }
.topo .selo { position: absolute; left: 520px; top: 64px; width: 52px; height: 52px; z-index: 2; }
.topo .lema { position: absolute; left: 44px; top: 162px; z-index: 2; color: #f4e6ff; font-weight: 600; text-shadow: 0 2px 0 #000, 0 0 8px #000; }
.topo .atalhos { position: absolute; right: 26px; top: 26px; z-index: 2; display: flex; gap: 8px; }

/* ---------- botões (peças do Grimório) ---------- */
.botao {
  display: inline-flex; align-items: center; justify-content: center; height: 32px; min-width: 118px; padding: 0 18px;
  border-style: solid; border-width: 0 16px; border-image: url("../img/ui/b194.png?v=6c2e5c2a45") 0 16 fill / 0 16px stretch;
  color: #e8dcf6; font-weight: 600; font-size: 14px; white-space: nowrap; text-decoration: none !important; cursor: pointer; background: none;
  font-family: inherit;
}
.botao:hover, .botao.ativo { border-image-source: url("../img/ui/b194_on.png?v=2a75c50e48"); color: #fff; }
.botao.grande { height: 32px; min-width: 194px; }
.botao-baixar {
  display: block; text-align: center; text-decoration: none !important; padding: 14px 10px 12px;
  border-style: solid; border-width: 14px; border-image: url("../img/ui/caixa_premio.png?v=a75cbf2532") 14 fill / 14px stretch;
  color: #fff; font-family: "Jersey 10", "Noto Sans", sans-serif; font-size: 30px; line-height: 1; letter-spacing: 1px;
  text-shadow: 0 2px 0 #000;
}
.botao-baixar small { display: block; font-family: "Noto Sans", sans-serif; font-size: 13px; color: var(--ciano); letter-spacing: 0; margin-top: 6px; text-shadow: none; }
.botao-baixar:hover { filter: brightness(1.18); }

/* ---------- colunas ---------- */
.pagina { width: 1120px; margin: -8px auto 0; display: grid; grid-template-columns: 220px 640px 236px; gap: 12px; position: relative; z-index: 3; align-items: start; }
.col-esq, .col-dir { display: flex; flex-direction: column; gap: 12px; }
.col-centro { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.menu-botao { display: none; }

/* ---------- a caixa (moldura do Grimório) ---------- */
.caixa {
  position: relative;
  border-style: solid; border-width: 64px 30px 30px 30px;
  border-image: url("../img/ui/caixa.png?v=1536a6e5ef") 64 52 30 52 fill / 64px 52px 30px 52px repeat;
  min-width: 0;
}
.caixa > .titulo {
  position: absolute; top: -44px; left: 8px; right: 8px; height: 34px; margin: 0;
  font-family: "Jersey 10", "Noto Sans", sans-serif; font-weight: 400; font-size: 30px; line-height: 34px;
  color: #f3e8ff; text-shadow: 0 2px 0 #08060a; letter-spacing: 0.5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.caixa.enfeite::before {
  content: ""; position: absolute; top: -64px; left: 50%; width: 60px; height: 28px; margin-left: -30px;
  background: url("../img/ui/caixa_enfeite.png?v=04eac26cb7") no-repeat; pointer-events: none;
}
.caixa.enfeite > .titulo { right: 50%; padding-right: 34px; }
.caixa > .corpo { padding: 8px 2px 4px; }
.col-esq .caixa > .titulo, .col-dir .caixa > .titulo { font-size: 30px; }
.col-esq .caixa, .col-dir .caixa { border-width: 64px 20px 30px 20px; }
.col-esq .caixa > .titulo, .col-dir .caixa > .titulo { left: 18px; }

/* menu da esquerda */
.menu { list-style: none; margin: 0; padding: 4px 0 0; display: flex; flex-direction: column; gap: 6px; }
.menu li { margin: 0; }
.menu a { display: flex; width: 100%; justify-content: flex-start; padding: 0 4px; min-width: 0; font-size: 13px; overflow: hidden; }
.menu a img { width: 20px; height: 20px; margin-right: 8px; }

/* painel ciano (peça caixa_detalhe) */
.painel { border-style: solid; border-width: 12px; border-image: url("../img/ui/caixa_detalhe.png?v=c7e1d61336") 14 fill / 14px stretch; padding: 4px 6px; margin: 0 0 12px; }
.painel > :last-child { margin-bottom: 0; }
.painel h3:first-child, .painel h4:first-child { margin-top: 2px; }

/* notícias */
.noticia { margin: 0 0 18px; padding-bottom: 14px; border-bottom: 1px dashed var(--linha); }
.noticia:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.noticia .data { font-size: 13px; color: var(--roxo); font-weight: 700; letter-spacing: .5px; }
.noticia h3 { margin: 2px 0 8px; }
.noticia .miudo { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin: 8px 0; }

/* tabelas no padrão do Grimório */
.tabela-rola { overflow-x: auto; margin: 0 0 14px; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
td small { display: block; color: var(--suave); font-size: 13px; }
th { background: #2a1f40; color: var(--ouro); text-align: left; font-weight: 700; padding: 6px 8px; border: 1px solid #4a3a6a; }
td { padding: 5px 8px; border: 1px solid #2e2642; vertical-align: top; }
tr:nth-child(even) td { background: rgba(255,255,255,0.025); }
td.num, th.num { text-align: right; white-space: nowrap; }
td img { vertical-align: middle; }

/* direita */
.status-servidor { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.lanterna { width: 14px; height: 14px; border-radius: 3px; background: #555; box-shadow: 0 0 0 2px #0a0810 inset; flex: none; }
.lanterna.on { background: var(--verde); box-shadow: 0 0 8px var(--verde); }
.lanterna.off { background: var(--vermelho); }
.lista-classes { display: grid; grid-template-columns: repeat(3, 64px); justify-content: center; gap: 8px 0; }
.lista-classes a { display: flex; flex-direction: column; align-items: center; font-size: 13px; color: var(--texto); }
.lista-classes img { width: 64px; height: 64px; background: #1a1424; }

/* redes sociais */
.redes { display: flex; flex-wrap: wrap; gap: 8px; }
.redes .rede { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; background: #1b1626; border: 1px solid #4a3a6a; }
.redes .rede:hover { border-color: var(--ciano); background: #261d36; }
.rodape .redes .rede { width: 32px; height: 32px; }
.lista-redes { list-style: none; padding: 0; } .lista-redes li { margin: 8px 0; font-weight: 600; }

/* sprites animados (site.js) */
.sprite { display: inline-block; background-repeat: no-repeat; vertical-align: bottom; }

/* classes */
.classe-cartao { display: grid; grid-template-columns: 136px 1fr; gap: 14px; align-items: start; }
.retrato { width: 128px; height: 128px; border: 4px solid #3a2f52; background-color: #1a1424; background-size: 2048px 128px; }
.etiquetas { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.etiqueta { font-size: 13px; padding: 1px 8px; border: 1px solid #4a3a6a; background: #22192f; color: var(--ciano); border-radius: 2px; }

/* wiki */
.busca { width: 100%; padding: 8px 10px; background: #0f0c16; border: 2px solid #4a3a6a; color: #fff; font: inherit; }
.busca:focus { outline: none; border-color: var(--ciano); }
.resultados { list-style: none; padding: 0; margin: 8px 0 0; }
.resultados li { padding: 6px 0; border-bottom: 1px dashed var(--linha); }
.resultados small { color: var(--suave); display: block; }
.grade-wiki { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.grade-wiki a { display: flex; gap: 10px; align-items: center; padding: 8px 10px; background: #1b1626; border: 1px solid #3a2f52; color: var(--texto); }
.grade-wiki a:hover { border-color: var(--ciano); text-decoration: none; }
.grade-wiki a img { width: 32px; height: 32px; flex: none; }
.grade-wiki a span small { display: block; color: var(--suave); font-size: 13px; }
.indice { columns: 2; font-size: 14px; }
.trilha { font-size: 13px; color: var(--suave); margin: 0 0 10px; }
.monstros { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.monstro { display: flex; flex-direction: column; align-items: center; text-align: center; font-size: 13px; width: 132px; }
.monstro .palco { height: 80px; display: flex; align-items: flex-end; justify-content: center; }
.cartas { display: flex; flex-wrap: wrap; gap: 12px; }
.cartas figure { margin: 0; text-align: center; font-size: 13px; width: 176px; }
.cartas img { width: 176px; height: auto; }
.jutsu-ic { width: 24px; height: 24px; vertical-align: middle; }
.mapa-vivo { display: block; margin: 0 auto 8px; border: 2px solid #3a2f52; }
.dois { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* calculadora */
.calc-linha { display: grid; grid-template-columns: 26px 110px 1fr 42px 64px; gap: 8px; align-items: center; margin: 4px 0; }
.calc-linha img { width: 20px; height: 20px; }
.calc-linha .val { font-weight: 700; color: #fff; text-align: center; }
.calc-linha .custo { font-size: 13px; color: var(--suave); }
.calc-linha .bonus { color: var(--ouro); font-size: 12px; }
.btn-mini { width: 26px; height: 24px; background: #2a1f40; border: 1px solid #5a4a7a; color: #fff; cursor: pointer; font: 700 14px/1 "Noto Sans", sans-serif; padding: 0; }
.btn-mini:hover { border-color: var(--ciano); }
.btn-mini:disabled { opacity: .35; cursor: default; }
.par { display: flex; gap: 4px; }
.campo { background: #0f0c16; border: 2px solid #4a3a6a; color: #fff; font: inherit; padding: 4px 6px; }
.formulario { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-bottom: 10px; }
.formulario label { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.status-grade { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
.status-grade div { display: flex; align-items: center; gap: 8px; padding: 3px 0; border-bottom: 1px dashed var(--linha); }
.status-grade img { width: 20px; height: 20px; }
.status-grade b { margin-left: auto; }
.pontos { font-size: 18px; font-weight: 700; }
.arvore-ramo { margin: 0 0 12px; }
.arvore-ramo h4 { margin: 8px 0 4px; }
.no { display: grid; grid-template-columns: 28px 1fr 74px 60px; gap: 8px; align-items: center; padding: 4px 4px; border-bottom: 1px dashed var(--linha); }
.no.travado { opacity: .55; }
.no .nome { font-weight: 600; font-size: 14px; }
.no .nome small { display: block; font-weight: 450; color: var(--suave); font-size: 13px; }
.no .nv { text-align: center; font-weight: 700; }
.aviso { color: var(--vermelho); font-weight: 600; }
.ok { color: var(--verde); font-weight: 600; }
.link-build { width: 100%; }

/* rodapé */
.rodape { width: 1120px; margin: 18px auto 30px; text-align: center; color: var(--suave); font-size: 13px; }
.rodape a { color: var(--suave); }

/* ---------- celular ---------- */
@media (max-width: 1140px) {
  body { background-size: 1200px 896px; }
  .topo { width: 100%; height: 170px; border: 0; background-size: 960px 600px; background-position: center -110px; }
  .topo .logo { left: 50%; margin-left: -118px; top: 30px; }
  .topo .logo img { width: 237px; height: 55px; }
  .topo .selo, .topo .atalhos { display: none; }
  .topo .lema { left: 0; right: 0; top: 100px; text-align: center; padding: 0 10px; font-size: 14px; }
  .pagina { width: 100%; grid-template-columns: minmax(0, 1fr); padding: 0 6px; margin-top: 0; }
  .col-centro img, .noticia img { max-width: 100%; height: auto; }
  .caixa.enfeite::before { display: none; }
  .caixa.enfeite > .titulo { right: 8px; padding-right: 0; }
  .miudo .sprite { max-width: 100%; }
  .col-esq { order: 1; } .col-centro { order: 2; } .col-dir { order: 3; }
  .menu-botao { display: flex; order: 0; width: 100%; }
  .col-esq.fechado .caixa { display: none; }
  .caixa { border-width: 64px 22px 30px 22px; }
  .col-esq .caixa, .col-dir .caixa { border-width: 64px 22px 30px 22px; }
  .rodape { width: 100%; padding: 0 10px; }
  .dois, .grade-wiki, .status-grade { grid-template-columns: 1fr; }
  .indice { columns: 1; }
  .classe-cartao { grid-template-columns: 1fr; }
  .calc-linha { grid-template-columns: 24px 90px 1fr 36px 56px; gap: 5px; }
  .mapa-vivo { max-width: 100%; height: auto; }
}
@media (prefers-reduced-motion: reduce) { .sprite { animation: none !important; } }
