/* ============ 小吴游戏库 · 明亮主题 ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #f6f8fc;
  --card: #ffffff;
  --text: #232936;
  --muted: #7a8299;
  --accent: #0ea87a;
  --accent-soft: rgba(14, 168, 122, 0.12);
  --gold: #e8960c;
  --border: #e5e9f2;
  --radius: 16px;
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

.bg-glow {
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(620px 420px at 88% -8%, rgba(14, 168, 122, 0.10), transparent),
    radial-gradient(520px 380px at -8% 22%, rgba(122, 140, 255, 0.10), transparent),
    radial-gradient(720px 520px at 50% 118%, rgba(255, 170, 80, 0.10), transparent);
}

/* ---------- 头部 ---------- */
.site-header { padding: 52px 20px 10px; text-align: center; }

.logo {
  font-size: clamp(30px, 5vw, 44px);
  letter-spacing: 2px;
  background: linear-gradient(90deg, #0ea87a, #3a8ae0 55%, #f2a51a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tagline { color: var(--muted); margin-top: 6px; font-size: 15px; letter-spacing: 4px; }

.stats {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 10px; margin-top: 22px;
}

.stat-chip {
  background: #ffffff;
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(30, 40, 70, 0.05);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 13.5px;
  color: var(--muted);
}
.stat-chip b { color: var(--text); font-size: 15px; margin-left: 4px; }
.stat-chip.gold b { color: var(--gold); }
.stat-chip.green b { color: var(--accent); }

/* ---------- 工具栏 ---------- */
.container { max-width: 1180px; margin: 0 auto; padding: 28px 20px 60px; }

.toolbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 24px;
}

.filters { display: flex; flex-wrap: wrap; gap: 8px; }

.filter-btn {
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 999px;
  padding: 7px 18px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 6px rgba(30, 40, 70, 0.04);
}
.filter-btn:hover { color: var(--text); border-color: #c9d2e3; }
.filter-btn.active {
  background: var(--accent-soft);
  border-color: rgba(14, 168, 122, 0.55);
  color: var(--accent);
  font-weight: 600;
}

.toolbar-right { display: flex; gap: 10px; flex-wrap: wrap; }

#search {
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 14px;
  outline: none;
  width: 200px;
  transition: border-color 0.2s;
  box-shadow: 0 2px 6px rgba(30, 40, 70, 0.04);
}
#search::placeholder { color: #a6adc0; }
#search:focus { border-color: rgba(14, 168, 122, 0.55); }

#sort {
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 14px;
  outline: none;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(30, 40, 70, 0.04);
}
#sort option { background: #ffffff; }

