:root {
  --bg: #0d1117;
  --bg-secondary: #151b23;
  --bg-card: #1c2333;
  --text: #e6edf3;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;
  --accent: #3fb950;
  --accent-hover: #4cd463;
  --accent-light: rgba(63, 185, 80, 0.12);
  --border: #30363d;
  --shadow: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-hover: 0 4px 12px rgba(0,0,0,0.4);
  --radius: 8px;
  --radius-sm: 6px;
  --transition: 0.2s ease;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-width: 1200px;
  --nav-height: 64px;
  --header-bg: #0d1117;
}

[data-theme="light"] {
  --bg: #ffffff;
  --bg-secondary: #f6f8fa;
  --bg-card: #ffffff;
  --text: #1f2328;
  --text-secondary: #656d76;
  --text-muted: #8c8f94;
  --accent: #2da44e;
  --accent-hover: #218838;
  --accent-light: rgba(45, 164, 78, 0.08);
  --border: #d0d7de;
  --shadow: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-hover: 0 4px 12px rgba(0,0,0,0.12);
  --header-bg: #ffffff;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background var(--transition), color var(--transition);
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }

img { max-width: 100%; height: auto; }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: background var(--transition), border-color var(--transition);
}
.nav-inner {
  max-width: var(--max-width); margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  height: 100%;
}
.nav-logo {
  font-size: 1.3rem; font-weight: 800; color: var(--text);
  display: flex; align-items: center; gap: 4px;
}
.nav-logo span {
  background: var(--accent);
  color: #fff;
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 6px;
  font-size: 1.1rem;
}
.nav-links { display: flex; align-items: center; gap: 24px; list-style: none; }
.nav-links a {
  color: var(--text-secondary); font-size: 0.85rem; font-weight: 500;
  transition: color var(--transition); padding: 4px 0;
  position: relative;
}
.nav-links a:hover { color: var(--text); }
.nav-links .nav-cta a {
  background: var(--accent); color: #fff; padding: 8px 18px;
  border-radius: var(--radius-sm); font-weight: 600;
}
.nav-links .nav-cta a:hover { background: var(--accent-hover); color: #fff; }

.theme-toggle {
  background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 6px;
  width: 36px; height: 36px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; transition: all var(--transition);
  color: var(--text-muted);
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }

.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.menu-toggle span {
  display: block; width: 22px; height: 2px; background: var(--text);
  margin: 5px 0; transition: var(--transition); border-radius: 2px;
}

.search-bar {
  max-width: 560px; margin: 0 auto; position: relative;
}
.search-bar input {
  width: 100%; padding: 14px 20px 14px 48px;
  border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--bg-card); color: var(--text);
  font-size: 0.95rem; font-family: var(--font);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-bar input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
.search-bar .search-icon {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); font-size: 1.1rem;
}

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 24px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 0.85rem; cursor: pointer;
  transition: all var(--transition); border: none; font-family: var(--font);
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(63, 185, 80, 0.3); }
[data-theme="light"] .btn-primary:hover { box-shadow: 0 4px 12px rgba(45, 164, 78, 0.25); }
.btn-secondary { background: var(--bg-card); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-outline { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn-outline:hover { background: var(--accent); color: #fff; }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-lg { padding: 12px 28px; font-size: 0.95rem; }

.hero {
  padding: 100px 0 60px; text-align: center;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
}
.hero h1 {
  font-size: 2.6rem; font-weight: 800; line-height: 1.2;
  margin-bottom: 12px;
}
.hero h1 span { color: var(--accent); }
.hero p {
  font-size: 1.05rem; color: var(--text-secondary);
  max-width: 560px; margin: 0 auto 28px; line-height: 1.6;
}

section { padding: 60px 0; }
.section-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 24px;
}
.section-header h2 {
  font-size: 1.4rem; font-weight: 700;
}
.section-header a {
  font-size: 0.85rem; color: var(--accent); font-weight: 500;
  display: inline-flex; align-items: center; gap: 4px;
}

.category-pills {
  display: flex; gap: 10px; flex-wrap: wrap; justify-content: center;
  margin: 24px 0;
}
.category-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 20px; border-radius: var(--radius);
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-secondary); font-size: 0.85rem; font-weight: 500;
  transition: all var(--transition); cursor: pointer;
}
.category-pill:hover {
  border-color: var(--accent); color: var(--accent);
  background: var(--accent-light);
}
.category-pill .icon { font-size: 1.1rem; }

