/* === 家電評測指南 v2 — 專業家電內容網站 === */

:root {
  --bg: #f8f9fb;
  --card-bg: #ffffff;
  --text: #1a1a2e;
  --text-secondary: #5a5a7a;
  --text-muted: #9090a8;
  --accent: #2563eb;
  --accent-light: #eff4ff;
  --accent-grad: linear-gradient(135deg, #2563eb, #4f46e5);
  --cat-dehumidifier: #0ea5e9;
  --cat-air: #10b981;
  --cat-robot: #8b5cf6;
  --cat-washing: #f59e0b;
  --cat-fridge: #ef4444;
  --cat-microwave: #ec4899;
  --border: #e8ecf1;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.08);
  --max-width: 800px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
}

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

/* === Header === */
.site-header {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 20px 0 14px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  text-align: center;
}

.logo {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.03em;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tagline {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 2px;
  font-weight: 400;
}

.nav-links {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 5px 14px;
  border-radius: 20px;
  transition: all 0.2s;
}

.nav-links a:hover {
  background: var(--accent-light);
  color: var(--accent);
}

/* === Hero === */
.hero {
  text-align: center;
  padding: 48px 0 36px;
}

.hero h1 {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 12px;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.3;
}

.hero p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.7;
}

/* === Category Section === */
.categories {
  margin-bottom: 10px;
}

.section-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.01em;
}

.section-title::before {
  content: '';
  width: 4px;
  height: 20px;
  background: var(--accent-grad);
  border-radius: 2px;
}

.count {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-left: auto;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-bottom: 44px;
}

.category-card {
  display: block;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.25s ease;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.category-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: var(--radius) var(--radius) 0 0;
  opacity: 0;
  transition: opacity 0.25s;
}

.category-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: transparent;
}

.category-card:hover::before {
  opacity: 1;
}

.category-card:nth-child(1):hover::before { background: var(--cat-dehumidifier); }
.category-card:nth-child(2):hover::before { background: var(--cat-air); }
.category-card:nth-child(3):hover::before { background: var(--cat-robot); }
.category-card:nth-child(4):hover::before { background: var(--cat-washing); }
.category-card:nth-child(5):hover::before { background: var(--cat-fridge); }
.category-card:nth-child(6):hover::before { background: var(--cat-microwave); }

.category-card .cat-icon {
  font-size: 1.8rem;
  margin-bottom: 8px;
  display: block;
}

.category-card h2 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.category-card p {
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

/* === Article Grid === */
.article-grid {
  display: grid;
  gap: 12px;
  margin-bottom: 48px;
}

.article-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  transition: all 0.25s ease;
  box-shadow: var(--shadow);
}

.article-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateX(3px);
  border-left: 3px solid var(--accent);
}

.article-card a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.article-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.article-card p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.55;
}

.meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  font-size: 0.78rem;
}

.category-tag {
  background: var(--accent-light);
  color: var(--accent);
  padding: 3px 12px;
  border-radius: 14px;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.02em;
}

.category-tag:hover {
  background: #dbeafe;
}

.meta time {
  color: var(--text-muted);
}

/* === Article Page === */
.full-article {
  max-width: 720px;
  margin: 0 auto;
}

.article-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.article-header h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.3;
  margin-bottom: 14px;
}

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

.article-content {
  font-size: 1.05rem;
  line-height: 1.85;
}

.article-content h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-top: 40px;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent-light);
  letter-spacing: -0.01em;
}

.article-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-top: 30px;
  margin-bottom: 10px;
  color: #2d3748;
}

.article-content h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.article-content p {
  margin-bottom: 18px;
}

.article-content ul, .article-content ol {
  margin-bottom: 18px;
  padding-left: 24px;
}

.article-content li {
  margin-bottom: 8px;
}

.article-content strong {
  font-weight: 700;
  color: #1a202c;
}

.article-content a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s;
}

.article-content a:hover {
  border-bottom-color: var(--accent);
}

.article-content img {
  max-width: 100%;
  border-radius: var(--radius);
  margin: 20px 0;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.9rem;
}

.article-content th {
  background: #f1f5f9;
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid var(--border);
}

.article-content td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

.article-disclaimer {
  margin-top: 36px;
  padding: 16px 20px;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: #92400e;
  line-height: 1.6;
}

/* === Related Articles === */
.related-articles {
  margin-top: 44px;
  padding: 24px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.related-articles h2 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.related-articles ul {
  list-style: none;
  display: grid;
  gap: 10px;
}

.related-articles a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.92rem;
  transition: color 0.15s;
}

.related-articles a:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

/* === Category Page === */
.category-page h1 {
  font-size: 1.7rem;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.category-desc {
  color: var(--text-secondary);
  margin-bottom: 36px;
  font-size: 1rem;
}

.category-page .article-list h2 {
  font-size: 1.05rem;
  margin-bottom: 16px;
}

/* === Breadcrumb === */
main.container {
  padding-top: 28px;
}

main > .container > :is(a, :has(a)):first-child,
main.container > a:first-of-type {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  display: inline-block;
}

main.container > a:first-of-type {
  color: var(--text-muted);
  text-decoration: none;
}

main.container > a:first-of-type a {
  color: var(--accent);
  text-decoration: none;
}

main.container > a:first-of-type a:hover {
  text-decoration: underline;
}

/* === Footer === */
.site-footer {
  margin-top: 72px;
  padding: 36px 0;
  border-top: 1px solid var(--border);
  background: var(--card-bg);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.84rem;
}

/* === Ad Container === */
.ad-container {
  margin: 28px 0;
  text-align: center;
  min-height: 90px;
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.footer-links {
  margin-top: 8px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
}

.footer-links a:hover {
  color: var(--accent);
}

/* === Mobile === */
@media (max-width: 640px) {
  .hero h1 { font-size: 1.6rem; }
  .article-header h1 { font-size: 1.45rem; }
  .hero { padding: 32px 0 24px; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .container { padding: 0 16px; }
  .nav-links { gap: 2px; }
  .nav-links a { font-size: 0.76rem; padding: 4px 10px; }
  .article-card { padding: 16px 18px; }
}