/* ============================================================
 * GameDev 导航 — 样式
 * 深色主题 · 橙/青双色 · 响应式
 * ============================================================ */

:root {
  --bg: #0f1115;
  --bg-card: #171b22;
  --bg-card-hover: #1d222b;
  --border: #262d38;
  --text: #e6e9ee;
  --text-dim: #9aa3af;
  --accent: #ff8c42;
  --accent2: #3ecfb2;
  --verified: #3ecfb2;
  --draft: #ffb74d;
  --radius: 12px;
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", -apple-system, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------------- 顶部导航 ---------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 17, 21, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 16px;
}
.logo {
  font-size: 20px;
  font-weight: 800;
  white-space: nowrap;
}
.logo em {
  font-style: normal;
  color: var(--accent);
}
.nav-links {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-dim);
  white-space: nowrap;
  transition: all 0.2s;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: var(--bg-card);
}

/* ---------------- Hero ---------------- */
.hero {
  padding: 64px 0 40px;
  text-align: center;
}
.hero h1 {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: 1px;
}
.hero h1 span { color: var(--accent); }
.hero .slogan {
  margin-top: 12px;
  font-size: 17px;
  color: var(--text-dim);
}
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 28px;
}
.hero-stats .stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-stats .num {
  font-size: 28px;
  font-weight: 800;
  color: var(--accent2);
}
.hero-stats .label {
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 2px;
}

/* ---------------- 栏目网格 ---------------- */
.section-title {
  font-size: 22px;
  font-weight: 700;
  margin: 40px 0 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
/* ---------------- 栏目标签条 ---------------- */
.cat-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 6px;
}
.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 14px 7px 16px;
  font-size: 14px;
  color: var(--text);
  transition: all 0.2s;
  white-space: nowrap;
}
.cat-pill:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
  transform: translateY(-1px);
}
.cat-pill .cnt {
  font-size: 12px;
  color: var(--accent2);
  background: rgba(62, 207, 178, 0.1);
  padding: 1px 8px;
  border-radius: 999px;
}

/* ---------------- 资源卡片 ---------------- */
.res-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.res-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s;
}
.res-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent2);
  box-shadow: var(--shadow);
}
.res-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.res-name {
  font-size: 17px;
  font-weight: 700;
}
.res-name a:hover { color: var(--accent); }
.res-badges { display: flex; gap: 6px; flex-shrink: 0; }
.badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-dim);
  white-space: nowrap;
}
.badge.free { color: var(--verified); border-color: rgba(62, 207, 178, 0.4); }
.badge.freemium { color: var(--accent2); border-color: rgba(62, 207, 178, 0.4); }
.badge.paid { color: var(--accent); border-color: rgba(255, 140, 66, 0.4); }
.badge.verified { color: var(--verified); border-color: rgba(62, 207, 178, 0.5); }
.badge.draft { color: var(--draft); border-color: rgba(255, 183, 77, 0.5); }
.badge.cat {
  color: var(--accent2);
  border-color: rgba(62, 207, 178, 0.35);
  background: rgba(62, 207, 178, 0.08);
}

/* ---------------- 分页器 ---------------- */
.pager {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 28px 0 4px;
  flex-wrap: wrap;
}
.pager button {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-dim);
  min-width: 38px;
  height: 38px;
  padding: 0 14px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13.5px;
  transition: all 0.2s;
}
.pager button:hover:not(:disabled) {
  color: var(--text);
  border-color: var(--accent);
}
.pager button.active {
  background: rgba(255, 140, 66, 0.12);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 700;
}
.pager button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.res-desc {
  font-size: 13.5px;
  color: var(--text-dim);
  line-height: 1.55;
}
.res-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.res-tags .tag {
  font-size: 12px;
  background: rgba(62, 207, 178, 0.08);
  color: var(--accent2);
  padding: 1px 8px;
  border-radius: 6px;
}
.res-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}
.res-stars { color: var(--accent); font-size: 13px; letter-spacing: 1px; }
.btn-go {
  background: rgba(255, 140, 66, 0.12);
  border: 1px solid rgba(255, 140, 66, 0.35);
  color: var(--accent);
  padding: 5px 14px;
  border-radius: 8px;
  font-size: 13px;
  transition: all 0.2s;
}
.btn-go:hover {
  background: var(--accent);
  color: #0f1115;
  font-weight: 700;
}

/* ---------------- 面包屑 ---------------- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 22px 0 0;
  font-size: 13px;
  color: var(--text-dim);
}
.breadcrumb a { color: var(--text-dim); transition: color 0.2s; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .crumb-current { color: var(--accent); }

/* ---------------- 栏目页 ---------------- */
.cat-header {
  padding: 36px 0 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.cat-header .icon { font-size: 36px; }
.cat-header h1 { font-size: 28px; font-weight: 800; }
.cat-header p { color: var(--text-dim); font-size: 14px; margin-top: 4px; }
.cat-filter {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.cat-filter button {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.cat-filter button:hover { color: var(--text); }
.cat-filter button.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(255, 140, 66, 0.1);
}

/* ---------------- 页脚 ---------------- */
.footer {
  margin-top: 60px;
  padding: 28px 0;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 13px;
  text-align: center;
}
.footer a { color: var(--accent2); }

/* ---------------- 说明区块 ---------------- */
.notice {
  margin-top: 40px;
  padding: 16px 20px;
  background: rgba(62, 207, 178, 0.06);
  border: 1px solid rgba(62, 207, 178, 0.25);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text-dim);
}
.notice b { color: var(--accent2); }

/* ---------------- 站内搜索 ---------------- */
.search-box {
  position: relative;
  max-width: 560px;
  margin: 24px auto 0;
}
.search-box input {
  width: 100%;
  padding: 13px 46px 13px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: all 0.2s;
}
.search-box input::placeholder { color: var(--text-dim); }
.search-box input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 140, 66, 0.15);
}
.search-box .search-icon {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 16px;
  pointer-events: none;
}
.search-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}
.search-row .search-box {
  flex: 1;
  min-width: 220px;
  margin: 0;
}
.search-row .cat-filter { margin-bottom: 0; }
.search-result-count {
  font-size: 13px;
  color: var(--text-dim);
  white-space: nowrap;
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 900px) {
  .res-list { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .hero h1 { font-size: 28px; }
  .hero-stats { gap: 24px; }
  .header-inner { flex-direction: column; height: auto; padding: 10px 0; gap: 8px; }
  .nav-links { justify-content: flex-start; width: 100%; }
}
