/* CompareStack - Main Stylesheet */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #0ea5e9;
  --primary-dark: #0284c7;
  --tool-a: #6366f1;
  --tool-b: #f97316;
  --gold: #f59e0b;
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-muted: #64748b;
  --win-bg: #fefce8;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
}

html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
}

/* =========================================
   NAV
   ========================================= */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: -0.5px;
}
.nav-brand span { color: var(--text); }
.nav-links { display: flex; gap: 8px; align-items: center; }
.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.875rem;
  padding: 6px 12px;
  border-radius: 6px;
  transition: all 0.2s;
}
.nav-links a:hover { background: var(--bg-alt); color: var(--text); }
.nav-links .btn-nav {
  background: var(--primary);
  color: white;
  font-weight: 600;
}
.nav-links .btn-nav:hover { background: var(--primary-dark); color: white; }

/* =========================================
   HERO
   ========================================= */
.hero {
  background: linear-gradient(135deg, #f0f9ff 0%, #fef9f0 100%);
  padding: 60px 24px 50px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.hero-badge {
  display: inline-block;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
}
.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  color: var(--text);
}
.hero h1 .vs-label { color: var(--text-muted); font-weight: 400; }
.hero-sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto 24px;
}
.hero-tools {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}
.tool-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: white;
  border: 2px solid var(--border);
  border-radius: 50px;
  padding: 8px 20px 8px 8px;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: var(--shadow);
}
.tool-chip.a { border-color: var(--tool-a); }
.tool-chip.b { border-color: var(--tool-b); }
.tool-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.85rem;
  color: white;
}
.tool-icon.a { background: var(--tool-a); }
.tool-icon.b { background: var(--tool-b); }
.vs-circle {
  width: 40px;
  height: 40px;
  background: var(--text);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 900;
  font-size: 0.75rem;
  flex-shrink: 0;
}

/* =========================================
   VERDICT BOX
   ========================================= */
.verdict-box {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 2px solid #f59e0b;
  border-radius: var(--radius);
  padding: 28px 32px;
  margin: 32px auto;
  max-width: 760px;
  position: relative;
}
.verdict-box::before {
  content: 'TL;DR VERDICT';
  position: absolute;
  top: -12px;
  left: 20px;
  background: var(--gold);
  color: white;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 20px;
}
.verdict-box p {
  font-size: 1.05rem;
  color: #78350f;
  margin: 0;
  line-height: 1.7;
}
.verdict-winner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: white;
  border: 2px solid var(--gold);
  border-radius: 8px;
  padding: 8px 16px;
  margin-top: 14px;
  font-weight: 700;
  color: var(--text);
}
.winner-badge {
  background: var(--gold);
  color: white;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* =========================================
   CONTAINER / LAYOUT
   ========================================= */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}
.section { padding: 48px 0; border-bottom: 1px solid var(--border); }
.section:last-of-type { border-bottom: none; }
.section h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 24px;
  color: var(--text);
  letter-spacing: -0.02em;
}

/* =========================================
   QUICK COMPARE CARDS
   ========================================= */
