/* ==========================================================================
   DIÁRIO DE CAMPO, RELÍQUIAS E MINIGAMES — CRONONAUTAS DO NOVO MUNDO
   ========================================================================== */

/* --------------------------------------------------------------------------
   Diário de Campo (Modal Estilo Livro de Viagem / Pergaminho)
   -------------------------------------------------------------------------- */
.journal-dialog,
.journal-book-modal {
  background: var(--bg-parchment);
  color: #292524;
  border: 4px solid var(--bg-parchment-border);
  border-radius: var(--radius-lg);
  max-width: 980px;
  width: 100%;
  height: 88vh;
  max-height: 800px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9), 0 0 35px rgba(212, 185, 130, 0.4);
  overflow: hidden;
  position: relative;
  animation: scaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.journal-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--bg-parchment-dark);
  border-bottom: 2px solid var(--bg-parchment-border);
  padding: 0.75rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.modal-close-btn {
  background: rgba(120, 53, 15, 0.15);
  border: 2px solid #78350f;
  color: #78350f;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 900;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.modal-close-btn:hover {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
  transform: scale(1.12);
}

.journal-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.journal-tab-btn {
  background: transparent;
  border: none;
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: 700;
  color: #78350f;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--transition-fast);
}

.journal-tab-btn:hover {
  background: rgba(120, 53, 15, 0.1);
}

.journal-tab-btn.active {
  background: var(--bg-parchment);
  color: #451a03;
  border-bottom: 3px solid #b45309;
  box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.08);
}

.journal-content-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.journal-content-scroll > .tab-pane { padding: 1.25rem; }

.tab-count {
  font-size: 0.75rem;
  background: #78350f;
  color: #fff;
  padding: 1px 6px;
  border-radius: var(--radius-full);
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: #78350f;
  font-size: 1.4rem;
  font-weight: bold;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}

.btn-close-modal:hover {
  color: #ef4444;
}

/* Conteúdo das Abas */
.journal-content-pane {
  padding: 1.5rem;
  min-height: 100%;
}

/* Grid de Entradas do Diário */
.entries-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.journal-entry-card {
  background: #fff;
  border: 1.5px solid var(--bg-parchment-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: transform var(--transition-fast);
}

.journal-entry-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.1);
}

.entry-badge {
  align-self: flex-start;
  font-size: 0.7rem;
  font-weight: 700;
  color: #78350f;
  background: #fef3c7;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.entry-title {
  font-family: var(--font-title);
  font-size: 1.05rem;
  color: #451a03;
}

.entry-date {
  font-size: 0.75rem;
  color: #92400e;
  font-style: italic;
}

.entry-text {
  font-size: 0.88rem;
  color: #44403c;
  line-height: 1.5;
}

.entry-didactic-box {
  margin-top: 0.5rem;
  background: #fdf4ff;
  border-left: 3px solid #c026d3;
  padding: 0.5rem 0.75rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.8rem;
  color: #701a75;
}

/* Grid do Baú de Relíquias */
.relics-showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
}

.relic-item-card {
  background: #fff;
  border: 1.5px solid var(--bg-parchment-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
  position: relative;
}

.relic-item-card.locked {
  opacity: 0.45;
  filter: grayscale(1);
  background: #f5f5f4;
}

.relic-icon-box {
  font-size: 3rem;
  width: 72px;
  height: 72px;
  background: #fef3c7;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #d97706;
}

.relic-name {
  font-family: var(--font-title);
  font-size: 0.95rem;
  color: #451a03;
  font-weight: 700;
}

.relic-desc {
  font-size: 0.8rem;
  color: #57534e;
  line-height: 1.4;
}

/* Perfil do Estudante */
.profile-summary-view {
  background: #fff;
  border: 1.5px solid var(--bg-parchment-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.profile-top {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.profile-avatar-big {
  font-size: 3.5rem;
  width: 80px;
  height: 80px;
  background: #fef3c7;
  border: 3px solid #d97706;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-avatar-big img { width:100%; height:100%; object-fit:cover; border-radius:50%; }

.profile-titles h3 {
  font-family: var(--font-title);
  font-size: 1.4rem;
  color: #451a03;
}

.profile-titles p {
  font-size: 0.9rem;
  color: #78350f;
  font-weight: 600;
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.stat-box {
  background: #fbfaf8;
  border: 1px solid var(--bg-parchment-border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.stat-box-icon {
  font-size: 1.5rem;
}

.stat-box-data strong {
  display: block;
  font-size: 1.1rem;
  color: #451a03;
}

.stat-box-data span {
  font-size: 0.75rem;
  color: #78350f;
}

/* --------------------------------------------------------------------------
   MODAL DE MINIGAME PRÁTICO
   -------------------------------------------------------------------------- */
.minigame-modal-card {
  background: #1e293b;
  color: #f1f5f9;
  border: 2px solid var(--gold-bright);
  border-radius: var(--radius-lg);
  max-width: 720px;
  width: 100%;
  box-shadow: var(--shadow-lg), var(--shadow-gold);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.minigame-header {
  background: #0f172a;
  border-bottom: 1.5px solid rgba(245, 158, 11, 0.3);
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.minigame-title {
  font-family: var(--font-title);
  font-size: 1.2rem;
  color: var(--gold-bright);
}

.minigame-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.minigame-instruction {
  font-size: 0.95rem;
  color: #cbd5e1;
  line-height: 1.5;
}

.minigame-puzzle-area {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.options-drag-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
}

.minigame-opt-btn {
  background: #1e293b;
  border: 1.5px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  color: #fff;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
  font-weight: 600;
}

.minigame-opt-btn:hover {
  border-color: var(--gold-bright);
  background: rgba(245, 158, 11, 0.15);
}

.minigame-opt-btn.correct {
  background: rgba(16, 185, 129, 0.2);
  border-color: var(--emerald-success);
  color: #6ee7b7;
}

.minigame-opt-btn.wrong {
  background: rgba(239, 68, 68, 0.2);
  border-color: var(--crimson-tordesilhas);
  color: #fca5a5;
}
