:root {
  --bg: #312a44;
  --surface: #453c5c;
  --surface-2: #3b3350;
  --border: #574c73;
  --text: #ece7f5;
  --muted: #b6acd0;
  --accent: #d0cbe3;
}

* {
  box-sizing: border-box;
}

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

header.site-header {
  padding: 24px 16px 12px;
  max-width: 720px;
  margin: 0 auto;
}

header.site-header h1 {
  font-size: 22px;
  margin: 0 0 4px;
}

header.site-header p.tagline {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 8px 16px 48px;
}

/* 全站搜索 */
.site-search {
  position: relative;
  margin-top: 12px;
  max-width: 720px;
}

#search-input {
  width: 100%;
  font-family: inherit;
  font-size: 14.5px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px;
}

#search-input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.search-results {
  display: none;
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  max-height: 60vh;
  overflow-y: auto;
}

.search-results.shown {
  display: block;
}

.search-result {
  display: block;
  padding: 10px 14px;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.search-result:last-child {
  border-bottom: none;
}

.search-result:hover {
  background: var(--surface-2);
}

.search-result-title {
  font-size: 14px;
  font-weight: 600;
}

.search-ext {
  color: var(--muted);
  font-weight: 400;
}

.search-result-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.search-empty {
  padding: 14px;
  font-size: 13.5px;
  color: var(--muted);
  text-align: center;
}

#status,
.empty-hint {
  color: var(--muted);
  padding: 24px 0;
  text-align: center;
}

/* 面包屑 */
.breadcrumb {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.crumb {
  color: var(--muted);
  text-decoration: none;
}

.crumb:not(.current):hover {
  color: var(--accent);
  text-decoration: underline;
}

.crumb.current {
  color: var(--text);
}

.crumb-sep {
  color: var(--border);
  margin: 0 2px;
}

.page-title {
  font-size: 22px;
  margin: 4px 0 8px;
  color: var(--text);
}

.intro-quote {
  font-size: 14.5px;
  color: var(--muted);
  font-style: italic;
  border-left: 3px solid var(--accent);
  padding: 4px 12px;
  margin: 0 0 18px;
  line-height: 1.7;
}

/* 目录网格：分类卡片 / 事件卡片 / 链接卡片 */
.node-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.node-card {
  display: block;
  border-radius: 10px;
  padding: 14px 16px;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.15s ease;
}

.node-card:active {
  transform: scale(0.99);
}

.node-card:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

/* 分类/子 tab 卡片：用该大类的浅色主题色打底 */
.folder-card {
  background: var(--accent, var(--surface));
  color: #2c2440;
  border: none;
}

.folder-card .node-card-title {
  font-size: 16px;
  font-weight: 700;
}

.folder-card .node-card-count {
  font-size: 12.5px;
  color: #55486f;
  margin-top: 2px;
}

/* 事件卡片（迷你版，用在分类页里） */
.event-card-mini {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}

.node-card-kicker {
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 2px;
}

.event-card-mini .node-card-title {
  font-size: 16px;
  font-weight: 600;
}

.event-card-mini .node-card-date {
  font-size: 12.5px;
  color: var(--muted);
  margin: 2px 0 4px;
}

.node-card-desc {
  font-size: 13.5px;
  color: var(--muted);
}

.node-card-error {
  background: var(--surface);
  color: var(--muted);
  border: 1px dashed var(--border);
}

/* 链接卡片（跟事件详情页的链接样式统一风格） */
.link-card {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}

.link-card .node-card-title {
  flex: 1 1 auto;
  font-size: 14px;
}

/* 首页事件卡片（如果直接用旧版列表，保留兼容） */
#event-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.event-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  text-decoration: none;
  color: var(--text);
}

.event-date {
  font-size: 13px;
  color: var(--muted);
}

.event-title {
  font-size: 17px;
  font-weight: 600;
  margin: 2px 0 4px;
}

.event-summary {
  font-size: 14px;
  color: var(--muted);
}

/* 详情页 */
.back-link {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--accent);
  text-decoration: none;
  font-size: 14px;
}

.back-link:hover {
  text-decoration: underline;
}

#event-date {
  font-size: 13px;
  color: var(--muted);
}

#event-title {
  font-size: 22px;
  margin: 4px 0 8px;
  color: var(--text);
}

#event-summary {
  color: var(--text);
  margin: 0 0 20px;
  font-size: 15px;
}

.material-group {
  margin-bottom: 20px;
}

.material-group-title {
  font-size: 14px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
  margin: 0 0 8px;
}

.material-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.material-link {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  text-decoration: none;
  color: var(--text);
}

.material-link:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.platform-badge {
  flex: 0 0 auto;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.material-title {
  flex: 1 1 auto;
  font-size: 14px;
}

.material-arrow {
  flex: 0 0 auto;
  color: var(--muted);
}

footer.site-footer {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

@media (max-width: 480px) {
  header.site-header h1 {
    font-size: 20px;
  }
}