.tools-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
.tool-card {
  background: var(--bg-card); border-radius: var(--radius);
  border: 1px solid var(--border); padding: 24px;
  transition: all var(--transition);
  position: relative;
}
.tool-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.tool-card .badge {
  display: inline-block; padding: 3px 10px; border-radius: 12px;
  font-size: 0.7rem; font-weight: 600; margin-bottom: 10px;
}
.badge-free { background: rgba(63, 185, 80, 0.15); color: #7cda9a; }
.badge-paid { background: rgba(56, 139, 253, 0.15); color: #7cacf0; }
.badge-freemium { background: rgba(217, 165, 46, 0.15); color: #daac7c; }
[data-theme="light"] .badge-free { background: #d4edda; color: #155724; }
[data-theme="light"] .badge-paid { background: #cce5ff; color: #004085; }
[data-theme="light"] .badge-freemium { background: #fff3cd; color: #856404; }

.tool-card h3 { font-size: 1.1rem; margin-bottom: 6px; }
.tool-card .rating { color: #f59e0b; font-size: 0.85rem; margin-bottom: 8px; }
.tool-card p { color: var(--text-secondary); font-size: 0.85rem; margin-bottom: 14px; line-height: 1.5; }
.tool-card .tool-footer, .tool-card .tool-meta {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 12px; border-top: 1px solid var(--border);
}
.tool-card .tool-footer span, .tool-card .tool-meta span { font-size: 0.78rem; color: var(--text-muted); }
.tool-card .affiliate-badge {
  position: absolute; top: 10px; right: 10px;
  font-size: 0.6rem; background: var(--accent-light); color: var(--accent);
  padding: 2px 8px; border-radius: 10px; font-weight: 600;
}

.articles-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px;
}
.article-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: all var(--transition);
}
.article-card:hover { border-color: var(--accent); box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.article-card .body, .article-card .article-body { padding: 20px; }
.article-card .tag {
  display: inline-block; padding: 3px 10px; border-radius: 10px;
  font-size: 0.68rem; font-weight: 600; background: var(--accent-light); color: var(--accent);
  margin-bottom: 8px;
}
.article-card h3 { font-size: 1rem; margin-bottom: 8px; line-height: 1.4; }
.article-card h3 a { color: var(--text); }
.article-card h3 a:hover { color: var(--accent); }
.article-card p { color: var(--text-secondary); font-size: 0.85rem; line-height: 1.5; }
.article-card .meta {
  display: flex; gap: 14px; padding: 12px 20px;
  border-top: 1px solid var(--border); font-size: 0.78rem; color: var(--text-muted);
}

.newsletter-box, .newsletter {
  background: linear-gradient(135deg, var(--accent-light), var(--bg-card));
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 40px; text-align: center;
}
.newsletter-box h2, .newsletter h2 { font-size: 1.4rem; margin-bottom: 8px; }
.newsletter-box p, .newsletter p { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 20px; }
.newsletter-form {
  display: flex; gap: 10px; max-width: 440px; margin: 0 auto;
}
.newsletter-form input {
  flex: 1; padding: 12px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg);
  color: var(--text); font-size: 0.9rem; font-family: var(--font);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.newsletter-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }

footer {
  border-top: 1px solid var(--border); padding: 48px 0 32px;
  margin-top: 60px; background: var(--header-bg);
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px;
}
.footer-brand h3 { font-size: 1.2rem; margin-bottom: 10px; }
.footer-brand p { color: var(--text-secondary); font-size: 0.85rem; max-width: 280px; line-height: 1.5; }
.footer-col h4 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 14px; color: var(--text-muted); }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 6px; }
.footer-col ul a { color: var(--text-secondary); font-size: 0.85rem; }
.footer-col ul a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--border); margin-top: 32px; padding-top: 20px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.8rem; color: var(--text-muted);
}

.aff-disclosure {
  font-size: 0.72rem; color: var(--text-muted);
  background: var(--bg-secondary); padding: 6px 14px;
  border-radius: var(--radius-sm); margin-bottom: 20px;
  text-align: center;
}

.page-header { padding: 100px 0 32px; }
.page-header h1 { font-size: 2rem; font-weight: 700; }
.page-header p { color: var(--text-secondary); font-size: 1rem; max-width: 560px; }

.breadcrumbs {
  display: flex; gap: 6px; align-items: center; font-size: 0.8rem;
  color: var(--text-muted); padding: 20px 0; flex-wrap: wrap;
}
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--accent); }

.compare-table {
  width: 100%; border-collapse: collapse; margin: 28px 0;
  border-radius: var(--radius); overflow: hidden;
}
.compare-table th, .compare-table td {
  padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}
