/* ==========================================================
   habilidades.css — Grade de cartas de habilidade
   Usada na tela de espíritos (screen-habilidades)
   ========================================================== */

/* ── Grade 2×2 ── */
.habilidades-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(6px, 1.8vw, 10px);
  width: 100%;
  justify-items: center;
  box-sizing: border-box;
  padding: 4px;
}

/* ── Carta elemental (com imagem real) ── */
.habil-card {
  position: relative;
  cursor: pointer;
  width: 100%;
  max-width: 115px;
  aspect-ratio: 232 / 300;
  border-radius: 0;
  overflow: hidden;
  box-sizing: border-box;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.2s;
}
.habil-card:hover {
  transform: scale(1.03) translateY(-2px);
  box-shadow: 0 8px 16px rgba(255, 204, 0, 0.2);
}
/* Imagem da carta ocupa todo o espaço */
.habil-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
/* Nome sobreposto no topo da carta */
.habil-card__name {
  position: absolute;
  top: 9%;
  left: 10%;
  right: 5%;
  text-align: left;
  font-family: 'Nunito', sans-serif;
  font-style: italic;
  font-weight: 600;
  font-size: 5px;
  color: #000;
  pointer-events: none;
}


/* ── Carta genérica (sem imagem, cores por tipo injetadas via JS) ── */
.habil-card-gen {
  /* background e border-color definidos via JS (dinâmicos por tipo) */
  border: 1.5px solid transparent;
  border-radius: 0;
  padding: 8px;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  max-width: 115px;
  aspect-ratio: 232 / 300;
  box-sizing: border-box;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}
.habil-card-gen:hover {
  transform: scale(1.03) translateY(-2px);
  border-color: #ffcc00 !important;
  box-shadow: 0 8px 16px rgba(255, 204, 0, 0.2);
}

/* Emoji de fundo decorativo */
.habil-card-gen__bg-icon {
  position: absolute;
  right: -10px;
  bottom: -10px;
  font-size: 60px;
  opacity: 0.15;
  pointer-events: none;
  user-select: none;
}
/* Linha superior: custo + ícone de tipo */
.habil-card-gen__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  z-index: 1;
}
.habil-card-gen__cost {
  font-size: 8px;
  font-weight: 900;
  background: rgba(0, 0, 0, 0.5);
  padding: 2px 6px;
  border-radius: 6px;
  text-transform: uppercase;
  font-family: monospace;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffcc00;
}
.habil-card-gen__type-icon {
  font-size: 11px;
}
/* Área central: emoji + nome */
.habil-card-gen__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  margin: 6px 0;
  z-index: 1;
}
.habil-card-gen__emoji-wrap {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  border: 1.5px dashed rgba(255, 255, 255, 0.15);
}
.habil-card-gen__emoji {
  font-size: 20px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}
.habil-card-gen__name {
  font-size: 10px;
  font-weight: 900;
  color: #fff;
  font-family: monospace;
  text-transform: uppercase;
  line-height: 1.2;
  word-break: break-word;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}
/* Rodapé com stats */
.habil-card-gen__footer {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  padding: 4px;
  border-radius: 8px;
  font-family: monospace;
  font-size: 8.5px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  z-index: 1;
}
.habil-card-gen__stat {
  display: flex;
  justify-content: space-between;
}
.habil-card-gen__stat--dano { color: #ff7675; }
.habil-card-gen__stat--cura { color: #2ecc71; }
.habil-card-gen__stat--crit { color: #f1c40f; }
.habil-card-gen__stat--def  { color: #e67e22; }
.habil-card-gen__stat--spd  { color: #9b59b6; }
