/* main.css — 猫狗大战主题 UI：大圆角卡片 + 阵营色渐变按钮 + 安全区适配 */

:root {
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --cat: #FF9F4A;
  --cat-soft: #FFB37E;
  --dog: #A8643C;
  --dog-soft: #D9A06B;
  --text: #6B5138;
  --card: rgba(255, 255, 255, 0.88);
  /* 顶部 HUD 安全偏移（解决安卓贴顶） */
  --top-offset: calc(var(--sat) + 16px);
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: fixed;
  overscroll-behavior: none;
  touch-action: none;
  background: #FFF1DC;
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', sans-serif;
  color: var(--text);
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

#game {
  position: fixed;
  inset: 0;
  display: block;
}

#ui {
  position: fixed;
  inset: 0;
  pointer-events: none; /* 默认穿透，子元素自行开启 */
}

.hidden { display: none !important; }

/* ---------- 全屏界面（结算） ---------- */
.screen {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  padding: calc(var(--sat) + 16px) 20px calc(var(--sab) + 16px);
}

.menu-card {
  width: min(340px, 88vw);
  max-height: 100%;
  overflow-y: auto;
  background: var(--card);
  border-radius: 24px;
  padding: 28px 24px;
  text-align: center;
  box-shadow: 0 12px 40px rgba(190, 140, 90, 0.25);
}

.logo { font-size: 56px; line-height: 1; }

.title {
  font-size: 26px;
  font-weight: 800;
  margin-top: 8px;
  background: linear-gradient(90deg, var(--cat), var(--dog));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  font-size: 13px;
  color: #A68A6B;
  margin: 4px 0 18px;
}

.btn-primary {
  width: 100%;
  height: 52px;
  margin-top: 14px;
  border: none;
  border-radius: 16px;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--cat), var(--dog));
  box-shadow: 0 6px 16px rgba(255, 159, 74, 0.4);
  transition: transform 0.08s ease;
  pointer-events: auto;
}
.btn-primary:active { transform: scale(0.95); }

.btn-ghost {
  width: 100%;
  height: 46px;
  margin-top: 10px;
  border: 2px solid #F0D9BE;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  color: #A68A6B;
  background: transparent;
  pointer-events: auto;
}
.btn-ghost:active { transform: scale(0.96); }

.howto {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed #F0D9BE;
  font-size: 12px;
  line-height: 1.9;
  color: #B39877;
  text-align: left;
}

/* ---------- HUD ---------- */
#hud { position: absolute; inset: 0; }

#hud-top {
  position: absolute;
  top: var(--top-offset);
  left: calc(var(--sal) + 12px);
  right: calc(var(--sar) + 12px);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

#hud-left { display: flex; flex-direction: column; gap: 6px; }

#hud-score {
  background: var(--card);
  border-radius: 16px;
  padding: 8px 14px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 14px rgba(190, 140, 90, 0.18);
}
.score-row { display: flex; align-items: baseline; gap: 6px; }
.score-label { font-size: 11px; color: #A68A6B; font-weight: 600; }
#score-val {
  font-size: 22px;
  font-weight: 800;
  color: var(--cat);
  line-height: 1.1;
}
.score-row.small { margin-top: 1px; }
#kills-val { font-size: 11px; color: #A68A6B; font-weight: 600; }

#hud-right { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }

/* 小地图 */
#minimap {
  width: 96px;
  height: 96px;
  border-radius: 16px;
  background: rgba(90, 70, 50, 0.55);
  box-shadow: 0 4px 14px rgba(190, 140, 90, 0.18);
}

/* 浮动文字层 */
#float-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.float-text {
  position: absolute;
  font-size: 18px;
  font-weight: 800;
  white-space: nowrap;
  text-shadow: 0 2px 8px rgba(255,255,255,0.9);
  animation: float-up 1.1s ease-out forwards;
}
@keyframes float-up {
  0% { transform: translate(-50%, 0) scale(0.7); opacity: 0; }
  15% { transform: translate(-50%, -12px) scale(1.15); opacity: 1; }
  100% { transform: translate(-50%, -64px) scale(1); opacity: 0; }
}

