/* AI Tool Stack - Clean, minimal, fast */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #fafafa; --card: #fff; --text: #1a1a2e; --muted: #6b7280;
  --accent: #6366f1; --accent-hover: #4f46e5; --border: #e5e7eb;
  --green: #10b981; --amber: #f59e0b; --red: #ef4444;
  --gradient: linear-gradient(135deg, #6366f1, #8b5cf6, #a855f7);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(99,102,241,0.1);
  --shadow-lg: 0 8px 30px rgba(99,102,241,0.15);
}
html { scroll-behavior: smooth; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: var(--bg); color: var(--text); line-height: 1.7; opacity: 0; animation: fadeInBody 0.5s ease forwards; }
@keyframes fadeInBody { to { opacity: 1; } }
.container { max-width: 800px; margin: 0 auto; padding: 0 20px; }
.container-wide { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* ===== Animations ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.8; }
}
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes glow {
  0%, 100% { box-shadow: 0 0 8px rgba(99,102,241,0.2); }
  50% { box-shadow: 0 0 20px rgba(99,102,241,0.4); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ===== Header ===== */
header { background: rgba(255,255,255,0.95); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); padding: 16px 0; position: sticky; top: 0; z-index: 100; animation: fadeInDown 0.4s ease; }
header .container-wide { display: flex; align-items: center; justify-content: space-between; }
.logo { font-size: 1.3rem; font-weight: 700; color: var(--accent); text-decoration: none; }
.logo span { color: var(--text); }
nav { display: flex; gap: 24px; align-items: center; }
nav a { color: var(--muted); text-decoration: none; font-size: 0.9rem; font-weight: 500; transition: all 0.2s; position: relative; padding: 2px 0; }
nav a:hover { color: var(--accent); }
nav a::after { content: ''; position: absolute; bottom: -2px; left: 0; width: 0; height: 2px; background: var(--gradient); transition: width 0.3s; border-radius: 1px; }
nav a:hover::after { width: 100%; }
nav .nav-cta { background: var(--gradient); color: #fff !important; padding: 6px 16px; border-radius: 6px; font-weight: 600; }
nav .nav-cta::after { display: none; }
nav .nav-cta:hover { opacity: 0.9; }

/* ===== Hero ===== */
.hero { text-align: center; padding: 60px 0 40px; }
.hero h1 { font-size: 2.2rem; font-weight: 800; margin-bottom: 12px; animation: fadeInUp 0.6s ease; }
.hero p { color: var(--muted); font-size: 1.1rem; max-width: 600px; margin: 0 auto; animation: fadeInUp 0.6s ease 0.1s both; }
.hero-split { text-align: left; padding: 50px 0; animation: fadeInUp 0.6s ease; }
.hero-split h1 { font-size: 2.4rem; line-height: 1.2; }
.hero-split p { margin: 0; max-width: 440px; }
.hero-gradient { background: linear-gradient(-45deg, #eef2ff, #f5f3ff, #eef2ff, #f0fdf4); background-size: 400% 400%; animation: gradientShift 15s ease infinite; border-bottom: 1px solid var(--border); }

/* ===== Social Proof ===== */
.social-proof { text-align: center; padding: 30px 0; animation: fadeInUp 0.8s ease 0.2s both; }
.social-proof p { font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; font-weight: 600; }
.social-proof .logos { display: flex; justify-content: center; gap: 30px; flex-wrap: wrap; }
.social-proof .logos span { font-size: 1.2rem; font-weight: 700; color: var(--muted); opacity: 0.4; transition: opacity 0.3s; }
.social-proof .logos span:hover { opacity: 0.7; }

/* ===== Article cards ===== */
.featured-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 0 0 60px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 28px; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); position: relative; overflow: hidden; animation: fadeInUp 0.5s ease both; }
.card:nth-child(1) { animation-delay: 0.05s; }
.card:nth-child(2) { animation-delay: 0.1s; }
.card:nth-child(3) { animation-delay: 0.15s; }
.card:nth-child(4) { animation-delay: 0.2s; }
.card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--gradient); transform: scaleX(0); transition: transform 0.3s ease; transform-origin: left; }
.card:hover::before { transform: scaleX(1); }
.card:hover { border-color: var(--accent); box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.card-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--accent); margin-bottom: 8px; }
.card-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 0.65rem; font-weight: 700; padding: 2px 10px; border-radius: 20px; margin-right: 6px; vertical-align: middle; }
.card-badge.editors-pick { background: linear-gradient(135deg, #fef3c7, #fde68a); color: #92400e; animation: pulse 2s ease-in-out infinite; }
.card-badge.trending { background: linear-gradient(135deg, #fee2e2, #fecaca); color: #991b1b; }
.card-badge.new { background: linear-gradient(135deg, #dbeafe, #bfdbfe); color: #1e40af; }
.card h2 { font-size: 1.15rem; margin-bottom: 8px; line-height: 1.4; }
.card h2 a { color: var(--text); text-decoration: none; }
.card h2 a:hover { color: var(--accent); }
.card p { font-size: 0.9rem; color: var(--muted); line-height: 1.6; }
.card-meta { font-size: 0.8rem; color: var(--muted); margin-top: 12px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card-meta .read-time { background: var(--bg); padding: 2px 8px; border-radius: 4px; }
.stars { color: var(--amber); font-size: 0.85rem; letter-spacing: 1px; }

/* ===== Price Badges ===== */
.price-badge { display: inline-block; font-size: 0.65rem; font-weight: 600; padding: 2px 10px; border-radius: 20px; margin-left: 6px; vertical-align: middle; }
.price-free { background: #dcfce7; color: #166534; }
.price-low { background: #dbeafe; color: #1e40af; }
.price-mid { background: #fef3c7; color: #92400e; }
.price-high { background: #fee2e2; color: #991b1b; }
.price-na { background: #f3f4f6; color: #6b7280; }

/* ===== Category page hero ===== */
.cat-hero { padding: 30px 0; animation: fadeInUp 0.6s ease; }
.cat-hero h1 { font-size: 2rem; font-weight: 800; margin-bottom: 8px; }
.cat-hero p { font-size: 1rem; color: var(--muted); max-width: 600px; }

/* ===== Newsletter ===== */
.newsletter-section { background: linear-gradient(135deg, #eef2ff, #f0fdf4); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 40px 0; margin: 0 0 20px; }

/* ===== Section headings ===== */
.section-title { font-size: 1.5rem; font-weight: 700; margin: 40px 0 20px; padding-bottom: 8px; border-bottom: 2px solid var(--border); display: flex; align-items: center; gap: 8px; }

/* ===== Article page ===== */
article { padding: 40px 0 60px; }
.article-header { margin-bottom: 32px; }
.article-header .breadcrumb { font-size: 0.85rem; color: var(--muted); margin-bottom: 12px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.article-header .breadcrumb a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
.article-header .breadcrumb a:hover { color: var(--accent-hover); }
.article-header .breadcrumb .sep { color: var(--border); }
.article-header h1 { font-size: 2rem; font-weight: 800; line-height: 1.3; margin-bottom: 12px; }
.article-header .meta { font-size: 0.9rem; color: var(--muted); }
.article-content h2 { font-size: 1.4rem; font-weight: 700; margin: 32px 0 12px; }
.article-content h3 { font-size: 1.15rem; font-weight: 600; margin: 24px 0 8px; }
.article-content p { margin-bottom: 16px; font-size: 1.05rem; }
.article-content ul, .article-content ol { margin: 0 0 16px 24px; }
.article-content li { margin-bottom: 8px; font-size: 1.05rem; }
.article-content a { color: var(--accent); }
.article-content a.affiliate { background: #eef2ff; padding: 1px 4px; border-radius: 3px; text-decoration: none; font-weight: 500; }
.article-content a.affiliate:hover { background: var(--accent); color: #fff; }

/* ===== Comparison table ===== */
.compare-table-wrapper { overflow-x: auto; margin: 24px 0; border-radius: 8px; border: 1px solid var(--border); }
.compare-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.compare-table th, .compare-table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--border); }
.compare-table th { background: #f8f8ff; font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); }
.compare-table tr:last-child td { border-bottom: none; }
.compare-table tr:hover td { background: #f8f8ff; }
.compare-table .winner { color: var(--green); font-weight: 700; }
.compare-table .winner::before { content: 'âœ“ '; }
.compare-table .tie { color: var(--amber); font-weight: 600; }
.compare-table .tie::before { content: '= '; }
.compare-table td:first-child { font-weight: 600; }

/* ===== Pros/Cons boxes ===== */
.pros-box, .cons-box { padding: 20px 24px; border-radius: 8px; margin: 16px 0; }
.pros-box { background: #ecfdf5; border-left: 4px solid var(--green); }
.cons-box { background: #fef2f2; border-left: 4px solid var(--red); }
.pros-box h3, .cons-box h3 { font-size: 1rem; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.pros-box ul, .cons-box ul { margin: 0 0 0 20px; }
.pros-box li, .cons-box li { font-size: 0.95rem; margin-bottom: 4px; }

/* ===== CTA box ===== */
.cta-box { background: linear-gradient(135deg, #eef2ff, #fafafa); border: 1px solid var(--accent); border-radius: 12px; padding: 28px; margin: 32px 0; text-align: center; box-shadow: var(--shadow-sm); }
.cta-box h3 { font-size: 1.2rem; margin-bottom: 8px; }
.cta-box p { color: var(--muted); margin-bottom: 16px; font-size: 0.95rem; }
.cta-btn { display: inline-block; background: var(--gradient); color: #fff; padding: 12px 28px; border-radius: 8px; text-decoration: none; font-weight: 600; font-size: 1rem; transition: all 0.3s; box-shadow: 0 4px 14px rgba(99,102,241,0.3); }
.cta-btn:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(99,102,241,0.4); }
.cta-btn-small { display: inline-block; background: var(--gradient); color: #fff; padding: 8px 20px; border-radius: 6px; text-decoration: none; font-weight: 500; font-size: 0.9rem; transition: all 0.2s; }
.cta-btn-small:hover { opacity: 0.9; transform: translateY(-1px); }

/* ===== Related articles ===== */
.related-articles { margin-top: 48px; padding-top: 32px; border-top: 2px solid var(--border); }
.related-articles h3 { font-size: 1.2rem; margin-bottom: 16px; }
.related-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.related-card { padding: 16px; border: 1px solid var(--border); border-radius: 8px; transition: all 0.2s; }
.related-card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); }
.related-card h4 { font-size: 0.95rem; }
.related-card h4 a { color: var(--text); text-decoration: none; }
.related-card h4 a:hover { color: var(--accent); }
.related-card .tag { font-size: 0.7rem; color: var(--accent); text-transform: uppercase; font-weight: 600; letter-spacing: 0.5px; margin-bottom: 4px; }

/* ===== Verdict box ===== */
.verdict-box { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 12px; padding: 28px; margin: 32px 0; }
.verdict-box h3 { font-size: 1.15rem; color: #166534; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.verdict-box p { margin-bottom: 8px; color: #166534; }
.verdict-box p:last-child { margin-bottom: 0; }
.verdict-box .rating { font-size: 2rem; font-weight: 800; color: var(--green); }

/* ===== Feature highlight boxes ===== */
.feature-box { display: flex; gap: 16px; padding: 16px 20px; border-radius: 8px; margin: 12px 0; background: #f8f8ff; border: 1px solid #e8e8ff; align-items: flex-start; }
.feature-box .icon { font-size: 1.5rem; flex-shrink: 0; width: 40px; text-align: center; }
.feature-box h4 { font-size: 0.95rem; margin-bottom: 4px; }
.feature-box p { font-size: 0.9rem; color: var(--muted); margin: 0; }

/* ===== Footer ===== */
footer { background: linear-gradient(135deg, #1a1a2e, #16213e); border-top: none; padding: 32px 0; margin-top: 40px; text-align: center; }
footer p { font-size: 0.85rem; color: #94a3b8; }
footer a { color: var(--accent); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ===== Back to top ===== */
.back-to-top { position: fixed; bottom: 30px; right: 30px; width: 44px; height: 44px; background: var(--gradient); color: #fff; border: none; border-radius: 50%; cursor: pointer; font-size: 1.2rem; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-lg); transition: all 0.3s; opacity: 0; visibility: hidden; z-index: 99; }
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { transform: translateY(-3px); box-shadow: 0 6px 25px rgba(99,102,241,0.4); }

/* ===== Disclosure ===== */
.disclosure { font-size: 0.8rem; color: var(--muted); background: #f9fafb; border: 1px solid var(--border); border-radius: 6px; padding: 12px 16px; margin-bottom: 24px; }

/* ===== Filter & Search Bar ===== */
.filter-bar { background: var(--card); border-bottom: 1px solid var(--border); padding: 16px 0; position: sticky; top: 60px; z-index: 90; animation: fadeInDown 0.4s ease; }
.filter-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.filter-row + .filter-row { margin-top: 10px; }
.search-wrap { flex: 1; min-width: 200px; position: relative; }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 0.9rem; opacity: 0.5; }
.search-input { width: 100%; padding: 10px 14px 10px 36px; border: 1px solid var(--border); border-radius: 8px; font-size: 0.9rem; background: var(--bg); transition: border-color 0.2s; }
.search-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(99,102,241,0.1); }
.filter-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-btn, .cat-btn { padding: 6px 16px; border: 1px solid var(--border); border-radius: 20px; background: var(--bg); color: var(--muted); font-size: 0.8rem; font-weight: 500; cursor: pointer; transition: all 0.2s; white-space: nowrap; }
.filter-btn:hover, .cat-btn:hover { border-color: var(--accent); color: var(--accent); }
.filter-btn.active, .cat-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.filter-cats { gap: 6px; }
.filter-cats .cat-btn { font-size: 0.75rem; padding: 4px 12px; }

/* ===== Section divider ===== */
.section-divider { text-align: center; padding: 20px 0; position: relative; }
.section-divider::before { content: ''; display: block; height: 2px; background: var(--gradient); width: 60px; margin: 0 auto; border-radius: 1px; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .hero h1 { font-size: 1.6rem; }
  .hero-split h1 { font-size: 1.6rem; }
  .featured-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .article-header h1 { font-size: 1.5rem; }
  nav { gap: 10px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
  nav a { font-size: 0.78rem; white-space: nowrap; }
  .compare-table { font-size: 0.8rem; }
  .compare-table th, .compare-table td { padding: 8px 10px; }
  .hero-split .container { flex-direction: column-reverse; text-align: center; }
  .hero-split p { margin: 0 auto; }
  .hero-split .cta-btn-small { justify-content: center; }
  .cat-hero h1 { font-size: 1.5rem; }
  .social-proof .logos { gap: 16px; }
  .social-proof .logos span { font-size: 0.9rem; }
  .back-to-top { right: 16px; bottom: 16px; width: 38px; height: 38px; font-size: 1rem; }
  .filter-bar { top: 50px; }
  .filter-bar .filter-btns { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
  .filter-cats { overflow-x: auto; flex-wrap: nowrap; }
}
