/**
 * AI 焕新：工具内嵌面板 + 全站助手共用样式
 */
.cluster-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm, 8px);
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: var(--radius-md, 10px);
  background: var(--color-surface-subtle, #f1f5f9);
  border: 1px solid var(--color-border, #e2e8f0);
}

.cluster-nav__link {
  display: inline-block;
  padding: 5px 12px;
  font-size: 13px;
  border-radius: 999px;
  background: #fff;
  color: #334155;
  text-decoration: none;
  border: 1px solid #cbd5e1;
}

.cluster-nav__link:hover {
  background: #e0f2fe;
  color: #0369a1;
  text-decoration: none;
}

.cluster-nav__link--active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.cluster-nav--tabs {
  gap: 0;
  padding: 4px;
  background: #e2e8f0;
  border-radius: 12px;
}

.cluster-nav--tabs .cluster-nav__link {
  border-radius: 8px;
  border: none;
  background: transparent;
}

.cluster-nav--tabs .cluster-nav__link--active {
  background: #fff;
  color: #1d4ed8;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

.hashtools-pro-notice {
  margin: 0 0 12px;
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.5;
  border-radius: 8px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

.aihub-search {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 16px;
  padding: 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.aihub-search__input {
  flex: 1;
  min-width: 200px;
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 14px;
}

.aihub-search__btn {
  padding: 8px 14px;
  border: none;
  border-radius: 8px;
  background: #7c3aed;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}

.aihub-search__results {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.aihub-search__item {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e2e8f0;
  text-decoration: none;
  color: #0f172a;
  font-size: 13px;
}

.aihub-search__item small {
  display: block;
  color: #64748b;
  margin-top: 2px;
}

.aihub-flagship {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 12px;
}

.aihub-flagship__link {
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 999px;
  background: #ede9fe;
  color: #5b21b6;
  text-decoration: none;
}

.ai-panel {
  margin: 20px 0 0;
  padding: 16px 18px;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  background: linear-gradient(180deg, #f8fbff 0%, #fff 100%);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.ai-panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.ai-panel__head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: #0f172a;
}

.ai-panel__badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 12px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
}

.ai-panel__lead {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.55;
  color: #475569;
}

.ai-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.ai-panel__out {
  margin: 0;
  padding: 12px 14px;
  min-height: 72px;
  max-height: 360px;
  overflow: auto;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 8px;
}

.ai-panel__out--light {
  background: #f8fafc;
  color: #334155;
  border: 1px solid #e2e8f0;
}

.ai-serp-variant {
  padding: 10px 12px;
  margin-bottom: 8px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.ai-serp-variant strong {
  display: block;
  margin-bottom: 4px;
  color: #1d4ed8;
  font-size: 14px;
}

.ai-serp-variant p {
  margin: 0;
  font-size: 13px;
  color: #475569;
}

/* 全站助手浮层 */
.site-ai-assistant {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 10050;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.site-ai-assistant__toggle {
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff;
  font-size: 22px;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.45);
  transition: transform 0.2s ease;
}

.site-ai-assistant__toggle:hover {
  transform: scale(1.05);
}

.site-ai-assistant__panel {
  display: none;
  position: absolute;
  right: 0;
  bottom: 64px;
  width: min(360px, calc(100vw - 36px));
  background: #fff;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
  overflow: hidden;
}

.site-ai-assistant--open .site-ai-assistant__panel {
  display: flex;
  flex-direction: column;
}

.site-ai-assistant__head {
  padding: 12px 14px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
}

.site-ai-assistant__body {
  padding: 12px 14px;
  max-height: 280px;
  overflow-y: auto;
}

.site-ai-assistant__form {
  display: flex;
  gap: 8px;
  padding: 10px 12px 12px;
  border-top: 1px solid #e2e8f0;
}

.site-ai-assistant__input {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 13px;
}

.site-ai-assistant__submit {
  padding: 8px 12px;
  border: none;
  border-radius: 8px;
  background: #2563eb;
  color: #fff;
  font-size: 13px;
  cursor: pointer;
}

.site-ai-assistant__item {
  display: block;
  padding: 8px 10px;
  margin-bottom: 6px;
  border-radius: 8px;
  background: #f1f5f9;
  text-decoration: none;
  color: #0f172a;
}

.site-ai-assistant__item:hover {
  background: #e0f2fe;
  text-decoration: none;
}

.site-ai-assistant__item small {
  display: block;
  margin-top: 2px;
  color: #64748b;
  font-size: 12px;
}

.site-ai-assistant__hint {
  margin: 0;
  font-size: 12px;
  color: #94a3b8;
}

@media (max-width: 480px) {
  .site-ai-assistant {
    right: 12px;
    bottom: 12px;
  }
}

.pro-tool-shell-badge {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: linear-gradient(90deg, #fef3c7 0%, #fff7ed 100%);
  border: 1px solid #fcd34d;
  font-size: 14px;
  color: #78350f;
}

.pro-tool-shell-badge__tag {
  display: inline-block;
  margin-right: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f59e0b;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  vertical-align: middle;
}

.pro-tool-shell-badge a {
  color: #b45309;
  font-weight: 600;
}