/* 道具倒计时环 */
#powerup-indicator {
  position: absolute;
  right: calc(var(--sar) + 16px);
  bottom: calc(var(--sab) + 128px);
}
#powerup-ring {
  --p: 100%;
  --c: #FFD166;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background:
    radial-gradient(circle at center, #FFFCF7 58%, transparent 59%),
    conic-gradient(var(--c) var(--p), rgba(0,0,0,0.08) var(--p));
  box-shadow: 0 4px 12px rgba(190, 140, 90, 0.2);
}

/* 加速狂潮横幅 */
#surge-banner {
  position: absolute;
  top: calc(var(--top-offset) + 68px);
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  pointer-events: none;
  animation: surge-pop 0.35s ease;
}
#surge-text {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--surge-c, #FFD166);
  text-shadow: 0 2px 12px rgba(0,0,0,0.18), 0 0 22px var(--surge-c, #FFD166);
  animation: surge-blink 0.6s ease-in-out infinite alternate;
}
#surge-sub {
  margin-top: 2px;
  font-size: 12px;
  font-weight: 700;
  color: #8A7156;
  background: var(--card);
  border-radius: 999px;
  padding: 3px 12px;
  display: inline-block;
}
@keyframes surge-pop {
  0% { transform: translateX(-50%) scale(0.5); opacity: 0; }
  100% { transform: translateX(-50%) scale(1); opacity: 1; }
}
@keyframes surge-blink {
  0% { opacity: 1; }
  100% { opacity: 0.55; }
}

/* 静音按钮（默认静音，🔇） */
#btn-mute {
  position: absolute;
  top: calc(var(--top-offset) + 62px);
  left: calc(var(--sal) + 12px);
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: var(--card);
  font-size: 16px;
  box-shadow: 0 4px 12px rgba(190, 140, 90, 0.18);
  pointer-events: auto;
}

/* 加速按钮（唯一可见操控元素，锚定 9:16 核心盒右下角） */
#btn-boost {
  position: absolute;
  right: calc(var(--sar) + 16px);
  bottom: calc(var(--sab) + 20px);
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cat), var(--dog-soft));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  box-shadow: 0 8px 20px rgba(168, 100, 60, 0.45), inset 0 -4px 0 rgba(0,0,0,0.08);
  pointer-events: auto;
  transition: transform 0.08s ease;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none; /* 防 iOS 长按 emoji 文本触发系统菜单导致 touchcancel */
}
#btn-boost:active { transform: scale(0.92); }

/* 护盾按钮（手动技能：就绪/生效/冷却三态） */
#btn-shield {
  position: absolute;
  right: calc(var(--sar) + 124px);
  bottom: calc(var(--sab) + 34px);
  width: 64px;
  height: 64px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #9ED8FF, #7EC8FF);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  box-shadow: 0 6px 16px rgba(126, 200, 255, 0.45), inset 0 -3px 0 rgba(0,0,0,0.08);
  pointer-events: auto;
  transition: transform 0.08s ease;
  -webkit-user-select: none;
  user-select: none;
  overflow: hidden;
}
#btn-shield:active { transform: scale(0.92); }
#btn-shield #shield-icon { position: relative; z-index: 2; }
#btn-shield #shield-sweep {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(rgba(90, 70, 50, 0.55) var(--cd, 0%), transparent var(--cd, 0%));
  z-index: 1;
}
#btn-shield.on-cooldown {
  background: linear-gradient(135deg, #D8CFC2, #C4B8A6);
  box-shadow: 0 4px 10px rgba(150, 130, 100, 0.3);
}
#btn-shield.active {
  animation: shield-pulse 0.5s ease-in-out infinite alternate;
}
@keyframes shield-pulse {
  0% { box-shadow: 0 0 6px 2px rgba(126, 200, 255, 0.7); }
  100% { box-shadow: 0 0 22px 8px rgba(126, 200, 255, 0.9); }
}

