/* ─── 픽셀몬 위키 - 메인 스타일시트 ──────────────────────────────────── */

:root {
  /* 색상 팔레트 */
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-tertiary: #21262d;
  --bg-card: #1c2128;
  --bg-hover: #2d333b;
  --border-color: #30363d;
  --border-subtle: #21262d;

  /* 텍스트 */
  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --text-muted: #484f58;
  --text-link: #58a6ff;
  --text-link-hover: #79c0ff;

  /* 강조 */
  --accent-blue: #1f6feb;
  --accent-blue-subtle: #0d1117;
  --accent-green: #238636;
  --accent-orange: #d29922;
  --accent-red: #da3633;

  /* 타입 색상 */
  --type-normal: #A8A878;
  --type-fire: #F08030;
  --type-water: #6890F0;
  --type-electric: #F8D030;
  --type-grass: #78C850;
  --type-ice: #98D8D8;
  --type-fighting: #C03028;
  --type-poison: #A040A0;
  --type-ground: #E0C068;
  --type-flying: #A890F0;
  --type-psychic: #F85888;
  --type-bug: #A8B820;
  --type-rock: #B8A038;
  --type-ghost: #705898;
  --type-dragon: #7038F8;
  --type-dark: #705848;
  --type-steel: #B8B8D0;
  --type-fairy: #EE99AC;

  /* 희귀도 색상 */
  --rarity-common: #8b949e;
  --rarity-uncommon: #3fb950;
  --rarity-rare: #58a6ff;
  --rarity-ultra_rare: #bc8cff;
  --rarity-legendary: #ffa657;

  /* 레이아웃 */
  --header-height: 60px;
  --sidebar-width: 280px;
  --content-max-width: 1400px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  /* 폰트 */
  --font-sans: 'Pretendard', 'Noto Sans KR', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* 애니메이션 */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
}

/* ─── 리셋 & 기본 ─────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--text-link);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover { color: var(--text-link-hover); }

img { max-width: 100%; height: auto; display: block; }

button {
  cursor: pointer;
  font-family: var(--font-sans);
  border: none;
  background: none;
}

input, select, textarea {
  font-family: var(--font-sans);
  font-size: 1rem;
}

ul, ol { list-style: none; }

/* ─── 레이아웃 ─────────────────────────────────────────────────────────── */

.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main-content {
  flex: 1;
  padding-top: var(--header-height);
}

.container {
  width: 100%;
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 768px) { .container { padding: 0 1.5rem; } }
@media (min-width: 1200px) { .container { padding: 0 2rem; } }

/* ─── 헤더 ─────────────────────────────────────────────────────────────── */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(13, 17, 23, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  display: flex;
  align-items: center;
}

.header-inner {
  width: 100%;
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  flex-shrink: 0;
}

.site-logo .logo-icon {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #1f6feb, #388bfd);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.site-logo:hover { color: var(--text-link-hover); }

.header-search {
  flex: 1;
  max-width: 480px;
  position: relative;
}

.header-search input {
  width: 100%;
  padding: 0.5rem 1rem 0.5rem 2.5rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
}

.header-search input:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.2);
}

.header-search input::placeholder { color: var(--text-muted); }

.header-search .search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  font-size: 0.9rem;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
}

.header-nav a {
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.875rem;
  transition: background var(--transition-fast), color var(--transition-fast);
  white-space: nowrap;
}

