:root {
  --ink: #1a1a2e;
  --ink-soft: #2d2d4a;
  --paper: #f5f0e8;
  --paper-warm: #ede8db;
  --accent: #c8392b;
  --gold: #c9a84c;
  --muted: #8a8090;
  --border: rgba(26,26,46,0.12);
  --shadow: 0 4px 24px rgba(26,26,46,0.08);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans SC', sans-serif;
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ── */
.site-header {
  padding: 0 2rem;
  border-bottom: 1px solid var(--border);
  background: rgba(245,240,232,0.95);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-mark {
  width: 32px; height: 32px;
  background: var(--ink);
  display: flex; align-items: center; justify-content: center;
}
.logo-mark::before {
  content: '搜';
  color: var(--gold);
  font-family: 'Noto Serif SC', serif;
  font-size: 16px; font-weight: 700;
}
.logo-text { font-family: 'Noto Serif SC', serif; font-size: 18px; font-weight: 700; color: var(--ink); letter-spacing: .05em; }
.logo-text span { color: var(--accent); }

.site-nav { display: flex; gap: 1.5rem; }
.site-nav a { font-size: 13px; color: var(--muted); text-decoration: none; letter-spacing: .08em; transition: color .2s; font-weight: 500; }
.site-nav a:hover, .site-nav a.active { color: var(--ink); }

/* ── Hero ── */
.hero {
  position: relative;
  padding: 80px 2rem 60px;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

.hero-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: .2em; color: var(--gold);
  text-transform: uppercase; margin-bottom: 20px;
  animation: fadeUp .6s ease forwards .1s; opacity: 0;
}
.hero h1 {
  font-family: 'Noto Serif SC', serif;
  font-size: clamp(36px, 6vw, 68px);
  font-weight: 700; line-height: 1.1; color: var(--ink);
  margin-bottom: 16px;
  animation: fadeUp .6s ease forwards .2s; opacity: 0;
}
.hero h1 em {
  font-style: normal; color: var(--accent); position: relative;
}
.hero h1 em::after {
  content: ''; position: absolute;
  bottom: 4px; left: 0; right: 0; height: 3px;
  background: var(--accent); opacity: .3;
}
.hero-sub {
  font-size: 15px; color: var(--muted); font-weight: 300;
  margin-bottom: 40px; letter-spacing: .04em;
  animation: fadeUp .6s ease forwards .3s; opacity: 0;
}

/* ── Search ── */
.search-wrap, .search-bar-wrap { animation: fadeUp .6s ease forwards .4s; opacity: 0; }
.search-box {
  position: relative; max-width: 640px;
  margin: 0 auto; display: flex;
}
.search-bar-wrap .search-box { max-width: 100%; }
.search-box input {
  width: 100%; height: 58px;
  background: white; border: 2px solid var(--ink); border-radius: 0;
  font-size: 16px; font-family: 'Noto Sans SC', sans-serif; color: var(--ink);
  padding: 0 120px 0 22px; outline: none;
  transition: border-color .2s, box-shadow .2s;
  box-shadow: 4px 4px 0 var(--ink);
}
.search-box input::placeholder { color: var(--muted); }
.search-box input:focus { border-color: var(--accent); box-shadow: 4px 4px 0 var(--accent); }
.search-btn {
  position: absolute; right: 0; top: 0;
  height: 58px; width: 110px;
  background: var(--ink); color: var(--paper);
  border: none; font-family: 'Noto Sans SC', sans-serif;
  font-size: 14px; font-weight: 500; letter-spacing: .1em;
  cursor: pointer; transition: background .2s;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.search-btn:hover { background: var(--accent); }
.search-btn svg { width: 16px; height: 16px; }

.search-tags {
  display: flex; gap: 8px; justify-content: center;
  flex-wrap: wrap; margin-top: 16px;
}
.search-tag {
  font-size: 12px; padding: 4px 12px;
  border: 1px solid var(--border); color: var(--muted);
  cursor: pointer; background: transparent; text-decoration: none;
  font-family: 'Noto Sans SC', sans-serif;
  transition: all .2s; letter-spacing: .04em;
}
.search-tag:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ── Stats Bar ── */
.stats-bar {
  max-width: 1200px; margin: 48px auto 0; padding: 0 2rem;
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--border); border: 1px solid var(--border);
}
.stat-item { padding: 20px 24px; background: white; text-align: center; }
.stat-num { font-family: 'JetBrains Mono', monospace; font-size: 28px; font-weight: 500; color: var(--ink); display: block; }
.stat-label { font-size: 12px; color: var(--muted); margin-top: 4px; letter-spacing: .08em; }

/* ── Section Divider ── */
.section-divider {
  display: flex; align-items: center; gap: 16px;
  max-width: 1200px; margin: 0 auto; padding: 0 2rem;
}
.section-divider::before, .section-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.section-label { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: .25em; color: var(--muted); text-transform: uppercase; white-space: nowrap; }

/* ── Resources Section ── */
.resources-section { max-width: 1200px; margin: 32px auto 0; padding: 0 2rem; width: 100%; }
.section-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 24px; }
.section-title { font-family: 'Noto Serif SC', serif; font-size: 22px; font-weight: 700; color: var(--ink); }
.section-count { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--muted); letter-spacing: .1em; }

