/* ================================================================
   竟分堂 · 小游戏聚合平台
   深色主题 #1A1A2E · 主色 #FF7D29 · 积分/排名 #FFD700
   适配：手机 / PC / 电视大屏
   ================================================================ */

:root {
  /* 品牌与主色 */
  --accent: #ff7d29; /* 高亮元素、按钮 */
  --accent-2: #ffa24d; /* 渐变辅助 */
  --accent-deep: #8c2800; /* 品牌描边 */
  --gold: #ffd700; /* 积分、排名数字 */

  /* 背景与容器 */
  --bg: #1a1a2e;
  --bg-soft: #20203a;
  --panel: rgba(255, 255, 255, 0.045);
  --panel-solid: #20203a;
  --line: rgba(255, 125, 41, 0.16);
  --line-strong: rgba(255, 125, 41, 0.46);

  /* 文本 */
  --text: #f3f3f7;
  --muted: #9b9bb4;

  /* 状态色 */
  --ok: #35e08b;
  --warn: #ffc857;
  --danger: #ff5f6d;

  --radius: 18px;
  --pad: 18px; /* 内容两侧留白 */
  --app-max: 560px; /* 内容最大宽度，.top-nav 通栏对齐依赖它 */
  --nav-x: max(var(--pad), calc(var(--pad) + (100vw - var(--app-max)) / 2)); /* 通栏导航的左右内边距 */
  --thumb-w: 96px;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  --font: 'Source Han Sans SC', 'Source Han Sans CN', 'Noto Sans SC', 'Noto Sans CJK SC', 'PingFang SC',
    'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

/* flex/grid 的 display 会盖掉 [hidden] 的默认 display:none，这里统一兜住 */
[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  overflow-x: hidden;
}

/* 背景光晕：暖橘光 + 品牌底色 */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(760px 460px at 12% -8%, rgba(255, 125, 41, 0.2), transparent 62%),
    radial-gradient(720px 520px at 92% 4%, rgba(255, 162, 77, 0.14), transparent 60%),
    radial-gradient(640px 520px at 50% 108%, rgba(140, 40, 0, 0.3), transparent 62%),
    linear-gradient(180deg, #1a1a2e 0%, #1d1d34 45%, #17172a 100%);
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.32;
  background-image:
    linear-gradient(rgba(255, 125, 41, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 125, 41, 0.06) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 50% 22%, #000 0%, transparent 76%);
}

a {
  color: var(--accent);
  text-decoration: none;
}

.app {
  width: 100%;
  max-width: var(--app-max);
  margin: 0 auto;
  padding: 0 var(--pad) 28px;
}

/* 键盘 / 遥控器焦点：电视浏览器靠方向键 + 回车操作 */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------------------------------------------------------------- 顶栏 */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.brand-mark {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 20px rgba(255, 125, 41, 0.5);
  position: relative;
}

.brand-mark::after {
  content: '';
  position: absolute;
  inset: 8px;
  border-radius: 5px;
  border: 2px solid rgba(26, 26, 46, 0.9);
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* 品牌标题：思源黑体 Bold · #FF7D29 · 1px #8C2800 描边 · 字间距 0.15em */
.brand-name {
  font-family: var(--font);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: 0.15em;
  color: var(--accent);
  -webkit-text-stroke: 1px var(--accent-deep);
  text-shadow: 0 0 18px rgba(255, 125, 41, 0.35);
}

.brand-slogan {
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 12px;
  color: var(--muted);
  max-width: 46vw;
  flex: 0 0 auto;
}

.user-chip b {
  color: var(--text);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 10px var(--ok);
  flex: 0 0 auto;
}

/* ---------------------------------------------------------------- 通用块 */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  padding: 18px;
}

.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 26px 2px 12px;
}

.section-title h2 {
  margin: 0;
  font-size: 16px;
  letter-spacing: 0.04em;
}

.section-title .sub {
  font-size: 12px;
  color: var(--muted);
  text-align: right;
}

/* ---------------------------------------------------------------- 按钮 */
.btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  border-radius: 14px;
  padding: 13px 20px;
  color: #1a1a2e;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 26px rgba(255, 125, 41, 0.3);
  transition: transform 0.12s ease, box-shadow 0.2s ease, filter 0.2s ease;
  flex: 1;
  text-align: center;
}

