/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 18px; scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.7;
  color: #1a1a1a;
  background: #fafaf9;
}

/* === Container === */
.container { max-width: 800px; margin: 0 auto; padding: 0 1.5rem; }

/* === Header === */
.site-header {
  background: #1a1a2e;
  color: #fff;
  padding: 1rem 0;
  position: sticky; top: 0; z-index: 100;
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
}
.site-logo { font-size: 1.3rem; font-weight: 700; color: #fff; text-decoration: none; }
.site-nav { display: flex; gap: 1.5rem; }
.site-nav a { color: #ccc; text-decoration: none; font-size: 0.9rem; }
.site-nav a:hover { color: #fff; }

/* === Hero === */
.hero {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  color: #fff;
  padding: 4rem 0 3rem;
  text-align: center;
}
.hero h1 { font-size: 2.5rem; line-height: 1.3; margin-bottom: 1rem; }
.hero-subtitle { font-size: 1.1rem; color: #aab; max-width: 600px; margin: 0 auto; }

/* === Breadcrumb === */
.breadcrumb { padding: 1rem 0; font-size: 0.85rem; color: #666; }
.breadcrumb a { color: #0f3460; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { color: #999; }
.breadcrumb a::after { content: "›"; margin: 0 0.5rem; color: #ccc; }

/* === Cards === */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}
.card {
  display: block;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}
.card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; color: #1a1a2e; }
.card p { font-size: 0.9rem; color: #555; }
.card-affiliate { border-left: 3px solid #ff9900; }

/* === Sections === */
.section-block { margin: 3rem 0; }
.section-block h2 {
  font-size: 1.6rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e5e5e5;
  color: #1a1a2e;
}

/* === Article Page === */
.article-page { padding-bottom: 3rem; }
.article-content { margin-top: 1rem; }
.article-content h1 { font-size: 2rem; margin-bottom: 0.5rem; }
.article-desc { font-size: 1.1rem; color: #555; margin-bottom: 1rem; }
.article-meta { font-size: 0.85rem; color: #777; margin-bottom: 1.5rem; display: flex; gap: 1rem; flex-wrap: wrap; }
.article-meta time { display: block; }

/* Content body */
.content-body { margin-top: 1.5rem; }
.content-body h2 { font-size: 1.5rem; margin: 2rem 0 0.5rem; color: #1a1a2e; }
.content-body h3 { font-size: 1.2rem; margin: 1.5rem 0 0.5rem; color: #333; }
.content-body p { margin-bottom: 1rem; }
.content-body ul, .content-body ol { margin: 0 0 1rem 1.5rem; }
.content-body li { margin-bottom: 0.3rem; }
.content-body img { max-width: 100%; height: auto; border-radius: 8px; margin: 1.5rem 0; }
.content-body a { color: #0f3460; }
.content-body blockquote {
  border-left: 4px solid #0f3460;
  margin: 1.5rem 0;
  padding: 0.5rem 1rem;
  background: #f0f0f5;
  border-radius: 0 8px 8px 0;
}

/* === ToC === */
.toc {
  background: #f0f0f5;
  border-radius: 8px;
  padding: 1rem;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}
.toc summary { font-weight: 600; cursor: pointer; color: #1a1a2e; }
.toc nav ul { margin: 0.5rem 0 0 1rem; }
.toc nav li { margin-bottom: 0.2rem; }
.toc nav a { color: #0f3460; text-decoration: none; }
.toc nav a:hover { text-decoration: underline; }

/* === Affiliate Notice === */
.affiliate-notice {
  background: #fffae6;
  border: 1px solid #f5d76e;
  border-radius: 8px;
  padding: 1rem;
  margin: 2rem 0;
  font-size: 0.85rem;
  color: #665;
}

/* === Related Posts === */
.related-posts { margin: 3rem 0; }
.related-posts h2 { font-size: 1.4rem; margin-bottom: 1rem; color: #1a1a2e; }

/* === List Page === */
.list-page { padding: 2rem 0 3rem; }
.list-page h1 { font-size: 2rem; margin-bottom: 0.5rem; }
.list-desc { font-size: 1.1rem; color: #555; margin-bottom: 1.5rem; }

/* === Footer === */
.site-footer {
  background: #1a1a2e;
  color: #ccc;
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-col h4 { color: #fff; font-size: 1rem; margin-bottom: 1rem; }
.footer-col a { display: block; color: #aaa; text-decoration: none; font-size: 0.9rem; margin-bottom: 0.4rem; }
.footer-col a:hover { color: #fff; }
.footer-col p { font-size: 0.9rem; line-height: 1.6; }
.footer-bottom { border-top: 1px solid #333; padding-top: 1.5rem; text-align: center; font-size: 0.85rem; color: #666; }

/* === Responsive === */
@media (max-width: 600px) {
  html { font-size: 16px; }
  .hero h1 { font-size: 1.8rem; }
  .hero { padding: 2.5rem 0; }
  .card-grid { grid-template-columns: 1fr; }
  .site-nav { gap: 1rem; }
  .site-nav a { font-size: 0.8rem; }
}
