/* ==========================================================================
   역천록 (逆天錄) - 전용 팝업 및 모달 레이어 스타일시트 (modals.css)
   ========================================================================== */

/* 0. 모달 전체 화면 백드롭 & 화면 정중앙 오버레이 */
.modal-backdrop,
.modal-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
}

.modal-dialog {
  position: relative;
  z-index: 10000;
  max-height: 90vh;
  overflow-y: auto;
  animation: modal-fade-in 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modal-fade-in {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
}

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.modal-icon {
  font-size: 1.5rem;
}

.modal-title-text h3 {
  margin: 0;
  font-size: 1.05rem;
  color: #fff;
}

.modal-subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 0 0.3rem;
  line-height: 1;
  transition: color 0.15s;
}

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

/* 1. 가부좌 폐관 정양 미니 제어기 */
.meditate-mini-dialog {
  max-width: 440px;
  width: 90%;
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 10px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.85);
  padding: 1.25rem;
}

.meditate-info-box {
  background: #161b22;
  border: 1px solid #21262d;
  border-radius: 6px;
  padding: 0.65rem 0.85rem;
  margin-bottom: 1rem;
  font-size: 0.82rem;
}

.meditate-info-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.meditate-info-row:last-child {
  margin-bottom: 0;
}

.btn-meditate-smart {
  width: 100%;
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  border: 1px solid #60a5fa;
  color: #eff6ff;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  text-align: center;
  cursor: pointer;
  margin-bottom: 1.1rem;
  transition: all 0.2s ease;
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.25);
}

.btn-meditate-smart:hover {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.45);
  transform: translateY(-1px);
}

.smart-btn-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.smart-btn-desc {
  font-size: 0.72rem;
  color: #bfdbfe;
}

.duration-section {
  margin-bottom: 1.1rem;
}

.duration-title {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.duration-chips-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.chip-duration {
  background: #161b22;
  border: 1px solid #30363d;
  color: var(--text-main);
  padding: 0.5rem 0.65rem;
  border-radius: 6px;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.15s;
}

.chip-duration:hover {
  background: #21262d;
  border-color: var(--border-gold);
  color: #fff;
  transform: translateY(-1px);
}

.meditate-footer {
  display: flex;
  justify-content: flex-end;
}

/* 3. 중앙 컴팩트 도감 카드 (요수 정보 팝업) */
.beast-compendium-dialog {
  max-width: 440px;
  width: 90%;
  background: #0f131a;
  border: 1px solid #ef4444;
  border-radius: 10px;
  box-shadow: 0 0 35px rgba(239, 68, 68, 0.2);
  padding: 1.25rem;
}

.beast-desc-text {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0.85rem;
}

.beast-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  background: #161b22;
  border: 1px solid #283040;
  border-radius: 6px;
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.85rem;
}

.beast-stat-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.beast-stat-box .stat-k {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.beast-stat-box .stat-v {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

.beast-section-box {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 0.65rem 0.75rem;
  margin-bottom: 1rem;
}

.section-sub-title {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.drop-items-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.drop-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  padding: 3px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
}

.drop-item-row:last-child {
  border-bottom: none;
}

.drop-name {
  color: var(--text-main);
}

.drop-rate {
  font-size: 0.7rem;
  padding: 1px 6px;
  border-radius: 3px;
  font-weight: 600;
}

.drop-rate.rate-guaranteed { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.drop-rate.rate-high { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.drop-rate.rate-rare { background: rgba(234, 179, 8, 0.15); color: #fbbf24; }