/* ---------- 卡片网格 ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
  gap: 22px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 16px rgba(30, 40, 70, 0.06);
}
.card:hover {
  transform: translateY(-5px);
  border-color: rgba(14, 168, 122, 0.45);
  box-shadow: 0 16px 36px rgba(30, 40, 70, 0.12), 0 4px 16px rgba(14, 168, 122, 0.08);
}

.cover { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #eef1f7; }
.cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.card:hover .cover img { transform: scale(1.05); }

.cover-badges {
  position: absolute; top: 10px; left: 10px;
  display: flex; gap: 6px; flex-wrap: wrap;
}

.plat {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(6px);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 700;
}
.plat.p-pc { border: 1px solid rgba(47, 127, 214, 0.45); color: #2f7fd6; }
.plat.p-switch { border: 1px solid rgba(230, 74, 95, 0.45); color: #e64a5f; }
.plat.p-ps { border: 1px solid rgba(0, 120, 210, 0.5); color: #0078d2; }

.rating-badge {
  position: absolute; top: 10px; right: 10px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(6px);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--gold);
  box-shadow: 0 2px 8px rgba(30, 40, 70, 0.12);
}

.fav-mark {
  position: absolute; bottom: 8px; right: 10px;
  font-size: 15px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.25));
}

.card-body { padding: 15px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }

.title-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.card-title {
  font-size: 17px; font-weight: 700; line-height: 1.35; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.status-pill {
  flex-shrink: 0;
  font-size: 11px;
  color: var(--muted);
  background: #f1f4f9;
  border: 1px solid var(--border);
  padding: 2px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

.card-sub { font-size: 12px; color: var(--muted); margin-top: -4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.card-meta { font-size: 12.5px; color: var(--accent); opacity: 0.95; font-weight: 600; }

.card-desc {
  font-size: 13.5px; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

.achv-strip { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.chip {
  font-size: 11.5px;
  background: rgba(232, 150, 12, 0.09);
  border: 1px solid rgba(232, 150, 12, 0.28);
  color: #9a6a08;
  padding: 2px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.chip.more { background: #f1f4f9; border-color: var(--border); color: var(--muted); }

.card-foot {
  display: flex; align-items: center; gap: 14px;
  margin-top: auto; padding-top: 10px;
  border-top: 1px dashed var(--border);
  font-size: 12.5px; color: var(--muted);
}
.card-foot b { color: var(--text); font-weight: 600; }

/* ---------- 添加游戏提示卡 ---------- */
.add-card {
  border: 1.5px dashed #cdd5e4;
  background: rgba(255, 255, 255, 0.6);
  cursor: default;
  min-height: 220px;
  box-shadow: none;
}
.add-card:hover { transform: none; background: rgba(255,255,255,0.6); box-shadow: none; border-color: #b8c2d6; }
.add-inner {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px;
  text-align: center; color: var(--muted); padding: 20px;
}
.add-inner .plus { font-size: 34px; opacity: 0.8; }
.add-inner b { color: var(--text); font-size: 15px; }
.add-inner p { font-size: 12.5px; line-height: 1.7; }
.add-inner code { color: var(--accent); background: var(--accent-soft); padding: 1px 6px; border-radius: 6px; }

/* ---------- 空状态 ---------- */
.empty-state {
  grid-column: 1 / -1;
  text-align: center; color: var(--muted);
  padding: 60px 20px; font-size: 15px;
}

/* ---------- 弹窗 ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(35, 42, 60, 0.38);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: fadeIn 0.2s ease;
}
.modal-overlay[hidden] { display: none; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: translateY(18px) scale(0.97); } to { opacity: 1; transform: none; } }

.modal {
  background: #ffffff;
  border-radius: 20px;
  max-width: 640px; width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  position: relative;
  animation: popIn 0.25s ease;
  box-shadow: 0 30px 80px rgba(30, 40, 70, 0.3);
}

.modal-close {
  position: sticky; top: 12px; margin-left: calc(100% - 48px);
  z-index: 2;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font-size: 20px; line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(30, 40, 70, 0.18);
  transition: background 0.2s;
}
.modal-close:hover { background: #ffffff; }

.modal-cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; margin-top: -48px; border-radius: 0; }

.modal-body { padding: 22px 26px 30px; }

.modal-title { font-size: 24px; font-weight: 800; line-height: 1.3; color: var(--text); }
.modal-sub { color: var(--muted); font-size: 13px; margin-top: 2px; }

.modal-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; align-items: center; }

.tag {
  font-size: 12px; color: var(--muted);
  border: 1px solid var(--border);
  background: #f7f9fc;
  padding: 3px 11px; border-radius: 999px;
}

.score-row {
  display: flex; align-items: center; gap: 18px;
  margin: 20px 0; padding: 14px 18px;
  background: rgba(232, 150, 12, 0.07);
  border: 1px solid rgba(232, 150, 12, 0.22);
  border-radius: 14px;
}

.score-big {
  font-size: 40px; font-weight: 800; color: var(--gold);
  line-height: 1; font-variant-numeric: tabular-nums;
}
.score-big small { font-size: 14px; color: var(--muted); font-weight: 400; }

.stars { position: relative; font-size: 19px; color: rgba(35, 41, 54, 0.14); letter-spacing: 2px; line-height: 1; }
.stars .stars-fill {
  position: absolute; top: 0; left: 0;
  overflow: hidden; white-space: nowrap;
  color: var(--gold);
}
.tier { font-size: 12.5px; color: var(--muted); margin-top: 6px; }

.fact-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px; margin-bottom: 20px;
}
.fact {
  background: #f7f9fc;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
}
.fact .k { font-size: 11.5px; color: var(--muted); }
.fact .v { font-size: 14.5px; font-weight: 700; margin-top: 2px; color: var(--text); }

.modal-desc { font-size: 14.5px; color: #4a5265; margin-bottom: 22px; }

.modal-h4 { font-size: 15px; margin-bottom: 12px; color: var(--text); }

.achv-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.achv-list li {
  display: flex; gap: 12px; align-items: flex-start;
  background: #f8fafd;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 14px;
  transition: border-color 0.2s, background 0.2s;
}
.achv-list li:hover { border-color: rgba(232, 150, 12, 0.45); background: #fffdf7; }
.achv-icon {
  flex-shrink: 0; width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px;
  background: rgba(232, 150, 12, 0.1);
  border: 1px solid rgba(232, 150, 12, 0.28);
  border-radius: 10px;
}
.achv-list b { font-size: 14px; color: var(--text); }
.achv-list p { font-size: 12.5px; color: var(--muted); margin-top: 1px; }

/* ---------- 页脚 ---------- */
.site-footer {
  text-align: center; padding: 30px 20px 40px;
  color: var(--muted); font-size: 13px;
}
.site-footer code { color: var(--accent); background: var(--accent-soft); padding: 1px 6px; border-radius: 6px; }

/* ---------- 响应式 ---------- */
@media (max-width: 560px) {
  .site-header { padding-top: 36px; }
  .toolbar { flex-direction: column; align-items: stretch; }
  #search { width: 100%; }
  .toolbar-right { justify-content: space-between; }
  .modal-body { padding: 18px 18px 24px; }
  .fact-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============ 设备展示区域 ============ */
.devices-section {
  margin-top: 48px;
  padding-bottom: 32px;
}

.section-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 20px;
  padding-left: 4px;
}

.devices-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.device-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.device-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(35, 41, 54, 0.10);
}

.device-img-wrap {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #eef1f7;
  display: flex;
  align-items: center;
  justify-content: center;
}

.device-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.device-info {
  padding: 16px 18px 20px;
}

.device-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.device-brand {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 4px;
}

.device-specs {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
}

.device-status {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 10px;
}

.device-desc {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.6;
}
