@charset "UTF-8";
/* ==========================================================================
   钢铁裂变 STEEL RIFT · screens.css
   --------------------------------------------------------------------------
   职责：五个全屏界面 —— 标题 / 选人 / 三选一强化 / 暂停 / 结算
   约定：#layer 内绝对铺满，z-index 在 canvas 与 HUD 之上；
        .screen-dim 为半透明遮罩，能透出后面的战斗画面。
   目录：
     01 界面骨架      02 页头页脚      03 标题页        04 选人页
     05 强化页        06 暂停页        07 结算页        08 关键帧
   ========================================================================== */

/* ==========================================================================
   01 界面骨架
   ========================================================================== */
.screen {
  --screen-base: linear-gradient(180deg, rgba(8, 12, 20, 0.965) 0%, rgba(4, 6, 10, 0.985) 100%);
  position: absolute;
  inset: 0;
  z-index: var(--z-screen);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 14px 12px;
  overflow: hidden;
  color: var(--text);
  font-family: var(--font-ui);
  background-color: transparent;
  background-image:
    repeating-linear-gradient(90deg, rgba(36, 49, 73, 0.45) 0 1px, transparent 1px 16px),
    repeating-linear-gradient(0deg, rgba(36, 49, 73, 0.45) 0 1px, transparent 1px 16px),
    radial-gradient(120% 68% at 50% 0%, rgba(94, 242, 255, 0.1), rgba(0, 0, 0, 0) 62%),
    var(--screen-base);
  animation: screen-in 0.2s ease-out backwards;
}

/* 半透明遮罩：暂停 / 强化 / 结算，保留战斗画面在背后 */
.screen-dim {
  --screen-base: linear-gradient(180deg, rgba(6, 10, 17, 0.74) 0%, rgba(3, 5, 9, 0.87) 100%);
}

/* --------------------------------------------------------------------------
   各界面容器的差异化节奏：页面元素越多，纵向间距收得越紧
   （id 显式列出，与 index.html 一一对应）
   -------------------------------------------------------------------------- */
#screen-title {
  gap: 0; /* 标题页靠 margin 排版 */
}

#screen-select {
  gap: 9px;
}

.run-options {
  flex: 0 0 auto;
  border: 1px solid var(--line-hi);
  padding: 7px 9px;
  font-size: 12px;
  background: rgba(10, 25, 36, 0.8);
}
.run-options legend { padding: 0 5px; color: var(--cyan); }
.run-mode-options, .run-duration-options, .run-difficulty-options { display: flex; gap: 6px; }
.run-options label {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 30px;
  cursor: pointer;
  background: #111d2d;
  border: 1px solid var(--line);
}
.run-options label:has(input:checked) { color: var(--cyan); border-color: var(--cyan); }
.run-options input { accent-color: var(--cyan); }
.run-duration-options, .run-difficulty-options { margin-top: 6px; }
#run-mode-hint, #run-difficulty-hint { margin-top: 6px; color: var(--text-dim); font-size: 10px; line-height: 1.5; }
.boss-win { justify-content: center; align-items: center; text-align: center; gap: 18px; }
.boss-win h2 { color: var(--amber); font-size: 30px; text-shadow: 0 0 18px #ffb02066; }
.boss-win-kicker { color: var(--amber); font-size: 13px; }
.boss-win small { color: var(--text-dim); }
.boss-win .btn { width: 240px; }
.is-evolution .screen-head h2 { color: var(--amber); }
.is-evolution .screen-head h2::before { background: var(--amber); }
.is-evolution .screen-head .sub { letter-spacing: 0.02em; }
.is-evolution .upgrade-card { border-left: 4px solid var(--accent); }
#screen-over.is-cleared .screen-head { border-bottom-color: var(--cyan); }
#screen-over.is-cleared .screen-head h2::before { background: var(--cyan); box-shadow: 0 0 6px #5ef2ff66; }
#screen-over.is-cleared #over-sub { color: var(--cyan); }

#screen-upgrade {
  gap: 8px;
}

