/* ==========================================================================
   ESTILOS DOS MÓDULOS OCULTISTAS & HERMÉTICOS
   Magia do Caos (40 Servidores), Ars Goetia, 72 Anjos da Cabala,
   Sistema Enochiano, Golden Dawn (Regardie) & Bibliografia Canônica
   ========================================================================== */

:root {
  --chaos-accent: #a855f7;
  --chaos-glow: rgba(168, 85, 247, 0.35);
  --goetia-accent: #ef4444;
  --goetia-glow: rgba(239, 68, 68, 0.35);
  --angels-accent: #38bdf8;
  --angels-glow: rgba(56, 189, 248, 0.35);
  --enoch-accent: #f59e0b;
  --enoch-glow: rgba(245, 158, 11, 0.35);
  --gd-accent: #ec4899;
  --gd-glow: rgba(236, 72, 153, 0.35);
  --bib-accent: #10b981;
  --bib-glow: rgba(16, 185, 129, 0.35);
}

/* Container Base dos Módulos */
.occult-module-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 15px 20px 80px 20px;
}

/* Banner do Módulo */
.occult-hero-banner {
  background: linear-gradient(135deg, rgba(17, 24, 39, 0.95), rgba(15, 23, 42, 0.9));
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.occult-hero-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, var(--module-tint, rgba(212, 175, 55, 0.08)) 0%, transparent 60%);
  pointer-events: none;
}

.occult-hero-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
  position: relative;
  z-index: 2;
}

.occult-hero-title-group h2 {
  font-family: var(--font-header, 'Cinzel', serif);
  font-size: 1.85rem;
  color: #fff;
  margin: 0 0 6px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
}

.occult-hero-subtitle {
  color: var(--text-muted, #94a3b8);
  font-size: 0.95rem;
  margin: 0;
  line-height: 1.5;
  max-width: 800px;
}

.occult-subnav-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 14px;
}

