:root {
  --graph-border: rgba(148, 163, 184, 0.2);
  --graph-bg: linear-gradient(135deg, rgba(248, 250, 252, 0.8) 0%, rgba(241, 245, 249, 0.9) 100%);
}

[data-theme="dark"] {
  --graph-border: rgba(100, 116, 139, 0.2);
  --graph-bg: linear-gradient(135deg, rgba(15, 23, 42, 0.6) 0%, rgba(30, 41, 59, 0.7) 100%);
}

.graph-wrap {
  border: 1px solid var(--graph-border);
  background: var(--graph-bg);
  border-radius: 20px;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.04),
    0 1px 2px rgba(0, 0, 0, 0.02);
  overflow: hidden;
  position: relative;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

[data-theme="dark"] .graph-wrap {
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.2),
    0 1px 2px rgba(0, 0, 0, 0.1);
}

.graph-chart {
  width: 100%;
  height: min(72vh, 680px);
  min-height: 480px;
}

.current-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding: 14px 18px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.06) 100%);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 14px;
  flex-wrap: wrap;
}

[data-theme="dark"] .current-filter {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(139, 92, 246, 0.08) 100%);
  border-color: rgba(99, 102, 241, 0.2);
}

.current-filter-label {
  color: var(--text-2);
  font-size: 0.9rem;
}

.current-filter-keyword {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.current-filter-count {
  color: var(--muted);
  font-size: 0.9rem;
}

.toggle-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-2);
  white-space: nowrap;
}

.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  margin-bottom: 14px;
}

.bottom-pager {
  margin-top: 16px;
  padding: 12px 16px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.pager-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pager-info {
  color: var(--text-2);
  font-size: 0.9rem;
}

.pager {
  display: flex;
  gap: 8px;
}

@media (max-width: 860px) {
  .graph-chart {
    height: min(55vh, 480px);
    min-height: 380px;
  }

  .graph-wrap {
    border-radius: 16px;
  }

  .search-row {
    flex-wrap: wrap;
  }

  .search-row .search-input {
    width: 100%;
  }
}
