/* ==================== 포켓몬 도감 스타일시트 (Pokédex Style) ==================== */

:root {
  --font-main: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-num: 'Rajdhani', monospace, sans-serif;

  /* 메인 테마 색상 */
  --bg-color: #0f172a;
  --bg-card: rgba(30, 41, 59, 0.7);
  --bg-card-hover: rgba(51, 65, 85, 0.9);
  --border-color: rgba(255, 255, 255, 0.1);
  --text-main: #f8fafc;
  --text-sub: #94a3b8;
  --text-muted: #64748b;
  
  --primary-red: #ef4444;
  --primary-red-hover: #dc2626;

  /* 18개 포켓몬 타입별 공식 시그니처 컬러 */
  --type-normal: #9fa19f;
  --type-fire: #e62829;
  --type-water: #2980ef;
  --type-electric: #fac000;
  --type-grass: #3fa129;
  --type-ice: #3dcef3;
  --type-fighting: #ff8000;
  --type-poison: #9141cb;
  --type-ground: #915121;
  --type-flying: #81b9ef;
  --type-psychic: #ef4179;
  --type-bug: #91a119;
  --type-rock: #afa981;
  --type-ghost: #704170;
  --type-dragon: #5060e1;
  --type-steel: #60a1b8;
  --type-dark: #50413f;
  --type-fairy: #ef70ef;
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-color);
  color: var(--text-main);
  min-height: 100vh;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(239, 68, 68, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(41, 128, 239, 0.08) 0%, transparent 40%);
  background-attachment: fixed;
  overflow-x: hidden;
}

/* ==================== 1. 상단 헤더 ==================== */
.pokedex-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
}

.header-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* 몬스터볼 아이콘 */
.pokeball-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 3px solid #f8fafc;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.5);
  animation: pokeballRotate 6s ease-in-out infinite;
}

@keyframes pokeballRotate {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(15deg); }
  75% { transform: rotate(-15deg); }
}

.pokeball-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: #ef4444;
}

.pokeball-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: #ffffff;
}

.pokeball-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  background: #f8fafc;
  border: 3px solid #1e293b;
  border-radius: 50%;
  z-index: 2;
}

.logo-text h1 {
  font-family: var(--font-num);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 1.5px;
  background: linear-gradient(135deg, #ef4444 0%, #f59e0b 50%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}

.logo-text .sub-text {
  font-size: 11px;
  color: var(--text-sub);
  font-weight: 500;
}

.header-actions {
  display: flex;
  gap: 10px;
}

.header-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.header-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.header-btn i.fa-heart {
  color: #f43f5e;
}

.header-btn.active {
  background: #f43f5e;
  border-color: #f43f5e;
  color: #ffffff;
}

.header-btn.active i.fa-heart {
  color: #ffffff;
}

/* ==================== 2. 메인 컨트롤 패널 (검색/필터) ==================== */
.main-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

.control-panel {
  background: rgba(30, 41, 59, 0.5);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* 검색창 */
.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 18px;
  color: var(--text-sub);
  font-size: 16px;
}

.search-box input {
  width: 100%;
  background: rgba(15, 23, 42, 0.8);
  border: 1.5px solid var(--border-color);
  border-radius: 14px;
  padding: 14px 44px 14px 48px;
  color: var(--text-main);
  font-size: 15px;
  font-family: var(--font-main);
  outline: none;
  transition: all 0.2s ease;
}

.search-box input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.2);
}

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

.btn-clear-search {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  color: var(--text-sub);
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
}

/* 세대별 탭 */
.gen-tabs-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.gen-tabs-wrap::-webkit-scrollbar {
  height: 4px;
}

.gen-tabs-wrap::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.gen-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-sub);
  white-space: nowrap;
}

.gen-tabs {
  display: flex;
  gap: 6px;
}

.gen-btn {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  color: var(--text-sub);
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.gen-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.gen-btn.active {
  background: #38bdf8;
  border-color: #38bdf8;
  color: #0f172a;
  font-weight: 700;
}

/* 타입 필터 칩 */
.type-filter-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.type-filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.filter-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-sub);
}

.btn-reset-types {
  background: none;
  border: none;
  color: #38bdf8;
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
}

.type-chips-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.type-chip {
  background: rgba(15, 23, 42, 0.6);
  border: 1.5px solid transparent;
  color: var(--text-sub);
  padding: 5px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
  user-select: none;
}

.type-chip .type-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.type-chip:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.type-chip.active {
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.2);
}

/* 정렬 바 */
.sort-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-color);
  padding-top: 14px;
  font-size: 13px;
}

.result-count-wrap {
  color: var(--text-sub);
  font-weight: 600;
}

.sort-select-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-sub);
}

.sort-select-wrap select {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-family: var(--font-main);
  outline: none;
  cursor: pointer;
}

/* ==================== 3. 포켓몬 카드 그리드 ==================== */
.pokemon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

/* 포켓몬 카드 */
.poke-card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 16px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.poke-card:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.4), 0 0 20px var(--card-glow, rgba(255, 255, 255, 0.1));
}

