/* ========================================
   AI工具评测指南 主样式表 v6.0
   参考 ai-bio.cn 设计思路，改色 + 内容站适配
   风格：紧凑卡片式、留白适度、色彩克制
   配色：深海蓝 #0891B2（主色，非侵权红）
   ======================================== */

/* ===== Variables ===== */
:root {
  --primary: #0891B2;
  --primary-light: #06B6D4;
  --primary-dark: #0E7490;
  --primary-glow: rgba(8,145,178,0.12);
  --secondary: #059669;
  --accent: #F59E0B;
  --accent-light: #FDE68A;

  --bg: #F4F6F9;
  --bg-card: #FFF;
  --text: #1E293B;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  --border: #E2E8F0;
  --border-light: #EDF2F7;

  --radius: 8px;
  --radius-sm: 5px;
  --shadow: 0 1px 3px rgba(0,0,0,.06);
  --shadow-hover: 0 4px 12px rgba(0,0,0,.08);
  --max-width: 1140px;
}

/* ===== Category Colors ===== */
.cat-ai-code { --cc: #3B82F6; --cbg: #EFF6FF; }
.cat-ai-writing { --cc: #7C3AED; --cbg: #F5F3FF; }
.cat-ai-image { --cc: #059669; --cbg: #ECFDF5; }
.cat-ai-video { --cc: #DC2626; --cbg: #FEF2F2; }
.cat-ai-voice { --cc: #D97706; --cbg: #FFFBEB; }
.cat-ai-productivity { --cc: #0891B2; --cbg: #ECFEFF; }
.cat-ai-other { --cc: #78716C; --cbg: #F5F5F4; }

/* ===== Reset ===== */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 13px; line-height: 1.5;
  color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
::selection { background: var(--primary); color: #fff; }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 16px; }

/* ===== Background Decorative Shapes (like ai-bio.cn) ===== */
.bg-shapes {
  position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: -1;
}
.bg-shapes .shape {
  position: absolute; border-radius: 50%; opacity: .06;
}
.bg-shapes .shape-1 {
  width: 400px; height: 400px; background: var(--primary);
  top: -80px; right: -100px;
  animation: float-slow 25s ease-in-out infinite;
}
.bg-shapes .shape-2 {
  width: 250px; height: 250px; background: var(--secondary);
  bottom: 10%; left: -60px;
  animation: float-slower 35s ease-in-out infinite;
}
.bg-shapes .shape-3 {
  width: 150px; height: 150px; background: var(--accent);
  top: 40%; right: 10%;
  animation: float-slow 20s ease-in-out infinite reverse;
}
@keyframes float-slow {
  0%,100% { transform: translate(0,0) rotate(0deg); }
  33% { transform: translate(30px,-20px) rotate(15deg); }
  66% { transform: translate(-15px,15px) rotate(-10deg); }
}
@keyframes float-slower {
  0%,100% { transform: translate(0,0); }
  50% { transform: translate(40px,30px); }
}

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(10px) saturate(180%);
  -webkit-backdrop-filter: blur(10px) saturate(180%);
  border-bottom: 1px solid rgba(226,232,240,.5);
  height: 48px;
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 100%;
}
.logo {
  font-size: .92rem; font-weight: 700; display: flex; align-items: center;
  gap: 7px; color: var(--text); letter-spacing: -.3px;
}
.logo-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 6px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff; font-size: .8rem;
}
.nav-wrap {
  display: flex; gap: 2px; overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.nav-wrap::-webkit-scrollbar { display: none; }
.nav-wrap a {
  flex-shrink: 0; padding: 4px 12px; border-radius: 14px;
  font-size: .76rem; font-weight: 500; color: var(--text-muted);
  white-space: nowrap; transition: all .15s;
}
.nav-wrap a:hover { background: var(--primary-glow); color: var(--primary-dark); }

/* ===== Hero Search Area ===== */
.hero {
  text-align: center; padding: 28px 0 20px;
  position: relative;
}
.hero h1 {
  font-size: 1.35rem; font-weight: 800; letter-spacing: -.5px;
  background: linear-gradient(135deg, var(--primary-dark), var(--secondary));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; margin-bottom: 6px;
}
.hero p {
  color: var(--text-muted); font-size: .82rem;
  max-width: 480px; margin: 0 auto; line-height: 1.5;
}

/* ===== Section Titles ===== */
.section-title {
  font-size: .88rem; font-weight: 650; margin: 22px 0 10px;
  display: flex; align-items: center; gap: 6px;
  letter-spacing: -.2px;
}

/* ===== Featured Grid (精选推荐，紧凑卡片) ===== */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 8px; margin-bottom: 22px;
}
.featured-card {
  display: flex; flex-direction: column; gap: 5px;
  background: var(--bg-card); border-radius: var(--radius);
  padding: 14px; box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  transition: all .2s;
}
.featured-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: var(--cc, var(--primary));
}
.featured-card .featured-tag {
  font-size: .62rem; font-weight: 600; color: var(--accent);
  background: var(--accent-light); padding: 1px 6px;
  border-radius: 3px; align-self: flex-start;
}
.featured-card .featured-title {
  font-size: .82rem; font-weight: 650; line-height: 1.35;
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.featured-card .featured-rating .star-rating { font-size: .72rem; }

/* ===== Tool Cards (核心目录卡片) ===== */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 6px; margin-bottom: 18px;
}
.tool-card {
  display: flex; align-items: center; gap: 9px;
  background: var(--bg-card); border-radius: var(--radius-sm);
  padding: 9px 11px; box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  transition: all .15s;
}
.tool-card:hover {
  background: var(--cbg, #F8FAFC);
  border-color: var(--cc, var(--border));
  box-shadow: var(--shadow-hover);
}
.tool-icon {
  flex-shrink: 0; width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  background: var(--cbg, #F3F4F6);
  border-radius: var(--radius-sm); font-size: 1rem;
}
.tool-info { flex: 1; min-width: 0; line-height: 1.3; }
.tool-name {
  font-size: .8rem; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tool-rating .star-rating { font-size: .66rem; letter-spacing: .3px; color: var(--accent); }
.price-badges { display: flex; gap: 3px; flex-wrap: wrap; margin: 1px 0; }
.badge {
  display: inline-block; padding: 0 5px; border-radius: 2px;
  font-size: .6rem; font-weight: 600; line-height: 1.5;
}
.badge-free { background: #D1FAE5; color: #065F46; }
.badge-freemium { background: #FEF3C7; color: #92400E; }
.badge-paid { background: #FEE2E2; color: #991B1B; }
.badge-price { background: #E0E7FF; color: #3730A3; }
.scene-tags { display: flex; gap: 2px; flex-wrap: wrap; }
.scene-tag {
  padding: 0 5px; border-radius: 2px; font-size: .6rem; font-weight: 500;
  background: var(--cbg, #F3F4F6); color: var(--cc, var(--text-muted));
}
.tool-desc { font-size: .7rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ===== Star Rating ===== */
.star-rating {
  display: inline-block; color: var(--accent); letter-spacing: 1px; font-size: .78rem;
}

/* ===== Category Sections ===== */
.cat-section { margin-bottom: 4px; }
.cat-section .section-title {
  padding: 6px 12px; border-radius: var(--radius-sm);
  background: var(--cbg, transparent);
  font-size: .84rem;
}
.section-count { font-size: .68rem; font-weight: 400; color: var(--text-muted); margin-left: 4px; }
.section-more {
  margin-left: auto; font-size: .73rem; font-weight: 500;
  color: var(--cc, var(--primary));
}
.section-more:hover { opacity: .7; }

/* ===== Category Page Header ===== */
.category-header {
  margin: 16px 0 20px; padding: 18px 22px;
  background: linear-gradient(135deg, var(--cbg, #F3F4F6), transparent);
  border-radius: var(--radius); border-left: 4px solid var(--cc, var(--primary));
}
.category-header h1 { font-size: 1.15rem; font-weight: 700; }
.category-header p { color: var(--text-muted); font-size: .8rem; margin-top: 3px; }

/* ===== Article Grid (分类页文章列表) ===== */
.article-grid { display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 22px; }
.article-card {
  background: var(--bg-card); border-radius: var(--radius);
  box-shadow: var(--shadow); border: 1px solid var(--border-light);
  transition: all .2s;
}
.article-card:hover { box-shadow: var(--shadow-hover); border-color: var(--cc, var(--border)); }
.article-card .card-body { padding: 14px 18px; }
.article-card .cat-tag {
  display: inline-block; padding: 1px 8px; border-radius: 3px;
  font-size: .68rem; font-weight: 600;
  background: var(--cbg, #F3F4F6); color: var(--cc, #6B7280);
  margin-bottom: 6px;
}
.article-card h2 { font-size: .9rem; line-height: 1.4; margin-bottom: 4px; }
.article-card h2 a { color: var(--text); }
.article-card h2 a:hover { color: var(--primary); }
.article-card .meta {
  font-size: .7rem; color: var(--text-muted);
  display: flex; gap: 10px; margin: 4px 0;
}
.article-card .excerpt {
  color: var(--text-secondary); font-size: .78rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; margin-top: 6px; padding-top: 6px;
  border-top: 1px solid var(--border-light);
}

/* ===== Breadcrumb ===== */
.breadcrumb {
  font-size: .72rem; color: var(--text-muted);
  padding: 10px 0 0; max-width: 740px; margin: 0 auto;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }

/* ===== Article Page ===== */
.article-page {
  background: var(--bg-card); border-radius: var(--radius);
  padding: 28px 34px; box-shadow: var(--shadow);
  max-width: 740px; margin: 16px auto 0;
  border: 1px solid var(--border-light);
}
.article-page .article-header { margin-bottom: 0; padding-bottom: 12px; }
.article-page .article-header .meta {
  display: flex; gap: 14px; color: var(--text-muted);
  font-size: .78rem; margin-bottom: 8px; flex-wrap: wrap;
}
.article-page h1 {
  font-size: 1.45rem; font-weight: 750; line-height: 1.3; letter-spacing: -.3px;
}
.article-page .article-body {
  font-size: .9rem; line-height: 1.8;
  margin-top: 16px; padding-top: 16px;
  border-top: 1px solid var(--border-light);
}
.article-page .article-body h2 {
  font-size: 1.1rem; font-weight: 650; margin: 24px 0 10px;
  padding-left: 10px; border-left: 3px solid var(--primary);
}
.article-page .article-body h3 { font-size: .92rem; font-weight: 600; margin: 18px 0 6px; }
.article-page .article-body p { margin-bottom: 12px; color: var(--text-secondary); }
.article-page .article-body ul, .article-page .article-body ol { margin: 0 0 12px 20px; color: var(--text-secondary); }
.article-page .article-body li { margin-bottom: 3px; }
.article-page .article-body strong { color: var(--text); }
.article-page .article-body blockquote {
  border-left: 3px solid var(--primary-light);
  padding: 10px 16px; margin: 14px 0;
  background: #F8FAFC; border-radius: 0 6px 6px 0;
  color: var(--text-secondary); font-size: .85rem;
}
.article-page .article-body table {
  width: 100%; border-collapse: collapse; margin: 14px 0;
  font-size: .8rem; border-radius: 6px; overflow: hidden;
}
.article-page .article-body th {
  padding: 8px 12px; border: 1px solid var(--border); text-align: left;
  background: var(--cbg, #F3F4F6);
  color: var(--cc, var(--primary-dark)); font-weight: 600; font-size: .78rem;
}
.article-page .article-body td { padding: 6px 12px; border: 1px solid var(--border); color: var(--text-secondary); }
.article-page .article-body tr:nth-child(even) td { background: #FAFBFC; }
.article-page .article-body code {
  background: #F1F5F9; padding: 1px 5px; border-radius: 3px;
  font-size: .86em; color: #BE185D;
}
.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.pros-cons > div { border-radius: var(--radius-sm); padding: 12px 16px; }
.pros-cons .pros { background: #ECFDF5; border: 1px solid #A7F3D0; }
.pros-cons .cons { background: #FEF2F2; border: 1px solid #FECACA; }
.pros-cons h4 { font-size: .82rem; margin-bottom: 4px; }
.pros-cons .pros h4 { color: #065F46; }
.pros-cons .cons h4 { color: #991B1B; }
.pros-cons li { padding: 2px 0; font-size: .8rem; }

/* ===== Article Top Panel ===== */
.article-top-panel {
  background: linear-gradient(135deg, #F8FAFC, #FFF);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 20px; margin: 14px auto 0; max-width: 740px;
}
.quick-recommend {
  display: flex; gap: 10px; align-items: flex-start;
  background: linear-gradient(135deg, #ECFDF5, #D1FAE5);
  border: 1px solid #A7F3D0; border-radius: var(--radius-sm);
  padding: 10px 14px; margin-bottom: 14px;
}
.qr-icon { font-size: 1.3rem; flex-shrink: 0; }
.qr-label { font-size: .74rem; font-weight: 700; color: #065F46; margin-bottom: 2px; }
.qr-text { font-size: .84rem; color: #065F46; line-height: 1.4; }
.rating-detail { margin: 0 0 10px; }
.rating-row { display: flex; align-items: center; gap: 6px; padding: 3px 0; font-size: .76rem; }
.rating-label { width: 60px; flex-shrink: 0; color: var(--text-secondary); text-align: right; font-size: .72rem; }
.rating-bar-bg { flex: 1; height: 4px; background: var(--border-light); border-radius: 2px; overflow: hidden; }
.rating-bar-fill { height: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--primary), var(--secondary-light)); }
.rating-summary { display: flex; align-items: center; gap: 5px; padding-top: 6px; border-top: 1px solid var(--border-light); justify-content: center; }
.rating-big { font-size: 1.5rem; font-weight: 800; line-height: 1; }
.rating-max { font-size: .85rem; color: var(--text-muted); }
.panel-section { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border-light); }

/* ===== Stance Banner ===== */
.stance-banner {
  display: flex; align-items: flex-start; gap: 6px;
  background: #ECFEFF; border: 1px solid #A5F3FC;
  border-radius: var(--radius-sm); padding: 8px 12px;
  margin: 16px auto; max-width: 740px;
  font-size: .76rem; color: var(--primary-dark); line-height: 1.4;
}
.stance-icon { font-size: 1rem; flex-shrink: 0; }

/* ===== Related Articles ===== */
.related-articles { margin-top: 22px; padding: 16px 0 0; border-top: 1px solid var(--border); }
.related-articles h3 { font-size: .88rem; margin-bottom: 10px; font-weight: 650; }
.related-articles .tool-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

/* ===== About Page ===== */
.page-content { background: var(--bg-card); border-radius: var(--radius); padding: 28px 34px; max-width: 720px; margin: 20px auto; }
.page-content h1 { font-size: 1.15rem; margin-bottom: 14px; }
.page-content p { margin-bottom: 10px; color: var(--text-secondary); font-size: .86rem; }

/* ===== Footer ===== */
.site-footer {
  background: #0F172A; color: #94A3B8; padding: 22px 0; margin-top: 36px;
}
.site-footer .container { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.footer-links { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.footer-links a { color: #CBD5E1; font-size: .78rem; }
.footer-links a:hover { color: #FFF; }
.footer-copy { font-size: .76rem; color: #64748B; }
.footer-icp { font-size: .74rem; }
.footer-icp a { color: var(--secondary-light); }

/* ===== Ad Slot ===== */
.ad-slot {
  min-height: 60px; background: linear-gradient(135deg, #F8FAFC, #F1F5F9);
  border: 1px dashed var(--border); border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: .74rem;
  margin: 16px auto; max-width: 740px;
}

/* ===== Responsive ===== */

/* Tablet 769-1024px */
@media (max-width: 1024px) {
  .container { max-width: 100%; padding: 0 14px; }
  .tool-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
  .featured-grid { grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); }
}

/* Mobile 481-768px */
@media (max-width: 768px) {
  body { font-size: 12px; }
  .site-header { height: auto; padding: 6px 0 4px; }
  .site-header .container { flex-wrap: wrap; gap: 2px; }
  .logo { font-size: .84rem; }
  .nav-wrap { width: 100%; padding: 4px 0; }
  .nav-wrap a { padding: 3px 9px; font-size: .7rem; background: var(--bg); border-radius: 12px; }
  .hero { padding: 18px 0 14px; }
  .hero h1 { font-size: 1.1rem; }
  .hero p { font-size: .76rem; }
  .featured-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .featured-card { padding: 10px; }
  .featured-card .featured-title { font-size: .76rem; }
  .tool-grid { grid-template-columns: repeat(2, 1fr); gap: 5px; }
  .tool-card { padding: 7px 9px; }
  .tool-icon { width: 28px; height: 28px; font-size: .85rem; }
  .tool-name { font-size: .74rem; }
  .tool-desc { display: none; }
  .section-title { font-size: .8rem; margin: 14px 0 6px; }
  .category-header { padding: 14px 16px; margin: 10px 0 14px; }
  .article-card .card-body { padding: 10px 14px; }
  .article-card h2 { font-size: .84rem; }
  .article-page { padding: 12px 14px; border-radius: 0; margin: 0; border: none; box-shadow: none; }
  .article-page h1 { font-size: 1.1rem; }
  .article-page .article-body { font-size: .85rem; line-height: 1.65; }
  .article-page .article-body h2 { font-size: 1rem; }
  .article-top-panel { padding: 12px 14px; }
  .quick-recommend { padding: 8px 10px; }
  .breadcrumb { padding: 6px 14px 0; }
  .page-content { padding: 14px; border-radius: 0; margin: 0; }
  .pros-cons { grid-template-columns: 1fr; gap: 6px; }
  .related-articles .tool-grid { grid-template-columns: repeat(2, 1fr); }
  .site-footer { padding: 16px 0; margin-top: 24px; }
  .bg-shapes .shape-1 { width: 200px; height: 200px; }
  .bg-shapes .shape-2 { display: none; }
}

/* Small Mobile ≤480px */
@media (max-width: 480px) {
  .container { padding: 0 8px; }
  .tool-grid { grid-template-columns: 1fr 1fr; gap: 4px; }
  .featured-grid { gap: 5px; }
  .featured-card .featured-title { -webkit-line-clamp: 1; }
  .nav-wrap a { padding: 2px 7px; font-size: .66rem; }
}

/* Print */
@media print {
  .site-header, .site-footer, .bg-shapes, .ad-slot,
  .related-articles, .article-top-panel, .stance-banner, .breadcrumb { display: none; }
  .article-page { box-shadow: none; padding: 0; margin: 0; border: none; }
}
