/* ============================================================
   拾光游戏厅 · snake.css
   仅作用于 .snake-* 命名空间。
   CRT 街机屏幕 + 胡桃木机台：扫描线、磷光像素蛇、黄铜按键。
   ============================================================ */

.snake-wrap {
  --snake-green: #9ee493;
  --snake-green-soft: rgba(158, 228, 147, .55);
  --snake-screen-deep: #07140d;
  position: relative;
  width: 100%;
}

.snake-stage {
  position: relative;
  align-items: start;
  padding: clamp(16px, 2.4vw, 28px) clamp(12px, 2vw, 26px);
  background:
    radial-gradient(ellipse 56% 40% at 50% 12%, rgba(158, 228, 147, .07), transparent 62%),
    radial-gradient(ellipse 90% 60% at 50% 112%, rgba(0, 0, 0, .42), transparent 70%),
    repeating-linear-gradient(93deg, rgba(26, 14, 7, .24) 0 2px, rgba(255, 230, 183, .012) 2px 5px, transparent 5px 19px),
    linear-gradient(150deg, #34251a, #1d130c 78%);
}

.snake-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 66% 52% at 50% 40%, transparent 52%, rgba(0, 0, 0, .3));
}

.snake-cabinet {
  position: relative;
  z-index: 1;
  width: min(100%, 566px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

/* ---------------- 机台顶灯牌 ---------------- */
.snake-cabinet-top {
  position: relative;
  width: 100%;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 16px 7px;
  border-radius: 6px 6px 2px 2px;
  border: 1px solid rgba(198, 160, 90, .3);
  background:
    linear-gradient(180deg, rgba(255, 242, 205, .09), transparent 62%),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .16) 0 2px, transparent 2px 6px),
    linear-gradient(150deg, #4b3420, #2a1b10);
  box-shadow:
    inset 0 1px 0 rgba(255, 238, 198, .2),
    0 4px 10px rgba(0, 0, 0, .32);
}

.snake-cabinet-top::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 4px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(158, 228, 147, .22), transparent);
}

.snake-cab-en {
  color: rgba(158, 228, 147, .82);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .38em;
  text-shadow: 0 0 10px rgba(158, 228, 147, .45);
}

.snake-cab-title {
  color: #f0dfba;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .34em;
  text-indent: .34em;
}

.snake-cab-badge {
  color: rgba(198, 160, 90, .55);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: .12em;
}

/* ---------------- 显示器外壳 ---------------- */
.snake-monitor {
  position: relative;
  width: 100%;
  padding: clamp(8px, 1.5vw, 15px);
  border-radius: 17px;
  border: 1px solid rgba(198, 160, 90, .34);
  background:
    linear-gradient(180deg, rgba(255, 238, 205, .11), transparent 22%),
    repeating-linear-gradient(92deg, rgba(255, 230, 185, .03) 0 1px, transparent 1px 4px),
    linear-gradient(160deg, #3d2c1d, #24170e 72%);
  box-shadow:
    0 26px 44px rgba(0, 0, 0, .52),
    inset 0 1px 0 rgba(255, 236, 196, .17),
    inset 0 -3px 8px rgba(0, 0, 0, .4);
}

.snake-monitor::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 13px;
  border: 1px solid rgba(255, 235, 200, .08);
  pointer-events: none;
}

.snake-screw {
  position: absolute;
  z-index: 3;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #f2dba0, #b98d4e 48%, #6a4c22 78%, #3a2711);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .65), inset 0 0 0 1px rgba(38, 22, 8, .5);
}

.snake-screw::after {
  content: "";
  position: absolute;
  left: 1px;
  right: 1px;
  top: 50%;
  height: 1px;
  background: rgba(44, 26, 9, .7);
  transform: rotate(-38deg);
}

.snake-screw.is-tl { left: 7px; top: 7px; }
.snake-screw.is-tr { right: 7px; top: 7px; }
.snake-screw.is-bl { left: 7px; bottom: 7px; }
.snake-screw.is-br { right: 7px; bottom: 7px; }