/* Resource Grid */
.resource-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }

.resource-card {
  background: white; border: 1px solid var(--border);
  padding: 20px 22px; position: relative;
  transition: all .2s; overflow: hidden;
}
.resource-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--accent); transform: scaleY(0);
  transition: transform .2s; transform-origin: bottom;
}
.resource-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.resource-card:hover::before { transform: scaleY(1); }

.card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.card-title { font-family: 'Noto Serif SC', serif; font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.4; flex: 1; }

.card-desc { font-size: 13px; color: var(--muted); line-height: 1.6; margin-bottom: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-footer { display: flex; align-items: center; justify-content: space-between; }
.card-links { display: flex; gap: 6px; }
.cloud-link {
  font-size: 11px; padding: 4px 10px;
  background: var(--paper-warm); color: var(--ink-soft);
  border: 1px solid var(--border); text-decoration: none;
  font-family: 'JetBrains Mono', monospace; letter-spacing: .05em;
  transition: all .15s;
}
.cloud-link:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.card-meta { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--muted); letter-spacing: .05em; }

/* ── Pagination ── */
.pagination { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 40px 0; }
.page-btn { padding: 8px 20px; border: 1px solid var(--border); color: var(--ink); text-decoration: none; font-size: 13px; transition: all .2s; }
.page-btn:hover { background: var(--ink); color: var(--paper); }
.page-info { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--muted); }

/* ── No Results ── */
.no-results { text-align: center; padding: 80px 0; color: var(--muted); }
.no-results-icon { font-size: 48px; display: block; margin-bottom: 16px; opacity: .3; }
.back-home { display: inline-block; margin-top: 16px; color: var(--accent); text-decoration: none; font-size: 14px; }

/* ── Search Page ── */
.search-page { max-width: 1200px; margin: 0 auto; padding: 40px 2rem 0; }
.search-bar-wrap .search-box { max-width: 100%; }

/* ── Footer ── */
.site-footer { margin-top: auto; padding-top: 60px; }
.footer-inner { border-top: 1px solid var(--border); background: var(--ink); padding: 40px 2rem; text-align: center; }
.footer-logo { font-family: 'Noto Serif SC', serif; font-size: 20px; color: var(--paper); font-weight: 700; margin-bottom: 16px; }
.footer-logo span { color: var(--gold); }
.footer-disclaimer { font-size: 12px; color: rgba(245,240,232,.45); max-width: 700px; margin: 0 auto 16px; line-height: 1.8; letter-spacing: .03em; }
.footer-bottom { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: rgba(245,240,232,.25); letter-spacing: .1em; }

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero { padding: 48px 1rem 40px; }
  .resource-grid { grid-template-columns: 1fr; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .site-nav { display: none; }
  .resources-section, .section-divider, .search-page { padding-left: 1rem; padding-right: 1rem; }
}



/* ── Detail Page ── */
.detail-page {
  max-width: 860px;
  margin: 40px auto;
  padding: 0 2rem;
}

.detail-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 28px;
}
.detail-breadcrumb a { color: var(--muted); text-decoration: none; }
.detail-breadcrumb a:hover { color: var(--ink); }
.detail-breadcrumb span { color: var(--border); }

.detail-card {
  background: white;
  border: 1px solid var(--border);
  padding: 36px 40px;
  box-shadow: var(--shadow);
}