.compare-table th {
  background: var(--bg-secondary); font-weight: 700;
  font-size: 0.72rem; letter-spacing: 0.5px; text-transform: uppercase;
}
.compare-table tr:hover td { background: var(--bg-secondary); }
.compare-table .winner { color: #7cda9a; font-weight: 600; }
.compare-table .loser { color: var(--text-muted); }

.review-header {
  padding: 100px 0 32px; text-align: center;
}
.review-header .emoji { font-size: 2.5rem; margin-bottom: 12px; display: block; }
.review-header h1 { font-size: 2rem; }
.rating-stars { color: #f59e0b; font-size: 1.1rem; margin: 8px 0; }
.rating-stars span { color: var(--text-muted); font-size: 0.85rem; }
.pros-cons {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 28px 0;
}
.pros, .cons { padding: 20px; border-radius: var(--radius-sm); }
.pros { background: rgba(63, 185, 80, 0.08); border: 1px solid rgba(63, 185, 80, 0.2); }
.cons { background: rgba(248, 81, 73, 0.08); border: 1px solid rgba(248, 81, 73, 0.2); }
[data-theme="light"] .pros { background: #ecfdf5; border-color: #a7f3d0; }
[data-theme="light"] .cons { background: #fef2f2; border-color: #fecaca; }
.pros h4, .cons h4 { margin-bottom: 10px; font-size: 0.9rem; }
.pros ul, .cons ul { list-style: none; }
.pros li::before { content: '\2713 '; color: #7cda9a; font-weight: 700; }
.cons li::before { content: '\2717 '; color: #f87171; font-weight: 700; }
.pros li, .cons li { padding: 3px 0; font-size: 0.85rem; }

.cta-box {
  background: linear-gradient(135deg, var(--accent), #2ea043);
  border-radius: var(--radius); padding: 40px; text-align: center;
  margin: 32px 0; color: #fff;
}
.cta-box h3 { font-size: 1.4rem; margin-bottom: 8px; }
.cta-box p { opacity: 0.9; margin-bottom: 20px; font-size: 0.9rem; }
.cta-box .btn { background: #fff; color: var(--accent); }
.cta-box .btn:hover { background: #f0f0f0; }

.content { max-width: 720px; margin: 0 auto; }
.content h2 { font-size: 1.4rem; margin: 36px 0 12px; }
.content h3 { font-size: 1.1rem; margin: 28px 0 10px; }
.content p { margin-bottom: 14px; color: var(--text-secondary); line-height: 1.7; font-size: 0.95rem; }
.content ul, .content ol { margin-bottom: 14px; padding-left: 20px; }
.content li { margin-bottom: 6px; color: var(--text-secondary); font-size: 0.95rem; }
.content blockquote {
  border-left: 3px solid var(--accent); padding: 14px 20px; margin: 20px 0;
  background: var(--bg-secondary); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic; color: var(--text-secondary);
}

.ad-container {
  width: 100%; text-align: center; margin: 28px 0; min-height: 90px;
  display: flex; align-items: center; justify-content: center;
}

.filter-bar {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px;
}

.stat-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  text-align: center;
}
.stat-item h3 { font-size: 2rem; font-weight: 800; color: var(--accent); }
.stat-item p { color: var(--text-secondary); font-size: 0.85rem; }

.pricing-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 28px 0;
}
.pricing-card {
  padding: 24px; border-radius: var(--radius); text-align: center;
  border: 1px solid var(--border);
}
.pricing-card.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.pricing-card h3 { font-size: 1.1rem; }
.pricing-card .price { font-size: 1.8rem; font-weight: 800; margin: 8px 0; }
.pricing-card .btn { width: 100%; }

@media (max-width: 768px) {
  .hero h1 { font-size: 1.8rem; }
  .hero p { font-size: 0.95rem; }
  .hero { padding: 80px 0 40px; }
  section { padding: 40px 0; }
  .tools-grid { grid-template-columns: 1fr; }
  .articles-grid { grid-template-columns: 1fr; }
  .stat-row { gap: 12px; }
  .newsletter-box, .newsletter { padding: 28px 20px; }
  .newsletter-form { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  .pros-cons { grid-template-columns: 1fr; }
  .category-pills { gap: 8px; }
  .pricing-row { grid-template-columns: 1fr; }
  .section-header { flex-direction: column; align-items: flex-start; gap: 8px; }

  .nav-links {
    position: fixed; top: var(--nav-height); left: 0; right: 0;
    background: var(--header-bg); flex-direction: column; padding: 20px;
    gap: 14px; border-bottom: 1px solid var(--border);
    transform: translateY(-100%); opacity: 0; pointer-events: none;
    transition: all var(--transition);
  }
  .nav-links.open { transform: translateY(0); opacity: 1; pointer-events: all; }
  .menu-toggle { display: block; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.4rem; }
  .container { padding: 0 16px; }
  .footer-grid { grid-template-columns: 1fr; }
}
