/* ============================================================
   在线经典游戏平台 · 基础样式（结构与布局）
   所有颜色 / 圆角 / 阴影均来自主题变量，
   由 theme-modern.css 或 theme-retro.css 提供。
   ============================================================ */

:root {
  /* —— 兜底默认值（与 theme-modern 一致，防止主题文件缺失时页面裸奔） —— */
  --bg: #0b0e14;
  --bg-deep: #07090f;
  --panel: #141a24;
  --panel-2: #1a2230;
  --panel-glass: rgba(255, 255, 255, .04);
  --border: rgba(255, 255, 255, .09);
  --border-strong: rgba(255, 255, 255, .18);

  --text: #e9edf4;
  --text-soft: #c4cbd8;
  --muted: #8b93a5;

  --accent: #5b8cff;
  --accent-strong: #7aa5ff;
  --accent-contrast: #ffffff;
  --accent-soft: rgba(91, 140, 255, .12);
  --accent-line: rgba(91, 140, 255, .45);

  /* 平台色 */
  --c-fc: #5b8cff;      --c-fc-soft: rgba(91, 140, 255, .12);      --c-fc-line: rgba(91, 140, 255, .5);
  --c-gba: #4ade80;     --c-gba-soft: rgba(74, 222, 128, .12);     --c-gba-line: rgba(74, 222, 128, .5);
  --c-arcade: #f87171;  --c-arcade-soft: rgba(248, 113, 113, .12); --c-arcade-line: rgba(248, 113, 113, .5);
  --c-web: #fbbf24;     --c-web-soft: rgba(251, 191, 36, .12);     --c-web-line: rgba(251, 191, 36, .5);
  --c-sfc: #a78bfa;     --c-sfc-soft: rgba(167, 139, 250, .12);    --c-sfc-line: rgba(167, 139, 250, .5);

  /* 形状与阴影 */
  --bw: 1px;
  --radius-lg: 16px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, .3);
  --shadow-md: 0 10px 28px rgba(0, 0, 0, .35);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, .45);
  --hover-lift: -4px;
  --hover-shadow: var(--shadow-md);

  /* 字体 */
  --font: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: Consolas, "Courier New", monospace;
}

/* 平台主题色：卡片、详情页等按平台代码取色 */
.p-fc     { --pf: var(--c-fc);     --pf-soft: var(--c-fc-soft);     --pf-line: var(--c-fc-line); }
.p-gba    { --pf: var(--c-gba);    --pf-soft: var(--c-gba-soft);    --pf-line: var(--c-gba-line); }
.p-arcade { --pf: var(--c-arcade); --pf-soft: var(--c-arcade-soft); --pf-line: var(--c-arcade-line); }
.p-web    { --pf: var(--c-web);    --pf-soft: var(--c-web-soft);    --pf-line: var(--c-web-line); }
.p-sfc    { --pf: var(--c-sfc);    --pf-soft: var(--c-sfc-soft);    --pf-line: var(--c-sfc-line); }

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

::selection { background: var(--accent); color: var(--accent-contrast); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 999px;
  border: 2px solid var(--bg-deep);
}
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

/* main 是 body（flex 纵向布局）的子项：显式撑满宽度并推住页脚 */
main.container { flex: 1 0 auto; }

a { color: var(--accent); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--accent-strong); }

h1, h2, h3, h4 { line-height: 1.3; margin-top: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- 顶栏（双排：上排品牌+搜索，下排导航） ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--bg-header, var(--bg));
  border-bottom: var(--bw) solid var(--border);
}

.header-top {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 62px;
  padding-top: 10px;
  padding-bottom: 10px;
  flex-wrap: wrap;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: .5px;
  white-space: nowrap;
  color: var(--text);
}
.logo:hover { color: var(--text); }
.logo-ico { font-size: 24px; }
.logo b { color: var(--accent); font-weight: 800; }

/* 下排导航：贴左分布，激活项用下划线 */
.main-nav { border-top: 1px solid var(--border); }
.main-nav-inner { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.main-nav-inner::-webkit-scrollbar { display: none; }
.main-nav a {
  color: var(--muted);
  padding: 11px 14px 9px;
  font-size: 14px;
  white-space: nowrap;
  position: relative;
  transition: color .15s ease;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--accent);
  opacity: 0;
  transition: opacity .15s ease;
}
.main-nav a:hover { color: var(--text); }
.main-nav a.active { color: var(--accent); font-weight: 700; }
.main-nav a.active::after { opacity: 1; }