.header-nav a:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.header-nav a.active {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

/* 모바일 메뉴 버튼 */
.mobile-menu-btn {
  display: none;
  padding: 0.5rem;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  margin-left: auto;
}

.mobile-menu-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

@media (max-width: 768px) {
  .header-nav { display: none; }
  .mobile-menu-btn { display: flex; align-items: center; }
  .header-search { max-width: none; }
}

/* ─── 모바일 메뉴 ───────────────────────────────────────────────────────── */

.mobile-menu {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  z-index: 999;
  padding: 1rem;
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  max-height: calc(100vh - var(--header-height));
  overflow-y: auto;
}

.mobile-menu.open { display: flex; }

.mobile-menu a {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.mobile-menu a:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* ─── 푸터 ─────────────────────────────────────────────────────────────── */

.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 2rem 0;
  margin-top: auto;
}

.footer-inner {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .footer-inner { grid-template-columns: 2fr 1fr 1fr 1fr; }
}

.footer-brand .footer-logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.footer-disclaimer {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.7;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  margin-top: 0.75rem;
  background: var(--bg-tertiary);
}

.footer-nav h4 {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.footer-nav ul {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.footer-nav a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.footer-nav a:hover { color: var(--text-link); }

.footer-bottom {
  max-width: var(--content-max-width);
  margin: 1.5rem auto 0;
  padding: 1rem 1.5rem 0;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ─── 카드 ─────────────────────────────────────────────────────────────── */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.card:hover {
  border-color: var(--accent-blue);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.card-body { padding: 1.25rem; }
.card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
  font-size: 0.9rem;
}

/* ─── 포켓몬 카드 ───────────────────────────────────────────────────────── */

.pokemon-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-normal);
  position: relative;
}

.pokemon-card:hover {
  border-color: var(--accent-blue);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

.pokemon-card a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.pokemon-card-image {
  aspect-ratio: 1;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.pokemon-card-image img {
  width: 80%;
  height: 80%;
  object-fit: contain;
  transition: transform var(--transition-normal);
}

.pokemon-card:hover .pokemon-card-image img { transform: scale(1.05); }

.pokemon-placeholder {
  width: 70%;
  height: 70%;
  background: var(--bg-hover);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--text-muted);
}

.pokemon-card-dex {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  font-family: var(--font-mono);
}

.pokemon-card-body {
  padding: 0.875rem;
}

.pokemon-card-name-ko {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.125rem;
}

.pokemon-card-name-en {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  text-transform: capitalize;
}

.pokemon-card-types {
  display: flex;
  gap: 0.375rem;
  flex-wrap: wrap;
}

/* ─── 타입 뱃지 ─────────────────────────────────────────────────────────── */

.type-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  white-space: nowrap;
}

.type-badge.type-normal   { background: var(--type-normal); }
.type-badge.type-fire     { background: var(--type-fire); }
.type-badge.type-water    { background: var(--type-water); }
.type-badge.type-electric { background: var(--type-electric); color: #333; text-shadow: none; }
.type-badge.type-grass    { background: var(--type-grass); }
.type-badge.type-ice      { background: var(--type-ice); color: #333; text-shadow: none; }
.type-badge.type-fighting { background: var(--type-fighting); }
.type-badge.type-poison   { background: var(--type-poison); }
.type-badge.type-ground   { background: var(--type-ground); color: #333; text-shadow: none; }
.type-badge.type-flying   { background: var(--type-flying); }
.type-badge.type-psychic  { background: var(--type-psychic); }
.type-badge.type-bug      { background: var(--type-bug); }
.type-badge.type-rock     { background: var(--type-rock); }
.type-badge.type-ghost    { background: var(--type-ghost); }
.type-badge.type-dragon   { background: var(--type-dragon); }
.type-badge.type-dark     { background: var(--type-dark); }
.type-badge.type-steel    { background: var(--type-steel); color: #333; text-shadow: none; }
.type-badge.type-fairy    { background: var(--type-fairy); color: #333; text-shadow: none; }

/* ─── 희귀도 뱃지 ───────────────────────────────────────────────────────── */

.rarity-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 600;
  border: 1px solid;
}

.rarity-common    { color: var(--rarity-common); border-color: var(--rarity-common); }
.rarity-uncommon  { color: var(--rarity-uncommon); border-color: var(--rarity-uncommon); }
.rarity-rare      { color: var(--rarity-rare); border-color: var(--rarity-rare); }
.rarity-ultra_rare { color: var(--rarity-ultra_rare); border-color: var(--rarity-ultra_rare); }
.rarity-legendary { color: var(--rarity-legendary); border-color: var(--rarity-legendary); }

/* ─── 검증 상태 뱃지 ───────────────────────────────────────────────────── */

.verify-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 600;
}

.verify-verified { background: rgba(35,134,54,0.15); color: #3fb950; }
.verify-unverified { background: rgba(210,153,34,0.15); color: #e3b341; }
.verify-outdated { background: rgba(218,70,51,0.15); color: #f85149; }
.verify-disputed { background: rgba(188,140,255,0.15); color: #bc8cff; }

/* ─── 그리드 ─────────────────────────────────────────────────────────────── */

.pokemon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}

@media (min-width: 480px) { .pokemon-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); } }
@media (min-width: 768px) { .pokemon-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); } }
@media (min-width: 1200px) { .pokemon-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); } }

/* ─── 검색 & 필터 ────────────────────────────────────────────────────────── */

.search-section {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 1.5rem 0;
  position: sticky;
  top: var(--header-height);
  z-index: 100;
}

.search-bar-wrapper {
  position: relative;
  margin-bottom: 1rem;
}

.search-bar {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 3rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1rem;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.search-bar:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.2);
}

.search-bar::placeholder { color: var(--text-muted); }

.search-bar-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.filter-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.filter-select {
  padding: 0.4rem 0.75rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238b949e' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  padding-right: 1.75rem;
  transition: border-color var(--transition-fast);
}

.filter-select:focus { border-color: var(--accent-blue); color: var(--text-primary); }

.filter-btn {
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.filter-btn:hover, .filter-btn.active {
  border-color: var(--accent-blue);
  color: var(--text-primary);
  background: rgba(31, 111, 235, 0.1);
}

.filter-reset {
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  background: transparent;
  transition: all var(--transition-fast);
}

.filter-reset:hover { color: var(--text-secondary); border-color: var(--border-color); }

.search-result-count {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-left: auto;
}

/* ─── 섹션 ─────────────────────────────────────────────────────────────── */

.page-section {
  padding: 2rem 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-title .icon { font-size: 1.1rem; }

.section-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

/* ─── 통계 바 ───────────────────────────────────────────────────────────── */

.stat-bar-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.stat-label {
  width: 80px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-align: right;
  flex-shrink: 0;
}

.stat-bar-track {
  flex: 1;
  height: 8px;
  background: var(--bg-hover);
  border-radius: 4px;
  overflow: hidden;
}

.stat-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
}

.stat-value {
  width: 40px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.stat-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-subtle);
  margin-top: 0.5rem;
  font-weight: 700;
}

/* 종족값 색상 등급 */
.stat-bar-fill.stat-low    { background: #f85149; }
.stat-bar-fill.stat-mid    { background: #e3b341; }
.stat-bar-fill.stat-high   { background: #3fb950; }
.stat-bar-fill.stat-max    { background: #388bfd; }

/* ─── 테이블 ─────────────────────────────────────────────────────────────── */

.data-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table th {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.75rem 1rem;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--border-color);
}

.data-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: none; }

.data-table tbody tr:hover { background: var(--bg-hover); }

/* ─── 빈 상태 ──────────────────────────────────────────────────────────── */

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.empty-state-desc {
  font-size: 0.875rem;
  max-width: 400px;
  margin: 0 auto;
}

/* ─── 로딩 ─────────────────────────────────────────────────────────────── */

.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  gap: 1rem;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-text {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ─── 알림 & 상태 ───────────────────────────────────────────────────────── */

.alert {
  padding: 0.875rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  border: 1px solid;
}

.alert-info { background: rgba(31,111,235,0.1); border-color: rgba(31,111,235,0.3); color: #58a6ff; }
.alert-warning { background: rgba(210,153,34,0.1); border-color: rgba(210,153,34,0.3); color: #e3b341; }
.alert-error { background: rgba(218,70,51,0.1); border-color: rgba(218,70,51,0.3); color: #f85149; }
.alert-success { background: rgba(35,134,54,0.1); border-color: rgba(35,134,54,0.3); color: #3fb950; }

/* ─── 버튼 ─────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  transition: all var(--transition-fast);
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-blue);
  color: white;
  border-color: var(--accent-blue);
}
.btn-primary:hover { background: #388bfd; border-color: #388bfd; color: white; }

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border-color: var(--border-color);
}
.btn-secondary:hover { border-color: var(--accent-blue); color: var(--text-primary); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}
.btn-ghost:hover { background: var(--bg-hover); color: var(--text-primary); }

.btn-sm { padding: 0.3rem 0.6rem; font-size: 0.8rem; }
.btn-lg { padding: 0.75rem 1.5rem; font-size: 1rem; }

/* ─── 페이지네이션 ──────────────────────────────────────────────────────── */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 2rem 0;
}

.page-btn {
  min-width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.page-btn:hover:not(:disabled) {
  border-color: var(--accent-blue);
  color: var(--text-primary);
}

.page-btn.active {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: white;
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ─── 포켓몬 상세 페이지 ─────────────────────────────────────────────────── */

.pokemon-detail-header {
  padding: 2rem 0 1rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2rem;
}

.pokemon-detail-dex {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-bottom: 0.25rem;
}

.pokemon-detail-name-ko {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

.pokemon-detail-name-en {
  font-size: 1rem;
  color: var(--text-secondary);
  text-transform: capitalize;
  margin-top: 0.25rem;
}

.pokemon-detail-layout {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .pokemon-detail-layout { grid-template-columns: 300px 1fr; }
}

@media (min-width: 1024px) {
  .pokemon-detail-layout { grid-template-columns: 340px 1fr; }
}

.pokemon-detail-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pokemon-detail-main {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.pokemon-image-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.pokemon-image-area {
  aspect-ratio: 1;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pokemon-image-area img {
  width: 70%;
  height: 70%;
  object-fit: contain;
}

.pokemon-info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.pokemon-info-table tr {
  border-bottom: 1px solid var(--border-subtle);
}

.pokemon-info-table tr:last-child { border-bottom: none; }

.pokemon-info-table th {
  padding: 0.625rem 0.875rem;
  text-align: left;
  color: var(--text-secondary);
  font-weight: 500;
  width: 45%;
  background: var(--bg-tertiary);
}

.pokemon-info-table td {
  padding: 0.625rem 0.875rem;
  color: var(--text-primary);
}

.null-data {
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.8rem;
}

/* ─── 폼 탭 ─────────────────────────────────────────────────────────────── */

.form-tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.form-tab {
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  border: 1px solid transparent;
  border-bottom: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.form-tab:hover { color: var(--text-secondary); background: var(--bg-hover); }

.form-tab.active {
  color: var(--text-primary);
  background: var(--bg-card);
  border-color: var(--border-color);
  border-bottom-color: var(--bg-card);
  margin-bottom: -1px;
}

/* ─── 진화 계보 ─────────────────────────────────────────────────────────── */

.evolution-chain {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 1rem;
}

.evolution-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.evolution-node:hover { transform: scale(1.05); }

.evolution-node-img {
  width: 64px;
  height: 64px;
  background: var(--bg-tertiary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--border-color);
  font-size: 1.5rem;
  color: var(--text-muted);
}

.evolution-node-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
}

.evolution-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-align: center;
  padding: 0 0.5rem;
}

.evolution-arrow .arrow { font-size: 1.25rem; color: var(--accent-blue); }
.evolution-arrow .condition { max-width: 80px; font-size: 0.7rem; }

/* ─── 스폰 표 ───────────────────────────────────────────────────────────── */

.spawn-conditions {
  display: flex;
  gap: 0.375rem;
  flex-wrap: wrap;
  align-items: center;
}

.spawn-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 500;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

/* ─── 드롭 테이블 ───────────────────────────────────────────────────────── */

.drop-chance-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.drop-chance-fill {
  flex: 1;
  height: 6px;
  background: var(--bg-hover);
  border-radius: 3px;
  overflow: hidden;
}

.drop-chance-fill-inner {
  height: 100%;
  background: var(--accent-blue);
  border-radius: 3px;
}

/* ─── 탭 콘텐츠 ─────────────────────────────────────────────────────────── */

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ─── 모바일 필터 패널 ──────────────────────────────────────────────────── */

.filter-toggle-btn {
  display: none;
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.875rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

@media (max-width: 768px) {
  .filter-toggle-btn { display: flex; }
  .filter-row { display: none; }
  .filter-row.open { display: flex; flex-direction: column; align-items: stretch; }
  .filter-select, .filter-btn { width: 100%; text-align: left; }
}

/* ─── 페이지 헤더 ───────────────────────────────────────────────────────── */

.page-header {
  background: linear-gradient(180deg, var(--bg-secondary), var(--bg-primary));
  border-bottom: 1px solid var(--border-color);
  padding: 2rem 0;
}

.page-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.page-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  max-width: 600px;
}

/* ─── 히어로 섹션 ──────────────────────────────────────────────────────── */

.hero-section {
  background: linear-gradient(135deg, #0d1117 0%, #161b22 50%, #0d1117 100%);
  border-bottom: 1px solid var(--border-color);
  padding: 4rem 0 3rem;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 60% 40%, rgba(31,111,235,0.08) 0%, transparent 50%);
  pointer-events: none;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #e6edf3, #58a6ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@media (min-width: 768px) { .hero-title { font-size: 3.5rem; } }

.hero-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 540px;
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero-search {
  max-width: 560px;
  position: relative;
}

.hero-search input {
  width: 100%;
  padding: 1rem 1.25rem 1rem 3.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-size: 1.05rem;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.hero-search input:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 4px rgba(31, 111, 235, 0.15);
}

.hero-search input::placeholder { color: var(--text-muted); }

.hero-search-icon {
  position: absolute;
  left: 1.125rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
  pointer-events: none;
}

.hero-stats {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.hero-stat {
  text-align: center;
}

.hero-stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  display: block;
}

.hero-stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ─── 퀵 링크 ───────────────────────────────────────────────────────────── */

.quick-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .quick-links { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}

.quick-link-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.25rem 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  color: var(--text-secondary);
  text-align: center;
  transition: all var(--transition-normal);
  font-size: 0.85rem;
}

.quick-link-item:hover {
  border-color: var(--accent-blue);
  color: var(--text-primary);
  background: var(--bg-hover);
  transform: translateY(-2px);
}

.quick-link-icon {
  font-size: 1.75rem;
}

.quick-link-name {
  font-weight: 600;
}

/* ─── 아코디언 ──────────────────────────────────────────────────────────── */

.accordion-item {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.accordion-header {
  width: 100%;
  padding: 1rem;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background var(--transition-fast);
}

.accordion-header:hover { background: var(--bg-hover); }

.accordion-icon {
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: transform var(--transition-fast);
}

.accordion-item.open .accordion-icon { transform: rotate(180deg); }

.accordion-body {
  display: none;
  padding: 1rem;
  background: var(--bg-card);
}

.accordion-item.open .accordion-body { display: block; }

/* ─── 브레드크럼 ────────────────────────────────────────────────────────── */

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--text-link); }
.breadcrumb .sep { color: var(--text-muted); }

/* ─── 버전 표시 ─────────────────────────────────────────────────────────── */

.version-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 600;
  font-family: var(--font-mono);
  background: rgba(31,111,235,0.1);
  color: var(--text-link);
  border: 1px solid rgba(31,111,235,0.2);
}

/* ─── 스크롤바 ──────────────────────────────────────────────────────────── */

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--bg-hover); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ─── 반응형 유틸리티 ───────────────────────────────────────────────────── */

.hide-mobile { display: none; }
@media (min-width: 768px) { .hide-mobile { display: initial; } }
.hide-desktop { display: initial; }
@media (min-width: 768px) { .hide-desktop { display: none; } }

/* ─── 접근성 ─────────────────────────────────────────────────────────────── */

:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ─── 폼 배지 ────────────────────────────────────────────────────────────── */

.form-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  border: 1px solid transparent;
}
.form-badge-default   { background: rgba(107,114,128,0.12); color: #6b7280; border-color: rgba(107,114,128,0.25); }
.form-badge-mega      { background: rgba(147,51,234,0.12); color: #9333ea; border-color: rgba(147,51,234,0.3); }
.form-badge-gmax      { background: rgba(220,38,38,0.12); color: #dc2626; border-color: rgba(220,38,38,0.3); }
.form-badge-regional  { background: rgba(37,99,235,0.12); color: #2563eb; border-color: rgba(37,99,235,0.3); }
.form-badge-battle-only { background: rgba(217,119,6,0.12); color: #d97706; border-color: rgba(217,119,6,0.3); }
.form-badge-cosmetic  { background: rgba(5,150,105,0.12); color: #059669; border-color: rgba(5,150,105,0.3); }
.form-badge-alternate { background: rgba(107,114,128,0.12); color: #6b7280; border-color: rgba(107,114,128,0.25); }

/* ─── 폼 링크 칩 ────────────────────────────────────────────────────────── */

.form-link-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  text-decoration: none;
  transition: all 0.15s ease;
  cursor: pointer;
}
.form-link-chip:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--accent-blue);
}
.form-link-chip.active {
  background: rgba(31,111,235,0.12);
  color: var(--accent-blue);
  border-color: rgba(31,111,235,0.3);
  font-weight: 600;
  cursor: default;
  pointer-events: none;
}

/* ─── 포켓몬 카드 폼 배지 ───────────────────────────────────────────────── */

.pokemon-card-form-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  margin-top: 0.25rem;
}

/* ─── 폼 섹션 (부모 포켓몬 상세 페이지) ────────────────────────────────── */

.forms-section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
}

.form-card {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 0.75rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.form-card:hover {
  border-color: var(--accent-blue);
  background: var(--bg-hover);
}
.form-card-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}
.form-card-name-en {
  font-size: 0.78rem;
  color: var(--text-secondary);
}
.form-card-types {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}
.form-card-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.125rem;
}

/* ─── 경고 박스 ──────────────────────────────────────────────────────────── */

.alert {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: 0.875rem;
  line-height: 1.6;
}
.alert-warning {
  background: rgba(217,119,6,0.08);
  border-color: rgba(217,119,6,0.3);
  color: var(--text-primary);
}

/* ─── 가용성 (Availability) ────────────────────────────────────────────────── */

/* 가용성 카드 */
.avail-card { margin-top: 1.5rem; }

/* true / false / null 값 구분 */
.avail-true  { display: inline-flex; align-items: center; gap: 0.25rem; font-weight: 600; color: #3fb950; }
.avail-false { display: inline-flex; align-items: center; gap: 0.25rem; font-weight: 600; color: #f85149; }
.avail-null  { display: inline-flex; align-items: center; gap: 0.25rem; color: var(--text-muted); font-style: italic; }
.avail-true::before  { content: "✔"; }
.avail-false::before { content: "✘"; }
.avail-null::before  { content: "–"; }

/* 검증 상태 배지 */
.avail-verify { display: inline-block; padding: 0.1em 0.5em; border-radius: 4px; font-size: 0.78rem; font-weight: 600; white-space: nowrap; }
.avail-verify-verified   { background: rgba(35,134,54,0.15);  color: #3fb950; border: 1px solid rgba(35,134,54,0.3); }
.avail-verify-partial    { background: rgba(210,153,34,0.15); color: #e3b341; border: 1px solid rgba(210,153,34,0.3); }
.avail-verify-unverified { background: rgba(120,120,120,0.12); color: var(--text-muted); border: 1px solid rgba(120,120,120,0.25); }

/* 가용성 테이블 */
.avail-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.avail-table th[scope="row"] {
  width: 40%; padding: 0.5rem 0.75rem; text-align: left;
  font-weight: 500; color: var(--text-secondary);
  background: var(--bg-secondary); border-bottom: 1px solid var(--border-color);
}
.avail-table td {
  padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--border-color);
}

/* 획득 방법 배지 */
.avail-methods { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.avail-method-badge {
  display: inline-block; padding: 0.15em 0.55em; border-radius: 4px;
  font-size: 0.78rem; font-weight: 500;
  background: rgba(59,130,246,0.12); color: #60a5fa;
  border: 1px solid rgba(59,130,246,0.25);
}

/* 출처 링크 */
.avail-sources { display: flex; flex-direction: column; gap: 0.2rem; margin-top: 0.5rem; }
.avail-source-link, .avail-source-text {
  font-size: 0.8rem; color: var(--text-secondary);
}
.avail-source-link { color: var(--accent-primary); text-decoration: underline dotted; }
.avail-source-link:hover { color: var(--accent-hover); }

/* 메모 */
.avail-notes {
  margin: 0.5rem 0 0; font-size: 0.82rem;
  color: var(--text-secondary); line-height: 1.55;
}

/* 확인일 */
.avail-checked-date {
  display: inline-block; margin-left: 0.5rem;
  font-size: 0.78rem; color: var(--text-muted);
}

/* 면책 조항 */
.avail-disclaimer {
  margin-top: 0.75rem; font-size: 0.8rem;
  color: var(--text-muted); font-style: italic;
}

/* 반응형 */
@media (max-width: 640px) {
  .avail-table th[scope="row"],
  .avail-table td { padding: 0.4rem 0.5rem; font-size: 0.82rem; }
  .avail-table th[scope="row"] { width: 45%; }
  .avail-methods { gap: 0.2rem; }
  .avail-method-badge { font-size: 0.73rem; }
}

/* ═══════════════════════════════════════════════════════════════════════
   Pixelmon 9.4.0 스폰 섹션 (Turn 7)
   ─────────────────────────────────────────────────────────────────────── */

/* 스폰 카드 */
.spawn-card { margin-bottom: 1.5rem; }

/* 전체 배지 */
.spawn-total-badge {
  display: inline-block; margin-left: 0.5rem;
  padding: 0.1em 0.55em; border-radius: 999px;
  font-size: 0.78rem; font-weight: 600;
  background: rgba(16,185,129,0.15); color: #34d399;
  border: 1px solid rgba(16,185,129,0.3);
}

/* 컨텍스트 그룹 */
.spawn-context-group { margin-bottom: 1.5rem; }
.spawn-context-header {
  font-size: 0.95rem; font-weight: 700;
  color: var(--text-primary); margin-bottom: 0.5rem;
  display: flex; align-items: center; gap: 0.4rem;
}
.spawn-count-badge {
  display: inline-block; padding: 0.05em 0.45em;
  border-radius: 999px; font-size: 0.75rem;
  background: rgba(148,163,184,0.15); color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

/* 스폰 테이블 */
.spawn-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.spawn-table { min-width: 900px; font-size: 0.82rem; }
.spawn-table th { white-space: nowrap; }
.spawn-table td { vertical-align: top; }

/* 바이옴 */
.spawn-biome-id {
  display: inline-block; padding: 0.1em 0.4em; margin: 0.1em;
  border-radius: 3px; font-size: 0.77rem;
  background: rgba(99,102,241,0.12); color: #a5b4fc;
  border: 1px solid rgba(99,102,241,0.25);
}
.spawn-biome-tag {
  display: inline-block; padding: 0.1em 0.4em; margin: 0.1em;
  border-radius: 3px; font-size: 0.77rem;
  background: rgba(16,185,129,0.1); color: #6ee7b7;
  border: 1px solid rgba(16,185,129,0.2);
}

/* 조건 배지 */
.spawn-cond-badge {
  display: inline-block; padding: 0.1em 0.45em; margin: 0.1em;
  border-radius: 3px; font-size: 0.77rem;
  background: rgba(245,158,11,0.1); color: #fcd34d;
  border: 1px solid rgba(245,158,11,0.2);
}

/* null 표시 */
.spawn-null { color: var(--text-muted); font-size: 0.8em; font-style: italic; }
.spawn-null-note { color: var(--text-muted); font-size: 0.8rem; font-style: italic; }

/* 레벨 */
.spawn-level { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* 원본 조건 */
.spawn-raw-conditions {
  margin-top: 0.25rem; font-size: 0.77rem;
  color: var(--text-muted); font-family: monospace;
}
.spawn-raw-label { color: var(--text-secondary); font-weight: 600; }

/* 안내 메모 */
.spawn-note { margin-bottom: 0.75rem; }

/* 검증 배지 (기존 verify-* 외 추가) */
.verify-conflict {
  background: rgba(239,68,68,0.15); color: #f87171;
  border-color: rgba(239,68,68,0.3);
}

/* 버전 태그 */
.version-tag {
  display: inline-block; padding: 0.1em 0.45em;
  border-radius: 3px; font-size: 0.77rem;
  background: rgba(148,163,184,0.1); color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

/* 반응형 */
@media (max-width: 640px) {
  .spawn-table { font-size: 0.78rem; }
  .spawn-context-header { font-size: 0.88rem; }
  .spawn-total-badge { font-size: 0.73rem; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   드롭 섹션 (Drop Section) — Pixelmon 9.4.0 canonical DropRecord
   ═══════════════════════════════════════════════════════════════════════════ */

.drop-section {
  margin-top: 1.5rem;
}

.drop-section .section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

/* 총 건수 뱃지 */
.drop-total-badge {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border-radius: 9999px;
  border: 1px solid var(--border-color);
}

/* 메타 정보 행 */
.drop-meta {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.drop-version-tag {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  background: #1d4ed8;
  color: #fff;
  border-radius: 4px;
  letter-spacing: 0.03em;
}

.drop-source-note {
  font-size: 0.73rem;
  color: var(--text-muted);
}

/* 폼별 그룹 */
.drop-group {
  margin-bottom: 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.drop-group-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  padding: 0.45rem 0.75rem;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
}

.drop-group-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* 컨텍스트 뱃지 */
.drop-ctx-badge {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  font-size: 0.68rem;
  font-weight: 600;
  background: rgba(100, 116, 139, 0.15);
  color: var(--text-secondary);
  border-radius: 4px;
  border: 1px solid var(--border-color);
}

/* 드롭 수 뱃지 */
.drop-count-badge {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* 테이블 스크롤 래퍼 */
.drop-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* 드롭 테이블 */
.drop-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.drop-table thead th {
  padding: 0.4rem 0.6rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.drop-table thead th:nth-child(2),
.drop-table thead th:nth-child(3),
.drop-table thead th:nth-child(4) {
  text-align: center;
}

.drop-row td {
  padding: 0.4rem 0.6rem;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

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

.drop-row:hover {
  background: var(--bg-hover);
}

/* 아이템 셀 */
.drop-item-cell {
  min-width: 160px;
}

.drop-item-name {
  font-weight: 500;
  color: var(--text-primary);
}

.drop-item-id {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

/* 수량 */
.drop-qty {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* 확률 */
.drop-chance {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}

/* 확정 드롭 (100%) */
.drop-guaranteed {
  color: #16a34a;
}

/* 검증 열 */
.drop-verify {
  text-align: center;
  white-space: nowrap;
}

.drop-verify-badge {
  display: inline-block;
  width: 1.25rem;
  height: 1.25rem;
  line-height: 1.25rem;
  text-align: center;
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 700;
}

.drop-verify-ok {
  background: #dcfce7;
  color: #15803d;
}

.drop-verify-partial {
  background: #fef3c7;
  color: #92400e;
}

.drop-verify-none {
  background: var(--bg-tertiary);
  color: var(--text-muted);
}

/* 폼 미확인 주석 */
.drop-form-note {
  font-size: 0.68rem;
  color: #92400e;
  background: #fef3c7;
  padding: 0.05rem 0.3rem;
  border-radius: 3px;
  margin-left: 0.25rem;
}

/* 조건 주석 (ℹ) */
.drop-raw-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: 0.2rem;
  cursor: default;
}

/* 네임스페이스 태그 */
.drop-ns-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.05rem 0.25rem;
  background: var(--bg-tertiary);
  color: var(--text-muted);
  border-radius: 3px;
  margin-right: 0.15rem;
  font-family: var(--font-mono);
}

/* 빈 상태 */
.drop-empty {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 0.75rem 0;
}

/* 부분 검증 안내 */
.drop-partial-note {
  font-size: 0.72rem;
  color: #92400e;
  font-weight: 400;
}

/* form_id 코드 */
.drop-form-id {
  font-family: var(--font-mono);
  font-size: 0.8em;
}

/* ─── 반응형 ─────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .drop-table { font-size: 0.78rem; }
  .drop-item-id { display: none; }
  .drop-group-header { padding: 0.35rem 0.5rem; }
  .drop-section .section-title { font-size: 1rem; }
  .drop-table thead th,
  .drop-row td { padding: 0.35rem 0.4rem; }
}
