:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --text: #1a202c;
  --muted: #64748b;
  --accent: #2563eb;
  --accent-b: #db2777;
  --win: #16a34a;
  --border: #e2e8f0;
  --radius: 10px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans TC", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 12px 16px; }
.logo { font-weight: 700; font-size: 1.15rem; color: var(--text); }
.main-nav { display: flex; gap: 12px; flex-wrap: wrap; }
.main-nav a { color: var(--text); font-weight: 500; }
.search-form { margin-left: auto; }
.search-form input {
  padding: 7px 12px; border: 1px solid var(--border); border-radius: 999px;
  min-width: 220px; font-size: 0.9rem;
}
.search-form.large { display: flex; gap: 8px; margin: 16px 0; }
.lang-nav a { margin-left: 8px; color: var(--muted); text-transform: uppercase; font-size: 0.8rem; }
.lang-nav a.active { color: var(--accent); font-weight: 700; }

/* Layout */
main { padding: 24px 16px 48px; }
.breadcrumb { font-size: 0.85rem; color: var(--muted); margin-bottom: 12px; }
.hero { text-align: center; padding: 32px 0 16px; }
.hero h1 { font-size: 2rem; margin: 0 0 8px; }
.hero p { color: var(--muted); }
.intro { color: var(--muted); max-width: 720px; }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; color: var(--text); display: block;
}
.card:hover { text-decoration: none; border-color: var(--accent); box-shadow: 0 2px 10px rgba(37, 99, 235, 0.08); }
.card h3 { margin: 8px 0 4px; }
.brand { color: var(--muted); font-size: 0.85rem; margin: 0 0 6px; }
.summary { font-size: 0.9rem; margin: 0; }
.vs-card { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.vs-badge {
  background: linear-gradient(135deg, var(--accent), var(--accent-b));
  color: #fff; font-size: 0.75rem; font-weight: 800;
  border-radius: 6px; padding: 4px 8px; flex-shrink: 0;
}

/* Ranking */
.ranking { list-style: none; padding: 0; margin: 24px 0; display: flex; flex-direction: column; gap: 12px; }
.rank-card {
  display: flex; align-items: center; gap: 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px;
}
.rank { font-size: 1.2rem; font-weight: 800; color: var(--muted); min-width: 42px; }
.rank-card img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; }
.rank-body { flex: 1; }
.rank-body h2 { margin: 0; font-size: 1.1rem; }
.standout { color: var(--win); font-size: 0.85rem; margin: 4px 0 0; }
.rank-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }

/* Buttons and badges */
.btn {
  display: inline-block; background: var(--accent); color: #fff; border: none; cursor: pointer;
  padding: 7px 14px; border-radius: 8px; font-size: 0.85rem; font-weight: 600;
}
.btn:hover { text-decoration: none; opacity: 0.92; }
.btn.ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn.buy { background: var(--win); margin: 8px 8px 0 0; }
.score-badge {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff; font-weight: 800;
  border-radius: 999px; min-width: 44px; height: 44px; padding: 0 8px; font-size: 1.05rem;
}
.score-badge.large { min-width: 56px; height: 56px; font-size: 1.3rem; }
.score-badge.small { min-width: 32px; height: 32px; font-size: 0.85rem; vertical-align: middle; }

/* Product page */
.product-hero { display: flex; gap: 24px; align-items: flex-start; margin: 16px 0 24px; }
.product-hero img { width: 260px; border-radius: var(--radius); }
.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 16px 0; }
.pros, .cons { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; }
.pros li { color: var(--win); }
.cons li { color: var(--accent-b); }
.pros ul, .cons ul { list-style: none; padding: 0; margin: 0; }

/* Spec tables */
.spec-group { margin-bottom: 16px; }
.spec-table {
  width: 100%; border-collapse: collapse; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
.spec-table th, .spec-table td { text-align: left; padding: 9px 14px; border-bottom: 1px solid var(--border); font-size: 0.92rem; }
.spec-table th { color: var(--muted); font-weight: 500; width: 40%; }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: none; }
.spec-table.compare th { width: auto; }
.spec-table .group-row td { background: var(--bg); font-weight: 700; color: var(--text); }
.spec-table td.winner { color: var(--win); font-weight: 700; }

/* Compare page */
.compare-hero {
  display: flex; align-items: stretch; gap: 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; margin: 16px 0;
}
.compare-side { flex: 1; text-align: center; }
.compare-side img { width: 160px; border-radius: 8px; }
.compare-side h2 { margin: 8px 0 2px; font-size: 1.15rem; }
.vs-divider { display: flex; align-items: center; font-weight: 800; color: var(--accent-b); font-size: 1.3rem; }
.verdict { background: var(--surface); border-left: 4px solid var(--accent); border-radius: var(--radius); padding: 16px 20px; margin: 16px 0; }
.best-for { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip { background: var(--bg); border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px; font-size: 0.85rem; }

/* Score bars */
.score-overview { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.score-row { display: flex; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.score-row:last-child { border-bottom: none; }
.score-row-label { width: 130px; font-weight: 600; flex-shrink: 0; }
.score-bars { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.bar-line { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; }
.bar-name { width: 110px; color: var(--muted); flex-shrink: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar { flex: 1; background: var(--bg); border-radius: 4px; height: 10px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 4px; }
.bar-fill.a { background: var(--accent); }
.bar-fill.b { background: var(--accent-b); }
.bar-value { width: 28px; text-align: right; font-weight: 600; }

/* FAQ */
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 16px; margin-bottom: 8px; }
.faq summary { font-weight: 600; cursor: pointer; }

.body-text { margin: 8px 0; }
.result-count { color: var(--muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); color: var(--muted); font-size: 0.85rem; padding: 16px 0; background: var(--surface); }

@media (max-width: 720px) {
  .product-hero { flex-direction: column; }
  .pros-cons { grid-template-columns: 1fr; }
  .compare-hero { flex-direction: column; }
  .vs-divider { justify-content: center; }
  .search-form { margin-left: 0; width: 100%; }
  .search-form input { width: 100%; }
}