#screen-pause {
  gap: 9px;
}

#screen-over {
  gap: 6px;
}

/* --------------------------------------------------------------------------
   各页动作按钮：统一尺寸（id 显式列出）
   -------------------------------------------------------------------------- */
#btn-howto,
#btn-mute {
  min-height: 30px;
  letter-spacing: 0.08em; /* 标签较长，比主按钮收紧字距 */
}

#btn-resume,
#btn-pause-mute,
#btn-quit,
#btn-retry,
#btn-over-select,
#btn-over-title,
#btn-howto-close {
  width: 100%;
  min-height: 34px;
}

/* ==========================================================================
   02 页头 / 页脚
   ========================================================================== */
.screen-head {
  flex: 0 0 auto;
  padding: 2px 0 7px;
  border-bottom: 1px solid var(--line);
  animation: rise 0.3s ease-out backwards;
}

.screen-head h2 {
  position: relative;
  padding-left: 11px;
  font-size: var(--fs-xl);
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #eaf6ff;
  text-shadow:
    0 0 10px rgba(94, 242, 255, 0.28),
    0 1px 0 #000;
}

.screen-head h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 2px;
  width: 3px;
  background: var(--cyan);
  box-shadow: 0 0 6px rgba(94, 242, 255, 0.6);
}

.screen-head .sub {
  margin-top: 4px;
  padding-left: 11px;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.screen-foot {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
  padding-top: 7px;
  border-top: 1px solid var(--line);
  animation: rise 0.3s ease-out 0.1s backwards;
}

.screen-foot .btn {
  min-height: 34px;
}

#btn-back-title {
  flex: 0 0 96px;
}

#btn-launch {
  flex: 1 1 auto;
}

/* ==========================================================================
   03 标题页
   ========================================================================== */
#screen-title {
  --screen-base: linear-gradient(180deg, rgba(8, 13, 22, 0.97) 0%, rgba(3, 5, 9, 0.99) 100%);
}

/* 顶部警戒带 */
#screen-title::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1;
  height: 5px;
  opacity: 0.5;
  background: repeating-linear-gradient(
    115deg,
    var(--amber) 0 6px,
    #0b0f16 6px 12px
  );
}

/* 机甲中轴背光 */
#screen-title::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  z-index: -1;
  width: 1px;
  background: linear-gradient(
    180deg,
    rgba(94, 242, 255, 0.5) 0%,
    rgba(94, 242, 255, 0) 34%,
    rgba(94, 242, 255, 0) 64%,
    rgba(94, 242, 255, 0.32) 100%
  );
  opacity: 0.6;
  pointer-events: none;
}

.title-logo {
  flex: 0 0 auto;
  padding-top: 46px;
  text-align: center;
  animation: rise 0.5s ease-out backwards;
}

.title-logo h1 {
  position: relative;
  display: inline-block;
  font-size: 34px;
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: 0.14em;
  color: #eafcff;
  -webkit-text-stroke: 1px var(--cyan);
  text-shadow:
    0 2px 0 #071018,
    0 0 3px rgba(94, 242, 255, 0.7),
    0 0 16px rgba(94, 242, 255, 0.45);
  animation: logo-flicker 6s ease-in-out infinite;
}

/* 故障感：两份文字副本做 RGB 错位切片闪烁 */
.title-logo h1::before,
.title-logo h1::after {
  content: "钢铁裂变";
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  -webkit-text-stroke: 0;
}

.title-logo h1::before {
  color: #ff3b5c;
  animation: glitch-a 5.5s steps(1, end) infinite;
}

.title-logo h1::after {
  color: #5ef2ff;
  animation: glitch-b 5.5s steps(1, end) infinite;
}

.title-en {
  display: inline-block;
  margin-top: 9px;
  padding: 3px 9px;
  border-top: 1px solid rgba(94, 242, 255, 0.35);
  border-bottom: 1px solid rgba(94, 242, 255, 0.35);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.14em;
  color: var(--cyan);
  text-shadow: 0 0 8px rgba(94, 242, 255, 0.5);
  animation: en-shimmer 4.5s ease-in-out infinite;
}

