/* ============================================================
 * 九路游传奇导航 - 样式文件
 * 站点：https://help.9luu.com/
 * ============================================================ */

/* ---------- 变量与基础 ---------- */
:root {
  --bg: #f5f6f8;
  --card: #ffffff;
  --text: #1a1b1c;
  --text-2: #6b7280;
  --line: #e5e7eb;
  --hero-bg1: #10151f;
  --hero-bg2: #1c2638;
  --accent: #f46036;
  --accent-dark: #d94e26;
  --accent-soft: rgba(244, 96, 54, 0.10);
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 4px 14px rgba(16, 24, 40, 0.06);
  --font: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Segoe UI", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-style: normal;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; border: 0; }

a { color: var(--accent-dark); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--accent); }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(16, 21, 31, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
  gap: 16px;
}

.logo { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 700; color: #ffffff; }
.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #ff9a5c);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  font-style: normal;
}
.logo span { color: #fff; }
.logo small { display: block; font-size: 10px; font-weight: 400; color: rgba(255,255,255,0.55); line-height: 1.2; font-style: normal; }

.header-nav { display: flex; align-items: center; gap: 6px; }
.header-nav a {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.82);
}
.header-nav a:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.header-nav a.link-main {
  color: #fff;
  background: var(--accent);
  font-weight: 600;
}
.header-nav a.link-main:hover { background: var(--accent-dark); }

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: transparent;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(160deg, var(--hero-bg1) 0%, var(--hero-bg2) 62%, #24334c 100%);
  color: #fff;
  padding: 64px 0 56px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  right: -120px;
  top: -120px;
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(244, 96, 54, 0.22) 0%, transparent 68%);
}
.hero::after {
  content: "";
  position: absolute;
  left: -80px;
  bottom: -140px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(255, 154, 92, 0.14) 0%, transparent 66%);
}

.hero-inner { position: relative; z-index: 1; text-align: center; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.06);
  font-style: normal;
}
.hero-badge b { color: #ffab7d; font-weight: 600; }

.hero h1 {
  margin: 18px 0 10px;
  font-size: 34px;
  font-weight: 800;
  line-height: 1.3;
  font-style: normal;
}
.hero h1 em { color: #ffab7d; font-style: normal; }

.hero p.sub {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.72);
  max-width: 640px;
  margin: 0 auto 26px;
  font-style: normal;
}

.hero-search {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 10px;
  padding: 6px 6px 6px 16px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}
.hero-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  font-size: 15px;
  font-family: var(--font);
  color: var(--text);
  background: transparent;
}
.hero-search button {
  border: 0;
  border-radius: 8px;
  padding: 10px 22px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.2s ease;
}
.hero-search button:hover { background: var(--accent-dark); }

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 28px;
}
.hero-stats .stat {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 8px 20px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.8);
  font-style: normal;
}
.hero-stats .stat b { display: block; font-size: 20px; font-weight: 800; color: #fff; font-style: normal; }
.hero-stats .stat b i { color: #ffab7d; font-style: normal; }

/* ---------- 筛选区 ---------- */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 34px 0 18px;
}
.filter-bar .label { font-size: 13.5px; font-weight: 600; color: var(--text); margin-right: 4px; }
.filter-btn {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text-2);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 13px;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.2s ease;
}
.filter-btn:hover { border-color: var(--accent); color: var(--accent-dark); }
.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}

/* ---------- 文档卡片网格 ---------- */
.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  padding-bottom: 10px;
}

.doc-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px 14px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
}
.doc-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: rgba(244, 96, 54, 0.45);
}

.doc-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.doc-card h3 {
  font-size: 16.5px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  font-style: normal;
}
.doc-card h3 a { color: inherit; }
.doc-card h3 a:hover { color: var(--accent-dark); }

.cat-tag {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 999px;
  font-style: normal;
}
.cat-tag.engine { background: #e8f0fb; color: #2c5aa0; }
.cat-tag.plugin { background: #fdeee8; color: #c24f22; }
.cat-tag.tool { background: #e6f4ec; color: #1f7a52; }

.doc-card .ver { font-size: 12px; color: var(--text-2); margin-top: 2px; font-style: normal; }
.doc-card p.desc {
  font-size: 13px;
  color: var(--text-2);
  margin: 10px 0 12px;
  flex: 1;
  font-style: normal;
}

.doc-card .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.doc-card .tags span {
  font-size: 11px;
  color: var(--text-2);
  background: #f3f4f6;
  border-radius: 6px;
  padding: 2px 8px;
  font-style: normal;
}

.doc-card .enter {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent-dark);
  border: 1.5px solid var(--accent);
  border-radius: 10px;
  padding: 10px 0;
  margin-top: 12px;
  background: #fff;
  transition: all 0.2s ease;
  font-style: normal;
}
.doc-card .enter i { font-style: normal; transition: transform 0.2s ease; }
.doc-card .enter:hover { background: var(--accent); color: #fff; }
.doc-card:hover .enter i { transform: translateX(4px); }

/* 空结果提示 */
.empty-tip {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-2);
  padding: 46px 0;
  font-size: 14px;
  display: none;
}
.empty-tip.show { display: block; }

/* 无 JS 时显示的静态文档列表 */
.noscript-list {
  grid-column: 1 / -1;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.noscript-list h4 { font-size: 14px; font-weight: 600; color: var(--text); margin: 12px 0 8px; font-style: normal; }
.noscript-list h4:first-child { margin-top: 0; }
.noscript-list a {
  display: inline-block;
  margin: 0 8px 8px 0;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-2);
}
.noscript-list a:hover { border-color: var(--accent); color: var(--accent-dark); }

/* ---------- 底部 ---------- */
.site-footer {
  margin-top: 46px;
  background: #10151f;
  color: rgba(255, 255, 255, 0.66);
  padding: 30px 0 26px;
  font-size: 13px;
}
.footer-inner { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: flex-start; }
.footer-brand { max-width: 340px; }
.footer-brand .logo { margin-bottom: 8px; }
.footer-brand p { font-size: 12.5px; color: rgba(255, 255, 255, 0.55); font-style: normal; }
.footer-links h4 { font-size: 13.5px; color: #fff; font-weight: 600; margin-bottom: 10px; font-style: normal; }
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 7px; }
.footer-links a { color: rgba(255, 255, 255, 0.66); font-size: 13px; }
.footer-links a:hover { color: #ffab7d; }
.footer-bottom {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
  font-style: normal;
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .doc-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
}

@media (max-width: 720px) {
  .header-nav {
    position: fixed;
    top: 62px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: #141a26;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 10px 16px;
    gap: 4px;
    display: none;
  }
  .header-nav.open { display: flex; }
  .header-nav a { justify-content: center; padding: 11px 14px; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }

  .hero { padding: 46px 0 42px; }
  .hero h1 { font-size: 26px; }
  .hero p.sub { font-size: 14px; }
  .hero-search { flex-direction: column; padding: 10px; gap: 8px; }
  .hero-search input { width: 100%; padding: 8px 4px; }
  .hero-search button { width: 100%; }

  .footer-inner { flex-direction: column; gap: 18px; }
}

@media (max-width: 480px) {
  .doc-grid { grid-template-columns: 1fr; }
  .hero-stats .stat { flex: 1 1 30%; }
}
