/* CatBluff 官网下载页（D-060）。版式参照 web.sxkxys.com 的结构（顶栏 / 满屏轮播 / 下载按钮 / 左右交替的玩法段 / 资讯 / 页脚 / 手机底部下载条），
   视觉用 CatBluff 自己的品牌色。CSP 只许本站样式：这里不用 @import、不用外部字体；JS 只改 transform 之类的 CSSOM，不写 style 属性。 */

:root {
  --bg: #06120f;
  --bg-2: #0a1a16;
  --surface: #0f231e;
  --surface-2: #143029;
  --line: rgba(160, 230, 205, 0.14);
  --text: #eaf7f2;
  --muted: #a3bdb4;
  --mint: #3ee6b0;
  --mint-2: #22c995;
  --on-mint: #03231a;
  --gold: #f5c451;
  --on-gold: #2a1d00;
  --radius: 14px;
  --header-h: 64px;
  --wrap: 1200px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "PingFang TC", "Hiragino Sans GB", "Microsoft YaHei", "Microsoft JhengHei", "Segoe UI", Roboto, "Noto Sans CJK SC", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(var(--wrap), 100% - 48px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ── 顶栏 ── */
.header {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h);
  transition: background-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.header.solid, .header.inner { background: rgba(6, 18, 15, 0.86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); }
.header .wrap { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: 0.02em; font-style: italic; }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.nav a, .nav button.lang-btn {
  padding: 8px 14px; border-radius: 999px; font-size: 15px; color: var(--muted); background: none; border: 0; cursor: pointer;
  transition: color 0.2s, background-color 0.2s;
}
.nav a:hover, .nav button.lang-btn:hover, .nav a.on { color: var(--text); }
.nav a.on { color: var(--mint); }
.lang { position: relative; }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 140px; padding: 6px; margin: 0; list-style: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}
.lang-menu button { display: block; width: 100%; text-align: left; padding: 9px 12px; border: 0; background: none; border-radius: 8px; cursor: pointer; color: var(--muted); }
.lang-menu button:hover, .lang-menu button[aria-current="true"] { background: var(--surface-2); color: var(--text); }
.btn-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 20px; border-radius: 999px;
  background: var(--mint); color: var(--on-mint); font-weight: 700; border: 0; cursor: pointer;
  transition: background-color 0.2s, transform 0.15s var(--ease);
}
.btn-cta:hover { background: #63f0c3; }
.btn-cta:active { transform: scale(0.97); }
.menu-btn { display: none; margin-left: auto; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; padding: 10px; }
.menu-btn span { display: block; height: 2px; background: var(--text); margin: 6px 0; border-radius: 2px; transition: transform 0.25s var(--ease), opacity 0.2s; }
.menu-open .menu-btn span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-open .menu-btn span:nth-child(2) { opacity: 0; }
.menu-open .menu-btn span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ── 首屏轮播 ── */
.hero { position: relative; height: min(100svh, 880px); min-height: 560px; overflow: hidden; background: #000; }
.slides { display: flex; height: 100%; transition: transform 0.7s var(--ease); }
.slide { position: relative; flex: 0 0 100%; height: 100%; }
.slide picture, .slide img { width: 100%; height: 100%; object-fit: cover; }
.slide a { position: absolute; inset: 0; }
.slide-cap { position: absolute; inset: 0; display: flex; align-items: center; pointer-events: none; }
.slide-title {
  margin: 0 0 120px; max-width: 9em; font-size: clamp(40px, 5.2vw, 76px); line-height: 1.12; font-weight: 900; font-style: italic; letter-spacing: 0.01em;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.65); text-wrap: balance;
}
.hero::after { content: ""; position: absolute; inset: auto 0 0; height: 45%; background: linear-gradient(to top, var(--bg) 4%, rgba(6, 18, 15, 0)); pointer-events: none; }
.dots { position: absolute; z-index: 3; left: 50%; bottom: 168px; transform: translateX(-50%); display: flex; gap: 10px; }
.dots button { width: 28px; height: 28px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.dots button::before { content: ""; width: 8px; height: 8px; border-radius: 99px; background: rgba(255, 255, 255, 0.45); transition: width 0.3s var(--ease), background-color 0.3s; }
.dots button[aria-current="true"]::before { width: 26px; background: var(--mint); }
.hero-dl { position: absolute; z-index: 3; left: 0; right: 0; bottom: 48px; }
.hero-dl .wrap { display: flex; align-items: flex-end; justify-content: center; gap: 28px; }

/* ── 下载按钮 ── */
.dl-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.dl { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.dl-btn {
  display: inline-flex; align-items: center; gap: 10px; min-width: 176px; height: 56px; padding: 0 22px; border-radius: 16px;
  background: rgba(15, 35, 30, 0.72); border: 1px solid rgba(62, 230, 176, 0.38); color: var(--text); font-weight: 700; font-size: 16px;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, transform 0.15s var(--ease);
}
.dl-btn svg { width: 24px; height: 24px; flex: none; fill: currentColor; }
.dl-btn .sub { display: block; font-size: 12px; font-weight: 500; color: var(--muted); line-height: 1.2; }
.dl-btn .lbl { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.25; }
.dl-btn:hover { background: rgba(62, 230, 176, 0.16); border-color: var(--mint); }
.dl-btn:active { transform: scale(0.97); }
.dl-btn.primary { background: var(--mint); color: var(--on-mint); border-color: var(--mint); }
.dl-btn.primary .sub { color: rgba(3, 35, 26, 0.72); }
.dl-btn.primary:hover { background: #63f0c3; }
.dl-btn.soon { opacity: 0.62; border-style: dashed; }
.dl-note { max-width: 220px; font-size: 12px; color: var(--muted); text-align: center; line-height: 1.4; }
.qr-card { display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; border-radius: 16px; background: rgba(15, 35, 30, 0.72); border: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.qr-card img { width: 84px; height: 84px; border-radius: 8px; background: #fff; padding: 4px; image-rendering: pixelated; }
.qr-card p { margin: 0; font-size: 13px; color: var(--muted); max-width: 96px; line-height: 1.45; }

/* ── 区块通用 ── */
.block { padding: 96px 0; }
.block-head { text-align: center; margin-bottom: 48px; }
.block-head h2 { margin: 0; font-size: clamp(28px, 4vw, 40px); letter-spacing: 0.02em; }
.block-head p { margin: 8px 0 0; color: var(--muted); }

/* ── 玩法介绍：左右交替，超大描边标题 ── */
.feature { position: relative; padding: 88px 0; overflow: hidden; }
.feature::before { content: ""; position: absolute; inset: 0; opacity: 0.9; pointer-events: none; }
.theme-mint::before { background: linear-gradient(120deg, rgba(62, 230, 176, 0.10), transparent 60%); }
.theme-sky::before { background: linear-gradient(120deg, rgba(86, 180, 255, 0.10), transparent 60%); }
.theme-sun::before { background: linear-gradient(120deg, rgba(245, 196, 81, 0.10), transparent 60%); }
.theme-rose::before { background: linear-gradient(120deg, rgba(255, 120, 150, 0.10), transparent 60%); }
.theme-violet::before { background: linear-gradient(120deg, rgba(170, 130, 255, 0.11), transparent 60%); }
.theme-night::before { background: linear-gradient(120deg, rgba(255, 255, 255, 0.04), transparent 60%); }
.feature .wrap { position: relative; display: grid; grid-template-columns: 1fr 1.15fr; align-items: center; gap: 64px; }
.feature.flip .wrap { grid-template-columns: 1.15fr 1fr; }
.feature.flip .feature-text { order: 2; }
.feature-text { position: relative; }
.outline-title {
  margin: 0; font-size: clamp(44px, 7vw, 96px); font-weight: 900; font-style: italic; line-height: 1; letter-spacing: 0.01em;
  color: transparent; -webkit-text-stroke: 1.5px rgba(234, 247, 242, 0.32);
}
.feature h3 { margin: 18px 0 12px; font-size: clamp(22px, 2.6vw, 30px); }
.feature p { margin: 0; color: var(--muted); white-space: pre-line; max-width: 34em; }
.badge { display: inline-block; margin-top: 16px; padding: 4px 12px; border-radius: 999px; background: var(--gold); color: var(--on-gold); font-size: 13px; font-weight: 800; }
.feature-img { border-radius: 22px; overflow: hidden; box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--line); aspect-ratio: 3 / 2; }
.feature-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.feature:hover .feature-img img { transform: scale(1.03); }
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ── 游戏特色截图 ── */
.shots { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 260px); gap: 18px; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x mandatory; }
.shots figure { margin: 0; scroll-snap-align: start; }
.shots img { width: 100%; aspect-ratio: 9 / 19; object-fit: cover; border-radius: 18px; border: 1px solid var(--line); }
.shots figcaption { margin-top: 10px; text-align: center; color: var(--muted); font-size: 14px; }

/* ── 资讯 ── */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.news-card { display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--line); transition: transform 0.25s var(--ease), border-color 0.25s; }
.news-card:hover { transform: translateY(-4px); border-color: rgba(62, 230, 176, 0.4); }
.news-card .cover { aspect-ratio: 16 / 9; background: var(--surface-2); }
.news-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.news-card .body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.news-card time { font-size: 13px; color: var(--mint); font-variant-numeric: tabular-nums; }
.news-card h3 { margin: 0; font-size: 18px; line-height: 1.4; }
.news-card p { margin: 0; color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-card .more { margin-top: auto; padding-top: 6px; font-size: 14px; color: var(--mint); }
.pin { display: inline-block; margin-right: 6px; padding: 0 8px; border-radius: 6px; background: var(--gold); color: var(--on-gold); font-size: 12px; font-weight: 800; vertical-align: 2px; }
.center { text-align: center; margin-top: 40px; }
.btn-ghost { display: inline-flex; align-items: center; min-height: 44px; padding: 0 26px; border-radius: 999px; border: 1px solid var(--line); color: var(--text); transition: border-color 0.2s, color 0.2s; }
.btn-ghost:hover { border-color: var(--mint); color: var(--mint); }

/* ── 内页（资讯列表、文章、单页） ── */
.inner-main { padding: calc(var(--header-h) + 48px) 0 96px; min-height: 70vh; }
.crumb { color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.crumb a:hover { color: var(--mint); }
.article { width: min(780px, 100%); margin-inline: auto; }
.article h1 { margin: 0 0 10px; font-size: clamp(26px, 4vw, 38px); line-height: 1.3; }
.article .meta { color: var(--muted); font-size: 14px; margin-bottom: 28px; }
.article .cover { border-radius: var(--radius); overflow: hidden; margin-bottom: 28px; }
.prose { font-size: 17px; line-height: 1.85; color: #d6e8e1; overflow-wrap: anywhere; }
.prose h2, .prose h3, .prose h4 { color: var(--text); line-height: 1.4; margin: 1.8em 0 0.6em; }
.prose h2 { font-size: 24px; } .prose h3 { font-size: 20px; } .prose h4 { font-size: 18px; }
.prose p, .prose ul, .prose ol, .prose blockquote { margin: 0 0 1.1em; }
.prose a { color: var(--mint); text-decoration: underline; text-underline-offset: 3px; }
.prose img { border-radius: 12px; margin: 1.2em auto; height: auto; }
.prose blockquote { padding: 12px 18px; border-left: 3px solid var(--mint); background: var(--surface); border-radius: 0 10px 10px 0; color: var(--muted); }
.prose code { padding: 2px 6px; border-radius: 6px; background: var(--surface-2); font-size: 0.9em; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.state { text-align: center; color: var(--muted); padding: 80px 0; }

/* ── 页脚 ── */
.footer { border-top: 1px solid var(--line); padding: 48px 0 40px; background: var(--bg-2); }
.footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 14px; color: var(--muted); }
.footer-links a:hover { color: var(--mint); }
.copyright { width: 100%; color: #6f8a81; font-size: 13px; }

/* ── 预览横条（?p=令牌 打开的未发布内容） ── */
.preview-bar { position: fixed; z-index: 100; left: 0; right: 0; top: 0; padding: 4px 16px; background: var(--gold); color: var(--on-gold); font-size: 13px; font-weight: 800; text-align: center; }
.preview-bar ~ .header { top: 28px; }

/* ── 弹窗 ── */
.modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 24px; background: rgba(0, 0, 0, 0.6); }
.modal-box { width: min(380px, 100%); padding: 28px 24px 22px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); text-align: center; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55); }
.modal-box h3 { margin: 0 0 10px; font-size: 19px; }
.modal-box p { margin: 0 0 20px; color: var(--muted); white-space: pre-line; }

/* ── 手机底部下载条 ── */
.dl-bar { display: none; }

@media (max-width: 1180px) {
  .qr-card { display: none; } /* 窄屏电脑 / 平板：四个按钮占满一行，二维码让位 */
  .dl-btn { min-width: 150px; padding: 0 16px; }
}

@media (max-width: 900px) {
  .feature .wrap, .feature.flip .wrap { grid-template-columns: 1fr; gap: 32px; }
  .feature.flip .feature-text { order: 0; }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
  :root { --header-h: 56px; }
  .wrap { width: calc(100% - 32px); }
  .menu-btn { display: block; }
  .header .btn-cta.top-dl { display: none; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 16px;
    background: rgba(6, 18, 15, 0.97); border-bottom: 1px solid var(--line); transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity 0.2s, transform 0.25s var(--ease);
  }
  .menu-open .nav { opacity: 1; transform: none; pointer-events: auto; }
  .menu-open .header { background: rgba(6, 18, 15, 0.97); }
  .nav a, .nav button.lang-btn { padding: 14px 8px; border-radius: 10px; font-size: 16px; text-align: left; width: 100%; }
  .lang-menu { position: static; box-shadow: none; border: 0; background: none; padding: 0 0 0 12px; }
  .hero { height: min(100svh, 760px); min-height: 520px; }
  .dots { bottom: 24px; }
  .hero-dl { display: none; }
  .slide-cap { align-items: flex-end; }
  .slide-title { margin: 0 0 84px; font-size: clamp(30px, 9vw, 44px); }
  .hero::after { height: 18%; }
  .block { padding: 64px 0; }
  .feature { padding: 56px 0; }
  .outline-title { -webkit-text-stroke-width: 1px; }
  .news-grid { grid-template-columns: 1fr; }
  .dl-bar {
    display: flex; gap: 10px; position: fixed; z-index: 60; inset: auto 0 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: rgba(6, 18, 15, 0.94); border-top: 1px solid var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  }
  .dl-bar .dl-btn { flex: 1; min-width: 0; height: 50px; justify-content: center; padding: 0 12px; }
  .dl-bar .dl-btn .sub { display: none; }
  body.has-bar .footer { padding-bottom: calc(40px + 72px + env(safe-area-inset-bottom)); }
  .mobile-dl { padding: 0 0 8px; }
  .mobile-dl .dl-row { flex-direction: column; align-items: stretch; }
  .mobile-dl .dl-btn { width: 100%; justify-content: center; }
  .mobile-dl .dl-note { max-width: none; }
}
@media (min-width: 768px) { .mobile-dl { display: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
