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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: #ffffff;
  color: #1e293b;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }

nav {
  border-bottom: 1px solid #e2e8f0;
  padding: 1rem 1.5rem;
}
.nav-inner {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nav-brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
}
.nav-link { color: #64748b; font-size: 0.875rem; }
.nav-link:hover { color: #1e293b; text-decoration: none; }

main {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.hero {
  text-align: center;
  margin-bottom: 3rem;
}
.hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 1rem;
  line-height: 1.2;
}
.hero p {
  font-size: 1.125rem;
  color: #64748b;
  max-width: 600px;
  margin: 0 auto;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 2rem;
}
.filter-btn {
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.2s;
}
.filter-btn:hover { color: #1e293b; border-color: #cbd5e1; }
.filter-btn.active { background: #2563eb; color: white; border-color: #2563eb; }

.card {
  display: block;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-bottom: 1rem;
  background: #ffffff;
  transition: border-color 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
}
.card:hover { border-color: #2563eb; box-shadow: 0 1px 3px rgba(37, 99, 235, 0.1); text-decoration: none; }
.card-inner {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.card-rank {
  flex-shrink: 0;
  min-width: 3.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  background: #eff6ff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.15rem;
}
.card-rank-label {
  font-size: 0.6rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.card-rank-value {
  font-weight: 800;
  font-size: 1.25rem;
  color: #2563eb;
  line-height: 1;
}
.card-content { flex: 1; }
.card-category {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #2563eb;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}
.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}
.card:hover .card-title { color: #2563eb; }
.card-summary {
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.6;
}
.card-tiktok {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: #64748b;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  text-decoration: none;
  transition: all 0.2s;
}
.card-tiktok:hover { color: #0f172a; border-color: #cbd5e1; text-decoration: none; }
.card { position: relative; }

/* Blog post page */
.back-link {
  display: inline-block;
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 1.5rem;
}
.back-link:hover { color: #1e293b; }

.post-meta {
  margin-bottom: 0.5rem;
}
.post-category {
  display: inline-block;
  background: #eff6ff;
  color: #2563eb;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.post-rank {
  color: #64748b;
  font-size: 0.875rem;
  margin-left: 0.75rem;
}

.post-title {
  font-size: 2rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0.75rem 0 1.5rem;
  line-height: 1.3;
}

.stat-block {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin: 1.5rem 0;
}
.stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.75rem;
}
.stat-source {
  font-size: 0.875rem;
  color: #64748b;
}

.post-body {
  font-size: 1.125rem;
  line-height: 1.8;
  color: #334155;
  margin: 2rem 0;
}
.post-body p { margin-bottom: 1.25rem; }

.comments-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #e2e8f0;
}
.comments-section h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 1.5rem;
}

.post-footer {
  border-top: 1px solid #e2e8f0;
  margin-top: 3rem;
  padding-top: 2rem;
}

footer {
  border-top: 1px solid #e2e8f0;
  padding: 2rem 1.5rem;
  margin-top: 4rem;
  text-align: center;
  font-size: 0.875rem;
  color: #64748b;
}
footer p { margin-bottom: 0.5rem; }

@media (max-width: 640px) {
  .hero h1 { font-size: 1.75rem; }
  .post-title { font-size: 1.5rem; }
  .card-inner { flex-direction: column; }
  .card-rank { width: 2.5rem; height: 2.5rem; font-size: 1rem; }
}
