/* ==========================================================================
   Rick 的游戏工坊 · 站点样式
   原生 CSS，不依赖任何 CDN：国内加载快，且后台动态生成的内容一定能拿到样式
   ========================================================================== */

:root {
  --ink-900: #080b11;
  --ink-800: #0d121b;
  --ink-700: #131a26;
  --ink-600: #1a2231;
  --line: #243044;
  --line-soft: #1b2534;
  --jade: #4ade80;
  --gold: #e8c15a;
  --text: #cbd5e1;
  --text-dim: #94a3b8;
  --text-mute: #64748b;
  --radius: 16px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 50% -10%, #16233a 0%, var(--ink-900) 55%) no-repeat,
    var(--ink-900);
  background-attachment: scroll;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, p, dl, dd { margin: 0; }
summary { list-style: none; cursor: pointer; }
summary::-webkit-details-marker { display: none; }

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

/* ---------- 顶栏 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  border-bottom: 1px solid rgba(36, 48, 68, .7);
  background: rgba(8, 11, 17, .85);
  backdrop-filter: blur(12px);
}
.site-header .inner {
  max-width: 1120px; margin: 0 auto; padding: 13px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px;
  background: rgba(74, 222, 128, .15); color: var(--jade);
  font-size: 14px; font-weight: 700; box-shadow: inset 0 0 0 1px rgba(74, 222, 128, .3);
}
.brand-name { font-size: 14px; font-weight: 600; letter-spacing: .02em; color: #f1f5f9; }
.site-nav { display: none; gap: 24px; font-size: 14px; color: var(--text-dim); }
.site-nav a { transition: color .2s; }
.site-nav a:hover { color: var(--jade); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 10px; cursor: pointer; font: inherit;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn-primary { background: var(--jade); color: var(--ink-900); font-weight: 600; font-size: 14px; padding: 9px 16px; }
.btn-primary:hover { background: #3ecf70; }
.btn-block { display: flex; width: 100%; padding: 11px 16px; font-size: 14px; margin-top: auto; }
.btn-ghost {
  border: 1px solid var(--line); background: var(--ink-800); color: #cbd5e1;
  font-size: 14px; padding: 9px 16px;
}
.btn-ghost:hover { border-color: rgba(74, 222, 128, .4); color: var(--jade); }
.btn-outline {
  border: 1px solid rgba(74, 222, 128, .38); background: transparent;
  color: var(--jade); font-weight: 500;
}
.btn-outline:hover { background: rgba(74, 222, 128, .12); border-color: rgba(74, 222, 128, .65); }
.btn-flex { flex: 1 1 0; min-width: 0; }
.btn-sm { padding: 10px 12px; font-size: 13px; }

/* 两个下载源并排；只填一个时铺满整行 */
.dl-row { display: flex; gap: 8px; margin-top: auto; }
.dl-row .btn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero-inner { max-width: 1120px; margin: 0 auto; padding: 64px 20px 72px; position: relative; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); background: rgba(19, 26, 38, .6);
  border-radius: 999px; padding: 6px 14px; font-size: 12px; color: var(--text-dim);
  margin-bottom: 22px;
}
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--jade); flex: none; }
.hero h1 {
  font-size: clamp(28px, 5vw, 46px); line-height: 1.22; font-weight: 700;
  letter-spacing: -.01em; color: #f8fafc; max-width: 780px;
}
.hero h1 .accent { color: var(--jade); text-shadow: 0 0 28px rgba(74, 222, 128, .35); display: inline-block; }
.hero p.lead {
  margin-top: 22px; max-width: 640px; font-size: clamp(14px, 1.4vw, 17px);
  line-height: 1.75; color: var(--text-dim);
}
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 38px; max-width: 620px; }
.stat { border: 1px solid var(--line); background: rgba(19, 26, 38, .5); border-radius: 12px; padding: 14px 16px; }
.stat-value { font-size: 24px; font-weight: 700; color: #f1f5f9; line-height: 1.2; }
.stat-value.is-accent { color: var(--jade); }
.stat-unit { font-size: 15px; font-weight: 500; color: var(--text-mute); }
.stat-label { margin-top: 3px; font-size: 12px; color: var(--text-mute); }

/* ---------- 区块 ---------- */
.section { max-width: 1120px; margin: 0 auto; padding: 0 20px 56px; }
.section.pad-top { padding-top: 56px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.section h2 { font-size: clamp(21px, 2.4vw, 28px); font-weight: 700; color: #f1f5f9; }
.section .section-desc { margin-top: 7px; font-size: 14px; color: var(--text-mute); }

/* ---------- 游戏卡 ---------- */
.card-grid { display: grid; gap: 22px; grid-template-columns: 1fr; }
.game-card {
  display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: rgba(19, 26, 38, .6);
  transition: transform .28s cubic-bezier(.2,.8,.2,1), box-shadow .28s, border-color .28s;
}
.game-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 60px -20px rgba(74, 222, 128, .28);
  border-color: #2f4a63;
}
.game-cover { position: relative; aspect-ratio: 1920 / 920; overflow: hidden; background: var(--ink-800); }
.game-cover img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s cubic-bezier(.2,.8,.2,1), opacity .45s;
  opacity: 0;
}
.game-cover img.loaded { opacity: 1; }
.game-cover { background: linear-gradient(110deg, var(--ink-800) 30%, #1a2333 50%, var(--ink-800) 70%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.game-card:hover .game-cover img { transform: scale(1.045); }
.game-cover::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 64px;
  background: linear-gradient(to top, rgba(19, 26, 38, .95), transparent);
}
.badge {
  position: absolute; left: 12px; top: 12px; z-index: 2;
  border-radius: 6px; padding: 3px 8px; font-size: 11px; font-weight: 500;
  background: rgba(8, 11, 17, .82); box-shadow: inset 0 0 0 1px rgba(232, 193, 90, .25);
}
.badge.tone-gold { color: var(--gold); }
.badge.tone-jade { color: var(--jade); box-shadow: inset 0 0 0 1px rgba(74, 222, 128, .25); }
.badge:empty { display: none; }

.game-body { display: flex; flex: 1; flex-direction: column; padding: 20px; }
.game-name { font-size: 17px; font-weight: 700; color: #f1f5f9; }
.game-en { margin-top: 2px; font-size: 12px; color: var(--text-mute); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tag {
  border: 1px solid #26384d; background: #101827; border-radius: 5px;
  padding: 2px 8px; font-size: 11px; color: var(--text-dim);
}
.game-desc {
  margin-top: 12px; min-height: 4.4rem;
  font-size: 14px; line-height: 1.65; color: var(--text-dim);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.meta { margin-top: auto; padding-top: 16px; font-size: 12px; color: var(--text-mute); }
.meta-row { display: flex; justify-content: space-between; gap: 12px; padding: 1.5px 0; }
.meta-row dd { color: var(--text-dim); text-align: right; }

/* ---------- 补丁 / 工具卡 ---------- */
.extra-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
.extra-card {
  display: block; border: 1px solid var(--line); border-radius: 12px;
  background: rgba(19, 26, 38, .4); padding: 20px;
  transition: border-color .2s, background .2s;
}
.extra-card:hover { border-color: rgba(74, 222, 128, .4); background: rgba(19, 26, 38, .7); }
.extra-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.extra-title { font-size: 15px; font-weight: 600; color: #e2e8f0; }
.extra-arrow { flex: none; color: #475569; transition: color .2s; }
.extra-card:hover .extra-arrow { color: var(--jade); }
.extra-desc { margin-top: 8px; font-size: 14px; line-height: 1.65; color: var(--text-mute); }
.extra-note { margin-top: 12px; font-size: 12px; color: #4b5a6e; }
.extra-card .btn, .extra-card .dl-row { margin-top: 14px; }
.extra-card .btn { padding: 8px 14px; font-size: 13px; }

/* ---------- CTA 横条 ---------- */
.cta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px;
  border: 1px solid var(--line); border-radius: 12px;
  background: rgba(19, 26, 38, .3); padding: 20px; margin-top: 24px;
}
.cta h3 { font-size: 15px; font-weight: 600; color: #e2e8f0; }
.cta p { margin-top: 4px; font-size: 14px; color: var(--text-mute); }

/* ---------- FAQ ---------- */
.faq-box { border: 1px solid var(--line); border-radius: var(--radius); background: rgba(19, 26, 38, .4); overflow: hidden; }
.faq-item { border-bottom: 1px solid rgba(36, 48, 68, .7); }
.faq-item:last-child { border-bottom: 0; }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; }
.faq-q { font-weight: 500; color: #e2e8f0; }
.faq-ico { color: var(--text-mute); transition: transform .2s; flex: none; }
.faq-item[open] .faq-ico { transform: rotate(45deg); }
.faq-a { padding: 0 20px 18px; font-size: 14px; line-height: 1.75; color: var(--text-dim); }

/* ---------- 免责 ---------- */
.notice { border: 1px solid rgba(36, 48, 68, .7); border-radius: 12px; background: rgba(13, 18, 27, .6); padding: 20px; }
.notice p { font-size: 12px; line-height: 1.8; color: var(--text-mute); }
.notice strong { color: var(--text-dim); font-weight: 500; }

/* ---------- 页脚 ---------- */
.site-footer { border-top: 1px solid rgba(36, 48, 68, .7); background: rgba(8, 11, 17, .6); }
.site-footer .inner {
  max-width: 1120px; margin: 0 auto; padding: 26px 20px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-size: 12px; color: #4b5a6e; text-align: center;
}

/* ---------- 轻提示 ---------- */
.toast {
  position: fixed; left: 50%; top: 80px; z-index: 100; transform: translateX(-50%);
  border: 1px solid rgba(232, 193, 90, .3); border-radius: 10px;
  background: var(--ink-700); color: var(--gold); padding: 11px 20px; font-size: 14px;
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .8);
}

/* ---------- 空状态 ---------- */
.empty {
  border: 1px dashed var(--line); border-radius: 12px; padding: 28px;
  text-align: center; font-size: 14px; color: var(--text-mute);
}

/* ---------- 响应式 ---------- */
@media (min-width: 640px) {
  .site-nav { display: flex; }
  .site-footer .inner { flex-direction: row; justify-content: space-between; text-align: left; }
  .extra-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .extra-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