/* ---------- 结算页 ---------- */
.go-title { font-size: 22px; font-weight: 800; color: var(--text); }
.go-cause { font-size: 12px; color: #B39877; margin-top: 4px; min-height: 16px; }

#final-score {
  font-size: 56px;
  font-weight: 800;
  line-height: 1.1;
  margin: 8px 0 0;
  background: linear-gradient(90deg, var(--cat), var(--dog));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.go-score-label {
  font-size: 12px;
  color: #B39877;
  font-weight: 600;
  margin-bottom: 2px;
}

.go-best {
  margin: 12px 0 2px;
  font-size: 14px;
  color: #A68A6B;
  font-weight: 600;
}
.go-best span {
  font-size: 20px;
  font-weight: 800;
  color: var(--dog);
  margin-left: 2px;
}

#new-record {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  color: #E8890C;
  background: #FFF3D6;
  border-radius: 999px;
  padding: 4px 14px;
  margin: 4px 0;
  animation: pop 0.5s ease;
}
@keyframes pop {
  0% { transform: scale(0.5); opacity: 0; }
  70% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

/* ---------- 横屏提示 ---------- */
#rotate-tip {
  display: none;
  position: fixed;
  inset: 0;
  background: #FFEEDD;
  z-index: 99;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  line-height: 2;
  pointer-events: auto;
}
@media (orientation: landscape) and (max-height: 500px) {
  #rotate-tip { display: flex; }
}

/* ---------- 猫/狗阵营选择浮层 ---------- */
.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 241, 220, 0.78);
  z-index: 50;
  pointer-events: auto;
  padding: calc(var(--sat) + 16px) 20px calc(var(--sab) + 16px);
}
.pick-card {
  width: min(340px, 88vw);
  background: var(--card);
  border-radius: 24px;
  padding: 28px 24px;
  text-align: center;
  box-shadow: 0 12px 40px rgba(190, 140, 90, 0.25);
}
.pick-title {
  font-size: 22px;
  font-weight: 800;
  background: linear-gradient(90deg, var(--cat), var(--dog));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.pick-sub {
  font-size: 12px;
  color: #A68A6B;
  margin: 4px 0 22px;
}
.pick-row {
  display: flex;
  gap: 16px;
  justify-content: center;
}
.pick-btn {
  flex: 1;
  max-width: 140px;
  height: 140px;
  border: none;
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 8px 20px rgba(190, 140, 90, 0.25);
  transition: transform 0.1s ease;
}
.pick-btn:active { transform: scale(0.94); }
.pick-btn.cat {
  background: linear-gradient(135deg, #FFB37E, var(--cat));
}
.pick-btn.dog {
  background: linear-gradient(135deg, var(--dog-soft), var(--dog));
}
.pick-emoji {
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 3px 5px rgba(0,0,0,0.18));
}
.pick-svg {
  width: 76px;
  height: 76px;
}
.pick-label {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 2px;
}
.pick-hint {
  margin-top: 18px;
  font-size: 12px;
  color: #B39877;
  line-height: 1.7;
}

/* ---------- 摇杆可视化（街霸四式：半透明底座 + 限位摇杆头） ---------- */
#joystick {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 30;
  display: none; /* 由 JS 控制显隐 */
}
#joystick.active { display: block; }
#joystick-base {
  position: absolute;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.18) inset, 0 0 12px rgba(255, 255, 255, 0.4);
  transform: translate(-50%, -50%);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  pointer-events: none;
}
#joystick-thumb {
  position: absolute;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.85);
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.95), rgba(255,200,140,0.55));
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* ---------- 加速狂潮冷却倒计时 ---------- */
#surge-cd {
  position: absolute;
  top: calc(var(--top-offset) + 62px);
  right: calc(var(--sar) + 12px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: var(--card);
  border-radius: 14px;
  padding: 4px 8px 4px;
  box-shadow: 0 4px 12px rgba(190, 140, 90, 0.18);
}
.cd-ring {
  --p: 100%;
  --c: var(--cat);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
  background:
    radial-gradient(circle at center, #FFFCF7 60%, transparent 61%),
    conic-gradient(var(--c) var(--p), rgba(0,0,0,0.08) var(--p));
}
.cd-label {
  font-size: 9px;
  color: #A68A6B;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* ========================================================================== */
/* NEON TAILS / Runway Edition — 深色时装杂志式竞技界面                    */
/* ========================================================================== */
:root {
  --cat: #ff5ca8;
  --cat-soft: #ff8a5b;
  --dog: #55d8ff;
  --dog-soft: #70f0c1;
  --text: #f7f2ff;
  --muted: rgba(227, 219, 247, 0.62);
  --card: rgba(20, 14, 36, 0.72);
  --line: rgba(255, 255, 255, 0.13);
}

html, body {
  background: #090711;
  color: var(--text);
  font-family: Inter, ui-rounded, -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
}

.overlay {
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 92, 168, 0.24), transparent 34%),
    radial-gradient(circle at 85% 78%, rgba(85, 216, 255, 0.18), transparent 36%),
    linear-gradient(155deg, rgba(9, 7, 17, 0.84), rgba(22, 14, 42, 0.94));
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
}