.search-form {
  display: flex;
  margin-left: auto;
  flex: 0 1 320px;
  background: var(--panel-glass);
  border: var(--bw) solid var(--border);
  border-radius: var(--radius-sm);
  padding: 3px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.search-form:focus-within { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-form input {
  flex: 1;
  min-width: 0;
  padding: 6px 12px;
  border: 0;
  background: transparent;
  color: var(--text);
  outline: none;
  font-size: 14px;
}
.search-form input::placeholder { color: var(--muted); }
.search-form button {
  border: 0;
  border-radius: calc(var(--radius-sm) - 3px);
  background: var(--accent);
  color: var(--accent-contrast);
  padding: 6px 16px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  transition: background .15s ease;
}
.search-form button:hover { background: var(--accent-strong); }

/* 主题切换按钮（顶部右侧小圆钮） */
.theme-toggle {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  cursor: pointer;
  color: var(--muted);
  background: var(--panel-glass);
  border: var(--bw) solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0;
  transition: color .15s ease, border-color .15s ease, transform .12s ease;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent-line); transform: translateY(-1px); }

/* ---------- Hero（左文右图分栏 + 大字排版） ---------- */
.hero {
  border-bottom: var(--bw) solid var(--border);
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 40px;
  align-items: center;
  padding: 56px 0 48px;
}
.hero-kicker {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--accent);
}
.hero h1 {
  font-size: clamp(34px, 5vw, 58px);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: 1px;
  margin: 0 0 18px;
  color: var(--text);
}
.hero-accent { display: block; color: var(--accent); }
.hero-sub {
  max-width: 560px;
  margin: 0 0 26px;
  color: var(--muted);
  font-size: 15px;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-stats {
  display: flex;
  gap: 0;
  margin: 34px 0 0;
  padding: 0;
}
.hero-stat {
  padding: 0 28px;
  border-left: var(--bw) solid var(--border);
}
.hero-stat:first-child { padding-left: 0; border-left: 0; }
.hero-stat dt {
  font-size: 30px;
  font-weight: 900;
  color: var(--text);
  line-height: 1.2;
}
.hero-stat dd { margin: 2px 0 0; font-size: 12px; color: var(--muted); letter-spacing: 1px; }

/* 右侧悬浮封面拼贴 */
.hero-art {
  position: relative;
  height: 400px;
  min-width: 0;
}
.hero-card {
  position: absolute;
  width: 46%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius);
  border: var(--bw) solid var(--border-strong);
  box-shadow: var(--shadow-lg);
  image-rendering: pixelated;
}
.hero-card-1 { left: 4%; top: 8%; transform: rotate(-6deg); z-index: 3; }
.hero-card-2 { right: 6%; top: 0; transform: rotate(4deg); z-index: 2; }
.hero-card-3 { left: 30%; bottom: 2%; transform: rotate(-2deg); z-index: 1; }

/* ---------- 平台选择（横向行卡） ---------- */
.platform-select { margin: 40px 0; }
.platform-blocks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.platform-block {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--panel);
  border: var(--bw) solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.platform-block::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--pf-soft, var(--accent-soft)), transparent 70%);
  pointer-events: none;
}
.platform-block:hover {
  transform: translateY(var(--hover-lift));
  border-color: var(--pf-line, var(--border-strong));
  box-shadow: var(--hover-shadow);
}
.platform-ico {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  background: var(--pf-soft, var(--accent-soft));
  border: var(--bw) solid var(--pf-line, var(--border));
  border-radius: var(--radius-sm);
}
.platform-text { display: flex; flex-direction: column; min-width: 0; }
.platform-name { font-weight: 800; color: var(--text); font-size: 16px; letter-spacing: 1px; }
.platform-count { font-size: 12px; color: var(--muted); transition: color .15s ease; }
.platform-block:hover .platform-count { color: var(--pf, var(--accent)); }
.platform-arrow {
  margin-left: auto;
  font-size: 24px;
  font-weight: 700;
  color: var(--border-strong);
  transition: color .15s ease, transform .15s ease;
}
.platform-block:hover .platform-arrow { color: var(--pf, var(--accent)); transform: translateX(3px); }

/* ---------- 区块标题 ---------- */
.game-section { margin: 42px 0; }
.game-section h2, .platform-select h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 18px;
}
.game-section h2::before, .platform-select h2::before {
  content: "";
  width: 6px;
  height: 20px;
  border-radius: var(--radius-sm);
  background: var(--accent);
}
.game-section h2::after, .platform-select h2::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ---------- 游戏卡片（竖版海报） ---------- */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(164px, 1fr));
  gap: 16px;
}

.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: var(--bw) solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.game-card:hover {
  transform: translateY(var(--hover-lift));
  border-color: var(--border-strong);
  box-shadow: var(--hover-shadow);
}

