:root {
  --bg: #0d1117;
  --surface: #161b22;
  --surface-hover: #1c2128;
  --border: #30363d;
  --text: #c9d1d9;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;
  --accent: #58a6ff;
  --accent-hover: #79c0ff;
  --success: #3fb950;
  --warning: #d29922;
  --danger: #f85149;
  --tag-feature: #a371f7;
  --tag-docs: #58a6ff;
  --tag-release: #3fb950;
  --tag-fix: #d29922;
  --nav-bg: rgba(13,17,23,0.85);
  --radius: 12px;
  --shadow: 0 8px 24px rgba(0,0,0,0.3);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

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

/* ── Navigation Bar ────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 24px;
}

.nav-brand {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-brand:hover {
  color: var(--accent);
  text-decoration: none;
}

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

.nav-link {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.15s;
}

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

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

/* Mobile nav */
@media (max-width: 640px) {
  .site-nav .container {
    padding: 0 16px;
  }
  .nav-brand span {
    display: none;
  }
  .nav-link {
    padding: 8px 10px;
    font-size: 13px;
  }
}

/* Header */
.site-header {
  background: linear-gradient(135deg, #1e3a8a 0%, #0d1117 100%);
  padding: 60px 0 40px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.site-header h1 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.site-header .subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.header-links {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  transition: all 0.2s;
}

.btn:hover {
  background: var(--surface-hover);
  border-color: var(--accent);
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

/* Main */
main {
  padding: 40px 0;
}

section {
  margin-bottom: 48px;
}

section h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

/* Current version */
.current-version {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  position: relative;
}

.version-badge {
  position: absolute;
  top: -1px;
  right: 24px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 0 0 8px 8px;
  letter-spacing: 0.5px;
}

.current-version h2 {
  font-size: 28px;
  border: none;
  padding: 0;
  margin-bottom: 12px;
}

.version-date {
  font-size: 16px;
  color: var(--text-muted);
  font-weight: 400;
  margin-left: 8px;
}

.version-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.tag-feature { background: rgba(163,113,247,0.15); color: var(--tag-feature); }
.tag-docs { background: rgba(88,166,255,0.15); color: var(--tag-docs); }
.tag-release { background: rgba(63,185,80,0.15); color: var(--tag-release); }
.tag-fix { background: rgba(210,153,34,0.15); color: var(--tag-fix); }

.changelog-list {
  list-style: none;
  margin-bottom: 20px;
}

.changelog-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  line-height: 1.7;
}

.changelog-list li:last-child {
  border-bottom: none;
}

.changelog-list code {
  background: rgba(110,118,129,0.2);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: "SF Mono", Monaco, monospace;
  font-size: 13px;
}

.read-more {
  display: inline-block;
  margin-top: 8px;
  font-weight: 600;
}

/* Version history */
.version-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
  transition: transform 0.2s, border-color 0.2s;
}

.version-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.version-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.version-header h3 {
  font-size: 20px;
}

.version-summary {
  color: var(--text-secondary);
  font-size: 15px;
  margin-bottom: 12px;
}

/* Guides */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.guide-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s;
}

.guide-card:hover {
  background: var(--surface-hover);
  border-color: var(--accent);
  transform: translateY(-2px);
  text-decoration: none;
  color: var(--text);
}

.guide-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.guide-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.guide-card p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
}

/* ── Archive / Daily pages ────────────────── */
.archive-section {
  margin-bottom: 40px;
}

.archive-month {
  margin-bottom: 24px;
}

.archive-month h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 12px;
  padding-left: 12px;
  border-left: 3px solid var(--accent);
}

.archive-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.archive-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 20px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.15s;
}

.archive-item:hover {
  background: var(--surface-hover);
  border-color: var(--accent);
  text-decoration: none;
  color: var(--text);
  transform: translateX(4px);
}

.archive-item .date {
  font-weight: 600;
  font-size: 15px;
}

.archive-item .meta {
  font-size: 13px;
  color: var(--text-muted);
}

.archive-item .arrow {
  color: var(--text-muted);
  font-size: 18px;
  transition: color 0.15s;
}

.archive-item:hover .arrow {
  color: var(--accent);
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state .icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.empty-state p {
  font-size: 16px;
}

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

/* Responsive */
@media (max-width: 640px) {
  .site-header { padding: 40px 0 30px; }
  .site-header h1 { font-size: 28px; }
  .current-version { padding: 24px; }
  .version-header { flex-direction: column; }
  .archive-item { padding: 12px 16px; }
}
