/* ============================================================
   JUTSUS.CSS — Elementos & Jutsus
   Usa os tokens de style.css (--ink-*, --chakra, --ember, --gold,
   --font-display, --font-body, --font-mono).
   ============================================================ */

.jut-page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 24px 60px;
}

/* ── CABEÇALHO ──────────────────────────────────────────────── */
.jut-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}
.jut-header-left { display: flex; align-items: center; gap: 14px; }
.jut-header-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  background: linear-gradient(135deg, var(--ink-800), var(--ink-700));
  border: 1px solid var(--ink-line-strong);
  color: var(--ember);
}
.jut-titulo {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--text);
  margin: 0 0 2px;
  letter-spacing: .5px;
}
.jut-subtitulo { font-size: .85rem; color: var(--text-dim); margin: 0; }

/* ── ABAS PRINCIPAIS: Elementos | Kekkei Genkai ────────────── */
.jut-abas { display: flex; gap: 8px; margin-bottom: 16px; }
.jut-aba {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: .84rem;
  padding: 10px 20px;
  border-radius: 10px;
  border: 1px solid var(--ink-line);
  background: var(--ink-800);
  color: var(--text-dim);
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.jut-aba:hover { color: var(--text); border-color: var(--ink-line-strong); }
.jut-aba.active { background: var(--ember); border-color: var(--ember); color: #fff; }

/* ── GRID DE ELEMENTOS/KG (cards clicáveis — clique expande o
   painel do jutsu logo abaixo da grade; clique de novo recolhe;
   clicar noutro elemento troca qual está aberto) ────────────── */
.jut-sub-abas { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.jut-elem-card {
  flex: 1 1 130px;
  max-width: 150px;
  background: var(--ink-800);
  border: 1px solid var(--ink-line);
  border-radius: 12px;
  padding: 12px 10px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s ease, transform .15s ease, background .15s ease;
}
.jut-elem-card:hover { border-color: var(--ink-line-strong); transform: translateY(-2px); }
.jut-elem-card.active { background: rgba(255,90,54,.08); }
.jut-elem-card.aprendido { border-color: var(--ink-line-strong); }

.jut-elem-card-img-wrap {
  width: 56px; height: 56px;
  margin: 0 auto 8px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--ink-900);
  border: 1px solid var(--ink-line);
}
.jut-elem-card-img { width: 100%; height: 100%; object-fit: cover; }
.jut-elem-card-img-fallback {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
}
.jut-elem-card-nome {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: .78rem;
  color: var(--text);
  margin-bottom: 4px;
}
.jut-sub-nivel {
  font-size: .64rem;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--ink-700);
  color: var(--text-dim);
  display: inline-block;
}

/* ── PAINEL DO ELEMENTO/KG SELECIONADO ─────────────────────── */
.jut-elemento-panel {
  position: relative;
  background: linear-gradient(180deg, var(--ink-800), var(--ink-850));
  border: 1px solid var(--ink-line);
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 18px;
}

.jut-elem-header {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-left: 14px;
  border-left: 3px solid var(--ember);
}

/* Imagem do elemento (ex: img/elemento/fogo/fogo.png) — já pronta pra
   quando os arquivos forem adicionados; até lá cai no fallback do ícone. */
.jut-elem-img,
.jut-elem-img-fallback {
  width: 84px;
  height: 84px;
  flex-shrink: 0;
  border-radius: 12px;
  border: 1px solid var(--ink-line-strong);
  background: var(--ink-900);
}
.jut-elem-img {
  object-fit: cover;
  object-position: center;
}
.jut-elem-img-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
}