.game-cover {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--bg-deep);
}
.game-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  image-rendering: pixelated;
  transition: transform .3s ease;
}
.game-card:hover .game-cover img { transform: scale(1.05); }

/* 封面左上角平台角标 */
.game-cover .badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  background: var(--pf-soft, var(--accent-soft));
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

/* 悬停遮罩：居中播放圆钮 */
.cover-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .45);
  opacity: 0;
  transition: opacity .18s ease;
  z-index: 1;
}
.game-card:hover .cover-play { opacity: 1; }
.cover-play-ico {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-contrast);
  font-size: 20px;
  padding-left: 4px;
  box-shadow: var(--shadow-md);
}

.game-label { display: flex; flex-direction: column; flex: 1; padding: 11px 13px 13px; }
.game-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.game-title a { color: var(--text); }
.game-title a:hover { color: var(--accent); }

.game-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .5px;
  background: var(--pf-soft, var(--accent-soft));
  color: var(--pf, var(--accent));
  border: 1px solid var(--pf-line, var(--accent-line));
}

.play-count { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }

/* ---------- 热门排行（榜单行） ---------- */
.rank-list {
  display: flex;
  flex-direction: column;
  border: var(--bw) solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
  counter-reset: rank;
}
.rank-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  counter-increment: rank;
  transition: background .15s ease;
}
.rank-item:last-child { border-bottom: 0; }
.rank-item:hover { background: var(--panel-glass); }
.rank-num {
  flex: 0 0 46px;
  font-size: 30px;
  font-weight: 900;
  font-style: italic;
  text-align: center;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 2px var(--muted);
  letter-spacing: 1px;
}
.rank-num::before { content: counter(rank); }
.rank-item:nth-child(-n+3) .rank-num { -webkit-text-stroke-color: var(--accent); }
.rank-cover {
  flex: 0 0 auto;
  width: 92px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: var(--bw) solid var(--border);
  image-rendering: pixelated;
}
.rank-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rank-title { font-size: 15px; font-weight: 700; color: var(--text); }
.rank-item:hover .rank-title { color: var(--accent); }
.rank-sub { font-size: 12px; color: var(--muted); }
.rank-go {
  margin-left: auto;
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  transition: color .15s ease, transform .15s ease;
}
.rank-item:hover .rank-go { color: var(--accent); transform: translateX(3px); }

/* ---------- 横向滑动卡片行 ---------- */
.cards-row .game-grid {
  display: flex;
  grid-template-columns: none;
  overflow-x: auto;
  gap: 14px;
  padding-bottom: 10px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}
.cards-row .game-card {
  flex: 0 0 190px;
  scroll-snap-align: start;
}

.section-more { margin: 22px 0 0; text-align: center; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  border: var(--bw) solid var(--border-strong);
  background: var(--panel-2);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .3px;
  cursor: pointer;
  text-align: center;
  transition: transform .12s ease, box-shadow .12s ease, background .15s ease,
    border-color .15s ease, color .15s ease;
}
.btn:hover {
  text-decoration: none;
  background: var(--panel-glass);
  color: var(--text);
  transform: translateY(-1px);
  border-color: var(--accent-line);
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  border-color: transparent;
  color: var(--accent-contrast);
  font-weight: 700;
}
.btn-primary:hover {
  background: var(--accent-strong);
  color: var(--accent-contrast);
  border-color: transparent;
}

.btn-ghost { background: transparent; border-color: var(--border); color: var(--text-soft); }
.btn-ghost:hover { border-color: var(--accent-line); color: var(--accent); background: transparent; }

