:root {
  --bg: #0f1115;
  --panel: #171a21;
  --panel-2: #1e222c;
  --line: #2a2f3a;
  --text: #e6e9f0;
  --muted: #8b93a5;
  --accent: #4f8cff;
  --accent-2: #7c5cff;
  --green: #2ecc71;
  --radius: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}
a { color: var(--accent); text-decoration: none; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* 顶栏 */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(15,17,21,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; gap: 24px; height: 60px; }
.logo { display: flex; align-items: center; gap: 8px; font-size: 20px; font-weight: 700; color: var(--text); }
.logo-icon { font-size: 24px; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a {
  color: var(--muted); padding: 6px 12px; border-radius: 8px; font-size: 14px;
}
.nav a:hover, .nav a.active { color: var(--text); background: var(--panel-2); }
.search-box input {
  width: 220px; padding: 8px 14px; border-radius: 20px; border: 1px solid var(--line);
  background: var(--panel); color: var(--text); outline: none; font-size: 14px;
}
.search-box input:focus { border-color: var(--accent); }

/* Hero */
.hero { text-align: center; padding: 48px 0 32px; }
.hero h1 {
  font-size: 34px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { color: var(--muted); margin-top: 8px; }
.stats { display: flex; justify-content: center; gap: 48px; margin-top: 24px; }
.stats b { display: block; font-size: 26px; color: var(--accent); }
.stats span { font-size: 13px; color: var(--muted); }

/* 筛选栏 */
.filter-bar { display: flex; align-items: center; justify-content: space-between; margin: 16px 0; flex-wrap: wrap; gap: 12px; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag {
  padding: 5px 14px; border-radius: 16px; border: 1px solid var(--line);
  background: var(--panel); color: var(--muted); cursor: pointer; font-size: 13px;
}
.tag.active, .tag:hover { color: #fff; background: var(--accent); border-color: var(--accent); }
.sort select {
  padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--panel); color: var(--text);
}

/* 资源卡片 */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; padding-bottom: 48px; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; cursor: pointer; transition: transform .15s, border-color .15s;
  display: flex; flex-direction: column; gap: 10px;
}
.card:hover { transform: translateY(-3px); border-color: var(--accent); }
.card-top { display: flex; align-items: center; justify-content: space-between; }
.card-icon { font-size: 32px; }
.badge { font-size: 12px; padding: 2px 10px; border-radius: 12px; background: rgba(79,140,255,.15); color: var(--accent); }
.badge.hot { background: rgba(255,107,107,.15); color: #ff6b6b; }
.badge.new { background: rgba(46,204,113,.15); color: var(--green); }
.card h3 { font-size: 16px; }
.card p { font-size: 13px; color: var(--muted); flex: 1; }
.card-foot { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 60px 0; }

/* 弹窗 */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; }
.modal[hidden] { display: none; }
.modal-mask { position: absolute; inset: 0; background: rgba(0,0,0,.6); }
.modal-card {
  position: relative; width: min(560px, 92vw); max-height: 85vh; overflow-y: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px;
}
.modal-close {
  position: absolute; top: 14px; right: 14px; background: none; border: none;
  color: var(--muted); font-size: 18px; cursor: pointer;
}
.modal-cover {
  width: 72px; height: 72px; border-radius: 16px; display: flex; align-items: center; justify-content: center;
  font-size: 36px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); margin-bottom: 14px;
}
.meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin: 8px 0 14px; }
.desc { color: #c3c9d6; font-size: 14px; margin-bottom: 18px; }
.links { display: flex; flex-direction: column; gap: 10px; }
.link-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px;
}
.link-row .name { font-size: 14px; }
.link-row .pwd { font-size: 12px; color: var(--muted); }
.btn {
  padding: 9px 18px; border-radius: 8px; border: none; cursor: pointer; font-size: 14px;
  background: var(--accent); color: #fff;
}
.btn.ghost { background: none; border: 1px solid var(--line); color: var(--muted); width: 100%; margin-top: 16px; }
.btn.ghost:hover { color: #ff6b6b; border-color: #ff6b6b; }
.report-ok { color: var(--green); font-size: 13px; margin-top: 10px; text-align: center; }

/* 页脚 */
.footer { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 13px; color: var(--muted); }
.footer b { color: #ff9f43; }
.footer .muted { margin-top: 8px; opacity: .7; }

/* ===== 详情页 ===== */
.breadcrumb { font-size: 13px; color: var(--muted); margin: 20px 0; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); }
.detail-hero { display: flex; gap: 20px; align-items: center; margin-bottom: 20px; }
.detail-cover {
  width: 88px; height: 88px; border-radius: 20px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 44px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.detail-hero h1 { font-size: 24px; }
.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; margin-bottom: 18px;
}
.panel-title { font-size: 17px; margin-bottom: 14px; }
.panel-title small { font-size: 12px; color: var(--muted); font-weight: normal; }
.intro { font-size: 14px; color: #c3c9d6; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.gallery .shot {
  width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px;
  cursor: zoom-in; border: 1px solid var(--line); transition: transform .15s;
}
.gallery .shot:hover { transform: scale(1.02); border-color: var(--accent); }
.lightbox {
  position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.88);
  display: flex; align-items: center; justify-content: center; cursor: zoom-out;
}
.lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 8px; }
.lightbox[hidden] { display: none; }
.links { margin-bottom: 4px; }
.report-ok { color: var(--green); font-size: 13px; margin-top: 10px; text-align: center; }
.related { padding: 0; }

@media (max-width: 720px) {
  .nav { display: none; }
  .topbar-inner { justify-content: space-between; }
  .hero h1 { font-size: 26px; }
  .stats { gap: 28px; }
}