.title-cn {
  margin-top: 8px;
  font-size: var(--fs-sm);
  letter-spacing: 0.22em;
  color: var(--text-dim);
}

/* 最高纪录面板（内容由 JS 填充） */
.title-best,
#title-best {
  --cut: 9px;
  --frame: rgba(58, 76, 109, 0.9);
  --face: linear-gradient(180deg, rgba(19, 28, 46, 0.76) 0%, rgba(8, 12, 20, 0.86) 100%);
  --glow-in: inset 0 0 12px rgba(94, 242, 255, 0.08);
  flex: 0 0 auto;
  margin: 20px 2px 0;
  padding: 8px 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 3px 10px;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  color: var(--text-dim);
  text-align: center;
  animation: rise 0.5s ease-out 0.06s backwards;
}

.title-best:empty,
#title-best:empty {
  display: none;
}

.title-best b,
.title-best strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--amber);
  text-shadow: 0 0 8px rgba(255, 176, 32, 0.45);
}

.title-best em {
  font-style: normal;
  color: var(--cyan);
}

.title-best i {
  font-style: normal;
  color: var(--text);
}

.title-best small {
  font-size: var(--fs-2xs);
  letter-spacing: 0.2em;
  color: var(--line-hi);
}

.title-actions {
  flex: 0 0 auto;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: rise 0.5s ease-out 0.12s backwards;
}

#btn-start {
  width: 100%;
}

.title-sub {
  display: flex;
  gap: 8px;
}

.title-sub .btn {
  flex: 1 1 0;
  min-height: 30px;
  font-size: var(--fs-md);
  letter-spacing: 0.1em;
}

/* 操作说明：浮层手册。可滚动，因此不使用伪元素描边框（描边会跟着内容滚走） */
.howto,
#howto {
  position: absolute;
  inset: 12px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(94, 242, 255, 0.55);
  background: linear-gradient(180deg, rgba(11, 20, 32, 0.97) 0%, rgba(6, 10, 17, 0.98) 100%);
  box-shadow:
    inset 0 0 16px rgba(94, 242, 255, 0.12),
    0 12px 28px rgba(0, 0, 0, 0.7);
  animation: rise 0.26s ease-out backwards;
}

.howto h3 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--cyan);
  text-shadow: 0 0 8px rgba(94, 242, 255, 0.4);
}

.howto ul {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 4px;
}

.howto li {
  position: relative;
  padding-left: 12px;
  font-size: var(--fs-sm);
  line-height: 1.55;
  text-align: left;
  color: var(--text-dim);
}

.howto li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 5px;
  height: 5px;
  background: var(--cyan);
  box-shadow: 0 0 5px rgba(94, 242, 255, 0.6);
}

.howto li b {
  color: var(--cyan);
}

#btn-howto-close {
  margin-top: auto;
  width: 100%;
}

.title-foot {
  flex: 0 0 auto;
  margin-top: 6px;
  padding-top: 7px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: 0.14em;
  text-align: center;
  color: var(--text-dim);
}

/* ==========================================================================
   04 选人页
   ========================================================================== */
.char-grid,
#char-grid {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-content: start;
  padding: 2px 2px 4px;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  scrollbar-width: thin;
  scrollbar-color: var(--line-hi) transparent;
}

.char-grid::-webkit-scrollbar,
.upgrade-list::-webkit-scrollbar,
.howto::-webkit-scrollbar {
  width: 3px;
}

.char-grid::-webkit-scrollbar-track,
.upgrade-list::-webkit-scrollbar-track,
.howto::-webkit-scrollbar-track {
  background: rgba(4, 6, 10, 0.6);
}

.char-grid::-webkit-scrollbar-thumb,
.upgrade-list::-webkit-scrollbar-thumb,
.howto::-webkit-scrollbar-thumb {
  background: var(--line-hi);
}