.btn-danger { background: transparent; border-color: rgba(248, 113, 113, .4); color: #f87171; }
.btn-danger:hover { background: rgba(248, 113, 113, .12); color: #fca5a5; border-color: rgba(248, 113, 113, .6); }

.btn-sm { padding: 4px 12px; font-size: 12px; }
.btn-lg { padding: 12px 28px; font-size: 15px; }
.btn-play { margin-top: auto; width: 100%; }

/* ---------- 面包屑 / 页面头 ---------- */
.breadcrumb { padding: 22px 0 6px; font-size: 13px; color: var(--muted); }
.page-head .breadcrumb { padding-top: 0; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { color: var(--text-soft); }

.page-head { padding: 30px 0 20px; }
.page-head h1 {
  font-size: clamp(22px, 3.4vw, 32px);
  font-weight: 900;
  margin: 0 0 10px;
  color: var(--text);
}
.page-head p { color: var(--muted); margin: 0 0 10px; }
.category-intro { max-width: 820px; }
.platform-nav { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

/* ---------- 详情页 ---------- */
.detail-hero {
  position: relative;
  display: flex;
  gap: 30px;
  align-items: center;
  padding: 30px;
  margin: 14px 0 26px;
  background: var(--panel);
  border: var(--bw) solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(520px 260px at 6% -10%, var(--pf-soft, var(--accent-soft)), transparent 70%);
  pointer-events: none;
}
.detail-cover { position: relative; flex: 0 0 300px; }
.detail-cover img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  border-radius: var(--radius);
  border: var(--bw) solid var(--border);
  image-rendering: pixelated;
}
.detail-info { position: relative; flex: 1; min-width: 0; }
.detail-info h1 { font-size: clamp(22px, 3.2vw, 30px); font-weight: 900; margin: 0 0 10px; }
.detail-desc { color: var(--muted); margin: 0 0 16px; }
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.detail-meta li {
  background: var(--panel-glass);
  border: var(--bw) solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 13px;
  font-size: 13px;
  color: var(--text-soft);
}
.detail-meta li a { color: var(--accent); font-weight: 700; }
.detail-actions { margin-top: 18px; display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- 内容区块 ---------- */
.content-block {
  background: var(--panel);
  border: var(--bw) solid var(--border);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin-bottom: 20px;
}
.content-block h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 800;
}
.content-block h2::before {
  content: "";
  width: 5px;
  height: 17px;
  border-radius: var(--radius-sm);
  background: var(--accent);
}
.content-block p { color: var(--text-soft); }

.controls-list { list-style: none; margin: 0; padding: 0; }
.controls-list li { position: relative; padding-left: 20px; margin-bottom: 8px; color: var(--text-soft); }
.controls-list li::before { content: "›"; position: absolute; left: 6px; color: var(--accent); font-weight: 800; }

.faq-item {
  border: var(--bw) solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 10px;
  background: var(--panel-glass);
  transition: border-color .15s ease;
}
.faq-item:hover { border-color: var(--border-strong); }
.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  color: var(--accent);
  font-weight: 800;
  font-size: 18px;
  line-height: 1;
  transition: transform .2s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { margin: 10px 0 2px; color: var(--muted); }

.seo-note {
  border: var(--bw) solid var(--border);
  border-radius: var(--radius);
  background: var(--panel-glass);
  padding: 20px 26px;
  margin: 34px 0 8px;
}
.seo-note h2 { margin: 0 0 8px; font-size: 16px; color: var(--text); font-weight: 800; }
.seo-note p { color: var(--muted); font-size: 14px; margin: 0; }

/* ---------- 截图 ---------- */
.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}
.shot-item { margin: 0; }
.shot-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  border-radius: var(--radius-sm);
  border: var(--bw) solid var(--border);
  image-rendering: pixelated;
  transition: transform .15s ease, box-shadow .15s ease;
}
.shot-item img:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

/* ---------- 运行页 ---------- */
.play-stage { padding: 20px 0 48px; text-align: center; }
.play-stage h1 {
  font-size: clamp(20px, 2.8vw, 26px);
  font-weight: 900;
  margin: 0 0 20px;
}

/* yikm 式布局：左侧竖排悬浮功能菜单 + 右侧游戏舞台 */
.play-layout {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  max-width: 1240px;
  margin: 0 auto;
  text-align: left;
}
.play-main { flex: 1 1 auto; min-width: 0; }

/* 左侧功能菜单：跟随滚动悬浮在页面左侧 */
.play-rail {
  flex: 0 0 58px;
  position: sticky;
  top: 118px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: calc(100vh - 132px);
  overflow-y: auto;
  scrollbar-width: none;
  overscroll-behavior: contain;
  padding: 2px;
}
.play-rail::-webkit-scrollbar { display: none; }
.playbar-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 7px 6px;
  background: var(--panel);
  border: var(--bw) solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.ejs-wrap {
  position: relative;
  display: block;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  height: 74vh;
  min-height: 540px;
  background: var(--bg-deep);
  border-radius: var(--radius);
  overflow: hidden;
  border: var(--bw) solid var(--border-strong);
  box-shadow: var(--shadow-lg);
}
.play-main .ejs-wrap { max-width: none; }
.ejs-zoom {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.ejs-wrap iframe { width: 100%; height: 100%; border: 0; display: block; position: relative; z-index: 1; }

/* 开始遮罩：快捷键提示 + 开始按钮（对标 yikm 开始页） */
.play-start {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 20px;
  text-align: center;
  background: radial-gradient(560px 300px at 50% 34%, rgba(30, 40, 70, .55), transparent 70%), #04060b;
  transition: opacity .25s ease, visibility .25s ease;
}
.play-start.hide { opacity: 0; visibility: hidden; pointer-events: none; }
.play-start-tips p {
  margin: 0 0 14px;
  font-size: 15px;
  color: #c9d3ea;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex-wrap: wrap;
}
.play-start-tips p:last-child { margin-bottom: 0; }
.play-start kbd {
  display: inline-block;
  min-width: 30px;
  padding: 3px 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: #7fa8ff;
  background: #10162a;
  border: 1px solid #2b3757;
  border-bottom-width: 3px;
  border-radius: 7px;
  line-height: 1.5;
}
.play-start-tips .wheel-ico { font-size: 20px; line-height: 1; }
.play-start-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 56px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--accent-contrast);
  background: var(--accent);
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .55), 0 0 0 7px var(--accent-soft);
  transition: transform .12s ease, filter .12s ease;
}
.play-start-btn:hover:not([disabled]) { transform: scale(1.045); filter: brightness(1.08); }
.play-start-btn:active:not([disabled]) { transform: scale(.97); }
.play-start-btn[disabled] { opacity: .55; cursor: wait; box-shadow: none; }
.play-start-arrow { font-size: 16px; }
.play-start-sub { margin: 0; font-size: 12.5px; color: #7d8aa8; }

.play-help { text-align: left; max-width: 960px; margin: 24px auto 0; }
.play-missing { max-width: 580px; margin: 30px auto; color: var(--muted); }

/* 游戏介绍 / 金手指 / 相关推荐 */
.play-intro, .play-cheats, .play-related { max-width: 960px; margin: 24px auto 0; text-align: left; }
.cheat-code-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.cheat-code-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 16px;
  padding: 10px 14px;
  background: var(--panel-glass);
  border: var(--bw) solid var(--border);
  border-radius: var(--radius-sm);
}
.cheat-code-list strong { color: var(--text); font-size: 14px; }
.cheat-code-list code {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  word-break: break-all;
}