/* ---------------- CRT 屏幕 ---------------- */
.snake-screen {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  border-radius: 11px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, .78);
  background:
    radial-gradient(ellipse at 50% 38%, #0e2717, #07140d 62%, #040b07);
  box-shadow:
    inset 0 0 46px rgba(0, 0, 0, .88),
    inset 0 0 18px rgba(158, 228, 147, .08),
    0 0 0 2px rgba(18, 24, 18, .92),
    0 0 0 3px rgba(198, 160, 90, .22),
    0 12px 26px rgba(0, 0, 0, .46);
}

.snake-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  border-radius: 11px;
  box-shadow:
    inset 0 0 26px rgba(0, 0, 0, .55),
    inset 0 2px 3px rgba(255, 255, 255, .045);
}

.snake-screen::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -40%;
  height: 32%;
  z-index: 4;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(158, 228, 147, .04), transparent);
}

.snake-hud {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px clamp(10px, 2vw, 16px) 6px;
  border-bottom: 1px solid rgba(158, 228, 147, .16);
  background: linear-gradient(180deg, rgba(4, 12, 8, .78), rgba(4, 12, 8, .12));
  color: var(--green-phosphor);
  font-family: var(--font-mono);
  font-size: clamp(9px, 1.5vw, 11px);
  letter-spacing: .12em;
  text-shadow: 0 0 8px rgba(158, 228, 147, .5);
}

.snake-hud-item {
  display: flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
}

.snake-hud-item em {
  color: rgba(158, 228, 147, .52);
  font-style: normal;
  font-size: .72em;
  letter-spacing: .18em;
}

.snake-hud-item b {
  color: #c8ffb4;
  font-weight: 700;
  font-size: 1.1em;
  letter-spacing: .07em;
}

.snake-canvas-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  cursor: crosshair;
}

.snake-canvas {
  display: block;
  filter:
    drop-shadow(0 0 4px rgba(158, 228, 147, .32))
    drop-shadow(0 0 13px rgba(158, 228, 147, .1));
}

.snake-scan {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .4) 0 1px, transparent 1px 3px);
  opacity: .6;
  mix-blend-mode: multiply;
}

.snake-glare {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    radial-gradient(ellipse 62% 42% at 30% 6%, rgba(214, 255, 222, .075), transparent 62%),
    radial-gradient(ellipse at center, transparent 56%, rgba(0, 0, 0, .52) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, .025), transparent 16%, transparent 86%, rgba(0, 0, 0, .28));
}

.snake-floats {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.snake-float {
  position: absolute;
  transform: translate(-50%, -50%);
  color: #eaffdc;
  font-family: var(--font-mono);
  font-size: clamp(12px, 2.2vw, 16px);
  font-weight: 700;
  letter-spacing: .06em;
  text-shadow: 0 0 12px rgba(158, 228, 147, .95), 0 0 3px rgba(230, 255, 220, .8);
}

.snake-speedup {
  position: absolute;
  left: 50%;
  top: 15%;
  z-index: 4;
  transform: translateX(-50%);
  padding: 3px 11px;
  border: 1px solid rgba(230, 201, 130, .5);
  border-radius: 2px;
  color: #ffe3a0;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .26em;
  text-indent: .26em;
  background: rgba(5, 13, 8, .82);
  box-shadow: 0 0 16px rgba(230, 201, 130, .16), inset 0 1px 0 rgba(255, 240, 200, .18);
  text-shadow: 0 0 10px rgba(230, 201, 130, .6);
  pointer-events: none;
}

.snake-speedup[hidden] { display: none; }

/* ---------------- 屏幕内遮罩 ---------------- */
.snake-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: 16px;
  text-align: center;
  color: var(--green-phosphor);
  font-family: var(--font-mono);
  text-shadow: 0 0 10px rgba(158, 228, 147, .45);
  background:
    radial-gradient(circle at 50% 44%, rgba(4, 14, 8, .42), rgba(2, 8, 4, .78));
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
}

.snake-overlay[hidden] { display: none; }