.card-bg-glow {
  position: absolute;
  top: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: var(--card-glow, rgba(255, 255, 255, 0.05));
  filter: blur(35px);
  pointer-events: none;
  z-index: 0;
}

.card-header-top {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1;
  margin-bottom: 6px;
}

.card-number {
  font-family: var(--font-num);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.btn-card-fav {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 2px;
}

.btn-card-fav:hover {
  color: #f43f5e;
  transform: scale(1.2);
}

.btn-card-fav.active {
  color: #f43f5e;
}

.card-img-wrap {
  width: 130px;
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 6px 0 12px;
  position: relative;
  z-index: 1;
}

.poke-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.35));
  transition: transform 0.3s ease;
}

.poke-card:hover .poke-img {
  transform: scale(1.1);
}

.card-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
  z-index: 1;
}

.card-sub-name {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: capitalize;
  margin-bottom: 10px;
  z-index: 1;
}

.card-types {
  display: flex;
  gap: 5px;
  z-index: 1;
}

/* 공통 타입 뱃지 */
.type-badge {
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* 로딩 & 더보기 & 빈 결과 */
.loading-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
  gap: 14px;
}

.pokeball-spinner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 4px solid #f8fafc;
  position: relative;
  overflow: hidden;
  animation: spin 1s linear infinite;
}

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

.pokeball-spinner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: #ef4444;
}

.pokeball-spinner::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  background: #f8fafc;
  border: 3px solid #1e293b;
  border-radius: 50%;
}

.loading-text {
  font-size: 14px;
  color: var(--text-sub);
  font-weight: 600;
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 36px;
}

.btn-load-more {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
  border: none;
  padding: 12px 28px;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-load-more:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(239, 68, 68, 0.6);
}

.empty-results {
  text-align: center;
  padding: 60px 20px;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.empty-results h3 {
  font-size: 18px;
  margin-bottom: 6px;
}

.empty-results p {
  font-size: 14px;
  color: var(--text-sub);
  margin-bottom: 20px;
}

.btn-reset-all {
  background: #38bdf8;
  color: #0f172a;
  border: none;
  padding: 10px 20px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

/* ==================== 4. 포켓몬 상세 정보 모달 ==================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-card {
  background: #1e293b;
  border: 1px solid var(--border-color);
  border-radius: 24px;
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-card::-webkit-scrollbar {
  width: 6px;
}

.modal-card::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 6px;
}

@keyframes slideUp {
  from { transform: translateY(30px) scale(0.96); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.btn-close-modal {
  position: absolute;
  top: 14px;
  right: 16px;
  background: rgba(0, 0, 0, 0.4);
  border: none;
  color: #ffffff;
  font-size: 24px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.2s ease;
}

.btn-close-modal:hover {
  background: rgba(0, 0, 0, 0.7);
  transform: rotate(90deg);
}

/* 모달 히어로 상단 */
.modal-header-hero {
  position: relative;
  padding: 24px 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  background: linear-gradient(180deg, var(--hero-bg, #334155) 0%, #1e293b 100%);
  overflow: hidden;
}

.hero-bg-pattern {
  position: absolute;
  top: -40px;
  right: -40px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 30px solid rgba(255, 255, 255, 0.05);
  pointer-events: none;
}

.hero-top-bar {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  z-index: 1;
}

.modal-poke-num {
  font-family: var(--font-num);
  font-size: 16px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 1px;
}

.hero-actions {
  display: flex;
  gap: 8px;
  margin-right: 36px;
}

.btn-cry, .btn-fav-toggle {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: all 0.2s ease;
}

.btn-cry:hover, .btn-fav-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.btn-fav-toggle.active i {
  color: #f43f5e;
}

.hero-image-wrap {
  position: relative;
  width: 180px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.modal-poke-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.45));
  transition: all 0.3s ease;
}

.btn-shiny-toggle {
  position: absolute;
  bottom: 0;
  right: -20px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fbbf24;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  backdrop-filter: blur(6px);
  transition: all 0.2s ease;
}

.btn-shiny-toggle:hover {
  background: #fbbf24;
  color: #0f172a;
}

.btn-shiny-toggle.active {
  background: #fbbf24;
  color: #0f172a;
}

.hero-title-wrap {
  margin-bottom: 8px;
}

.modal-poke-name {
  font-size: 24px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
}

.modal-poke-sub {
  font-size: 13px;
  color: var(--text-sub);
  text-transform: capitalize;
}

.modal-types-wrap {
  display: flex;
  gap: 6px;
}

/* 모달 탭 메뉴 */
.modal-tabs {
  display: flex;
  background: rgba(15, 23, 42, 0.6);
  border-bottom: 1px solid var(--border-color);
  padding: 0 16px;
}

.modal-tab-btn {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-sub);
  padding: 12px 0;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  transition: color 0.2s ease;
}

.modal-tab-btn:hover {
  color: var(--text-main);
}

.modal-tab-btn.active {
  color: #38bdf8;
  font-weight: 700;
}

.modal-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 20%;
  right: 20%;
  height: 2px;
  background: #38bdf8;
  border-radius: 2px;
}