.jut-elem-info { flex: 1; min-width: 200px; }
.jut-elem-nome {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 400;
  margin: 0 0 3px;
}
.jut-elem-desc {
  font-size: .78rem;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.jut-elem-stats { display: flex; flex-wrap: wrap; gap: 8px; }
.jut-elem-stat {
  font-family: var(--font-mono);
  font-size: .74rem;
  font-weight: 700;
  color: var(--text-dim);
  background: var(--ink-900);
  border: 1px solid var(--ink-line);
  border-radius: 7px;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.jut-elem-stat strong { color: var(--text); }

.jut-elem-acoes {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  margin-left: auto;
}

.jut-elem-nivel-badge {
  font-family: var(--font-mono);
  font-size: .74rem;
  font-weight: 700;
  border: 1px solid;
  padding: 5px 12px;
  border-radius: 8px;
  white-space: nowrap;
}

.jut-btn-evoluir, .jut-btn-aprender {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: .82rem;
  color: #fff;
  background: linear-gradient(135deg, var(--chakra-dim), var(--chakra));
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  white-space: nowrap;
  transition: filter .15s ease, transform .12s ease;
}
.jut-btn-aprender { background: linear-gradient(135deg, var(--ember-dim), var(--ember)); }
.jut-btn-evoluir:hover, .jut-btn-aprender:hover { filter: brightness(1.1); transform: translateY(-1px); }
.jut-btn-max {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: .78rem;
  color: var(--text-faint);
  background: var(--ink-700);
  border: none;
  border-radius: 8px;
  padding: 9px 16px;
  cursor: not-allowed;
}

.jut-locked-msg {
  margin-top: 14px;
  font-size: .82rem;
  color: var(--text-dim);
  background: var(--ink-900);
  border: 1px solid var(--ink-line);
  border-radius: 8px;
  padding: 12px 14px;
}
.jut-locked-msg strong { color: var(--ember); }

/* ── GRID DE JUTSUS (cards) ─────────────────────────────────── */
.jut-jutsus-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.jut-card {
  flex: 1 1 220px;
  max-width: 260px;
  background: var(--ink-800);
  border: 1px solid var(--ink-line);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color .15s ease, transform .15s ease;
}
.jut-card:hover { border-color: var(--ink-line-strong); transform: translateY(-2px); }
.jut-card.bloqueado { opacity: .55; }

/* Imagem do jutsu — padronizada 120x120, quadrada */
.jut-card-img-wrap {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 14px auto 0;
  border-radius: 10px;
  overflow: hidden;
  background: var(--ink-900);
  border: 1px solid var(--ink-line);
  flex-shrink: 0;
}
.jut-card-img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  display: block;
}
.jut-card-img-fallback {
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
}
.jut-card-img-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,.55) 100%);
  pointer-events: none;
}
.jut-card-rank-badge {
  position: absolute;
  top: 6px; right: 6px;
  font-family: var(--font-mono);
  font-size: .64rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid;
}

.jut-card-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  text-align: center;
}
.jut-card-nome { font-family: var(--font-body); font-weight: 700; font-size: .86rem; color: var(--text); }
.jut-card-desc { font-size: .7rem; color: var(--text-dim); line-height: 1.4; min-height: 2.6em; }

.jut-card-nivel-badge {
  position: absolute;
  top: 6px; left: 6px;
  font-family: var(--font-mono);
  font-size: .62rem;
  font-weight: 700;
  color: var(--ink-950);
  background: var(--chakra);
  padding: 2px 7px;
  border-radius: 6px;
}
.jut-card-stats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.jut-card-stat {
  font-size: .64rem;
  font-weight: 700;
  color: var(--text-dim);
  background: var(--ink-900);
  border: 1px solid var(--ink-line);
  border-radius: 6px;
  padding: 3px 7px;
}
.jut-card-stat.dano { color: var(--ember); }
.jut-card-footer { padding: 0 14px 14px; margin-top: auto; }
.jut-card-footer button { width: 100%; }

.jut-card-btn-aprender, .jut-card-btn-evoluir, .jut-card-btn-locked, .jut-card-btn-max {
  margin-top: auto;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: .76rem;
  color: #fff;
  background: linear-gradient(135deg, var(--ember-dim), var(--ember));
  border: none;
  border-radius: 7px;
  padding: 9px 10px;
  transition: filter .15s ease;
}
.jut-card-btn-evoluir { background: linear-gradient(135deg, var(--chakra-dim), var(--chakra)); }
.jut-card-btn-aprender:hover, .jut-card-btn-evoluir:hover { filter: brightness(1.1); }
.jut-card-btn-locked, .jut-card-btn-max {
  background: var(--ink-700);
  color: var(--text-faint);
  cursor: not-allowed;
}

/* ── RESPONSIVO ─────────────────────────────────────────────── */
@media (max-width: 640px) {
  .jut-page { padding: 16px 14px 40px; }
  .jut-page-header { flex-direction: column; align-items: flex-start; }
  .jut-card { flex: 1 1 100%; max-width: none; }
}