/* ---------- 运行页左侧功能菜单（playbar.js 动态生成，类名勿改） ---------- */
/* #playbar-root 上不能设 position：会覆盖 .play-rail 的 sticky，使 top 变成相对偏移导致左栏下移 */

.playbar-btn {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border: var(--bw) solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
  padding: 0;
  transition: transform .12s ease, border-color .12s ease, color .12s ease, background .12s ease;
}
.playbar-btn:hover { border-color: var(--accent-line); color: var(--accent); transform: translateY(-1px); }
.playbar-btn:active { transform: scale(.94); }
.playbar-btn.active { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.playbar-btn[disabled] { opacity: .38; cursor: not-allowed; }
.playbar-btn[disabled]:hover { transform: none; border-color: var(--border-strong); color: var(--text); }
.playbar-btn svg { width: 20px; height: 20px; display: block; }
.playbar-btn-sm { width: 32px; height: 32px; font-size: 15px; font-weight: 800; }
.playbar-fav.active, .playbar-like.active { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }

.playbar-panel {
  position: fixed;
  top: 118px;
  left: max(96px, calc((100vw - 1240px) / 2 + 96px));
  width: min(440px, 82vw);
  max-height: calc(100vh - 136px);
  display: none;
  flex-direction: column;
  background: var(--panel);
  border: var(--bw) solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  z-index: 80;
  text-align: left;
  overflow: hidden;
}
.playbar-panel.show { display: flex; }
.playbar-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: var(--bw) solid var(--border);
  background: var(--panel-glass);
}
.playbar-panel-head strong { color: var(--accent); font-size: 14px; letter-spacing: .5px; }
.playbar-panel-close {
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
}
.playbar-panel-close:hover { color: var(--accent); background: var(--panel-glass); }
.playbar-panel-body { padding: 14px 16px; overflow: auto; }

/* 面板内小节标题（画面设置 / 按键设置面板） */
.playbar-sec {
  margin: 16px 0 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .5px;
  color: var(--muted);
}
.playbar-panel-body .playbar-sec:first-child { margin-top: 0; }

.playbar-zoom { display: flex; align-items: center; gap: 6px; }
.playbar-zoom-label {
  min-width: 48px;
  text-align: center;
  font-size: 12px;
  color: var(--accent);
  font-weight: 700;
  background: var(--panel-2);
  border: var(--bw) solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 4px 6px;
}

