:root {
  color-scheme: dark;
  --bg: #0c0e14;
  --surface: #151922;
  --surface-2: #1d2330;
  --primary: #10131c;
  --primary-2: #171b26;
  --accent: #0284c7;
  --accent-2: #22d3ee;
  --gold: #fbbf24;
  --text: #eef1f6;
  --muted: #8b93a5;
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .16);
  --shadow: 0 16px 40px rgba(0, 0, 0, .45);
  --radius: 12px;
  --maxw: 1240px;
  --font: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.cover-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
button, input, select { font: inherit; color: inherit; }
main { width: min(var(--maxw), calc(100% - 32px)); margin: 0 auto; }

/* —— 顶部 —— */
.site-header { position: sticky; top: 0; z-index: 60; background: rgba(16, 19, 28, .92); border-bottom: 1px solid var(--line); backdrop-filter: blur(16px); }
.header-inner { width: min(var(--maxw), calc(100% - 32px)); margin: 0 auto; display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 auto; border-radius: 10px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-size: 20px; }
.brand-name { font-size: 20px; font-weight: 900; letter-spacing: 1px; line-height: 1; }
.brand-tag { display: block; margin-top: 3px; font-size: 11px; letter-spacing: 3px; color: var(--gold); }
.main-nav { display: flex; gap: 2px; margin-left: auto; }
.main-nav a { padding: 8px 14px; border-radius: 8px; color: var(--muted); font-size: 14px; font-weight: 700; white-space: nowrap; transition: color .18s ease, background .18s ease; }
.main-nav a:hover { color: var(--text); background: var(--surface-2); }
.main-nav a[aria-current="page"] { color: #fff; background: var(--accent); }
.top-search { display: flex; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); }
.top-search input { width: 168px; padding: 9px 12px; border: 0; outline: 0; background: transparent; }
.top-search button { padding: 0 16px; border: 0; background: var(--accent); color: #fff; font-weight: 800; cursor: pointer; }
.nav-toggle { display: none; width: 42px; height: 42px; padding: 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); cursor: pointer; }
.nav-toggle span { display: block; height: 2px; background: var(--text); margin: 4px 0; }