.btn:hover {
  filter: brightness(1.08);
  box-shadow: 0 14px 30px rgba(255, 125, 41, 0.42);
}

.btn:active {
  transform: scale(0.975);
}

a.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.btn:disabled {
  filter: grayscale(0.6) brightness(0.8);
  cursor: not-allowed;
  box-shadow: none;
}

.btn.ghost {
  background: rgba(255, 125, 41, 0.08);
  color: var(--accent);
  border: 1px solid var(--line-strong);
  box-shadow: none;
}

.btn.block {
  display: block;
  width: 100%;
}

.btn.small {
  padding: 9px 14px;
  font-size: 13px;
  border-radius: 11px;
  flex: 0 0 auto;
}

/* ---------------------------------------------------------------- 表单 */
.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 7px;
  letter-spacing: 0.03em;
}

.field input,
.field select {
  width: 100%;
  padding: 14px 15px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(18, 18, 34, 0.9);
  color: var(--text);
  font: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  appearance: none;
}

.field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) calc(50% + 2px), calc(100% - 15px) calc(50% + 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.field input:focus,
.field select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 125, 41, 0.18);
}

.field .hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

.form-foot {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin-top: 16px;
}

.alert {
  display: none;
  border-radius: 12px;
  padding: 11px 13px;
  font-size: 13px;
  margin-bottom: 14px;
  border: 1px solid transparent;
}

.alert.show {
  display: block;
}

.alert.error {
  color: #ffd0d5;
  background: rgba(255, 95, 109, 0.12);
  border-color: rgba(255, 95, 109, 0.4);
}

.alert.success {
  color: #c8ffe4;
  background: rgba(53, 224, 139, 0.12);
  border-color: rgba(53, 224, 139, 0.38);
}

/* ---------------------------------------------------------------- 游戏卡 */
.game-list {
  display: grid;
  gap: 14px;
}

.game-card {
  position: relative;
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

/* PC / 电视：hover 与焦点（遥控器）共用同一套抬升动效 */
.game-card:hover,
.game-card:focus-within {
  transform: translateY(-6px);
  border-color: var(--line-strong);
  background: rgba(255, 125, 41, 0.06);
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 125, 41, 0.28), 0 0 30px rgba(255, 125, 41, 0.18);
}

.game-card:active {
  transform: scale(0.99);
}

.game-card .thumb {
  position: relative;
  flex: 0 0 var(--thumb-w);
  height: calc(var(--thumb-w) * 0.708);
  border-radius: 13px;
  overflow: hidden;
  background: linear-gradient(135deg, #262646, #3a2118);
  border: 1px solid var(--line);
}

.game-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.32s ease;
}

.game-card:hover .thumb img,
.game-card:focus-within .thumb img {
  transform: scale(1.08);
}

.game-card .thumb.soon::after {
  content: '敬请期待';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--accent-2);
  background: rgba(26, 26, 46, 0.76);
  letter-spacing: 0.08em;
}

.game-card .meta {
  min-width: 0;
  flex: 1;
}

.game-card .meta h3 {
  margin: 0 0 4px;
  font-size: 15px;
}

.game-card .meta p {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.chip {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
}

.chip.on {
  color: var(--accent);
  border-color: var(--line-strong);
  background: rgba(255, 125, 41, 0.1);
}

.game-card .go {
  flex: 0 0 auto;
  font-size: 12px;
  color: var(--accent);
  border: 1px solid var(--line-strong);
  background: rgba(255, 125, 41, 0.1);
  border-radius: 11px;
  padding: 8px 12px;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.game-card .go:hover,
.game-card:focus-within .go {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #1a1a2e;
  box-shadow: 0 8px 22px rgba(255, 125, 41, 0.36);
}

.game-card.disabled {
  opacity: 0.62;
}

.game-card.disabled .go,
.game-card.disabled .go:hover {
  color: var(--muted);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: none;
}

/* -------------------------------------------------------------- 排行榜 */
.board-group {
  display: grid;
  gap: 10px;
}

.board-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 2px 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.04em;
}

.board-group-title::before {
  content: '';
  width: 3px;
  height: 14px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent), var(--gold));
  box-shadow: 0 0 10px rgba(255, 125, 41, 0.6);
}

