/* ===== AI Tool Picks - 主样式表 ===== */

:root {
  --primary: #2563EB;
  --primary-dark: #1D4ED8;
  --primary-light: #DBEAFE;
  --accent: #F59E0B;
  --accent-light: #FEF3C7;
  --text: #1E293B;
  --text-light: #64748B;
  --bg: #FFFFFF;
  --bg-secondary: #F8FAFC;
  --border: #E2E8F0;
  --success: #10B981;
  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
  --max-width: 1200px;
  --header-height: 64px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--primary-dark);
}

ul, ol {
  padding-left: 1.5em;
}

/* Container */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  height: var(--header-height);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary), #7C3AED);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
}

.nav-links {
  display: flex;
  gap: 24px;
  list-style: none;
  padding: 0;
}

.nav-links a {
  color: var(--text-light);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}

/* ===== Hero ===== */
.hero {
  padding: 80px 0 60px;
  text-align: center;
  background: linear-gradient(180deg, var(--primary-light) 0%, var(--bg) 100%);
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 16px;
  line-height: 1.3;
}

.hero .highlight {
  background: linear-gradient(135deg, var(--primary), #7C3AED);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.125rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto 32px;
}

.hero-search {
  display: flex;
  max-width: 480px;
  margin: 0 auto;
  gap: 8px;
}

.hero-search input {
  flex: 1;
  padding: 12px 20px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

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

.hero-search button {
  padding: 12px 28px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.hero-search button:hover {
  background: var(--primary-dark);
}

/* ===== Category Pills ===== */
.categories {
  padding: 0 0 40px;
}

.category-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  list-style: none;
  padding: 0;
}

.category-list a {
  display: inline-block;
  padding: 6px 18px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-light);
  transition: all 0.2s;
}

.category-list a:hover,
.category-list a.active {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

/* ===== Tool Cards Grid ===== */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 24px;
  padding: 0 0 60px;
}

.tool-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all 0.2s;
  position: relative;
}

.tool-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  border-color: var(--primary-light);
}

.tool-card-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--accent-light);
  color: #92400E;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tool-card-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.tool-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary-light), #EDE9FE);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.tool-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
  line-height: 1.4;
}

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

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

.tool-card-desc {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 16px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tool-card-meta {
  display: flex;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 16px;
}

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

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
  color: white;
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Rating Stars */
.stars {
  color: var(--accent);
  font-size: 0.85rem;
  letter-spacing: 1px;
}

/* ===== Section Title ===== */
.section-title {
  text-align: center;
  margin-bottom: 40px;
}

.section-title h2 {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.section-title p {
  color: var(--text-light);
  font-size: 1rem;
}

/* ===== Newsletter CTA ===== */
.newsletter {
  background: linear-gradient(135deg, var(--primary), #7C3AED);
  color: white;
  padding: 60px 0;
  text-align: center;
  margin: 0 0 60px;
}

.newsletter h2 {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.newsletter p {
  opacity: 0.9;
  margin-bottom: 24px;
  font-size: 1rem;
}

.newsletter-form {
  display: flex;
  max-width: 420px;
  margin: 0 auto;
  gap: 8px;
}

.newsletter-form input {
  flex: 1;
  padding: 12px 20px;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  outline: none;
}

.newsletter-form button {
  padding: 12px 24px;
  background: var(--accent);
  color: #1E293B;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

.newsletter-form button:hover {
  background: #FCD34D;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 48px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}

.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
  color: var(--text);
}

.footer-col p {
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.7;
}

.footer-col ul {
  list-style: none;
  padding: 0;
}

.footer-col ul li {
  margin-bottom: 8px;
}

.footer-col ul a {
  font-size: 0.85rem;
  color: var(--text-light);
}

.footer-col ul a:hover {
  color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-light);
}

.affiliate-disclosure {
  background: var(--accent-light);
  border: 1px solid #FCD34D;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 0.75rem;
  color: #92400E;
  text-align: center;
}

/* ===== Article Page ===== */
.article-header {
  padding: 48px 0 32px;
  text-align: center;
}

.article-header .category-label {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  padding: 4px 14px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.article-header h1 {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 16px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.article-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-light);
}

.article-meta .author-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary-light);
}

.article-body {
  max-width: 750px;
  margin: 0 auto;
  padding: 0 24px;
}

.article-body h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 48px 0 16px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.article-body h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 32px 0 12px;
}

.article-body p {
  margin-bottom: 20px;
  font-size: 1.05rem;
  line-height: 1.8;
}

.article-body ul,
.article-body ol {
  margin-bottom: 20px;
}

.article-body li {
  margin-bottom: 8px;
  line-height: 1.7;
}

.article-body blockquote {
  border-left: 4px solid var(--primary);
  padding: 16px 24px;
  margin: 24px 0;
  background: var(--bg-secondary);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--text-light);
}