.playbar-save-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 56vh;
  overflow: auto;
  padding-right: 4px;
}
.playbar-slot {
  display: flex;
  gap: 12px;
  background: var(--panel-glass);
  border: var(--bw) solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
  transition: border-color .15s ease;
}
.playbar-slot:hover { border-color: var(--border-strong); }
.playbar-slot.filled { border-color: var(--accent-line); }
.playbar-slot-thumb {
  width: 112px;
  height: 84px;
  flex: 0 0 auto;
  background: var(--bg-deep);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.playbar-slot-thumb img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.playbar-slot-empty { color: var(--muted); font-size: 12px; }
.playbar-slot-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.playbar-slot-title { font-weight: 700; font-size: 14px; color: var(--text); }
.playbar-tag { color: var(--accent); font-style: normal; font-size: 11px; margin-left: 4px; }
.playbar-slot-meta { color: var(--muted); font-size: 12px; }
.playbar-slot-actions { display: flex; gap: 6px; margin-top: auto; flex-wrap: wrap; }

.playbar-cheat-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 56vh;
  overflow: auto;
  padding-right: 4px;
}
.playbar-cheat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--panel-glass);
  border: var(--bw) solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.playbar-cheat:hover { border-color: var(--border-strong); }
.playbar-cheat.on { border-color: var(--accent-line); background: var(--accent-soft); }
.playbar-cheat-info { min-width: 0; }
.playbar-cheat-name { font-size: 13px; font-weight: 700; color: var(--text); word-break: break-all; }
.playbar-cheat-code { font-size: 11px; color: var(--muted); font-family: var(--font-mono); word-break: break-all; }
.playbar-cheat-select {
  max-width: 48%;
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 12px;
}
.playbar-switch { position: relative; width: 42px; height: 24px; flex: 0 0 auto; }
.playbar-switch input { position: absolute; inset: 0; opacity: 0; margin: 0; z-index: 2; cursor: pointer; }
.playbar-switch .track {
  position: absolute;
  inset: 0;
  background: var(--border-strong);
  border-radius: 999px;
  transition: background .18s ease;
}
.playbar-switch .knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 999px;
  transition: transform .18s ease;
  z-index: 1;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .4);
}
.playbar-cheat.on .track { background: var(--accent); }
.playbar-cheat.on .knob { transform: translateX(18px); }

.playbar-filter-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  max-height: 56vh;
  overflow: auto;
  padding-right: 4px;
}
.playbar-opt {
  border: var(--bw) solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel-glass);
  color: var(--text-soft);
  padding: 9px 6px;
  font-size: 12px;
  cursor: pointer;
  text-align: center;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.playbar-opt:hover { border-color: var(--border-strong); color: var(--text); }
.playbar-opt.active { background: var(--accent); border-color: transparent; color: var(--accent-contrast); font-weight: 700; }

.playbar-bg-colors { display: flex; gap: 8px; flex-wrap: wrap; }
.playbar-swatch {
  width: 46px;
  height: 46px;
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 0;
  transition: transform .12s ease;
}
.playbar-swatch:hover { transform: scale(1.06); }
.playbar-swatch.active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.playbar-bg-upload { display: flex; gap: 8px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
#playbar-root #playbar-bg-file { color: var(--muted); font-size: 12px; max-width: 200px; }

.playbar-volume { display: flex; align-items: center; gap: 12px; }
.playbar-volume input[type=range] { flex: 1; accent-color: var(--accent); }
.playbar-volume-val { min-width: 46px; text-align: right; color: var(--accent); font-weight: 700; }

.playbar-empty { color: var(--muted); font-size: 13px; padding: 6px 2px; }
.playbar-hint { color: var(--muted); font-size: 11px; margin: 12px 0 0; line-height: 1.6; }

#playbar-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translate(-50%, -16px);
  z-index: 999;
  background: var(--panel);
  border: var(--bw) solid var(--border-strong);
  color: var(--text);
  padding: 10px 22px;
  font-size: 14px;
  border-radius: 999px;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: transform .18s ease, opacity .18s ease;
  max-width: 82vw;
  text-align: center;
}
#playbar-toast.show { transform: translate(-50%, 0); opacity: 1; }
#playbar-toast.error { background: rgba(248, 113, 113, .15); border-color: rgba(248, 113, 113, .5); color: #fca5a5; }

