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

:root {
  --text-primary: #1a1a1a;
  --text-secondary: #666666;
  --text-muted: #999999;
  --text-accent: #0c447c;
  --bg-accent: #e6f1fb;
  --border: #e5e5e5;
  --border-strong: #cccccc;
  --border-accent: #378add;
  --surface-1: #f7f7f5;
  --surface-2: #ffffff;
  --radius: 8px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Malgun Gothic", "맑은 고딕", sans-serif;
  color: var(--text-primary);
  background: var(--surface-2);
  line-height: 1.6;
  font-size: 16px;
}

a { color: inherit; text-decoration: none; }

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px;
}

/* 헤더 */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.logo { font-weight: 600; font-size: 19px; }
.nav { display: flex; gap: 16px; font-size: 14px; overflow-x: auto; white-space: nowrap; }
.nav a { color: var(--text-secondary); padding: 4px 0; }
.nav a.active { color: var(--text-primary); font-weight: 600; }
.nav a.disabled { color: var(--text-muted); pointer-events: none; }

/* 브레드크럼 */
.breadcrumb { font-size: 13px; color: var(--text-secondary); margin-bottom: 6px; }
.breadcrumb a { color: var(--text-secondary); }

/* 검색 영역 */
.hero { text-align: center; padding: 24px 0 20px; }
.hero h1 { font-size: 22px; font-weight: 600; margin-bottom: 8px; }
.hero p { font-size: 14px; color: var(--text-secondary); margin-bottom: 18px; }

.search-box {
  width: 100%;
  max-width: 480px;
  padding: 12px 16px;
  font-size: 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  margin: 0 auto;
  display: block;
}
.search-box:focus { outline: none; border-color: var(--border-accent); }
.search-note { font-size: 12px; color: var(--text-muted); margin-top: 8px; }

/* 카테고리 필터 (다중선택) */
.filter-label { font-size: 12px; color: var(--text-muted); text-align: center; margin: 20px 0 10px; }
.filter-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 24px; }
.filter-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 4px;
  text-align: center;
  cursor: pointer;
  background: none;
  font-family: inherit;
}
.filter-item.active { border: 1.5px solid var(--border-accent); background: var(--bg-accent); color: var(--text-accent); }
.filter-item.disabled { opacity: 0.4; cursor: not-allowed; }
.filter-item i { font-size: 20px; display: block; margin-bottom: 6px; }
.filter-item svg { display: block; margin: 0 auto 6px; }
.filter-item span { font-size: 11px; font-weight: 500; }

/* 계열 카드 그리드 */
.hub-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 8px; }
.hub-card {
  border-radius: var(--radius);
  padding: 14px 8px;
  text-align: center;
  background: var(--surface-1);
}
.hub-card i { font-size: 18px; display: block; margin-bottom: 6px; color: var(--text-accent); }
.hub-card .name { font-size: 12px; font-weight: 600; margin-bottom: 2px; }
.hub-card .count { font-size: 10px; color: var(--text-muted); }

/* 태그 */
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }
.tag {
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 12px;
}
.tag.link { color: var(--text-accent); }

/* 섹션 제목 */
.section-title { font-size: 13px; color: var(--text-secondary); font-weight: 600; margin: 0 0 8px; }

/* 표 */
table { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 16px; }
th { text-align: left; padding: 10px 6px; font-weight: 600; color: var(--text-secondary); border-bottom: 1px solid var(--border-strong); font-size: 12px; }
th.num, td.num { text-align: right; }
td { padding: 10px 6px; border-bottom: 1px solid var(--border); }
tr.highlight { background: var(--bg-accent); }
td a { color: var(--text-accent); font-weight: 600; }

/* 스탯 카드 (모델 상세) */
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 20px; }
.stat-card { background: var(--surface-1); border-radius: var(--radius); padding: 16px 8px; text-align: center; }
.stat-card .label { font-size: 12px; color: var(--text-secondary); margin-bottom: 4px; }
.stat-card .value { font-size: 22px; font-weight: 700; }

/* 광고 placeholder - 지금은 미사용, 애드센스 승인 후 실제 스크립트로 교체 예정 */
.ad-slot { display: none; }

/* 푸터 */
.footer { border-top: 1px solid var(--border); padding: 16px 0; text-align: center; font-size: 11px; color: var(--text-muted); margin-top: 24px; }

/* 반응형: 태블릿 이하 */
@media (max-width: 640px) {
  .hero h1 { font-size: 19px; }
  .filter-grid { grid-template-columns: repeat(3, 1fr); }
  .hub-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .stat-card .value { font-size: 18px; }
  .nav { gap: 12px; }
  table { font-size: 12px; }
}

/* 반응형: 작은 모바일 */
@media (max-width: 380px) {
  .filter-grid { grid-template-columns: repeat(3, 1fr); }
  .hub-grid { grid-template-columns: repeat(2, 1fr); }
  .logo { font-size: 17px; }
}
