
:root {
  --bg: #f8f6f3;
  --surface: #ffffff;
  --surface-2: #fafaf8;
  --surface-3: #f0ede9;
  --text: #1a1a1a;
  --text-secondary: #555555;
  --text-muted: #888888;
  --border: #e8e6e3;
  --border-strong: #d8d4cf;
  --accent: #c9a227;
  --accent-dark: #a8841f;
  --navy: #3d5a80;
  --purple: #6d597a;
  --green: #52796f;
  --orange: #bc6c25;
  --olive: #606c38;
  --shadow: 0 1px 3px rgba(0,0,0,0.05), 0 8px 24px rgba(0,0,0,0.06);
  --radius: 12px;
  --radius-sm: 8px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  margin: 0;
  min-height: 100vh;
}

a { color: var(--navy); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-dark); text-decoration: underline; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

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

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

.logo {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo:hover { text-decoration: none; color: var(--text); }

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--navy);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.nav-links {
  display: flex;
  gap: 8px;
  align-items: center;
}

.nav-link {
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-weight: 500;
}

.nav-link:hover {
  background: var(--surface-2);
  color: var(--text);
  text-decoration: none;
}

.nav-link.active {
  background: var(--surface-3);
  color: var(--text);
}

/* Hero */
.hero {
  padding: 80px 0 64px;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero-title {
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
  font-family: Georgia, "Noto Serif SC", serif;
}

.hero-subtitle {
  font-size: 1.5rem;
  color: var(--text-secondary);
  font-weight: 400;
  margin: 0 0 24px;
}

.hero-desc {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 540px;
  margin-bottom: 28px;
}

.theme-flow {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 28px 0;
}

.flow-step {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-weight: 500;
}

.flow-step .num {
  width: 28px;
  height: 28px;
  background: var(--navy);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
}

.flow-arrow {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.2rem;
  line-height: 0.5;
}

.quote-block {
  background: var(--surface-2);
  border-left: 4px solid var(--accent);
  padding: 20px 24px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-top: 24px;
}

.quote-text {
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 1.15rem;
  font-style: italic;
  color: var(--text-secondary);
  margin: 0 0 10px;
  line-height: 1.6;
}

.quote-author {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-badge {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  position: relative;
}

.hero-badge::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px dashed var(--border-strong);
  border-radius: 50%;
}

.hero-badge-icon {
  font-size: 4rem;
  margin-bottom: 12px;
}

.hero-badge-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.hero-badge-sub {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Stats */
.stats-section {
  padding: 48px 0;
  border-bottom: 1px solid var(--border);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  box-shadow: var(--shadow);
}

.stat-number {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

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

.section:last-child { border-bottom: none; }

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 28px;
}

.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: Georgia, "Noto Serif SC", serif;
}

.section-subtitle {
  color: var(--text-secondary);
  margin: 6px 0 0;
  font-size: 1rem;
}

.view-all {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
}

.view-all:hover { color: var(--navy); }

/* Category cards */
.category-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.category-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.category-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08), 0 16px 40px rgba(0,0,0,0.08);
  text-decoration: none;
}

.category-icon {
  font-size: 2rem;
  margin-bottom: 14px;
}

.category-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.category-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  flex: 1;
  margin-bottom: 14px;
}

.category-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Topic cards */
.topic-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.topic-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.topic-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08), 0 16px 40px rgba(0,0,0,0.08);
  text-decoration: none;
}

.topic-card .topic-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.4;
}

.topic-card .topic-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.topic-card .badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--surface-3);
  color: var(--text-secondary);
}

/* Tags */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-block;
  padding: 5px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.tag:hover {
  background: var(--surface-3);
  color: var(--text);
  text-decoration: none;
}

/* Category page */
.page-header {
  padding: 56px 0 40px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.page-header .category-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.page-title {
  font-size: 2.6rem;
  font-weight: 800;
  margin: 0 0 12px;
  font-family: Georgia, "Noto Serif SC", serif;
}

.page-desc {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0;
}

.section-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.section-nav a {
  padding: 6px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.section-nav a:hover {
  background: var(--surface-3);
  color: var(--text);
  text-decoration: none;
}

.section-group {
  margin-bottom: 48px;
}

.section-group-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Unit detail */
.unit-detail {
  padding: 48px 0 64px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--navy); }

.unit-header {
  margin-bottom: 36px;
}

.unit-title {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.3;
  margin: 0 0 16px;
  font-family: Georgia, "Noto Serif SC", serif;
}

.unit-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.unit-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.unit-body {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow);
}

.unit-section {
  margin-bottom: 32px;
}

.unit-section:last-child { margin-bottom: 0; }

.unit-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.unit-section-content {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.unit-section-content p {
  margin: 0 0 14px;
}

.unit-section-content p:last-child { margin-bottom: 0; }

.unit-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 36px;
}

.unit-nav a {
  display: block;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.unit-nav a:hover {
  background: var(--surface-2);
  text-decoration: none;
}

.unit-nav-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.unit-nav-title {
  font-weight: 600;
  color: var(--text);
}

.unit-nav a.next { text-align: right; }

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

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer a { color: var(--text-muted); }

/* Responsive */
@media (max-width: 1024px) {
  .category-grid { grid-template-columns: repeat(3, 1fr); }
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .topic-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 2.2rem; }
  .hero-subtitle { font-size: 1.2rem; }
  .hero-badge { width: 220px; height: 220px; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .topic-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .unit-nav { grid-template-columns: 1fr; }
  .unit-title { font-size: 1.6rem; }
  .unit-body { padding: 24px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: 1fr; }
}