/* ---- 存档文件导入 / 退出确认弹窗 ---- */
.playbar-import-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.playbar-import-tip { color: var(--muted); font-size: 12px; }
.playbar-confirm-mask { position: fixed; inset: 0; z-index: 1000; background: rgba(0, 0, 0, .66); display: flex; align-items: center; justify-content: center; }
.playbar-confirm { width: min(92vw, 380px); background: var(--panel); border: var(--bw) solid var(--border-strong); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-lg); }
.playbar-confirm-text { margin: 0 0 6px; font-size: 16px; font-weight: 700; color: var(--text); }
.playbar-confirm-sub { margin: 0 0 16px; font-size: 13px; color: var(--muted); line-height: 1.6; }
.playbar-confirm-actions { display: flex; gap: 10px; justify-content: flex-end; }
.playbar-bookmark-steps {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: var(--bw) solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel-glass);
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.75;
}
.playbar-bookmark-steps p { margin: 0; }
.playbar-bookmark-steps p + p { margin-top: 6px; }
.playbar-bookmark-steps kbd {
  display: inline-block;
  padding: 1px 6px;
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 3px;
  background: var(--panel-2);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
}
.playbar-bookmark-url {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}
.playbar-bookmark-url strong { color: var(--text); }

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: var(--bw) solid var(--border);
  margin-top: 52px;
  background: var(--bg-deep);
}
.footer-inner { padding-top: 28px; padding-bottom: 28px; text-align: center; }
.footer-links { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.footer-links span { color: var(--muted); opacity: .5; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--accent); }
.footer-seo { color: var(--muted); font-size: 13px; margin: 12px auto 6px; max-width: 720px; }
.copyright { color: var(--muted); font-size: 12px; margin: 0; opacity: .85; }

/* ---------- 后台 ---------- */
.admin-page { padding: 28px 0 48px; }
.admin-page h1 { font-size: 24px; font-weight: 900; margin: 0 0 14px; }
.admin-page h2 {
  font-size: 18px;
  font-weight: 800;
  margin: 28px 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.admin-page h2::before {
  content: "";
  width: 5px;
  height: 17px;
  border-radius: var(--radius-sm);
  background: var(--accent);
}
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.admin-head h1 { margin: 0; }
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-actions-top { margin-bottom: 18px; }

.admin-box {
  background: var(--panel);
  border: var(--bw) solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 24px 28px;
  margin: 24px 0;
  max-width: 800px;
}
.admin-box h1, .admin-box h2 { margin-top: 0; }
.admin-box:has(> h1) { margin: 60px auto; max-width: 480px; }

.table-wrap {
  overflow-x: auto;
  border: var(--bw) solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
}
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th, .admin-table td { padding: 11px 15px; text-align: left; }
.admin-table th {
  background: var(--panel-glass);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .6px;
  border-bottom: var(--bw) solid var(--border-strong);
  white-space: nowrap;
}
.admin-table td { border-bottom: 1px solid var(--border); color: var(--text-soft); }
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table tbody tr { transition: background .12s ease; }
.admin-table tbody tr:hover { background: var(--panel-glass); }
.admin-table code {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-line);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-family: var(--font-mono);
}
.row-actions { display: flex; gap: 8px; align-items: center; }
.inline-form { display: inline; margin: 0; }

.form-stack { display: flex; flex-direction: column; gap: 16px; max-width: 900px; }
.form-stack label { display: flex; flex-direction: column; gap: 7px; font-size: 13px; color: var(--muted); font-weight: 600; }
.form-stack input,
.form-stack select,
.form-stack textarea {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: var(--bw) solid var(--border-strong);
  background: var(--bg-deep);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.form-stack input:focus,
.form-stack select:focus,
.form-stack textarea:focus { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.form-stack select option { background: var(--panel); color: var(--text); }
.form-stack textarea { resize: vertical; line-height: 1.6; }
.form-stack input[type=file] { padding: 9px 12px; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }

.shot-admin { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.shot-admin-item { width: 170px; }
.shot-admin-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  border-radius: var(--radius-sm);
  border: var(--bw) solid var(--border);
  margin-bottom: 8px;
  image-rendering: pixelated;
}

/* ---------- 统计 ---------- */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin: 18px 0 34px;
}
.stat-card {
  position: relative;
  background: var(--panel);
  border: var(--bw) solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  overflow: hidden;
}
.stat-num { font-size: 34px; font-weight: 900; margin: 0; color: var(--accent); }
.stat-label { color: var(--muted); margin: 6px 0 0; font-size: 13px; }

.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  height: 240px;
  background: var(--panel);
  border: var(--bw) solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px 14px;
  margin-bottom: 30px;
}
.bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  gap: 6px;
  min-width: 0;
}
.bar {
  width: min(36px, 64%);
  min-height: 4px;
  background: var(--accent);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  opacity: .85;
}
.bar-value { font-size: 12px; color: var(--accent); font-weight: 700; }
.bar-label { font-size: 12px; color: var(--muted); white-space: nowrap; }

.mini-bar {
  width: 130px;
  height: 8px;
  background: var(--panel-glass);
  border-radius: 999px;
  overflow: hidden;
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
}
.mini-bar-inner { height: 100%; background: var(--accent); border-radius: 999px; }