/* 机体卡（JS 生成 button.char-card） */
.char-card {
  --cut: 10px;
  --frame: var(--line);
  --frame-hi: var(--cyan);
  --face: linear-gradient(180deg, var(--panel-2) 0%, #0a101a 100%);
  --face-hi: linear-gradient(180deg, #1a2740 0%, #0d1626 100%);
  --glow-in: inset 0 0 12px rgba(94, 242, 255, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 9px 8px 8px;
  color: var(--text);
  font-family: var(--font-ui);
  text-align: center;
  transition:
    transform 0.14s ease,
    filter 0.16s ease,
    color 0.14s ease;
  animation: rise 0.3s ease-out backwards;
}

.char-card:nth-child(1) {
  animation-delay: 0.02s;
}

.char-card:nth-child(2) {
  animation-delay: 0.06s;
}

.char-card:nth-child(3) {
  animation-delay: 0.1s;
}

.char-card:nth-child(4) {
  animation-delay: 0.14s;
}

.char-card:nth-child(5) {
  animation-delay: 0.18s;
}

.char-card:nth-child(n + 6) {
  animation-delay: 0.22s;
}

.char-card:hover {
  --frame: var(--frame-hi);
  --face: var(--face-hi);
  transform: translateY(-1px);
  filter: drop-shadow(0 0 6px rgba(94, 242, 255, 0.3));
}

.char-card:active {
  transform: translateY(1px);
}

.char-card:focus-visible {
  outline-offset: 2px;
}

/* 选中态：青色描边 + 辉光 + 微上浮 */
.char-card.is-active {
  --frame: var(--cyan);
  --face: linear-gradient(180deg, #16323f 0%, #0a1822 100%);
  --glow-in: inset 0 0 18px rgba(94, 242, 255, 0.2);
  transform: translateY(-2px);
  color: #eafcff;
  filter: drop-shadow(0 0 8px rgba(94, 242, 255, 0.45));
}

/* 像素机体图：放大后依旧硬边 */
.char-sprite {
  width: 48px;
  height: 48px;
  object-fit: contain;
  image-rendering: pixelated;
  background: radial-gradient(
    62% 62% at 50% 56%,
    rgba(94, 242, 255, 0.14) 0%,
    rgba(0, 0, 0, 0) 72%
  );
  transition: transform 0.16s ease;
}

.char-card:hover .char-sprite,
.char-card.is-active .char-sprite {
  transform: translateY(-1px);
}

.char-name {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.08em;
  color: #e8f4ff;
}

.char-name small {
  display: block;
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.char-role {
  padding: 1px 5px;
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: 0.14em;
  color: var(--cyan);
  background: rgba(94, 242, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(94, 242, 255, 0.35);
}

.char-desc {
  display: -webkit-box;
  width: 100%;
  min-height: 30px;
  overflow: hidden;
  font-size: var(--fs-xs);
  line-height: 1.5;
  text-align: left;
  color: var(--text-dim);
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
}

/* 数值面板：JS 生成 <span>标签<em>数值</em></span> */
.char-stats {
  width: 100%;
  margin-top: auto;
  padding-top: 5px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px 7px;
  border-top: 1px solid rgba(36, 49, 73, 0.8);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: 0.04em;
  text-align: left;
}

.char-stats span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 3px;
  color: var(--text-dim);
}

.char-stats em,
.char-stats b,
.char-stats i,
.char-stats strong {
  font-style: normal;
  font-weight: 700;
  color: var(--cyan);
}

.char-card.is-active .char-stats em,
.char-card.is-active .char-stats b,
.char-card.is-active .char-stats i,
.char-card.is-active .char-stats strong {
  color: #eafcff;
}

/* ==========================================================================
   05 三选一强化页
   ========================================================================== */
.upgrade-list,
#upgrade-list {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 2px;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  scrollbar-width: thin;
  scrollbar-color: var(--line-hi) transparent;
}

.upgrade-card {
  --cut: 10px;
  --frame: var(--line-hi);
  --frame-hi: var(--cyan);
  --face: linear-gradient(180deg, var(--panel) 0%, #0a101a 100%);
  --face-hi: linear-gradient(180deg, #17263c 0%, #0d1626 100%);
  --accent: #8fa3c0;
  --glow-out: rgba(143, 163, 192, 0.35);
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 9px 10px;
  color: var(--text);
  font-family: var(--font-ui);
  text-align: left;
  transition:
    transform 0.14s ease,
    filter 0.16s ease;
  animation: rise 0.3s ease-out backwards;
}

.upgrade-card:nth-child(1) {
  animation-delay: 0.03s;
}

.upgrade-card:nth-child(2) {
  animation-delay: 0.09s;
}

.upgrade-card:nth-child(3) {
  animation-delay: 0.15s;
}

.upgrade-card:nth-child(n + 4) {
  animation-delay: 0.2s;
}

.upgrade-card:hover {
  --frame: var(--accent);
  --face: var(--face-hi);
  transform: translateY(-1px);
  filter: drop-shadow(0 0 6px var(--glow-out));
}

.upgrade-card:active {
  transform: translateY(1px);
}

.upgrade-card:focus-visible {
  outline-offset: 2px;
}

/* 稀有度：普通 / 稀有 / 史诗 —— 描边颜色 + 内发光 + 图标色 */
.upgrade-card.r-common {
  --frame: var(--accent);
  --accent: #a8b5c9;
  --glow-out: rgba(143, 163, 192, 0.35);
}

.upgrade-card.r-rare {
  --frame: var(--accent);
  --accent: #54b9ff;
  --face: linear-gradient(110deg, #132d45 0%, #0b1423 100%);
  --glow-in: inset 0 0 14px rgba(94, 200, 255, 0.16);
  --glow-out: rgba(94, 200, 255, 0.45);
}

.upgrade-card.r-epic {
  --frame: var(--accent);
  --accent: #cc86ff;
  --face: linear-gradient(110deg, #2c1d43 0%, #151125 100%);
  --glow-in: inset 0 0 16px rgba(180, 85, 255, 0.2);
  --glow-out: var(--glow-out-violet);
}

.upgrade-card.r-legendary {
  --frame: var(--accent);
  --accent: #ffc857;
  --face: linear-gradient(110deg, #3a2b12 0%, #1c1710 100%);
  --glow-in: inset 0 0 16px #ffc85726;
  --glow-out: #ffc85766;
}
.upgrade-card { border-left: 4px solid var(--accent); }
.upgrade-card .up-name { color: var(--accent); }
.up-title-box { flex: 1; min-width: 0; }
.rarity-badge {
  flex: 0 0 auto;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 3px 5px;
  font-size: 10px;
  font-weight: 700;
}
.rarity-legend { display: flex; justify-content: flex-end; gap: 13px; font-size: 10px; }
.rarity-legend span::before { content: '◆ '; }
.rarity-legend .r-common { color: #a8b5c9; }
.rarity-legend .r-rare { color: #54b9ff; }
.rarity-legend .r-epic { color: #cc86ff; }
.rarity-legend .r-legendary { color: #ffc857; }
.upgrade-tools { display: flex; gap: 8px; }
.upgrade-tools .btn { flex: 1; font-size: 11px; min-height: 32px; }
.pause-tabs { display: flex; flex: 0 0 auto; gap: 8px; }
.pause-tabs button {
  flex: 1; min-height: 32px;
  border: 1px solid var(--line-hi);
  background: #101a29; color: var(--text-dim); font-size: 12px;
  cursor: pointer;
}
.pause-tabs button[aria-selected='true'] { border-color: var(--cyan); color: var(--cyan); background: #122b36; }
.pause-body { display: flex; flex: 1; min-height: 0; }
.pause-body > * { flex: 1; min-width: 0; }
.build-list {
  min-height: 0; overflow-y: auto; touch-action: pan-y; overscroll-behavior: contain;
  border: 1px solid var(--line-hi); padding: 8px;
  background: #080e18e8; scrollbar-width: thin;
}
.build-section { margin-bottom: 12px; }
.build-section:last-child { margin-bottom: 0; }
.build-section h3 { color: #eaf6ff; font-size: 12px; padding: 3px 0 6px; }
.build-entry { border-left: 3px solid var(--accent); background: #121c2b; padding: 8px; margin-bottom: 6px; }
.build-entry-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.build-entry-head b { color: var(--accent); font-size: 12px; }
.build-entry-head span { color: #dae5f4; font-size: 11px; white-space: nowrap; }
.build-entry p, .build-empty { color: #a4b4cc; font-size: 10px; line-height: 1.6; margin-top: 4px; }

.up-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 图标：方块套方块 + 一道斜线，纯 CSS 几何图形 */
.up-icon {
  position: relative;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(0, 0, 0, 0) 100%);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.up-icon::before {
  content: "";
  position: absolute;
  inset: 5px;
  background: var(--accent);
  box-shadow: 0 0 7px var(--accent);
}

.up-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.45;
  background: linear-gradient(
    45deg,
    rgba(0, 0, 0, 0) calc(50% - 1px),
    var(--accent) 50%,
    rgba(0, 0, 0, 0) calc(50% + 1px)
  );
}

.up-name {
  font-size: var(--fs-lg);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #eafcff;
}

.up-tag {
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

.up-desc {
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: var(--text-dim);
}

.up-desc b,
.up-desc em,
.up-desc strong {
  font-style: normal;
  font-weight: 700;
  color: var(--accent);
}

.upgrade-hint {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding-top: 7px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.18em;
  color: var(--text-dim);
}

/* 闪烁光标，硬切换 */
.upgrade-hint::after {
  content: "";
  width: 5px;
  height: 10px;
  background: var(--cyan);
  box-shadow: 0 0 5px rgba(94, 242, 255, 0.6);
  animation: caret-blink 1.1s steps(2, end) infinite;
}

/* ==========================================================================
   06 暂停页 + 07 结算页（共用数值面板结构）
   --------------------------------------------------------------------------
   面板固定高度、不滚动：帧线由伪元素绘制，若容器滚动会让描边跟着内容跑掉。
   行数由 JS 决定，超过面板高度会被裁切（正常局内 6~8 行，留有余量）。
   ========================================================================== */
.pause-stats,
.over-stats,
#pause-stats,
#over-stats {
  --cut: 10px;
  --frame: rgba(58, 76, 109, 0.85);
  --face: linear-gradient(180deg, rgba(19, 28, 46, 0.74) 0%, rgba(8, 12, 20, 0.84) 100%);
  --glow-in: inset 0 0 12px rgba(94, 242, 255, 0.08);
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 6px 9px;
  overflow: hidden;
  animation: rise 0.3s ease-out 0.06s backwards;
}

/* JS 生成 <div><span>标签</span><b>数值</b></div> */
.pause-stats > div,
.over-stats > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 2px;
  border-bottom: 1px solid rgba(36, 49, 73, 0.55);
}

.pause-stats > div:nth-child(odd),
.over-stats > div:nth-child(odd) {
  background: linear-gradient(90deg, rgba(94, 242, 255, 0.04) 0%, rgba(0, 0, 0, 0) 70%);
}

.pause-stats > div:last-child,
.over-stats > div:last-child {
  border-bottom: 0;
}

.pause-stats span,
.over-stats span {
  font-size: var(--fs-sm);
  letter-spacing: 0.1em;
  color: var(--text-dim);
}

.pause-stats b,
.over-stats b {
  font-family: var(--font-mono);
  font-size: var(--fs-lg);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #eafcff;
}

.pause-stats em,
.over-stats em,
.pause-stats i,
.over-stats i {
  font-style: normal;
  color: var(--cyan);
}

.pause-actions,
.over-actions {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  animation: rise 0.3s ease-out 0.12s backwards;
}

.pause-actions .btn,
.over-actions .btn {
  width: 100%;
}

/* ==========================================================================
   07 结算页
   ========================================================================== */
#screen-over .screen-head {
  border-bottom-color: rgba(255, 59, 92, 0.45);
}

#screen-over .screen-head h2::before {
  background: var(--red);
  box-shadow: 0 0 6px rgba(255, 59, 92, 0.6);
}

#over-title {
  letter-spacing: 0.2em;
  color: #f2f7ff;
}

#over-sub {
  color: rgba(255, 59, 92, 0.78);
}

/* 大字母评级：实心琥珀 + 硬挤出阴影 + 光环 + 两侧卡爪 */
.over-rank,
#over-rank {
  position: relative;
  flex: 0 0 auto;
  padding: 0 0 4px;
  font-family: var(--font-mono);
  font-size: 76px;
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: 0.06em;
  text-align: center;
  color: var(--amber);
  -webkit-text-stroke: 1px #ffe6b0;
  text-shadow:
    0 4px 0 #1a0f00,
    0 5px 0 rgba(255, 176, 32, 0.35),
    0 0 20px rgba(255, 176, 32, 0.45);
  animation: rank-pulse 2.6s ease-in-out infinite;
}

.over-rank::before,
.over-rank::after {
  content: "";
  position: absolute;
  top: 12px;
  bottom: 16px;
  width: 11px;
  border: 1px solid rgba(255, 176, 32, 0.55);
}

.over-rank::before {
  left: 26px;
  border-right: 0;
}

.over-rank::after {
  right: 26px;
  border-left: 0;
}

/* 新纪录：硬闪烁 */
.over-newbest,
#over-newbest {
  flex: 0 0 auto;
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: var(--fs-md);
  font-weight: 700;
  letter-spacing: 0.28em;
  text-align: center;
  color: var(--amber);
  text-shadow: 0 0 10px var(--glow-out-amber);
  animation: best-flash 1.15s steps(1, end) infinite;
}

/* ==========================================================================
   08 关键帧
   ========================================================================== */
/* 界面整体淡入 */
@keyframes screen-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* 标题霓虹轻微呼吸 */
@keyframes logo-flicker {
  0%,
  100% {
    text-shadow:
      0 2px 0 #071018,
      0 0 3px rgba(94, 242, 255, 0.7),
      0 0 16px rgba(94, 242, 255, 0.45);
  }
  48% {
    text-shadow:
      0 2px 0 #071018,
      0 0 3px rgba(94, 242, 255, 0.55),
      0 0 12px rgba(94, 242, 255, 0.32);
  }
}

/* 故障切片：红青两色错位，绝大多数时间静止，偶尔抖一下 */
@keyframes glitch-a {
  0%,
  86%,
  100% {
    opacity: 0;
  }
  87% {
    opacity: 0.85;
    transform: translate(-3px, 1px);
    clip-path: inset(0 0 58% 0);
  }
  89% {
    opacity: 0.7;
    transform: translate(2px, -1px);
    clip-path: inset(62% 0 0 0);
  }
  92% {
    opacity: 0;
  }
}

@keyframes glitch-b {
  0%,
  88%,
  100% {
    opacity: 0;
  }
  89% {
    opacity: 0.8;
    transform: translate(3px, -1px);
    clip-path: inset(70% 0 0 0);
  }
  91% {
    opacity: 0.6;
    transform: translate(-2px, 1px);
    clip-path: inset(0 0 72% 0);
  }
  94% {
    opacity: 0;
  }
}

/* 英文副标题微亮 */
@keyframes en-shimmer {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.72;
  }
}

/* 输入光标硬闪 */
@keyframes caret-blink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0.15;
  }
}

/* 评级字呼吸 */
@keyframes rank-pulse {
  0%,
  100% {
    text-shadow:
      0 4px 0 #1a0f00,
      0 5px 0 rgba(255, 176, 32, 0.35),
      0 0 20px rgba(255, 176, 32, 0.45);
  }
  50% {
    text-shadow:
      0 4px 0 #1a0f00,
      0 5px 0 rgba(255, 176, 32, 0.2),
      0 0 30px rgba(255, 176, 32, 0.72);
  }
}

/* 新纪录硬闪 */
@keyframes best-flash {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0.22;
  }
}