.occult-tab-btn {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  padding: 8px 16px;
  border-radius: 9999px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.occult-tab-btn:hover {
  background: rgba(51, 65, 85, 0.9);
  color: #fff;
  transform: translateY(-1px);
}

.occult-tab-btn.active {
  background: var(--btn-active-bg, linear-gradient(135deg, #d4af37, #b45309));
  color: #0f172a;
  border-color: #fde047;
  box-shadow: 0 4px 14px var(--btn-active-glow, rgba(212, 175, 55, 0.4));
  font-weight: 700;
}

/* Barra de Filtros e Busca */
.occult-controls-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 12px 18px;
  border-radius: 12px;
  margin-bottom: 20px;
}

.occult-search-input {
  background: rgba(2, 6, 23, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f8fafc;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  min-width: 260px;
  outline: none;
  transition: border-color 0.2s;
}

.occult-search-input:focus {
  border-color: var(--accent-gold, #d4af37);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.occult-filter-select {
  background: rgba(2, 6, 23, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f8fafc;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.88rem;
  outline: none;
  cursor: pointer;
}

/* Grid de Cards */
.occult-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.occult-card {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 18px;
  cursor: pointer;
  position: relative;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  backdrop-filter: blur(8px);
}

.occult-card:hover {
  transform: translateY(-4px);
  border-color: var(--card-hover-border, rgba(212, 175, 55, 0.6));
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.6), 0 0 16px var(--card-hover-glow, rgba(212, 175, 55, 0.2));
}

.occult-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.occult-card-num {
  font-family: monospace;
  font-size: 0.8rem;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 8px;
  border-radius: 6px;
}

.occult-card-title {
  font-family: var(--font-header, 'Cinzel', serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: #f8fafc;
  margin: 0 0 4px 0;
}

.occult-card-archetype {
  font-size: 0.82rem;
  color: var(--accent-gold, #d4af37);
  font-weight: 600;
  margin-bottom: 10px;
}

.occult-card-sigil-box {
  width: 100%;
  height: 120px;
  background: radial-gradient(circle, rgba(30, 41, 59, 0.7) 0%, rgba(2, 6, 23, 0.9) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
}

.occult-card-sigil-box svg:not(.angel-sigil-svg) {
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.6));
}

.angel-sigil-svg {
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
  object-fit: contain;
}


.occult-card-desc {
  font-size: 0.84rem;
  color: #cbd5e1;
  line-height: 1.45;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.occult-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: #94a3b8;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 10px;
  margin-top: auto;
}

/* Badge estilizado */
.occult-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.occult-badge-chaos { background: rgba(168, 85, 247, 0.15); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.3); }
.occult-badge-goetia { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.occult-badge-angel { background: rgba(56, 189, 248, 0.15); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.3); }
.occult-badge-enoch { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.occult-badge-gd { background: rgba(236, 72, 153, 0.15); color: #f472b6; border: 1px solid rgba(236, 72, 153, 0.3); }

/* Modais Específicos */
.occult-modal-content {
  background: #0f172a;
  border: 1px solid var(--modal-border, rgba(212, 175, 55, 0.4));
  border-radius: 18px;
  padding: 28px;
  max-width: 850px;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.9);
  color: #f8fafc;
  position: relative;
}

/* Altar dos Servidores / Painel de Assentamento */
.servant-altar-panel {
  background: radial-gradient(circle at center, #1e1b4b 0%, #030712 100%);
  border: 2px solid rgba(168, 85, 247, 0.4);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 0 30px rgba(168, 85, 247, 0.2);
  margin-bottom: 24px;
}

.servant-altar-slots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 18px 0;
}

.servant-altar-slot {
  background: rgba(15, 23, 42, 0.7);
  border: 2px dashed rgba(168, 85, 247, 0.3);
  border-radius: 14px;
  padding: 18px;
  text-align: center;
  transition: all 0.2s;
}

.servant-altar-slot.occupied {
  border-style: solid;
  border-color: #a855f7;
  background: rgba(88, 28, 135, 0.2);
}

/* Enochian Watchtowers Table Grid */
.enoch-table-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 2px;
  background: #000;
  border: 2px solid #f59e0b;
  padding: 4px;
  border-radius: 8px;
  overflow-x: auto;
}

.enoch-table-cell {
  background: #111827;
  color: #f3f4f6;
  font-family: monospace;
  font-size: 0.9rem;
  padding: 6px 2px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: background 0.15s;
}

.enoch-table-cell:hover {
  background: #f59e0b;
  color: #000;
  font-weight: bold;
}

/* Gerador de Sigilos da Rosa Cruz */
.rosecross-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.rosecross-canvas-wrap {
  position: relative;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, #1e293b 0%, #020617 100%);
  border: 2px solid #d4af37;
  border-radius: 50%;
  box-shadow: 0 0 25px rgba(212, 175, 55, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Escudo Geomântico */
.geomancy-shield {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  max-width: 800px;
  margin: 0 auto;
}

.geomancy-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  width: 100%;
}

.geomancy-card {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 10px;
  padding: 10px;
  text-align: center;
  flex: 1;
  min-width: 70px;
}

.geomancy-dots {
  font-family: monospace;
  font-size: 1.25rem;
  letter-spacing: 2px;
  line-height: 1.2;
  color: #fde047;
}

/* Seção Bibliografia */
.bib-entry-card {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-left: 4px solid #10b981;
  border-radius: 12px;
  padding: 18px 22px;
  margin-bottom: 16px;
  transition: all 0.2s;
}

.bib-entry-card:hover {
  background: rgba(30, 41, 59, 0.9);
  border-color: #34d399;
  transform: translateX(4px);
}

.bib-entry-title {
  font-family: var(--font-header, 'Cinzel', serif);
  font-size: 1.15rem;
  color: #fff;
  font-weight: 700;
  margin-bottom: 4px;
}

.bib-entry-author {
  color: #34d399;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.bib-entry-desc {
  font-size: 0.86rem;
  color: #cbd5e1;
  line-height: 1.5;
  margin-bottom: 10px;
}

.bib-entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.78rem;
  color: #94a3b8;
}

@media (max-width: 768px) {
  .occult-hero-banner {
    padding: 16px;
  }
  .occult-hero-title-group h2 {
    font-size: 1.4rem;
  }
  .occult-subnav-tabs {
    overflow-x: auto;
    padding-bottom: 6px;
  }
  .rosecross-canvas-wrap {
    width: 300px;
    height: 300px;
  }
}

/* ==========================================================================
   ESTILOS DUAL LADO A LADO E LAZY LOADING PARA OS 40 SERVIDORES DO CAOS
   ========================================================================== */
.servant-visual-lazy-slot {
  width: 100%;
  min-height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border-radius: 12px;
  margin: 8px 0 12px 0;
}

.servant-lazy-skeleton {
  width: 100%;
  height: 190px;
  background: linear-gradient(110deg, rgba(30, 41, 59, 0.6) 8%, rgba(51, 65, 85, 0.4) 18%, rgba(30, 41, 59, 0.6) 33%);
  background-size: 200% 100%;
  animation: servantSkeletonShimmer 1.5s infinite linear;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(192, 132, 252, 0.25);
  color: #c084fc;
  font-size: 0.78rem;
  gap: 8px;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.5);
}

@keyframes servantSkeletonShimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.servant-skeleton-spinner {
  font-size: 1.6rem;
  animation: servantSpin 2s linear infinite;
}

@keyframes servantSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.servant-dual-box {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 6px 0 10px 0;
  background: radial-gradient(circle, rgba(26, 15, 46, 0.75) 0%, rgba(3, 7, 18, 0.95) 100%);
  border: 1px solid rgba(192, 132, 252, 0.35);
  border-radius: 12px;
  padding: 10px;
  box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.65);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.occult-card:hover .servant-dual-box {
  border-color: rgba(192, 132, 252, 0.7);
  box-shadow: inset 0 0 20px rgba(168, 85, 247, 0.3);
}

.servant-card-side,
.servant-sigil-side {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 200px;
}

.servant-card-side {
  border-right: 1px dashed rgba(192, 132, 252, 0.25);
  padding-right: 6px;
}

.servant-sigil-side {
  background: rgba(0, 0, 0, 0.45);
  border-radius: 8px;
  padding: 6px;
  border: 1px solid rgba(192, 132, 252, 0.2);
}

.servant-card-img {
  width: 100%;
  height: auto;
  max-height: 165px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid rgba(212, 175, 55, 0.6);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.7);
  transition: transform 0.2s ease;
}

.servant-card-img:hover {
  transform: scale(1.04);
}

.servant-sigil-svg-container {
  width: 100%;
  height: 145px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.servant-sigil-svg-container svg,
.servant-sigil-img,
.servant-sigil-svg-container img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(192, 132, 252, 0.65));
  transition: transform 0.2s ease;
}

.servant-sigil-img:hover {
  transform: scale(1.05);
}

.servant-side-label {
  font-size: 0.7rem;
  color: #c084fc;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-top: 5px;
  font-weight: 600;
  background: rgba(168, 85, 247, 0.12);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Responsividade Adaptativa Mobile */
@media (max-width: 640px) {
  .occult-cards-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .servant-dual-box {
    gap: 12px;
    padding: 12px;
  }

  .servant-card-side,
  .servant-sigil-side {
    height: 190px;
  }

  .servant-card-img {
    max-height: 155px;
  }

  .servant-sigil-svg-container {
    height: 135px;
  }
}

@media (max-width: 420px) {
  .servant-dual-box {
    padding: 8px;
    gap: 8px;
  }

  .servant-card-side,
  .servant-sigil-side {
    height: 170px;
  }

  .servant-card-img {
    max-height: 138px;
  }

  .servant-sigil-svg-container {
    height: 120px;
  }

  .servant-side-label {
    font-size: 0.65rem;
  }
}

/* ==========================================================================
   LAZY LOADER PARA SUB-MÓDULOS OCULTISTAS (GOETIA & ENOCHIANO)
   ========================================================================== */
.occult-lazy-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  min-height: 280px;
}

.occult-lazy-spinner {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  animation: occultSpin 0.9s linear infinite;
  margin-bottom: 16px;
}

@keyframes occultSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ==========================================================================
   MODO CLARO & ALTO CONTRASTE — SUBMÓDULOS OCULTISTAS (v5.2.0)
   ========================================================================== */
:root[data-theme="light"] .occult-module-wrapper,
:root[data-theme="light"] .occult-hero-banner,
:root[data-theme="light"] .occult-subnav-bar,
:root[data-theme="light"] .occult-card,
:root[data-theme="light"] .servant-dual-box,
:root[data-theme="light"] .ritual-reader-box,
:root[data-theme="light"] .aethyr-card,
:root[data-theme="light"] .angel-clock-panel {
  background: var(--surface-elevated, #ffffff) !important;
  border-color: var(--border-hairline, #d4dce8) !important;
  color: var(--text-main, #0f172a) !important;
}

:root[data-theme="light"] .occult-subnav-btn {
  color: #334155 !important;
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
}

:root[data-theme="light"] .occult-subnav-btn.active {
  background: rgba(154, 107, 6, 0.14) !important;
  color: #78350f !important;
  border-color: #9a6b06 !important;
}

:root[data-theme="light"] .servant-sigil-side {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
}

:root[data-theme="light"] .servant-side-label {
  color: #6d28d9 !important;
  background: rgba(109, 40, 217, 0.1) !important;
}




