/* ==========================================================================
   js/modules/goetia/goetia.module.css - SCOPED STYLES: ARS GOETIA
   Enriquecido com Selos Canônicos e Iconografia da Wiki Deldebbio
   Apresentação Dupla: Selo Canônico + Gravura Histórica (Louis Le Breton / 1863)
   ========================================================================== */

:root {
  --mod-goetia-accent: #ef4444;
  --mod-goetia-glow: rgba(239, 68, 68, 0.35);
  --mod-goetia-bg: rgba(24, 15, 20, 0.95);
  --mod-goetia-border: rgba(239, 68, 68, 0.25);
}

.mod-goetia-card {
  background: var(--mod-goetia-bg);
  border: 1px solid var(--mod-goetia-border);
  border-radius: 14px;
  padding: 16px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.mod-goetia-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px var(--mod-goetia-glow);
}

.mod-goetia-rank-pill {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
  padding: 3px 8px;
  border-radius: 16px;
  font-size: 0.78rem;
  font-weight: 600;
}

/* Badge de gravura clássica no card */
.goetia-illust-badge {
  font-size: 0.7rem;
  background: rgba(245, 158, 11, 0.18);
  color: #fde047;
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 2px 7px;
  border-radius: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

/* ==========================================================================
   APRESENTAÇÃO VISUAL DUPLA NOS CARDS DO GRIMÓRIO (SELO + GRAVURA HISTÓRICA)
   ========================================================================== */
.goetia-card-dual-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
  margin: 6px 0 10px 0;
  background: radial-gradient(circle, rgba(35, 8, 8, 0.85) 0%, rgba(5, 7, 15, 0.98) 100%);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 12px;
  padding: 8px;
  box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.8);
  box-sizing: border-box;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
}

.occult-card:hover .goetia-card-dual-box {
  border-color: rgba(239, 68, 68, 0.7);
  box-shadow: inset 0 0 20px rgba(239, 68, 68, 0.3), 0 4px 14px rgba(0, 0, 0, 0.6);
}

.goetia-card-subbox {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 6px 4px 8px 4px;
  min-height: 145px;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.goetia-card-subbox:hover {
  background: rgba(0, 0, 0, 0.7);
  border-color: rgba(239, 68, 68, 0.45);
}

.goetia-card-seal-box {
  border-color: rgba(212, 175, 55, 0.2);
}

.goetia-card-seal-box:hover {
  border-color: rgba(212, 175, 55, 0.5);
}

.goetia-card-illust-box.has-demon {
  border-color: rgba(245, 158, 11, 0.25);
}

.goetia-card-illust-box.has-demon:hover {
  border-color: rgba(245, 158, 11, 0.6);
}

.goetia-subbox-label {
  font-size: 0.68rem;
  letter-spacing: 0.6px;
  font-weight: 700;
  color: #f87171;
  text-transform: uppercase;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
  line-height: 1.1;
  text-align: center;
}

.goetia-subbox-label.has-illust {
  color: #fde047;
}

.goetia-subbox-label.seal-label {
  color: #d4af37;
}

.goetia-subbox-img-wrap {
  width: 100%;
  height: 112px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.goetia-card-img-seal,
.goetia-card-img-demon {
  max-width: 94%;
  max-height: 94%;
  object-fit: contain;
  transition: transform 0.25s ease, filter 0.25s ease;
}

.goetia-card-img-seal {
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.85)) contrast(1.1);
  border-radius: 4px;
}

.goetia-card-img-demon {
  filter: contrast(1.12) drop-shadow(0 2px 8px rgba(0, 0, 0, 0.9));
  border-radius: 6px;
}

.occult-card:hover .goetia-card-img-seal,
.occult-card:hover .goetia-card-img-demon {
  transform: scale(1.07);
}

/* Placa clássica para espíritos sem gravura no Dict. Infernal */
.goetia-card-no-illust {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 100%;
  width: 100%;
  color: #94a3b8;
  gap: 3px;
  padding: 4px;
  box-sizing: border-box;
}

.goetia-no-illust-symbol {
  font-size: 1.6rem;
  color: #f87171;
  line-height: 1;
  filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.45));
}

.goetia-no-illust-text {
  font-size: 0.72rem;
  font-weight: 700;
  color: #cbd5e1;
  letter-spacing: 0.4px;
}

.goetia-no-illust-sub {
  font-size: 0.65rem;
  color: #94a3b8;
  line-height: 1.2;
}

.goetia-no-illust-note {
  font-size: 0.6rem;
  color: #64748b;
  margin-top: 2px;
}

/* Apresentação Visual Dupla no Modal de Detalhes */
.goetia-dual-visual {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.goetia-visual-card {
  background: radial-gradient(circle, #2a0808 0%, #070913 100%);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  position: relative;
}

.goetia-img-container {
  width: 175px;
  height: 175px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 8px;
  overflow: hidden;
  cursor: zoom-in;
  position: relative;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.goetia-img-container:hover {
  border-color: rgba(239, 68, 68, 0.6);
  transform: scale(1.02);
}

.goetia-img-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: filter 0.2s ease, transform 0.25s ease;
}

.goetia-img-container img.seal-inverted {
  filter: invert(1) hue-rotate(180deg) contrast(1.15) drop-shadow(0 0 8px rgba(255, 255, 255, 0.5));
}

.goetia-visual-caption {
  font-size: 0.82rem;
  color: #f87171;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 4px;
}

.goetia-visual-subcaption {
  font-size: 0.75rem;
  color: #94a3b8;
  line-height: 1.3;
}

/* Caixas de Texto Temáticas no Modal */
.goetia-text-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 18px;
}

.goetia-info-box {
  background: rgba(255, 255, 255, 0.035);
  border-left: 3px solid #ef4444;
  padding: 12px 14px;
  border-radius: 8px;
}

.goetia-info-box.mythology {
  border-left-color: #d4af37;
  background: rgba(212, 175, 55, 0.05);
}

.goetia-info-box.deldebbio {
  border-left-color: #38bdf8;
  background: rgba(56, 189, 248, 0.04);
}

.goetia-wiki-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: #fde047;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.goetia-wiki-button:hover {
  background: rgba(212, 175, 55, 0.25);
  border-color: #fde047;
  color: #fff;
  transform: translateY(-1px);
}

.goetia-seal-text-plaque {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  height: 100%;
  padding: 8px;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 8px;
  border: 1px dashed rgba(239, 68, 68, 0.35);
}

/* Modal Lightbox de Zoom para Visualização em Alta Resolução */
.goetia-zoom-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.94);
  backdrop-filter: blur(12px);
  z-index: 100000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
  animation: fadeIn 0.2s ease;
}

.goetia-zoom-lightbox img {
  max-width: 88vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 10px;
  border: 2px solid rgba(239, 68, 68, 0.5);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.95), 0 0 30px rgba(239, 68, 68, 0.3);
  background: #02040a;
}

.goetia-zoom-lightbox-caption {
  margin-top: 14px;
  color: #cbd5e1;
  font-size: 0.95rem;
  text-align: center;
  max-width: 600px;
}

/* Responsividade Mobile */
@media (max-width: 640px) {
  .goetia-card-dual-box {
    gap: 6px;
    padding: 6px;
  }
  .goetia-card-subbox {
    min-height: 125px;
    padding: 4px;
  }
  .goetia-subbox-img-wrap {
    height: 95px;
  }
  .goetia-img-container {
    width: 140px;
    height: 140px;
  }
}
