/* ==========================================================================
   MAME 中文网 - www.mamedev.com.cn
   配色源自官方 logo：深海军蓝 #00274f / 亮天蓝 #68cafb
   风格：扁平 · 现代 · 专业
   ========================================================================== */

:root {
  --navy: #00274f;
  --navy-2: #0a3a75;
  --blue: #0a4a8f;
  --sky: #68cafb;
  --sky-soft: #e3f4fe;
  --bg: #f4f8fc;
  --card: #ffffff;
  --text: #1c2b3a;
  --muted: #5b6b7c;
  --line: #dbe7f2;
  --radius: 10px;
  --shadow: 0 2px 8px rgba(0, 39, 79, 0.06);
  --maxw: 1160px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "SF Mono", Consolas, "Courier New", monospace;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--navy); text-decoration: underline; }

img { max-width: 100%; height: auto; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- 顶部导航 ---------- */
.site-header {
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 rgba(104, 202, 251, 0.25);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.5px;
  text-decoration: none;
}
.nav-brand:hover { color: var(--sky); text-decoration: none; }
.nav-brand img { height: 30px; width: auto; }

.nav-menu { display: flex; align-items: center; gap: 4px; list-style: none; }

.nav-menu a {
  color: #cfe3f5;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 15px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.nav-menu a:hover { color: #fff; background: rgba(104, 202, 251, 0.15); text-decoration: none; }
.nav-menu a.active { color: var(--sky); background: rgba(104, 202, 251, 0.12); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle svg { display: block; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-menu {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--navy);
    flex-direction: column;
    align-items: stretch;
    padding: 8px 24px 16px;
    gap: 2px;
  }
  .nav-menu.open { display: flex; }
  .nav-menu a { display: block; padding: 12px 16px; }
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 55%, #0d55a5 100%);
  color: #fff;
  padding: 72px 0 64px;
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero h1 {
  font-size: 40px;
  line-height: 1.25;
  font-weight: 700;
  margin: 18px 0 16px;
}
.hero h1 .grad {
  background: linear-gradient(90deg, #68cafb, #a5e3ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p.lead {
  color: #bcd6ec;
  font-size: 17px;
  max-width: 560px;
  margin-bottom: 28px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(104, 202, 251, 0.14);
  border: 1px solid rgba(104, 202, 251, 0.45);
  color: var(--sky);
  font-size: 13px;
  padding: 5px 14px;
  border-radius: 999px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* Hero 视觉面板：街机 cabinet 抽象图（纯SVG绘制） */
.hero-visual { display: flex; justify-content: center; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 30px;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s, background 0.2s;
  font-family: var(--font);
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(90deg, var(--sky) 0%, #37b1ef 100%);
  color: var(--navy);
  box-shadow: 0 4px 16px rgba(104, 202, 251, 0.35);
}
.btn-primary:hover { color: var(--navy); box-shadow: 0 6px 20px rgba(104, 202, 251, 0.5); }

.btn-outline {
  background: transparent;
  color: #dcedfb;
  border: 1px solid rgba(220, 237, 251, 0.5);
}
.btn-outline:hover { color: #fff; border-color: var(--sky); }

.btn-ghost {
  background: var(--sky-soft);
  color: var(--navy);
  border: 1px solid var(--line);
}
.btn-ghost:hover { background: #d3ecfb; }

.btn-sm { padding: 8px 18px; font-size: 14px; }

/* ---------- 区块通用 ---------- */
.section { padding: 64px 0; }
.section.alt { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-head { text-align: center; max-width: 720px; margin: 0 auto 44px; }
.section-head .kicker {
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.section-head h2 { font-size: 30px; color: var(--navy); margin: 10px 0 12px; font-weight: 700; }
.section-head p { color: var(--muted); font-size: 15.5px; }

/* ---------- 数据条 ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 20px;
  text-align: center;
  box-shadow: var(--shadow);
}
.stat .num {
  font-size: 34px;
  font-weight: 700;
  background: linear-gradient(90deg, var(--navy), #1b8fd6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat .label { color: var(--muted); font-size: 14px; margin-top: 4px; }

/* ---------- 卡片网格 ---------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px;
  box-shadow: var(--shadow);
  transition: border-color 0.2s, transform 0.2s;
}
.card:hover { border-color: var(--sky); transform: translateY(-2px); }

.card .icon {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: var(--sky-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--blue);
}
.card h3 { font-size: 18px; color: var(--navy); margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 14.5px; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; }
table.tbl {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 14.5px;
}
table.tbl th {
  background: var(--navy);
  color: #d9ecfb;
  text-align: left;
  padding: 12px 16px;
  font-weight: 600;
  white-space: nowrap;
}
table.tbl td { padding: 12px 16px; border-top: 1px solid var(--line); color: var(--text); vertical-align: top; }
table.tbl tr:nth-child(even) td { background: #f8fbfe; }
code.k {
  font-family: var(--mono);
  background: var(--sky-soft);
  color: var(--navy);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 13px;
  white-space: nowrap;
}

/* ---------- 时间线 ---------- */
.timeline { position: relative; max-width: 780px; margin: 0 auto; padding-left: 28px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(180deg, var(--sky), var(--navy));
}
.tl-item { position: relative; padding: 0 0 30px 24px; }
.tl-item::before {
  content: "";
  position: absolute;
  left: -28px;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--sky);
  border: 3px solid var(--navy);
}
.tl-item .year { font-weight: 700; color: var(--blue); font-size: 15px; }
.tl-item h3 { color: var(--navy); font-size: 17px; margin: 2px 0 6px; }
.tl-item p { color: var(--muted); font-size: 14.5px; }

/* ---------- FAQ 手风琴 ---------- */
.faq-list { max-width: 860px; margin: 0 auto; }
.faq-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}
.faq-q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: none;
  border: none;
  padding: 18px 22px;
  font-size: 16px;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  text-align: left;
  font-family: var(--font);
}
.faq-q .chev { transition: transform 0.25s; color: var(--blue); flex-shrink: 0; }
.faq-item.open .faq-q .chev { transform: rotate(180deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.faq-a-inner { padding: 0 22px 18px; color: var(--muted); font-size: 15px; }
.faq-a-inner a { color: var(--blue); }

/* ---------- 下载弹窗 ---------- */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 20, 40, 0.62);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.modal-mask.show { display: flex; }

.modal {
  background: #fff;
  border-radius: 14px;
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0, 20, 40, 0.35);
  animation: pop 0.22s ease;
}
@keyframes pop {
  from { transform: scale(0.94); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 26px;
  border-bottom: 1px solid var(--line);
}
.modal-head h3 { color: var(--navy); font-size: 19px; }
.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 6px;
  border-radius: 6px;
  display: flex;
}
.modal-close:hover { background: var(--sky-soft); color: var(--navy); }

.modal-body { padding: 24px 26px 28px; }
.modal-body p.tip { color: var(--muted); font-size: 14px; margin-bottom: 20px; }

.qr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.qr-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 14px;
  text-align: center;
  background: var(--bg);
}
.qr-box img { width: 168px; height: 168px; display: block; margin: 0 auto 12px; background: #fff; padding: 8px; border-radius: 8px; border: 1px solid var(--line); }
.qr-box .qr-name { font-weight: 700; color: var(--navy); font-size: 15px; }
.qr-box .qr-desc { color: var(--muted); font-size: 12.5px; margin-top: 2px; }

.modal-foot {
  margin-top: 20px;
  padding: 14px 18px;
  background: var(--sky-soft);
  border: 1px solid #cbe9fb;
  border-radius: 8px;
  color: var(--navy);
  font-size: 13px;
  line-height: 1.6;
}

@media (max-width: 520px) {
  .qr-grid { grid-template-columns: 1fr; }
  .qr-box img { width: 150px; height: 150px; }
}

/* ---------- 面包屑 ---------- */
.crumbs { padding: 18px 0 0; font-size: 13.5px; color: var(--muted); }
.crumbs a { color: var(--blue); }
.crumbs span.sep { margin: 0 6px; color: #9fb4c6; }

/* ---------- 页面通用标题区 ---------- */
.page-head {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 60%, #0d55a5 100%);
  color: #fff;
  padding: 48px 0 44px;
}
.page-head h1 { font-size: 32px; font-weight: 700; margin: 8px 0 10px; }
.page-head p { color: #bcd6ec; font-size: 15.5px; max-width: 720px; }
.page-head .crumbs { color: #9cc3e2; padding: 0 0 14px; }
.page-head .crumbs a { color: var(--sky); }
.page-head .crumbs span.sep { color: #6d94b8; }

/* ---------- 步骤 ---------- */
.steps { counter-reset: step; display: grid; gap: 18px; }
.step {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow);
}
.step .no {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--sky);
  font-weight: 700;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step h3 { color: var(--navy); font-size: 17px; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 14.5px; }
.step p + p { margin-top: 6px; }

/* ---------- 版本发布块 ---------- */
.release-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 28px;
  align-items: center;
}
.release-ver {
  text-align: center;
  background: linear-gradient(160deg, var(--navy), #0d55a5);
  border-radius: var(--radius);
  color: #fff;
  padding: 20px 26px;
}
.release-ver .v { font-size: 30px; font-weight: 700; color: var(--sky); }
.release-ver .d { font-size: 13px; color: #bcd6ec; margin-top: 2px; }

.release-info h3 { color: var(--navy); font-size: 20px; margin-bottom: 8px; }
.release-info p { color: var(--muted); font-size: 14.5px; }

@media (max-width: 780px) {
  .release-card { grid-template-columns: 1fr; text-align: center; }
}

/* ---------- 提示框 ---------- */
.note {
  border-left: 4px solid var(--sky);
  background: var(--sky-soft);
  padding: 14px 18px;
  border-radius: 0 8px 8px 0;
  color: var(--navy);
  font-size: 14.5px;
  margin: 18px 0;
}
.note.warn { border-left-color: #e8a33d; background: #fdf5e9; color: #7a5320; }

/* ---------- 页脚 ---------- */
.site-footer {
  background: var(--navy);
  color: #9cc3e2;
  padding: 52px 0 0;
  margin-top: 64px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 40px;
}
.footer-grid h4 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 9px; }
.footer-grid a { color: #9cc3e2; font-size: 14px; }
.footer-grid a:hover { color: var(--sky); }
.footer-brand { color: #fff; font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-brand img { height: 26px; }
.footer-desc { font-size: 13.5px; line-height: 1.8; }

.footer-bar {
  border-top: 1px solid rgba(156, 195, 226, 0.18);
  padding: 18px 0;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

@media (max-width: 920px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- CTA 横幅 ---------- */
.cta-band {
  background: linear-gradient(90deg, var(--navy), #0d55a5);
  border-radius: 14px;
  color: #fff;
  padding: 40px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}
.cta-band h2 { font-size: 24px; margin-bottom: 6px; }
.cta-band p { color: #bcd6ec; font-size: 15px; }

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero p.lead { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .hero { padding: 48px 0; }
  .hero h1 { font-size: 28px; }
  .section { padding: 44px 0; }
  .section-head h2 { font-size: 24px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .cta-band { padding: 30px 24px; }
}