.snake-ov-inner {
  width: min(100%, 340px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}

.snake-ov-en {
  color: rgba(158, 228, 147, .62);
  font-size: 8.5px;
  letter-spacing: .34em;
  text-indent: .34em;
  text-shadow: 0 0 7px rgba(158, 228, 147, .32);
}

.snake-ov-title {
  color: #d9ffca;
  font-family: var(--font-display);
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: .26em;
  text-indent: .26em;
  text-shadow:
    0 0 18px rgba(158, 228, 147, .55),
    0 0 3px rgba(206, 255, 188, .8);
}

.snake-ov-hint {
  color: rgba(158, 228, 147, .8);
  font-size: 10.5px;
  line-height: 1.9;
  letter-spacing: .04em;
  text-shadow: 0 0 6px rgba(158, 228, 147, .26);
}

.snake-ov-hint span {
  color: rgba(158, 228, 147, .66);
  font-size: 10px;
  text-shadow: none;
}

.snake-ov-hint b { color: #e7ffd8; }

.snake-ov-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 5px;
}

.snake-arcade-btn {
  min-height: 33px;
  padding: 6px 17px;
  border: 1px solid rgba(158, 228, 147, .48);
  border-radius: 3px;
  color: #d9ffca;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-indent: .16em;
  background:
    linear-gradient(180deg, rgba(158, 228, 147, .16), rgba(158, 228, 147, .03)),
    rgba(6, 18, 10, .82);
  box-shadow:
    inset 0 1px 0 rgba(212, 255, 202, .22),
    0 2px 0 rgba(0, 0, 0, .42),
    0 0 16px rgba(158, 228, 147, .12);
  text-shadow: 0 0 8px rgba(158, 228, 147, .5);
  transition: color .16s ease, border-color .16s ease, background .16s ease, transform .1s ease;
  -webkit-tap-highlight-color: transparent;
}

.snake-arcade-btn:hover {
  color: #f0ffe6;
  border-color: rgba(206, 255, 188, .85);
  background:
    linear-gradient(180deg, rgba(158, 228, 147, .28), rgba(158, 228, 147, .05)),
    rgba(8, 24, 13, .9);
}

.snake-arcade-btn:active { transform: translateY(2px); }

.snake-arcade-btn.is-primary {
  color: #0b1c0e;
  border-color: #d9ffca;
  background: linear-gradient(180deg, #b8f39f, #6cc46a);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .55),
    0 2px 0 #2f5a2c,
    0 0 20px rgba(158, 228, 147, .28);
  text-shadow: none;
  font-weight: 700;
}

.snake-arcade-btn.is-primary:hover {
  color: #06130a;
  background: linear-gradient(180deg, #cfffb8, #7ed779);
}

.snake-final {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 4vw, 30px);
  margin: 2px 0;
}

.snake-final div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.snake-final em {
  color: rgba(158, 228, 147, .55);
  font-style: normal;
  font-size: 8.5px;
  letter-spacing: .2em;
}

.snake-final b {
  color: #e7ffd8;
  font-size: clamp(22px, 3.4vw, 28px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .04em;
  text-shadow: 0 0 16px rgba(158, 228, 147, .6);
}

.snake-new-record {
  color: #ffd98f;
  font-size: 9px;
  letter-spacing: .22em;
  text-indent: .22em;
  text-shadow: 0 0 12px rgba(230, 201, 130, .55);
}

.snake-new-record[hidden] { display: none; }

/* ---------------- 操作面板 ---------------- */
.snake-deck {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px clamp(10px, 2vw, 16px);
  border-radius: 5px;
  border: 1px solid rgba(198, 160, 90, .26);
  background:
    linear-gradient(180deg, rgba(255, 238, 200, .07), transparent 42%),
    repeating-linear-gradient(92deg, rgba(255, 230, 185, .03) 0 1px, transparent 1px 4px),
    linear-gradient(160deg, #3a2a1b, #251810 76%);
  box-shadow:
    inset 0 1px 0 rgba(255, 236, 196, .12),
    0 8px 16px rgba(0, 0, 0, .32);
}

.snake-dpad {
  display: grid;
  grid-template-columns: repeat(3, 32px);
  grid-template-rows: repeat(3, 32px);
  grid-template-areas:
    ". up ."
    "left start right"
    ". down .";
  gap: 4px;
}

.snake-key {
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 4px;
  color: rgba(239, 225, 196, .82);
  border: 1px solid rgba(198, 160, 90, .4);
  background: linear-gradient(180deg, #4c3b29, #261b11);
  box-shadow:
    inset 0 1px 0 rgba(255, 240, 200, .15),
    0 3px 0 #120b06,
    0 4px 7px rgba(0, 0, 0, .3);
  transition: transform .08s ease, box-shadow .08s ease, border-color .16s ease, color .16s ease;
  -webkit-tap-highlight-color: transparent;
}

.snake-key:hover { color: var(--brass-hi); border-color: rgba(230, 201, 130, .72); }

.snake-key:active {
  transform: translateY(2px);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, .5), 0 1px 0 #120b06;
}

.snake-key.is-up { grid-area: up; }
.snake-key.is-left { grid-area: left; }
.snake-key.is-right { grid-area: right; }
.snake-key.is-down { grid-area: down; }

.snake-key.is-start {
  grid-area: start;
  color: rgba(158, 228, 147, .82);
  border-color: rgba(158, 228, 147, .38);
  background: linear-gradient(180deg, #2c3a26, #16200f);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: .05em;
  text-shadow: 0 0 7px rgba(158, 228, 147, .5);
  box-shadow:
    inset 0 1px 0 rgba(206, 255, 188, .18),
    0 3px 0 #0a1006,
    0 4px 7px rgba(0, 0, 0, .3);
}

.snake-tri {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 7px solid currentColor;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .4));
}

.snake-tri.is-left { transform: rotate(-90deg); }
.snake-tri.is-right { transform: rotate(90deg); }
.snake-tri.is-down { transform: rotate(180deg); }

.snake-deck-plate {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(198, 160, 90, .42);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: .3em;
  text-indent: .3em;
  white-space: nowrap;
}

.snake-deck-plate i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(158, 228, 147, .4);
  box-shadow: 0 0 6px rgba(158, 228, 147, .4);
}

.snake-deck-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  flex-wrap: wrap;
}

.snake-panel-btn {
  min-width: 64px;
  min-height: 30px;
  padding: 5px 11px;
  border: 1px solid rgba(198, 160, 90, .42);
  border-radius: 3px;
  color: rgba(242, 230, 205, .85);
  font-family: var(--font-body);
  font-size: 10.5px;
  letter-spacing: .08em;
  background:
    linear-gradient(180deg, rgba(255, 240, 205, .12), transparent 45%),
    linear-gradient(180deg, #4f3c28, #2a1e13);
  box-shadow: inset 0 1px 0 rgba(255, 240, 200, .18), 0 2px 0 rgba(0, 0, 0, .35);
  transition: color .16s ease, border-color .16s ease, transform .08s ease;
  -webkit-tap-highlight-color: transparent;
}

.snake-panel-btn:hover { color: #ffe9c6; border-color: rgba(230, 201, 130, .72); }
.snake-panel-btn:active { transform: translateY(2px); }
.snake-panel-btn[disabled] { opacity: .38; pointer-events: none; }

.snake-cabinet-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(239, 225, 196, .3);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: .12em;
  text-align: center;
}

.snake-cabinet-foot i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(198, 160, 90, .4);
}

/* ---------------- 右侧纸卡 ---------------- */
.snake-score-card { position: relative; }

.snake-score-main {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  padding: 1px 2px 6px;
}

.snake-score-num {
  display: inline-block;
  color: #235c4d;
  font-family: var(--font-display);
  font-size: clamp(40px, 3.6vw, 54px);
  font-weight: 700;
  line-height: .95;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, .62),
    0 2px 3px rgba(20, 60, 48, .14);
}

