/* ═══════════════════════════════════════════════
   monsters.css — 몬스터 도감 (카드형 레이아웃)
   아이템도감(items.css) 스타일과 동일 패턴 준수
   CSS prefix: mo-
   ═══════════════════════════════════════════════ */

/* ── 페이지 헤더 ──────────────────────── */
.mo-page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 21px 20px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-secondary);
}
.mo-header-info { display: flex; flex-direction: column; gap: 8px; }
.mo-title {
  font-size: 20px; font-weight: 700; color: var(--text-primary);
  display: flex; align-items: center; gap: 8px;
}
.mo-title i { color: var(--color-accent); }
.mo-subtitle { font-size: 13px; color: var(--text-muted); }

/* ── 안내 문구 ──────────────────────── */
.mo-notice {
  padding: 12px 20px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-secondary);
  font-size: 12px; color: var(--text-muted); line-height: 1.6;
}
.mo-notice p { margin: 0; }

/* ── 통합 필터 바 (드롭다운 + 서브 필터) ───────── */
.mo-filter-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 20px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-secondary);
  gap: 12px;
}

/* 지역 드롭다운 (BBS 서버 드롭다운 패턴) */
.mo-location-dropdown { position: relative; }

.mo-dropdown-trigger {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 4px; border: none; background: none;
  color: var(--color-accent); font-size: 15px; font-weight: 700;
  font-family: var(--font-sans); letter-spacing: -0.5px;
  cursor: pointer; transition: all 0.2s;
  white-space: nowrap; position: relative;
}
.mo-dropdown-trigger i {
  font-size: 16px; opacity: 0.7;
}
.mo-dropdown-trigger:hover { color: var(--color-accent); }

.mo-dropdown-chevron {
  width: 12px; height: 12px;
  transition: transform 0.25s cubic-bezier(.4, 0, .2, 1);
  opacity: 0.6; flex-shrink: 0;
}
.mo-location-dropdown.open .mo-dropdown-chevron {
  transform: rotate(180deg); opacity: 1;
}

.mo-dropdown-menu {
  position: absolute; top: calc(100% + 10px); left: -8px;
  min-width: 200px; max-height: 400px;
  overflow-y: auto; overflow-x: hidden;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-secondary);
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.04);
  z-index: 100;
  opacity: 0; visibility: hidden;
  transform: translateY(-8px) scale(0.97);
  transition: all 0.22s cubic-bezier(.4, 0, .2, 1);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.08) transparent;
  padding: 6px;
}
.mo-dropdown-menu::-webkit-scrollbar { width: 4px; }
.mo-dropdown-menu::-webkit-scrollbar-track { background: transparent; }
.mo-dropdown-menu::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

.mo-location-dropdown.open .mo-dropdown-menu {
  opacity: 1; visibility: visible;
  transform: translateY(0) scale(1);
}

.mo-dropdown-item {
  display: flex; align-items: center;
  padding: 8px 12px; border-radius: 6px;
  font-size: 13px; font-weight: 500; color: var(--text-muted);
  text-decoration: none; transition: all 0.12s;
  font-family: var(--font-sans); letter-spacing: -0.4px;
}
.mo-dropdown-item:hover {
  background-color: rgba(255,255,255,0.05);
  color: var(--text-primary);
}
.mo-dropdown-item.active {
  background-color: rgba(240, 185, 11, 0.08);
  color: var(--color-accent); font-weight: 700;
}
.mo-dropdown-name { flex: 1; }

/* 소분류 필터 (우측 정렬) */
.mo-sub-filters {
  display: flex; gap: 6px;
  margin-left: auto;
  flex-wrap: nowrap;
}
.mo-sub {
  padding: 5px 14px;
  font-size: 12px; font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border: 1px solid var(--border-secondary);
  border-radius: 20px;
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}
.mo-sub:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
}
.mo-sub.active {
  color: var(--bg-body);
  background: var(--color-accent);
  border-color: var(--color-accent);
}