/* 모달 바디 콘텐츠 */
.modal-body {
  padding: 20px;
}

.tab-content {
  display: none;
  flex-direction: column;
  gap: 16px;
  animation: fadeIn 0.25s ease;
}

.tab-content.active {
  display: flex;
}

/* 1. 도감 정보 스타일 */
.flavor-text-box {
  background: rgba(15, 23, 42, 0.5);
  border-left: 3px solid #38bdf8;
  padding: 12px 14px 12px 34px;
  border-radius: 10px;
  position: relative;
}

.flavor-text-box .quote-icon {
  position: absolute;
  top: 10px;
  left: 12px;
  font-size: 12px;
  color: #38bdf8;
  opacity: 0.6;
}

.flavor-text-box p {
  font-size: 13px;
  line-height: 1.6;
  color: #e2e8f0;
}

.info-grid-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.info-item {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--border-color);
  padding: 10px 14px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.info-label {
  font-size: 11px;
  color: var(--text-muted);
}

.info-val {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

/* 2. 스탯 & 상성 스타일 */
.stats-card, .matchups-card, .evolution-card, .moves-card {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 16px;
}

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

.stats-header h3, .matchups-card h3, .evolution-card h3, .moves-header h3 {
  font-size: 14px;
  font-weight: 700;
}

.stat-total-badge, .moves-count-badge {
  font-size: 12px;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  padding: 2px 8px;
  border-radius: 10px;
}

.stats-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-row {
  display: grid;
  grid-template-columns: 60px 35px 1fr;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.stat-name {
  font-weight: 600;
  color: var(--text-sub);
}

.stat-num {
  font-family: var(--font-num);
  font-weight: 700;
  text-align: right;
  color: var(--text-main);
}

.stat-bar-track {
  background: rgba(255, 255, 255, 0.1);
  height: 7px;
  border-radius: 4px;
  overflow: hidden;
}

.stat-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 상성 배율 */
.matchups-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.matchups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 6px;
}

.matchup-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px;
  border-radius: 6px;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.05);
}

.matchup-multiplier {
  font-weight: 800;
  font-size: 11px;
}

.multiplier-2 { color: #ef4444; }
.multiplier-4 { color: #dc2626; font-weight: 900; }
.multiplier-05 { color: #10b981; }
.multiplier-025 { color: #059669; }
.multiplier-0 { color: #64748b; text-decoration: line-through; }

/* 3. 진화 트리 스타일 */
.evolution-flow {
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 0;
}

.evo-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.evo-node:hover {
  transform: scale(1.08);
}

.evo-img-wrap {
  width: 70px;
  height: 70px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}

.evo-img-wrap img {
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
}

.evo-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
}

.evo-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-muted);
  font-size: 14px;
}

.evo-condition {
  font-size: 10px;
  color: #38bdf8;
  font-weight: 600;
}

/* 4. 기술 목록 테이블 */
.moves-list-table-wrap {
  max-height: 220px;
  overflow-y: auto;
}

.moves-list-table-wrap::-webkit-scrollbar {
  width: 4px;
}

.moves-list-table-wrap::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.moves-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.moves-table th {
  background: rgba(15, 23, 42, 0.8);
  padding: 6px 8px;
  color: var(--text-muted);
  text-align: left;
  position: sticky;
  top: 0;
}

.moves-table td {
  padding: 6px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* 모달 하단 네비게이션 */
.modal-footer-nav {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border-color);
  padding: 12px 20px;
  background: rgba(15, 23, 42, 0.8);
  border-bottom-left-radius: 24px;
  border-bottom-right-radius: 24px;
}

.btn-nav-prev, .btn-nav-next {
  background: none;
  border: none;
  color: var(--text-sub);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s ease;
}

.btn-nav-prev:hover, .btn-nav-next:hover {
  color: #38bdf8;
}

/* ==================== 5. 푸터 ==================== */
.pokedex-footer {
  text-align: center;
  padding: 30px 20px;
  color: var(--text-muted);
  font-size: 12px;
  border-top: 1px solid var(--border-color);
}

.pokedex-footer a {
  color: #38bdf8;
  text-decoration: none;
}

.pokedex-footer a:hover {
  text-decoration: underline;
}

.pokedex-footer .copyright {
  margin-top: 4px;
  font-size: 11px;
  opacity: 0.7;
}

/* ==================== 6. 반응형 미디어 쿼리 ==================== */
@media (max-width: 640px) {
  .header-container {
    padding: 10px 14px;
  }
  
  .main-container {
    padding: 14px 12px 40px;
  }

  .control-panel {
    padding: 14px;
    gap: 14px;
  }

  .pokemon-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .poke-card {
    padding: 12px 8px;
  }

  .card-img-wrap {
    width: 90px;
    height: 90px;
  }

  .card-name {
    font-size: 14px;
  }

  .type-chips-grid {
    gap: 4px;
  }

  .type-chip {
    font-size: 11px;
    padding: 4px 8px;
  }

  .modal-card {
    border-radius: 16px;
  }
}