.snake-score-side {
  padding-bottom: 4px;
  text-align: right;
  color: rgba(41, 74, 62, .58);
  font-family: var(--font-display);
  font-size: 10.5px;
  line-height: 1.55;
  letter-spacing: .08em;
}

.snake-score-side em {
  display: block;
  margin-top: 2px;
  color: rgba(41, 74, 62, .4);
  font-family: var(--font-mono);
  font-size: 7.5px;
  font-style: normal;
  letter-spacing: .12em;
}

.snake-hi-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 9px 2px 2px;
  border-top: 1px dashed rgba(109, 76, 38, .26);
  color: rgba(56, 69, 45, .72);
  font-size: 10.5px;
}

.snake-hi-row b {
  margin-left: 2px;
  color: #2f4c33;
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 700;
}

.snake-hi-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(76, 111, 63, .45);
}

.snake-record-badge {
  margin-left: auto;
  padding: 1px 7px;
  border: 1px solid rgba(178, 58, 43, .5);
  border-radius: 2px;
  color: #8e2c1e;
  font-size: 8.5px;
  letter-spacing: .1em;
  background: rgba(178, 58, 43, .07);
}

.snake-record-badge[hidden] { display: none; }

.snake-speed-title {
  margin: 12px 0 8px;
  color: rgba(109, 76, 38, .5);
  font-size: 8px;
}

