/* Header & Search */
.header {
  padding: var(--space-3xl) var(--space-lg) var(--space-xl);
  max-width: var(--max-width);
  margin: 0 auto;
}

.header-title {
  font-family: var(--font-heading);
  font-size: var(--text-hero);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-align: center;
  margin-bottom: var(--space-xl);
}

.search-wrapper {
  max-width: 720px;
  margin: 0 auto;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 16px 20px 16px 48px;
  font-family: var(--font-body);
  font-size: var(--text-body);
  color: var(--text-primary);
  background: transparent;
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
  outline: none;
  transition: border-color var(--transition-base);
}

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

.search-input:focus {
  border-color: var(--border-focus);
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--text-tertiary);
  pointer-events: none;
}

.search-stats {
  position: absolute;
  right: 12px;
  bottom: -22px;
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-tertiary);
  line-height: 1.4;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Stats Source Tooltip */
.stats-source {
  position: relative;
  cursor: help;
  color: var(--accent);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
}

.stats-tooltip {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 293px;
  max-height: none;
  background: var(--bg-card);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  z-index: 100;
  white-space: normal;
  font-size: 12px;
  line-height: 1.6;
}

.stats-source:hover .stats-tooltip,
.stats-tooltip:hover {
  display: block;
}

.tooltip-section {
  margin-bottom: 12px;
}

.tooltip-section:last-child {
  margin-bottom: 0;
}

.tooltip-section h4 {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 6px 0;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border-default);
}

.tooltip-section ul {
  margin: 0;
  padding-left: 16px;
  list-style: disc;
}

.tooltip-section li {
  margin-bottom: 3px;
}

.tooltip-section a {
  color: var(--accent);
  text-decoration: none;
}

.tooltip-section a:hover {
  text-decoration: underline;
}

/* Tooltip arrow */
.stats-tooltip::before {
  content: '';
  position: absolute;
  top: -5px;
  right: 20px;
  width: 8px;
  height: 8px;
  background: var(--bg-card);
  border-left: 1px solid var(--border-hover);
  border-top: 1px solid var(--border-hover);
  transform: rotate(45deg);
}

/* Main Content */
.main {
  flex: 1;
  min-width: 0;
  padding: var(--space-xl) var(--space-lg) var(--space-3xl);
}

/* Category Sections */
.category {
  margin-bottom: var(--space-2xl);
}

.category-header {
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border-default);
}

.category-title {
  font-family: var(--font-heading);
  font-size: var(--text-h1);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

/* Subcategory */
.subcategory {
  margin-bottom: var(--space-xl);
}

.subcategory-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.subcategory-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.subcategory-title {
  font-family: var(--font-heading);
  font-size: var(--text-h2);
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Empty State */
.empty-state {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-3xl) var(--space-lg);
  text-align: center;
}

.empty-state.active {
  display: flex;
}

.empty-state-icon {
  width: 48px;
  height: 48px;
  color: var(--text-tertiary);
  margin-bottom: var(--space-md);
}

.empty-state-text {
  font-size: var(--text-body);
  color: var(--text-secondary);
}

/* Highlight */
mark {
  background: var(--accent-soft);
  color: inherit;
  border-radius: 2px;
  padding: 0 2px;
}