.pick-card, .menu-card {
  width: min(364px, 91vw);
  background: linear-gradient(145deg, rgba(35, 25, 58, 0.88), rgba(12, 9, 24, 0.88));
  border: 1px solid var(--line);
  border-radius: 30px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.52), inset 0 1px rgba(255, 255, 255, 0.08);
  padding: 30px 24px 24px;
}

.pick-card::before, .menu-card::before {
  content: "";
  display: block;
  width: 44px;
  height: 3px;
  margin: -12px auto 21px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--cat), #ffe66d, var(--dog));
  box-shadow: 0 0 18px rgba(255, 92, 168, 0.7);
}

.pick-kicker, .hud-kicker, .bounty-kicker, #run-grade-label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: var(--muted);
}

.pick-title {
  margin-top: 7px;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -1px;
  background: linear-gradient(105deg, #fff 4%, #ff77b7 45%, #75e5ff 92%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.pick-sub { margin: 7px 0 24px; color: var(--muted); letter-spacing: 1px; }
.pick-row { gap: 12px; }
.pick-btn {
  position: relative;
  height: 150px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 24px;
  box-shadow: 0 14px 35px rgba(0,0,0,.3), inset 0 1px rgba(255,255,255,.16);
}
.pick-btn::after {
  content: "PLAY";
  position: absolute;
  right: 10px;
  top: 10px;
  font-size: 8px;
  letter-spacing: 1.5px;
  opacity: .65;
}
.pick-btn.cat { background: linear-gradient(145deg, #71204c, #ff5ca8 66%, #ff8a5b); }
.pick-btn.dog { background: linear-gradient(145deg, #164969, #55d8ff 62%, #70f0c1); }
.pick-label { font-size: 18px; letter-spacing: 5px; }
.pick-hint { color: var(--muted); border-top: 1px solid var(--line); padding-top: 16px; }

#hud-top { left: calc(var(--sal) + 14px); right: calc(var(--sar) + 14px); }
#hud-left { gap: 7px; }
#hud-score, #style-card, #contract-card, #act-card, #bounty-card, #surge-cd {
  background: linear-gradient(145deg, rgba(28, 20, 48, .82), rgba(11, 8, 21, .75));
  border: 1px solid var(--line);
  box-shadow: 0 12px 30px rgba(0,0,0,.26), inset 0 1px rgba(255,255,255,.07);
  backdrop-filter: blur(12px) saturate(1.25);
  -webkit-backdrop-filter: blur(12px) saturate(1.25);
}

#hud-score { border-radius: 17px; min-width: 112px; padding: 9px 12px; }
.score-label { color: var(--muted); font-size: 9px; letter-spacing: 1px; }
#score-val {
  color: #fff;
  font-size: 25px;
  letter-spacing: -1px;
  text-shadow: 0 0 18px rgba(255,92,168,.45);
}
#kills-val { color: var(--muted); font-size: 10px; letter-spacing: .6px; }

#style-card { width: 112px; padding: 8px 10px 9px; border-radius: 14px; }
.style-meta { display: flex; align-items: center; justify-content: space-between; }
#style-name { font-size: 10px; font-weight: 900; letter-spacing: 1.7px; }
#style-mult { font-size: 9px; font-weight: 800; color: #fff; }
#style-track { height: 4px; margin-top: 6px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.1); }
#style-fill { display: block; height: 100%; border-radius: inherit; transition: width .18s ease, background .2s ease; box-shadow: 0 0 10px currentColor; }

#contract-card { width: 144px; padding: 8px 10px 9px; border-radius: 14px; }
#contract-kicker { display: block; color: #55d8ff; font-size: 8px; font-weight: 900; letter-spacing: 1.4px; }
.contract-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 2px; }
.contract-row strong { max-width: 106px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #fff; font-size: 9px; }
.contract-row i { color: var(--muted); font-size: 8px; font-style: normal; }
#contract-track { height: 3px; overflow: hidden; margin-top: 5px; border-radius: 9px; background: rgba(255,255,255,.09); }
#contract-fill { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #55d8ff, #70f0c1); box-shadow: 0 0 9px #55d8ff; transition: width .18s ease; }

#hud-right { gap: 7px; }
#act-card { --act-c: #ff5ca8; min-width: 104px; padding: 8px 10px; border-radius: 14px; border-top-color: var(--act-c); text-align: right; }
#act-card span { display: block; color: var(--act-c); font-size: 8px; font-weight: 900; letter-spacing: 1.7px; }
#act-card strong { display: block; margin-top: 2px; color: #fff; font-size: 11px; letter-spacing: .5px; }
#minimap { width: 92px; height: 92px; border: 1px solid var(--line); border-radius: 18px; background: rgba(8,6,15,.7); box-shadow: 0 12px 28px rgba(0,0,0,.28); }

#bounty-card {
  position: absolute;
  top: calc(var(--top-offset) + 134px);
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: 1fr auto;
  min-width: 168px;
  padding: 8px 10px;
  border-radius: 14px;
  border-color: rgba(255,230,109,.34);
  animation: bounty-in .35s cubic-bezier(.2,.8,.2,1);
}
#bounty-card .bounty-kicker { grid-column: 1 / -1; color: #ffe66d; }
#bounty-name { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; color: #fff; }
#bounty-reward { color: #ffe66d; font-size: 11px; font-weight: 900; margin-left: 8px; }
@keyframes bounty-in { from { opacity: 0; transform: translate(-50%, -10px) scale(.92); } }

#effect-tray {
  position: absolute;
  left: calc(var(--sal) + 14px);
  bottom: calc(var(--sab) + 112px);
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-start;
  gap: 5px;
}
.effect-chip {
  --effect-c: #fff;
  display: grid;
  grid-template-columns: 22px auto 24px;
  align-items: center;
  min-width: 96px;
  height: 28px;
  padding: 0 7px 0 3px;
  border: 1px solid color-mix(in srgb, var(--effect-c) 42%, transparent);
  border-radius: 99px;
  background: rgba(9,7,17,.72);
  box-shadow: 0 6px 18px rgba(0,0,0,.22), inset 2px 0 var(--effect-c);
  backdrop-filter: blur(8px);
}
.effect-chip b { color: var(--effect-c); font-size: 12px; text-align: center; }
.effect-chip span { color: #fff; font-size: 9px; font-weight: 800; letter-spacing: .5px; }
.effect-chip i { color: var(--muted); font-size: 8px; font-style: normal; text-align: right; }

.float-text { font-size: 16px; font-weight: 900; letter-spacing: 1px; text-shadow: 0 2px 12px #090711, 0 0 18px currentColor; }
#surge-banner { top: calc(var(--top-offset) + 178px); }
#surge-text { font-size: 19px; letter-spacing: 3px; }
#surge-sub { color: #fff; background: rgba(9,7,17,.76); border: 1px solid var(--line); }

#surge-cd { top: calc(var(--top-offset) + 142px); right: calc(var(--sar) + 14px); border-radius: 14px; }
.cd-ring { color: #fff; background: radial-gradient(circle at center, #171025 60%, transparent 61%), conic-gradient(var(--cat) var(--p), rgba(255,255,255,.09) var(--p)); }
.cd-label { color: var(--muted); }

#btn-mute {
  top: auto;
  left: calc(var(--sal) + 16px);
  bottom: calc(var(--sab) + 20px);
  background: rgba(12,9,23,.76);
  border: 1px solid var(--line);
  color: #fff;
  box-shadow: 0 8px 22px rgba(0,0,0,.3);
}

#btn-boost, #btn-shield {
  border: 1px solid rgba(255,255,255,.34);
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,.3);
}
#btn-boost {
  width: 88px;
  height: 88px;
  font-size: 34px;
  background: radial-gradient(circle at 35% 28%, #ff91c5, #ff3e95 52%, #832257);
  box-shadow: 0 0 0 7px rgba(255,92,168,.09), 0 15px 35px rgba(255,62,149,.34), inset 0 1px rgba(255,255,255,.45);
}
#btn-shield {
  background: radial-gradient(circle at 35% 28%, #98ebff, #4baee9 55%, #254f9c);
  box-shadow: 0 0 0 6px rgba(85,216,255,.08), 0 12px 28px rgba(55,161,224,.28), inset 0 1px rgba(255,255,255,.4);
}
#btn-shield.on-cooldown { filter: grayscale(.78); opacity: .65; }
#btn-shield #shield-sweep { background: conic-gradient(rgba(9,7,17,.72) var(--cd, 0%), transparent var(--cd, 0%)); }

#joystick-base { border-color: rgba(255,255,255,.32); background: radial-gradient(circle, rgba(255,92,168,.08), rgba(13,9,25,.18)); box-shadow: inset 0 0 28px rgba(0,0,0,.34), 0 0 18px rgba(255,92,168,.18); }
#joystick-thumb { background: radial-gradient(circle at 35% 30%, #fff, #ff8cc3 32%, rgba(255,92,168,.52)); box-shadow: 0 8px 20px rgba(0,0,0,.34), 0 0 20px rgba(255,92,168,.32); }

.screen { background: radial-gradient(circle at 50% 28%, rgba(255,92,168,.16), transparent 40%), rgba(9,7,17,.58); backdrop-filter: blur(10px); }
.go-title { color: #fff; font-size: 18px; letter-spacing: 2px; }
.go-cause, .go-score-label, .go-best { color: var(--muted); }
#run-grade { --grade-c: #fff; margin-top: 12px; font-size: 68px; font-weight: 950; font-style: italic; line-height: .9; color: var(--grade-c); text-shadow: 0 0 30px var(--grade-c); }
#run-grade-label { margin-top: 4px; }
#final-score { margin-top: 14px; font-size: 44px; background: linear-gradient(90deg, #fff, var(--cat), var(--dog)); -webkit-background-clip: text; background-clip: text; }
#run-recap { margin: 10px 0 2px; font-size: 9px; font-weight: 800; letter-spacing: 1.5px; color: #ffe66d; }
.btn-primary { background: linear-gradient(110deg, #ff3e95, #8d59ff 52%, #55d8ff); box-shadow: 0 10px 26px rgba(255,62,149,.3); }
.btn-ghost { color: var(--muted); border-color: var(--line); }
#new-record { color: #090711; background: #ffe66d; }
#rotate-tip { background: #090711; color: #fff; }

@media (max-height: 700px) {
  #effect-tray { bottom: calc(var(--sab) + 92px); }
  .effect-chip { height: 24px; }
  #bounty-card { top: calc(var(--top-offset) + 118px); }
  #surge-banner { top: calc(var(--top-offset) + 152px); }
  #surge-cd { top: calc(var(--top-offset) + 132px); }
  #minimap { width: 80px; height: 80px; }
}