.rank-list {
  display: grid;
  gap: 10px;
}

.rank-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--panel);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.rank-row:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.42), 0 0 22px rgba(255, 125, 41, 0.14);
}

/* 排名数字：#FFD700 */
.rank-row .no {
  flex: 0 0 34px;
  height: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 15px;
  color: var(--gold);
  background: rgba(255, 215, 0, 0.07);
  border: 1px solid rgba(255, 215, 0, 0.24);
  text-shadow: 0 0 12px rgba(255, 215, 0, 0.4);
}

.rank-row.r1 {
  border-color: rgba(255, 215, 0, 0.42);
  box-shadow: 0 0 0 1px rgba(255, 215, 0, 0.14), var(--shadow);
}

.rank-row.r1 .no {
  background: rgba(255, 215, 0, 0.16);
  border-color: rgba(255, 215, 0, 0.6);
  box-shadow: 0 0 18px rgba(255, 215, 0, 0.3);
}

.rank-row.r2 .no {
  border-color: rgba(226, 236, 255, 0.42);
}

.rank-row.r3 .no {
  border-color: rgba(255, 162, 77, 0.5);
}

.rank-row .no.lv {
  color: var(--accent);
  border-color: var(--line-strong);
  background: rgba(255, 125, 41, 0.12);
  text-shadow: 0 0 12px rgba(255, 125, 41, 0.4);
}

.rank-row .who {
  flex: 1;
  min-width: 0;
}

