:root {
  --bg: #ffffff;
  --bg-alt: #f9fafb;
  --text: #111827;
  --text-secondary: #4b5563;
  --text-muted: #9ca3af;
  --border: #e5e7eb;
  --border-light: #f3f4f6;
  --accent: #7c3aed;
  --accent-light: #f5f3ff;
  --accent-hover: #6d28d9;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(0,0,0,0.04);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 15px;
}

.logo svg { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-links::-webkit-scrollbar { display: none; }

.nav-links a {
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: all 0.15s;
}

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

/* Hero */
.hero {
  padding: 32px 0 28px;
  border-bottom: 1px solid var(--border);
}

.hero-inner { text-align: center; }

.hero h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.3px;
  margin-bottom: 6px;
}

.hero .gradient {
  color: var(--accent);
}

.hero p {
  color: var(--text-secondary);
  font-size: 14px;
}

/* Section */
.section {
  padding: 28px 0;
  border-bottom: 1px solid var(--border-light);
}

.section:last-of-type { border-bottom: none; }

.section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.section-badge {
  padding: 2px 8px;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}

.section-badge.hot {
  background: #fef2f2;
  color: #dc2626;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
}

/* Article Grid - Compact */
.article-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.article-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 14px;
  border: 1px solid var(--border);
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.article-card:hover {
  border-color: #d1d5db;
  box-shadow: var(--shadow);
}

.article-card.featured {
  border-color: #fecaca;
  background: linear-gradient(135deg, #fff 0%, #fef2f2 100%);
}

.article-card.featured:hover {
  border-color: #f87171;
}

.article-tag {
  display: inline-block;
  padding: 2px 7px;
  background: #fee2e2;
  color: #dc2626;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  width: fit-content;
}

.article-card h3 {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text);
}

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

.article-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--border-light);
}

/* Category */
.category { margin-bottom: 24px; }
.category:last-child { margin-bottom: 0; }

.category-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 12px;
  padding-left: 8px;
  border-left: 2px solid var(--accent);
}

/* Tool Grid - Dense */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.tool-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 12px;
  border: 1px solid var(--border);
  transition: all 0.2s;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.tool-card:hover {
  border-color: #d1d5db;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.tool-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.tool-info { min-width: 0; }

.tool-info h4 {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tool-info p {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Footer */
.footer {
  padding: 24px 0;
  text-align: center;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }

/* Responsive */
@media (max-width: 1200px) {
  .article-grid { grid-template-columns: repeat(3, 1fr); }
  .tool-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 900px) {
  .article-grid { grid-template-columns: repeat(2, 1fr); }
  .tool-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 600px) {
  .article-grid { grid-template-columns: 1fr; }
  .tool-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-links { gap: 0; }
  .nav-links a { padding: 5px 8px; font-size: 12px; }
}