.quick-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 32px;
}
.qc-card {
  background: var(--bg-alt);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.qc-card.a { border-color: var(--tool-a); }
.qc-card.b { border-color: var(--tool-b); }
.qc-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.qc-header .tool-icon { width: 44px; height: 44px; font-size: 1rem; }
.qc-header h3 { font-size: 1.1rem; font-weight: 800; }
.qc-price {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.qc-best {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  margin-bottom: 14px;
}
.qc-stars { color: #f59e0b; font-size: 0.9rem; margin-bottom: 8px; }
.rating-num { color: var(--text); font-weight: 700; margin-left: 4px; }

/* =========================================
   COMPARISON TABLE
   ========================================= */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.compare-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
}
.compare-table th {
  padding: 14px 18px;
  text-align: left;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  white-space: nowrap;
}
.compare-table th:first-child { background: var(--bg-alt); color: var(--text-muted); }
.compare-table th.col-a { background: #eef2ff; color: var(--tool-a); }
.compare-table th.col-b { background: #fff7ed; color: var(--tool-b); }
.compare-table td {
  padding: 13px 18px;
  border-top: 1px solid var(--border);
  font-size: 0.925rem;
  vertical-align: middle;
}
.compare-table tr:nth-child(even) td { background: #fafbfc; }
.compare-table td:first-child { font-weight: 600; color: var(--text-muted); font-size: 0.875rem; }
.compare-table td.col-a { border-left: 3px solid var(--tool-a)40; }
.compare-table td.col-b { border-left: 3px solid var(--tool-b)40; }
.check { color: #16a34a; font-size: 1.1rem; font-weight: 700; }
.cross { color: #dc2626; font-size: 1.1rem; font-weight: 700; }
.partial { color: #d97706; font-size: 1rem; }
.winner-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.win-tag {
  background: var(--gold);
  color: white;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* =========================================
   PRICING CARDS
   ========================================= */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.pricing-card {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.pricing-card.a { border-color: var(--tool-a); }
.pricing-card.b { border-color: var(--tool-b); }
.pricing-head {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.pricing-card.a .pricing-head { background: #eef2ff; }
.pricing-card.b .pricing-head { background: #fff7ed; }
.pricing-head h3 { font-weight: 800; font-size: 1rem; }
.pricing-tiers { padding: 16px 20px; display: flex; flex-direction: column; gap: 10px; }
.tier {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.tier:last-child { border-bottom: none; }
.tier-name { font-weight: 600; }
.tier-price { font-weight: 700; color: var(--text-muted); }
.tier-price .free { color: #16a34a; font-weight: 800; }

/* =========================================
   PROS / CONS
   ========================================= */
.pros-cons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.pc-card {
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--border);
}
.pc-card.a { background: #eef2ff; border-color: #c7d2fe; }
.pc-card.b { background: #fff7ed; border-color: #fed7aa; }
.pc-title {
  font-weight: 800;
  font-size: 1rem;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pc-section { margin-bottom: 16px; }
.pc-section h4 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
  color: var(--text-muted);
}
.pc-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.pc-list li {
  font-size: 0.9rem;
  display: flex;
  gap: 8px;
  line-height: 1.4;
}
.pro-icon { color: #16a34a; flex-shrink: 0; }
.con-icon { color: #dc2626; flex-shrink: 0; }

/* =========================================
   BEST FOR
   ========================================= */
.bestfor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.bestfor-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}
.bestfor-card h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.bestfor-winner {
  font-weight: 800;
  font-size: 1rem;
  margin-bottom: 4px;
}
.bestfor-winner.a { color: var(--tool-a); }
.bestfor-winner.b { color: var(--tool-b); }
.bestfor-card p { font-size: 0.8rem; color: var(--text-muted); line-height: 1.4; }

/* =========================================
   CTA BUTTONS
   ========================================= */
.cta-section {
  background: linear-gradient(135deg, #f0f9ff 0%, #f5f3ff 100%);
  border-radius: var(--radius);
  padding: 40px 32px;
  text-align: center;
  border: 1px solid var(--border);
  margin: 40px 0;
}
.cta-section h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 8px;
}
.cta-section p {
  color: var(--text-muted);
  margin-bottom: 28px;
}
.cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}
.btn-a {
  background: var(--tool-a);
  color: white;
  box-shadow: 0 4px 16px rgba(99,102,241,0.35);
}
.btn-a:hover {
  background: #4f46e5;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(99,102,241,0.45);
}
.btn-b {
  background: var(--tool-b);
  color: white;
  box-shadow: 0 4px 16px rgba(249,115,22,0.35);
}
.btn-b:hover {
  background: #ea6c0a;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(249,115,22,0.45);
}
.btn-outline {
  background: white;
  color: var(--text);
  border: 2px solid var(--border);
  box-shadow: var(--shadow);
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}
.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 16px rgba(14,165,233,0.35);
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}
.btn-arrow::after { content: ' →'; }

/* =========================================
   FAQ
   ========================================= */
.faq-list { display: flex; flex-direction: column; gap: 0; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 8px;
  overflow: hidden;
}
.faq-q {
  width: 100%;
  background: none;
  border: none;
  padding: 18px 20px;
  text-align: left;
  font-size: 0.975rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  transition: background 0.15s;
}
.faq-q:hover { background: var(--bg-alt); }
.faq-q .arrow {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform 0.2s;
  font-size: 1.1rem;
}
.faq-item.open .faq-q .arrow { transform: rotate(180deg); }
.faq-a {
  display: none;
  padding: 0 20px 18px;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}
.faq-item.open .faq-a { display: block; }

/* =========================================
   RELATED COMPARISONS
   ========================================= */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.related-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s;
}
.related-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.related-icons {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.related-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 900;
  color: white;
}
.related-label { font-size: 0.875rem; font-weight: 700; }
.related-arrow { margin-left: auto; color: var(--text-muted); font-size: 1.1rem; }

/* =========================================
   ANALYSIS SECTION
   ========================================= */
.analysis p {
  color: var(--text-muted);
  margin-bottom: 16px;
  font-size: 0.975rem;
  line-height: 1.75;
}
.analysis p:last-child { margin-bottom: 0; }
.analysis h3 {
  font-size: 1.1rem;
  font-weight: 800;
  margin: 24px 0 10px;
  color: var(--text);
}
.highlight-box {
  background: #f0f9ff;
  border-left: 4px solid var(--primary);
  border-radius: 0 8px 8px 0;
  padding: 16px 20px;
  margin: 20px 0;
  font-size: 0.9rem;
  color: #0369a1;
  line-height: 1.65;
}

/* =========================================
   HOMEPAGE
   ========================================= */
.home-hero {
  background: linear-gradient(135deg, #f0f9ff 0%, #fff7ed 50%, #f5f3ff 100%);
  padding: 80px 24px 60px;
  text-align: center;
}
.home-hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 16px;
}
.home-hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 32px;
}
.home-stats {
  display: flex;
  gap: 32px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 20px;
}
.stat-item { text-align: center; }
.stat-num { font-size: 1.8rem; font-weight: 900; color: var(--primary); }
.stat-label { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }

.category-section { padding: 48px 0; }
.category-section h2 {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.category-tag {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: 20px;
  background: #dbeafe;
  color: #1d4ed8;
}
.comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.comparison-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s;
  display: block;
}
.comparison-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
  transform: translateY(-3px);
}
.cc-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.cc-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.8rem;
  color: white;
}
.cc-vs { font-size: 0.7rem; font-weight: 700; color: var(--text-muted); }
.cc-title { font-weight: 800; font-size: 0.975rem; margin-bottom: 4px; }
.cc-desc { font-size: 0.8rem; color: var(--text-muted); line-height: 1.4; }
.cc-winner {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-top: 10px;
  color: var(--text-muted);
}
.cc-winner .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
}
.cc-arrow { margin-left: auto; color: var(--primary); font-weight: 700; }

/* =========================================
   FOOTER
   ========================================= */
footer {
  background: var(--text);
  color: #94a3b8;
  padding: 40px 24px 24px;
  text-align: center;
}
.footer-brand {
  font-weight: 900;
  font-size: 1.2rem;
  color: white;
  margin-bottom: 8px;
}
.footer-tagline {
  font-size: 0.875rem;
  margin-bottom: 20px;
}
.footer-links {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.footer-links a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s;
}
.footer-links a:hover { color: white; }
.footer-copy { font-size: 0.8rem; color: #64748b; }
.footer-disclosure {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 8px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

/* =========================================
   ADSENSE
   ========================================= */
.ad-slot {
  text-align: center;
  padding: 16px 0;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ad-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  display: block;
  margin-bottom: 4px;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 640px) {
  .quick-compare { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .pros-cons-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.6rem; }
  .hero-tools { flex-direction: column; gap: 8px; }
  .vs-circle { display: none; }
  .cta-buttons { flex-direction: column; align-items: center; }
  .verdict-box { padding: 20px; }
  .container { padding: 0 16px; }
  .nav-links .nav-text { display: none; }
}

@media (max-width: 480px) {
  .compare-table th, .compare-table td { padding: 10px 12px; font-size: 0.85rem; }
  .home-stats { gap: 20px; }
}