/* ── 검색 바 ──────────────────────── */
.mo-search-bar {
  display: flex; gap: 8px;
  padding: 12px 20px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-secondary);
  align-items: center;
}
.mo-search-input {
  flex: 1;
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-secondary);
  border-radius: 6px;
  padding: 8px 12px;
}
.mo-search-input i { color: var(--text-muted); font-size: 16px; }
.mo-search-input input {
  flex: 1; border: none; outline: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 13px;
  font-family: var(--font-ui);
}
.mo-search-input input::placeholder { color: var(--text-muted); }
.mo-search-btn {
  padding: 8px 18px;
  background: var(--color-accent);
  color: var(--bg-body);
  border: none; border-radius: 6px;
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}
.mo-search-btn:hover { opacity: 0.85; }
.mo-filter-toggle {
  padding: 8px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-secondary);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}
.mo-filter-toggle:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}
.mo-filter-toggle.has-filter {
  border-color: rgba(240, 185, 11, 0.4);
  color: var(--color-accent);
  background: rgba(240, 185, 11, 0.06);
}
.mo-filter-badge {
  font-size: 10px; font-weight: 700;
  background: var(--color-accent); color: #000;
  padding: 1px 5px; border-radius: 3px;
  margin-left: 2px; line-height: 1.2;
}

/* ── 상세 필터 패널 ──────────────────────── */
.mo-filter-panel {
  display: none;
  padding: 16px 24px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-secondary);
  flex-direction: column;
  gap: 0;
}
.mo-filter-panel.open { display: flex; }

.mo-filter-group {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0;
}
.mo-filter-label {
  font-size: 11px; font-weight: 700;
  color: var(--text-muted);
  min-width: 36px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.mo-filter-chips {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.mo-filter-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.04);
}

.mo-filter-chip {
  padding: 5px 14px;
  font-size: 12px; font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border-secondary);
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.15s;
  white-space: nowrap;
}
.mo-filter-chip:hover {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.03);
}
.mo-filter-chip.active {
  color: var(--color-accent);
  background: rgba(240, 185, 11, 0.08);
  border-color: rgba(240, 185, 11, 0.3);
  font-weight: 600;
}

/* ── 목록 섹션 ──────────────────────── */
.mo-section { padding: 20px 20px; }
.mo-section-title {
  padding: 0 0 12px;
  font-size: 14px; font-weight: 300;
  color: var(--text-secondary);
}
.mo-count {
  font-family: var(--font-mono);
  color: var(--color-accent);
  margin-left: 8px;
}
.mo-search-tag {
  font-size: 12px;
  color: var(--color-accent);
  margin-left: 12px;
}
.mo-search-tag a {
  color: var(--text-muted);
  text-decoration: none;
  margin-left: 4px;
}
.mo-search-tag a:hover { color: var(--color-down); }

.mo-empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--text-muted);
}
.mo-empty i { font-size: 40px; margin-bottom: 12px; display: block; }
.mo-empty p { font-size: 14px; }