/* —— 轮播 —— */
.hero { position: relative; height: 480px; overflow: hidden; }
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .7s ease; pointer-events: none; }
.hero-slide.active { opacity: 1; pointer-events: auto; }
.hero-cover { position: absolute; inset: 0; background: radial-gradient(120% 120% at 15% 0%, var(--tone-a, #ff4d6d), transparent 55%), radial-gradient(120% 120% at 100% 100%, var(--tone-b, #7b2ff7), transparent 55%), #0c0e14; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12, 14, 20, .5), rgba(12, 14, 20, .92)); }
.hero-copy { position: absolute; left: 0; right: 0; bottom: 44px; width: min(var(--maxw), calc(100% - 32px)); margin: 0 auto; }
.hero-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 800; }
.hero-copy h2 { margin: 16px 0 0; max-width: 760px; font-size: clamp(24px, 3.4vw, 40px); line-height: 1.25; font-weight: 900; }
.hero-copy p { margin: 12px 0 0; max-width: 640px; color: rgba(238, 241, 246, .85); font-size: 15px; }
.hero-cta { display: inline-flex; align-items: center; gap: 6px; margin-top: 20px; padding: 11px 22px; border-radius: 8px; background: var(--accent); color: #fff; font-size: 14px; font-weight: 800; transition: background .18s ease; }
.hero-cta:hover { background: var(--accent-2); }
.hero-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 5; display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line-strong); border-radius: 50%; background: rgba(12, 14, 20, .55); color: #fff; font-size: 20px; cursor: pointer; }
.hero-arrow:hover { background: var(--accent); }
.hero-arrow.prev { left: 18px; }
.hero-arrow.next { right: 18px; }
.hero-dots { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; gap: 8px; }
.hero-dot { width: 8px; height: 8px; border-radius: 999px; background: rgba(255, 255, 255, .35); cursor: pointer; transition: all .3s ease; }
.hero-dot.active { width: 24px; background: var(--accent); }

/* —— 跑马灯 —— */
.ticker { background: var(--accent); color: #fff; }
.ticker-inner { width: min(var(--maxw), calc(100% - 32px)); margin: 0 auto; display: flex; align-items: center; gap: 14px; padding: 9px 0; }
.ticker-label { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 6px; background: rgba(0, 0, 0, .18); font-size: 12px; font-weight: 900; white-space: nowrap; }
.ticker-viewport { flex: 1; overflow: hidden; white-space: nowrap; }
.ticker-track { display: inline-flex; gap: 40px; white-space: nowrap; animation: ticker 28s linear infinite; }
.ticker-track:hover { animation-play-state: paused; }
.ticker-track a { font-size: 13px; color: #fff; }
.ticker-track a:hover { text-decoration: underline; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* —— 区块 —— */
.section { margin: 34px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.eyebrow { margin: 0 0 6px; color: var(--accent); font-size: 12px; font-weight: 900; letter-spacing: 2px; text-transform: uppercase; }
.section-head h2 { margin: 0; font-size: clamp(20px, 2.4vw, 28px); line-height: 1.2; }
.text-link { padding: 8px 12px; border-radius: 8px; color: var(--accent); font-size: 14px; font-weight: 800; white-space: nowrap; transition: background .18s ease; }
.text-link:hover { background: var(--surface-2); }

/* —— 卡片 —— */
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: transform .25s ease, border-color .25s ease; }
.card:hover { transform: translateY(-4px); border-color: rgba(255, 77, 109, .55); }
.card-cover { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: radial-gradient(120% 120% at 15% 0%, var(--tone-a, #ff4d6d), transparent 60%), radial-gradient(120% 120% at 100% 100%, var(--tone-b, #7b2ff7), transparent 60%), #1d2330; }
.card-cover .cover-tag { position: absolute; right: -14px; bottom: -18px; font-size: 92px; font-weight: 900; color: rgba(255, 255, 255, .14); line-height: 1; }
.cat-badge { position: absolute; left: 12px; top: 12px; padding: 4px 10px; border-radius: 6px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 800; }
.hot-badge { position: absolute; right: 12px; top: 12px; display: inline-flex; align-items: center; gap: 3px; padding: 4px 8px; border-radius: 6px; background: rgba(0, 0, 0, .5); color: #ffd166; font-size: 12px; font-weight: 800; }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 16px 18px 18px; }
.card-body h3 { margin: 0; font-size: 16px; line-height: 1.4; font-weight: 800; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; transition: color .18s ease; }
.card:hover .card-body h3 { color: var(--accent); }
.card-body .excerpt { margin: 10px 0 0; color: var(--muted); font-size: 13px; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; color: var(--muted); font-size: 12px; }
.card-meta .reads { color: var(--gold); }

/* —— 首页入口 —— */
.intro { padding: 26px 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.intro .eyebrow { color: var(--gold); }
.intro h2 { margin: 0; font-size: 22px; }
.intro p { margin: 12px 0 0; max-width: 820px; color: var(--muted); font-size: 14px; line-height: 1.8; }

/* —— 分类页 —— */
.page-title { padding: 34px 0 6px; }
.page-title h1 { margin: 0; font-size: clamp(28px, 4.5vw, 44px); line-height: 1.2; }
.page-title p { max-width: 720px; color: var(--muted); margin: 12px 0 0; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 14px; padding: 16px; margin: 20px 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.filter-bar label { display: grid; gap: 6px; flex: 1 1 160px; min-width: 150px; color: var(--muted); font-size: 13px; font-weight: 800; }
.filter-bar input, .filter-bar select { min-height: 44px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--bg); outline: 0; }
.filter-bar input:focus, .filter-bar select:focus { border-color: var(--accent); }
.library-meta { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; color: var(--muted); }
.library-meta strong { color: var(--text); font-size: 20px; }
.empty-state { grid-column: 1 / -1; padding: 56px 20px; text-align: center; color: var(--muted); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }

/* —— 详情页 —— */
.article-hero { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.article-cover { position: relative; aspect-ratio: 21 / 9; background: radial-gradient(120% 120% at 15% 0%, var(--tone-a, #ff4d6d), transparent 55%), radial-gradient(120% 120% at 100% 100%, var(--tone-b, #7b2ff7), transparent 55%), #1d2330; }
.article-cover .cover-tag { position: absolute; right: 10px; bottom: -8px; font-size: 140px; font-weight: 900; color: rgba(255, 255, 255, .12); line-height: 1; }
.article-head { padding: 26px 28px 28px; }
.article-head h1 { margin: 0 0 14px; font-size: clamp(24px, 3.4vw, 38px); line-height: 1.3; }
.article-meta { display: flex; flex-wrap: wrap; gap: 10px 20px; color: var(--muted); font-size: 13px; }
.article-meta .cat-badge { position: static; padding: 4px 12px; }
.article-body { padding: 26px 28px 34px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-top: 20px; }
.article-body p { margin: 0 0 18px; font-size: 15px; line-height: 2; color: #d4d9e2; }
.article-body p:last-child { margin-bottom: 0; }
.article-body .lead { color: var(--text); font-size: 16px; font-weight: 700; }

/* —— 底部 —— */
.site-footer { margin-top: 48px; background: var(--primary); border-top: 1px solid var(--line); }
.footer-inner { width: min(var(--maxw), calc(100% - 32px)); margin: 0 auto; padding: 40px 0 24px; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, auto); gap: 20px 44px; }
.footer-grid .about { max-width: 640px; margin: 12px 0 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.footer-col { display: flex; flex-direction: column; gap: 9px; }
.footer-col .col-title { color: var(--text); font-size: 14px; font-weight: 800; margin-bottom: 2px; }
.footer-col a { color: var(--muted); font-size: 13px; }
.footer-col a:hover { color: var(--accent); }
.copyright { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 16px; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }

/* —— 入场动画 —— */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* —— 响应式 —— */
@media (max-width: 900px) {
  .main-nav { display: none; }
  .nav-toggle { display: block; margin-left: auto; }
  .nav-open .main-nav { display: flex; flex-wrap: wrap; position: absolute; top: 64px; left: 0; right: 0; padding: 12px 16px; background: var(--primary); border-bottom: 1px solid var(--line); }
  .nav-open .main-nav a { flex: 1 1 30%; text-align: center; }
  .top-search { display: none; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero { height: 420px; }
}
@media (max-width: 560px) {
  .card-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero { height: 400px; }
  .article-cover { aspect-ratio: 16 / 10; }
}