.snake-speed-meter {
  display: flex;
  align-items: stretch;
  gap: 4px;
}

.snake-speed-bar {
  flex: 1;
  height: 8px;
  border-radius: 2px;
  border: 1px solid rgba(109, 76, 38, .28);
  background: rgba(86, 59, 28, .08);
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.snake-speed-bar.is-on {
  border-color: #4c6f3f;
  background: linear-gradient(180deg, #93c47d, #57874a);
  box-shadow: inset 0 1px 0 rgba(240, 255, 220, .45), 0 1px 2px rgba(40, 70, 30, .22);
}

.snake-speed-note {
  margin-top: 7px;
  color: rgba(76, 52, 25, .55);
  font-size: 9.5px;
  line-height: 1.6;
}

.snake-toolbar { gap: 7px; }
.snake-toolbar .btn { flex: 1 1 auto; justify-content: center; }

.snake-status {
  margin-top: 10px;
  align-items: baseline;
}

.snake-status span {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .02em;
}

.snake-status small { font-size: 9px; }

.snake-keys {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 11px;
  color: rgba(84, 58, 28, .55);
  font-size: 9px;
}

.snake-kbd {
  min-width: 19px;
  padding: 2px 5px;
  border: 1px solid rgba(109, 76, 38, .32);
  border-bottom-width: 2px;
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(255, 252, 242, .6), rgba(240, 230, 208, .38));
  color: #5c4327;
  font-family: var(--font-mono);
  font-size: 9.5px;
  line-height: 1.3;
  text-align: center;
}

.snake-kbd.is-wide { min-width: 30px; }
.snake-key-sep { margin: 0 1px; color: rgba(109, 76, 38, .35); }
.snake-key-text { font-size: 9.5px; letter-spacing: .02em; }

/* ---------------- CRT 动画（尊重 reduced-motion） ---------------- */
@media (prefers-reduced-motion: no-preference) {
  @keyframes snake-flicker {
    0%, 95.6%, 96.4%, 100% { opacity: 1; }
    95.8% { opacity: .94; }
    96.8% { opacity: .975; }
  }

  @keyframes snake-sweep {
    0% { transform: translateY(0); }
    100% { transform: translateY(430%); }
  }

  @keyframes snake-eat-flash {
    0% { filter: brightness(1.75) saturate(1.2); }
    55% { filter: brightness(1.28); }
    100% { filter: brightness(1); }
  }

  @keyframes snake-shake {
    10%, 90% { transform: translateX(-2px); }
    20%, 80% { transform: translateX(3px); }
    30%, 50%, 70% { transform: translateX(-4px); }
    40%, 60% { transform: translateX(4px); }
    100% { transform: translateX(0); }
  }

  @keyframes snake-float-up {
    0% { opacity: 0; transform: translate(-50%, -20%) scale(.78); }
    22% { opacity: 1; transform: translate(-50%, -55%) scale(1); }
    70% { opacity: 1; }
    100% { opacity: 0; transform: translate(-50%, -170%) scale(1); }
  }

  @keyframes snake-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: .42; }
  }

  @keyframes snake-speedup-in {
    0% { opacity: 0; transform: translateX(-50%) scale(.9); }
    14%, 80% { opacity: 1; transform: translateX(-50%) scale(1); }
    100% { opacity: 0; transform: translateX(-50%) scale(1); }
  }

  @keyframes snake-btn-glow {
    0%, 100% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 2px 0 #2f5a2c, 0 0 16px rgba(158, 228, 147, .24); }
    50% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 2px 0 #2f5a2c, 0 0 24px rgba(158, 228, 147, .45); }
  }

  .snake-canvas { animation: snake-flicker 8.5s steps(1) infinite; }
  .snake-screen::after { animation: snake-sweep 6.5s linear infinite; }
  .snake-screen.is-flash .snake-canvas-wrap { animation: snake-eat-flash .24s ease; }
  .snake-screen.is-shake { animation: snake-shake .44s cubic-bezier(.36, .07, .19, .97); }
  .snake-float { animation: snake-float-up .84s cubic-bezier(.2, .7, .4, 1) both; }
  .snake-speedup.is-on { animation: snake-speedup-in 1.12s ease both; }
  #snake-ready .snake-arcade-btn.is-primary { animation: snake-btn-glow 2.4s ease-in-out infinite; }
  #snake-ready .snake-ov-en { animation: snake-blink 2.2s steps(1) infinite; }
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 1080px) {
  .snake-cabinet { width: min(100%, 540px); }
}

