/* AI工具页面 */

.tools-search-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.tools-search-bar input {
  flex: 1;
  height: 44px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  outline: none;
}

.tools-search-bar input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.tools-search-bar .btn {
  height: 44px;
  padding: 0 28px;
}

.tools-grid-aidh {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.tools-grid-compact {
  grid-template-columns: repeat(3, 1fr);
}

.tool-card-aidh {
  display: block;
  background: var(--bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: transform .2s, box-shadow .2s;
}

.tool-card-aidh:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
}

.tool-card-cover {
  height: 140px;
  background: linear-gradient(135deg, #eef3ff, #f5f7fa);
  overflow: hidden;
}

.tool-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tool-card-cover-placeholder {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
}

.tool-card-body {
  padding: 14px 16px 16px;
}

.tool-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.tool-card-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-section);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.tool-card-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tool-card-body strong {
  font-size: 15px;
  color: var(--text);
}

.tool-card-body p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0 0 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sidebar-tree .sidebar-group {
  margin-bottom: 4px;
}

.sidebar-parent {
  font-weight: 600;
}

.sidebar-children {
  padding-left: 12px;
  margin-bottom: 8px;
}

.sidebar-children a {
  display: block;
  padding: 6px 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.sidebar-children a.active,
.sidebar-children a:hover {
  color: var(--primary);
}

.card-aidh {
  background: var(--bg);
  border-radius: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.tool-detail-page .tool-detail-top {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 28px;
  padding: 28px;
}

.tool-detail-cover {
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-section);
  min-height: 220px;
}

.tool-detail-cover img {
  width: 100%;
  display: block;
}

.tool-detail-cover-placeholder {
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: var(--primary);
  background: linear-gradient(135deg, #eef3ff, #f8f9fb);
}

.tool-detail-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.tool-detail-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, #e8f0fe, #eef3ff);
  flex-shrink: 0;
  position: relative;
}

.tool-detail-icon.tool-logo-box .tool-logo-text {
  font-size: 20px;
}

.tool-detail-cover.tool-logo-box .tool-cover-char {
  font-size: 48px;
}

.tool-detail-cover.tool-logo-box.show-char {
  min-height: 220px;
}

.tool-detail-meta h1 {
  font-size: 28px;
  margin: 0 0 6px;
}

.tool-cat-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 12px;
  text-decoration: none;
}

.tool-subtitle {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 14px;
}

.tool-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.btn-arrow span {
  margin-left: 4px;
}

.tool-detail-stats {
  margin-top: 14px;
  font-size: 13px;
}

.tool-detail-content {
  padding: 28px 32px;
}

.section-title-aidh {
  font-size: 18px;
  margin: 0 0 16px;
  padding-left: 10px;
  border-left: 4px solid var(--primary);
}

.tool-related-section {
  margin-top: 8px;
  margin-bottom: 40px;
}

.article-content {
  font-size: 15px;
  line-height: 1.9;
  color: var(--text);
}

.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 16px 0;
}

.article-content p {
  margin: 0 0 14px;
}

@media (max-width: 992px) {
  .tools-grid-aidh,
  .tools-grid-compact {
    grid-template-columns: repeat(2, 1fr);
  }
  .tool-detail-page .tool-detail-top {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .tools-grid-aidh,
  .tools-grid-compact {
    grid-template-columns: 1fr;
  }
}

.tool-card-horizontal {
  display: flex;
  gap: 16px;
  padding: 20px;
  align-items: flex-start;
}

.tool-card-horizontal .tool-logo {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  background: linear-gradient(135deg, #e8f0fe, #eef3ff);
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
  display: block;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.tool-card-horizontal a.tool-logo:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(26, 115, 232, 0.15);
}

.tool-logo-box .tool-logo-text {
  display: none;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 26px;
  font-weight: 700;
  color: #1a73e8;
  line-height: 1;
}

.tool-logo-box.show-char .tool-logo-text {
  display: flex;
}

.tool-logo-box img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 1;
}

.tool-card-horizontal .tool-info {
  flex: 1;
  min-width: 0;
}

.tool-card-horizontal h4 {
  font-size: 16px;
  margin-bottom: 6px;
}

.tool-card-horizontal h4 a {
  color: var(--text);
}

.tool-card-horizontal h4 a:hover {
  color: var(--primary);
}

.tool-card-horizontal p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 8px;
}

.tool-card-horizontal .tool-meta {
  display: flex;
  gap: 8px;
  align-items: center;
}

.tool-card-horizontal .visit-btn {
  flex-shrink: 0;
  align-self: center;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.tool-detail-header {
  display: flex;
  gap: 24px;
  padding: 30px;
  background: var(--bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.tool-detail-logo {
  width: 100px;
  height: 100px;
  border-radius: 16px;
  background: var(--bg-section);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  flex-shrink: 0;
}

.tool-detail-info h1 {
  font-size: 26px;
  margin-bottom: 10px;
}

.tool-detail-info .desc {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 16px;
}

.tool-detail-actions {
  display: flex;
  gap: 12px;
}

.tool-detail-body {
  background: var(--bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 30px;
}

.tool-detail-body h3 {
  font-size: 18px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