.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.detail-title-wrap { display: flex; flex-direction: column; gap: 10px; }
.detail-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}
.detail-size {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  padding: 4px 10px;
  border: 1px solid var(--border);
  background: var(--paper-warm);
}

.detail-section-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.detail-desc {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.detail-desc p {
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.9;
  white-space: pre-line;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.detail-tag {
  font-size: 12px;
  padding: 4px 12px;
  border: 1px solid var(--border);
  color: var(--muted);
  text-decoration: none;
  transition: all .2s;
  letter-spacing: .04em;
}
.detail-tag:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.detail-links-section { margin-bottom: 24px; }
.detail-links { display: flex; flex-direction: column; gap: 10px; }

.detail-link-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--ink);
  background: var(--paper-warm);
  transition: all .2s;
  font-size: 15px;
}
.detail-link-btn:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.detail-link-btn:hover .link-arrow { opacity: 1; transform: translateX(4px); }
.link-icon { font-size: 18px; width: 24px; text-align: center; }
.link-name { flex: 1; font-weight: 500; }
.link-arrow { opacity: .3; transition: all .2s; font-family: 'JetBrains Mono', monospace; }

.detail-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .08em;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.detail-back {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}
.back-btn {
  font-size: 13px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  color: var(--muted);
  text-decoration: none;
  transition: all .2s;
}
.back-btn:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

@media (max-width: 768px) {
  .detail-page { padding: 0 1rem; margin: 24px auto; }
  .detail-card { padding: 24px 20px; }
  .detail-header { flex-direction: column; }
  .detail-title { font-size: 20px; }
}



/* ── Resource List ── */
.resource-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
}

.resource-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0;
  align-items: center;
  background: white;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--border);
  padding: 0;
  position: relative;
  transition: background 0.18s, box-shadow 0.18s;
  overflow: hidden;
}

.resource-row:last-child { border-bottom: none; }

/* hover 左侧红线 */
.resource-row::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: center;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.resource-row:hover {
  background: #fdfaf5;
  box-shadow: inset 0 0 0 1px rgba(200, 57, 43, 0.12);
}
.resource-row:hover::before { transform: scaleY(1); }

/* 偶数行淡底 */
.resource-row:nth-child(even) { background: #faf7f2; }
.resource-row:nth-child(even):hover { background: #fdfaf5; }

/* 主体 */
.row-body {
  padding: 16px 20px 16px 20px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.row-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  transition: color 0.15s;
}
.resource-row:hover .row-title { color: var(--accent); }

.row-size {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--muted);
  padding: 2px 7px;
  border: 1px solid var(--border);
  background: var(--paper-warm);
  letter-spacing: 0.06em;
  align-self: flex-start;
  margin-top: 2px;
}

.row-desc {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.row-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.row-tag {
  font-size: 11px;
  padding: 2px 8px;
  background: var(--paper-warm);
  border: 1px solid var(--border);
  color: var(--muted);
  letter-spacing: 0.04em;
  font-family: 'Noto Sans SC', sans-serif;
  border-radius: 2px;
  transition: all 0.15s;
}
.resource-row:hover .row-tag {
  border-color: rgba(200,57,43,0.25);
  color: var(--ink-soft);
}

/* 右列：顶部网盘 / 中部箭头 / 底部日期 */
.row-meta-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  flex-shrink: 0;
  padding: 16px 24px 16px 20px;
  min-width: 90px;
  align-self: stretch;
}

.row-clouds {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.cloud-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 2px;
}
.cloud-badge.quark  { background: #fff3cd; color: #856404; border: 1px solid #fde68a; }
.cloud-badge.ali    { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }
.cloud-badge.baidu  { background: #ede9fe; color: #5b21b6; border: 1px solid #ddd6fe; }

.row-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.row-arrow {
  font-size: 22px;
  color: var(--muted);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.18s, transform 0.18s, color 0.18s;
  line-height: 1;
}
.resource-row:hover .row-arrow {
  opacity: 1;
  transform: translateX(0);
  color: var(--accent);
}

/* ── 响应式 ── */
@media (max-width: 640px) {
  .resource-row {
    grid-template-columns: 1fr;
    padding: 0;
  }
  .row-body { padding: 14px 14px 8px; }
  .row-meta-col {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px 14px;
    min-width: unset;
    align-self: auto;
  }
  .row-arrow { display: none; }
}