@media (max-width: 900px) {
  .snake-cabinet { width: min(100%, 620px); }
  .snake-score-num { font-size: 52px; }
}

@media (max-width: 600px) {
  .snake-stage { padding: 12px 8px 14px; }
  .snake-cabinet { width: 100%; gap: 8px; }
  .snake-cabinet-top { padding: 6px 11px; }
  .snake-cab-title { font-size: 11px; letter-spacing: .24em; text-indent: .24em; }
  .snake-cab-en { font-size: 8px; letter-spacing: .3em; }
  .snake-cab-badge { font-size: 7px; }
  .snake-monitor { padding: 7px; border-radius: 13px; }
  .snake-monitor::before { inset: 3px; border-radius: 10px; }
  .snake-screen { border-radius: 8px; }
  .snake-screen::before { border-radius: 8px; }
  .snake-hud { padding: 5px 9px; letter-spacing: .08em; }
  .snake-deck { padding: 9px 10px; gap: 8px; }
  .snake-dpad { grid-template-columns: repeat(3, 30px); grid-template-rows: repeat(3, 30px); gap: 3px; }
  .snake-deck-actions { gap: 5px; }
  .snake-panel-btn { min-width: 52px; padding: 4px 8px; font-size: 9.5px; }
  .snake-cabinet-foot { font-size: 7px; gap: 5px; }
  .snake-deck-plate { display: none; }
  .snake-final b { font-size: 23px; }
  .snake-ov-title { letter-spacing: .18em; text-indent: .18em; }
  .snake-score-num { font-size: 40px; }
  .snake-side .paper-card { padding: 13px 13px 12px; }
  .snake-screw { width: 5px; height: 5px; }
  .snake-screw.is-tl { left: 5px; top: 5px; }
  .snake-screw.is-tr { right: 5px; top: 5px; }
  .snake-screw.is-bl { left: 5px; bottom: 5px; }
  .snake-screw.is-br { right: 5px; bottom: 5px; }
}

@media (max-width: 380px) {
  .snake-dpad { grid-template-columns: repeat(3, 27px); grid-template-rows: repeat(3, 27px); }
  .snake-key.is-start { font-size: 6.5px; }
  .snake-panel-btn { min-width: 46px; font-size: 9px; }
}