/* ── 몬스터 카드 (lcinfo 기반) ──────────────────────── */
.mo-card {
  background: #0f1115;
  border: 1px solid #2b2f36;
  border-radius: 8px;
  margin-bottom: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* 상단 스펙 영역 */
.mo-card-top {
  display: flex;
  align-items: stretch;
}
.mo-card-img-box {
  width: 110px;
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #181a20;
  flex-shrink: 0;
  padding: 10px;
}
.mo-card-img-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.mo-card-img-box i {
  font-size: 32px;
  color: var(--text-muted);
}

.mo-card-specs {
  display: flex;
  flex: 1;
  min-width: 0;
}
.mo-spec-item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-left: 1px solid #2b2f36;
  flex: 1;
  padding: 12px 8px;
  min-width: 0;
}
.mo-spec-item.name-item {
  flex: 2;
  align-items: center;
  justify-content: center;
}
.mo-spec-lbl {
  font-size: 11px;
  color: #848e9c;
  margin-bottom: 6px;
  font-weight: 500;
}
.mo-spec-val {
  font-size: 14px;
  font-weight: 700;
  color: #eaecef;
  font-family: var(--font-mono);
}
.mo-spec-val.name {
  font-family: var(--font-sans);
  font-size: 15px;
  color: #eaecef;
  text-align: center;
  word-break: keep-all;
}
.mo-spec-val.hp { color: #f6465d; }
.mo-spec-val.mp { color: #38bdf8; }

/* 하단 정보 영역 */
.mo-card-bottom {
  display: flex;
  border-top: 1px solid #2b2f36;
}
.mo-info-block {
  display: flex;
  flex-direction: column;
  padding: 14px 18px;
  border-left: 1px solid #2b2f36;
}
.mo-info-block:first-child { border-left: none; }
.mo-info-block.traits { flex: 1.5; }
.mo-info-block.locations { flex: 2; }
.mo-info-block.drops { flex: 3.5; }

.mo-info-lbl {
  font-size: 12px;
  color: #848e9c;
  margin-bottom: 8px;
  font-weight: 600;
}
.mo-info-content {
  font-size: 13px;
  line-height: 1.6;
  color: #b7bdc6;
}

/* 툴팁/아이템 텍스트 스타일 */
.mo-tooltip-text {
  border-bottom: 1px dotted currentColor;
  cursor: help;
  display: inline-block;
  margin-bottom: 2px;
  text-decoration: none;
}
.mo-tooltip-text:hover { filter: brightness(1.2); }

/* 특성 색상 */
.mo-tooltip-text.weak { color: #38bdf8; }
.mo-tooltip-text.tamable { color: #4ade80; }
.mo-tooltip-text.agro { color: #f6465d; }
.mo-tooltip-text.undead { color: #a78bfa; }
.mo-tooltip-text.poison, .mo-tooltip-text.paralyze, .mo-tooltip-text.stone { color: #fb923c; }

/* 드랍 아이템 등급 색상 */
.mo-tooltip-text.item.normal { color: #848e9c; }
.mo-tooltip-text.item.rare { color: #60a5fa; border-bottom-color: rgba(96,165,250,0.5); }
.mo-tooltip-text.item.hero { color: #f43f5e; border-bottom-color: rgba(244,63,94,0.5); }
.mo-tooltip-text.item.legend { color: #c084fc; border-bottom-color: rgba(192,132,252,0.5); }
.mo-tooltip-text.item.mythic { color: #f59e0b; border-bottom-color: rgba(245,158,11,0.5); }
.mo-tooltip-text.item.cursed { color: #f6465d; border-bottom-color: rgba(246,70,93,0.5); }

/* ── 페이지네이션 ──────────────────────── */
.mo-pagination {
  display: flex;
  justify-content: center;
  gap: 4px;
  padding: 20px;
}
.mo-page-btn {
  display: flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px;
  padding: 0 10px;
  font-size: 13px; font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-surface);
  border: 1px solid var(--border-secondary);
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s;
}
.mo-page-btn:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
}
.mo-page-btn.active {
  color: var(--bg-body);
  background: var(--color-accent);
  border-color: var(--color-accent);
}

/* ── 모바일 반응형 ──────────────────────── */
@media (max-width: 992px) {
  .mo-card-bottom { flex-direction: column; }
  .mo-info-block { border-left: none; border-top: 1px solid #2b2f36; padding: 12px 16px; }
  .mo-info-block:first-child { border-top: none; }
}

@media (max-width: 768px) {
  .mo-search-bar { padding: 10px 12px; flex-wrap: wrap; }
  .mo-filter-panel { padding: 12px; flex-direction: column; }
  .mo-section { padding: 16px 12px; }
  .mo-card-top { flex-direction: column; }
  .mo-card-img-box { width: 100%; height: 120px; border-bottom: 1px solid #2b2f36; }
  .mo-card-specs { flex-wrap: wrap; }
  .mo-spec-item { flex: 1 1 25%; border-left: none; border-right: 1px solid #2b2f36; border-bottom: 1px solid #2b2f36; }
  .mo-spec-item:nth-child(4n) { border-right: none; }
  .mo-spec-item.name-item { flex: 1 1 100%; border-right: none; }
}