/* Product Card in Article */
.product-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin: 24px 0;
}

.product-card h3 {
  margin-top: 0;
}

.product-card .cta-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 16px;
}

/* Comparison Table */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.9rem;
}

.comparison-table th {
  background: var(--primary);
  color: white;
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
}

.comparison-table th:first-child {
  border-radius: 8px 0 0 0;
}

.comparison-table th:last-child {
  border-radius: 0 8px 0 0;
}

.comparison-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.comparison-table tr:nth-child(even) td {
  background: var(--bg-secondary);
}

.comparison-table .winner {
  color: var(--success);
  font-weight: 700;
}

/* Author Box */
.author-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin: 48px 0;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.author-avatar-lg {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light), #EDE9FE);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.author-info h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.author-info p {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 0;
}

/* Breadcrumbs */
.breadcrumbs {
  font-size: 0.8rem;
  color: var(--text-light);
  padding: 16px 0;
}

.breadcrumbs a {
  color: var(--text-light);
}

.breadcrumbs a:hover {
  color: var(--primary);
}

.breadcrumbs span {
  margin: 0 8px;
}

/* TOC */
.toc {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 24px 0;
}

.toc h4 {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  color: var(--text);
}

.toc ol {
  padding-left: 1.2em;
}

.toc li {
  margin-bottom: 6px;
  font-size: 0.9rem;
}

/* ===== About Page ===== */
.about-hero {
  padding: 80px 0 60px;
  text-align: center;
  background: linear-gradient(180deg, var(--primary-light) 0%, var(--bg) 100%);
}

.about-hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.about-hero p {
  font-size: 1.125rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}

.about-content {
  max-width: 750px;
  margin: 0 auto;
  padding: 0 24px 60px;
}

.about-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 40px 0 16px;
}

.about-content p {
  margin-bottom: 20px;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 1.75rem;
  }

  .hero-search {
    flex-direction: column;
  }

  .tools-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .article-header h1 {
    font-size: 1.6rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .comparison-table {
    font-size: 0.75rem;
  }

  .comparison-table th,
  .comparison-table td {
    padding: 8px 10px;
  }
}

@media (max-width: 480px) {
  .nav-links {
    gap: 12px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .tool-card-footer {
    flex-direction: column;
  }

  .tool-card-footer .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ===== Animations ===== */
@keyframes cardHighlight {
  0% { transform: scale(1); box-shadow: var(--shadow); }
  50% { transform: scale(1.02); box-shadow: 0 0 0 3px var(--primary-light); }
  100% { transform: scale(1); box-shadow: var(--shadow); }
}

/* ===== Scroll to Top Button ===== */
.scroll-top-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px) !important;
  box-shadow: var(--shadow-lg);
}

/* ===== Table Hover (JS enhances) ===== */
.comparison-table tbody tr {
  transition: background 0.2s;
}

/* ===== Print Styles ===== */
@media print {
  .site-header, .site-footer, .newsletter, .scroll-top-btn,
  .reading-progress, .hero-search, .nav-links {
    display: none !important;
  }
  .article-body { max-width: 100%; }
  body { font-size: 12pt; line-height: 1.5; }
}