.rank-row .who b {
  display: block;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-row .who span {
  font-size: 11px;
  color: var(--muted);
}

.rank-row .score {
  text-align: right;
  flex: 0 0 auto;
}

/* 积分数字：#FFD700 */
.rank-row .score b {
  display: block;
  font-size: 17px;
  color: var(--gold);
  text-shadow: 0 0 16px rgba(255, 215, 0, 0.45);
}

.rank-row .score span {
  font-size: 11px;
  color: var(--muted);
}

.empty {
  text-align: center;
  padding: 30px 16px;
  color: var(--muted);
  font-size: 13px;
  border: 1px dashed var(--line);
  border-radius: 16px;
}

/* ---------------------------------------------------------------- 顶部导航 */
/* 通栏吸顶：左右各撑出「视口 – 内容列」的差值，
   padding 再补上同样的差值，保证导航内元素与下方内容列对齐 */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 calc(50% - 50vw) 14px;
  padding: 10px var(--nav-x);
  background: rgba(26, 26, 46, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.top-nav a,
.top-nav button {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
  border-radius: 12px;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.top-nav a:hover,
.top-nav button:hover {
  color: var(--text);
  background: rgba(255, 125, 41, 0.08);
}

.top-nav .ico {
  font-size: 15px;
  line-height: 1;
}

.top-nav .active {
  color: var(--accent);
  border-color: var(--line-strong);
  background: rgba(255, 125, 41, 0.12);
  text-shadow: 0 0 14px rgba(255, 125, 41, 0.5);
}

.site-footer {
  margin-top: 30px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}

.site-footer a {
  color: inherit;
  text-decoration: none;
}

/* ---------------------------------------------------------------- 游玩页 */
/* 整屏玩法：高度跟随动态视口（地址栏收放），并禁止页面滚动，
   避免浏览器导航栏把游戏底部的技能按钮顶出可视区 */
.player-page {
  padding: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

/* 上下分栏：控制条占位在上，游戏画面占满剩余空间，二者互不覆盖。
   底部安全区由 .stage-screen 预留（见下） */
.stage {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  height: 100vh;
  height: 100dvh;
  background: var(--bg);
}

/* 游戏外层容器：居中承载竖屏游戏，空间不足时裁掉留白而不是裁掉游戏内容。
   底部 padding 取「系统安全区」与 80px 的较大值兜底：
   iPhone 的 Home 指示条、微信/夸克等 WKWebView 的底部工具条、
   安卓与红米电视浏览器的常驻导航栏都会占用这几十像素，
   预留之后底部技能按钮才不会被盖住。
   注意 cqh 按内容盒计算，这段 padding 不计入 iframe 可用高度，
   所以底部留白只会挤压画面尺寸、不会裁切游戏顶部 */
.stage-screen {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  container-type: size;
  padding-bottom: 80px;
  /* constant() 与 env() 必须拆成两条声明：Chromium 内核会把二者混写在同一个
     max() 里的整条声明判为非法（实测计算值退化为 0px），导致安全区兜底失效。
     拆开后不支持的浏览器按级联保留上一条合法值，语义不变：
     max(安全区, 80px) */
  padding-bottom: max(constant(safe-area-inset-bottom), 80px);
  padding-bottom: max(env(safe-area-inset-bottom), 80px);
}

.stage-screen iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #05060d;
}

/* 支持 aspect-ratio：按 9:16 竖屏比例呈现，不拉伸游戏画面 */
@supports (aspect-ratio: 9 / 16) {
  .stage-screen iframe {
    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    aspect-ratio: 9 / 16;
  }
}

/* 支持容器查询：按容器宽高取小值，竖屏比例与「不裁切顶部」同时成立 */
@supports (width: 1cqw) {
  .stage-screen iframe {
    width: min(100cqw, calc(100cqh * 9 / 16));
  }
}

/* iPhone 提示：绝对定位在底部预留的安全区里，
   不参与 flex 分配，因此不会占用、也不会挤压游戏画面 */
.stage-hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6;
  margin: 0;
  padding: 0 12px 10px;
  padding-bottom: max(constant(safe-area-inset-bottom), 10px);
  padding-bottom: max(env(safe-area-inset-bottom), 10px);
  text-align: center;
  font-size: 11px;
  line-height: 1.4;
  color: var(--muted);
  pointer-events: none;
}

.stage-top {
  flex: 0 0 auto;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(8px + env(safe-area-inset-top)) 12px 8px;
  background: rgba(26, 26, 46, 0.94);
  border-bottom: 1px solid var(--line);
}

.stage-top .back {
  border: 1px solid var(--line-strong);
  background: rgba(255, 125, 41, 0.08);
  color: var(--accent);
  border-radius: 11px;
  padding: 7px 12px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.stage-top .state {
  flex: 1;
  text-align: right;
  font-size: 11px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stage-top .state b {
  color: var(--ok);
}

.stage-top .state.warn b {
  color: var(--warn);
}

.stage-top .state.bad b {
  color: var(--danger);
}

.overlay {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: none;
  place-items: center;
  padding: 22px;
  background: rgba(26, 26, 46, 0.86);
  backdrop-filter: blur(6px);
}

.overlay.show {
  display: grid;
}

.result {
  width: 100%;
  max-width: 340px;
  text-align: center;
  padding: 22px;
  border-radius: 20px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(160deg, rgba(32, 32, 58, 0.97), rgba(20, 20, 38, 0.97));
  box-shadow: var(--shadow);
}

.result h3 {
  margin: 0 0 4px;
  font-size: 19px;
}

/* 本局积分：#FFD700 */
.result .big {
  font-size: 40px;
  font-weight: 800;
  margin: 8px 0 2px;
  color: var(--gold);
  text-shadow: 0 0 26px rgba(255, 215, 0, 0.45);
}

.result .grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 16px 0;
}

.result .grid div {
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 9px 6px;
  background: rgba(255, 255, 255, 0.03);
}

.result .grid b {
  display: block;
  font-size: 16px;
  color: var(--gold);
}

.result .grid span {
  font-size: 11px;
  color: var(--muted);
}

.result .note {
  font-size: 12px;
  color: var(--muted);
  min-height: 18px;
  margin-bottom: 14px;
}

.result .actions {
  display: flex;
  gap: 10px;
}

.spinner {
  width: 26px;
  height: 26px;
  margin: 0 auto 12px;
  border-radius: 50%;
  border: 3px solid rgba(255, 125, 41, 0.2);
  border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------------------------------------------------------------- toast */
.toast {
  position: fixed;
  top: calc(14px + env(safe-area-inset-top));
  left: 50%;
  transform: translate(-50%, -20px);
  z-index: 60;
  max-width: 86vw;
  padding: 11px 16px;
  border-radius: 13px;
  font-size: 13px;
  color: var(--text);
  background: rgba(32, 32, 58, 0.97);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast.ok {
  border-color: rgba(53, 224, 139, 0.5);
}

.toast.err {
  border-color: rgba(255, 95, 109, 0.55);
}

.skeleton {
  height: 84px;
  border-radius: 16px;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0.04), rgba(255, 125, 41, 0.1), rgba(255, 255, 255, 0.04));
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

.reveal {
  animation: rise 0.4s ease both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ================================================================
   大屏适配：PC（≥900px）与电视浏览器（≥1440px）
   ================================================================ */
@media (min-width: 900px) {
  :root {
    --pad: 28px;
    --app-max: 1080px;
    --thumb-w: 132px;
  }

  body {
    font-size: 16px;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 13px;
  }

  .brand-name {
    font-size: 28px;
  }

  .brand-slogan {
    font-size: 13px;
  }

  .section-title {
    margin: 34px 2px 14px;
  }

  .section-title h2 {
    font-size: 20px;
  }

  .section-title .sub,
  .user-chip {
    font-size: 14px;
  }

  .top-nav a,
  .top-nav button {
    height: 46px;
    font-size: 15px;
  }

  .top-nav .ico {
    font-size: 18px;
  }

  /* 卡片库：宽屏自动分栏 */
  .game-list {
    grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
    gap: 18px;
  }

  .game-card .meta h3 {
    font-size: 18px;
  }

  .game-card .meta p,
  .game-card .go {
    font-size: 13px;
  }

  .game-card .chip {
    font-size: 12px;
  }

  /* 排行榜：每个游戏一组，宽屏并排 */
  .rank-list {
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    align-items: start;
  }

  .rank-row .who b {
    font-size: 15px;
  }

  .rank-row .score b {
    font-size: 19px;
  }

  .board-group-title {
    font-size: 15px;
  }
}

/* 电视 / 超大屏：加大字号与点击（遥控器）热区 */
@media (min-width: 1440px) {
  :root {
    --pad: 48px;
    --app-max: 1400px;
    --thumb-w: 168px;
  }

  body {
    font-size: 18px;
  }

  .brand-name {
    font-size: 34px;
  }

  .brand-slogan {
    font-size: 15px;
    letter-spacing: 0.16em;
  }

  .section-title h2 {
    font-size: 24px;
  }

  .section-title .sub,
  .user-chip {
    font-size: 15px;
  }

  .user-chip {
    padding: 10px 18px;
  }

  .top-nav {
    gap: 14px;
    padding: 14px var(--nav-x);
  }

  .top-nav a,
  .top-nav button {
    height: 58px;
    font-size: 18px;
    border-radius: 14px;
  }

  .game-list {
    grid-template-columns: repeat(auto-fill, minmax(520px, 1fr));
    gap: 22px;
  }

  .game-card {
    padding: 16px;
    gap: 18px;
    border-radius: 22px;
  }

  .game-card .meta h3 {
    font-size: 22px;
  }

  .game-card .meta p {
    font-size: 15px;
    -webkit-line-clamp: 2;
  }

  .game-card .chip {
    font-size: 13px;
    padding: 5px 12px;
  }

  .game-card .go {
    font-size: 16px;
    padding: 12px 20px;
    border-radius: 14px;
  }

  .rank-list {
    grid-template-columns: repeat(auto-fit, minmax(480px, 1fr));
    gap: 14px;
  }

  .rank-row {
    padding: 16px 18px;
    border-radius: 18px;
  }

  .rank-row .no {
    flex-basis: 44px;
    height: 44px;
    font-size: 20px;
    border-radius: 13px;
  }

  .rank-row .who b {
    font-size: 18px;
  }

  .rank-row .who span,
  .rank-row .score span {
    font-size: 13px;
  }

  .rank-row .score b {
    font-size: 26px;
  }

  .stage {
    max-width: none;
  }
}

/* 尊重系统「减少动态效果」设置 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