/* ---------- 通用 ---------- */
.error { color: #f87171; font-weight: 700; }
.muted { color: var(--muted); font-size: 13px; }

/* ---------- 我的游戏（收藏 / 点赞） ---------- */
.my-games-page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 36px 0 18px;
}
.my-games-heading h1 {
  margin: 4px 0 10px;
  color: var(--text);
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.15;
}
.my-games-intro {
  max-width: 720px;
  margin: 0;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.8;
}
.my-games-tabs {
  display: flex;
  gap: 8px;
  margin: 28px 0 14px;
  border-bottom: 1px solid var(--border);
}
.my-games-tab {
  margin-bottom: -1px;
  padding: 10px 18px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}
.my-games-tab:hover { color: var(--text); }
.my-games-tab.active {
  border-bottom-color: var(--accent);
  color: var(--accent);
}
.my-games-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  margin-left: 4px;
  padding: 0 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel-glass);
  color: var(--text-soft);
  font-size: 11px;
}
.my-games-status {
  min-height: 20px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
}
.my-games-grid { margin-top: 4px; }
.my-games-panel[hidden] { display: none; }
.my-games-remove {
  margin-left: auto;
  padding: 3px 7px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 11px;
  cursor: pointer;
}
.my-games-remove:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.my-games-empty {
  padding: 46px 24px;
  border: 1px dashed var(--border-strong, var(--border));
  background: var(--panel-glass);
  color: var(--text-soft);
  text-align: center;
}
.my-games-empty p { margin: 0 0 10px; }
.my-games-empty .my-games-empty-title {
  margin-bottom: 8px;
  color: var(--text);
  font-size: 20px;
  font-weight: 800;
}
.my-games-empty .btn { margin-top: 12px; }
.my-games-bookmark-card {
  padding: 24px;
  border: var(--bw) solid var(--border);
  background: var(--panel);
}
.my-games-bookmark-card h2 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 20px;
}
.my-games-bookmark-card p {
  margin: 0 0 12px;
  color: var(--text-soft);
  line-height: 1.8;
}
.my-games-bookmark-card ul {
  margin: 0 0 14px;
  padding-left: 22px;
  color: var(--text-soft);
  line-height: 2;
}
.my-games-bookmark-card kbd {
  display: inline-block;
  padding: 1px 6px;
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 3px;
  background: var(--panel-2);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
}

/* ---- 手机 PWA 引导（仅小屏显示） ---- */
.pwa-tip { display: none; }
@media (max-width: 768px) { .pwa-tip { display: block; } }

/* ---------- 动效（尊重系统减弱动效设置） ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 26px; padding: 40px 0 36px; }
  .hero-art { display: none; }
  .detail-hero { flex-direction: column; align-items: stretch; }
  .detail-cover { flex: 1 1 auto; width: 100%; max-width: 440px; margin: 0 auto; }

  /* 运行页：左栏改为画布下方的横向功能菜单，面板改为底部弹层 */
  .play-layout { flex-direction: column; gap: 12px; }
  .play-rail {
    order: 2;
    position: static;
    flex: 0 0 auto;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    width: 100%;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px;
    scrollbar-width: none;
  }
  .playbar-group { flex-direction: row; gap: 6px; padding: 6px; flex: 0 0 auto; }
  .playbar-panel {
    top: auto;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    width: min(480px, 94vw);
    max-height: 66vh;
  }
}
@media (max-width: 760px) {
  .header-top { gap: 10px; }
  .search-form { order: 3; flex: 1 1 100%; }
  .my-games-page { padding-top: 26px; }
  .my-games-tab { padding: 9px 14px; }
  .game-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 13px; }
  .cards-row .game-card { flex-basis: 160px; }
  .hero-stat { padding: 0 16px; }
  .hero-stat dt { font-size: 24px; }
  .rank-item { padding: 10px 14px; gap: 12px; }
  .rank-num { flex-basis: 34px; font-size: 24px; }
  .rank-cover { width: 72px; }
  .rank-go { display: none; }
  .ejs-wrap { height: 62vh; min-height: 360px; }
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .playbar-btn { width: 38px; height: 38px; }
  .playbar-btn svg { width: 18px; height: 18px; }
  .playbar-btn-sm { width: 30px; height: 30px; }
  .play-start-btn { padding: 13px 44px; font-size: 18px; }
  .play-start-tips p { font-size: 13.5px; }
}
@media (max-width: 420px) {
  .game-grid { grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); gap: 12px; }
  .game-title { font-size: 14px; }
}

/* 分页导航 */
.pagination { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 26px 0 6px; }
.pagination-info { font-size: 13.5px; color: var(--text-soft); }
.pagination-disabled { opacity: .45; pointer-events: none; }
