/* ROOM RUSH - style.css */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  width: 100%; height: 100%;
  background: #16171c;
  overflow: hidden;
  font-family: "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-user-select: none; user-select: none;
  touch-action: none;
}
#wrap {
  position: relative;
  width: 100vw; height: 100vh;
  display: flex; align-items: center; justify-content: center;
}
#game {
  background: #1c1e24;
  border-radius: 6px;
  box-shadow: 0 10px 60px rgba(0,0,0,0.6);
  cursor: crosshair;
}
#overlay {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  transform-origin: center center;
  width: 1280px; height: 720px;
  pointer-events: none;
  display: flex; align-items: center; justify-content: center;
}

.panel {
  pointer-events: auto;
  background: linear-gradient(160deg, #262932 0%, #1d1f26 100%);
  border: 2px solid #3a3e4a;
  border-radius: 18px;
  padding: 28px 40px;
  text-align: center;
  color: #f2f3f5;
  box-shadow: 0 20px 80px rgba(0,0,0,0.7);
  max-width: 860px;
  animation: pop .25s ease-out;
}
@keyframes pop { from { transform: scale(0.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ---------- menu (prototype §10) ---------- */
.title-en {
  font-size: 64px; font-weight: 900; letter-spacing: 4px;
  background: linear-gradient(180deg, #ffe27a 20%, #ff9d3c 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 6px 0 rgba(0,0,0,0.35);
  line-height: 1;
}
.title-zh {
  font-size: 26px; font-weight: 800; color: #f2f3f5;
  letter-spacing: 14px; margin: 6px 0 2px;
}
.subtitle { color: #9aa0ab; font-size: 15px; margin-bottom: 18px; }
.char-row { display: flex; gap: 14px; justify-content: center; margin: 10px 0 20px; }
.char-card {
  background: #2e323d; border: 2px solid #3a3e4a; border-radius: 14px;
  padding: 10px 12px 8px; cursor: pointer; width: 128px;
  transition: transform .12s, border-color .12s;
}
.char-card:hover { transform: translateY(-3px); }
.char-card.sel { border-color: #ffcc33; background: #3a3423; box-shadow: 0 0 0 3px rgba(255,204,51,0.25); }
.char-card canvas { display: block; margin: 0 auto; }
.char-name { font-weight: 800; font-size: 16px; margin-top: 2px; }
.char-perk { font-size: 12px; color: #9fe8a0; }
.btn {
  pointer-events: auto;
  display: inline-block; border: none; cursor: pointer;
  font-family: inherit; font-weight: 800; font-size: 22px;
  color: #26282e; background: linear-gradient(180deg, #ffe27a, #ffb42e);
  padding: 14px 66px; border-radius: 14px;
  box-shadow: 0 6px 0 #a86f12, 0 10px 24px rgba(0,0,0,0.4);
  transition: transform .08s;
  letter-spacing: 6px;
}
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #a86f12; }
.btn.ghost {
  background: #33363f; color: #e8eaee; font-size: 16px; letter-spacing: 2px;
  box-shadow: 0 4px 0 #1d1f24, 0 8px 18px rgba(0,0,0,0.35); padding: 12px 30px;
}
.btn.start:active { transform: translateY(4px); }
.chapter { margin-top: 12px; color: #8ef1ff; font-size: 14px; font-weight: 700; }
.help { margin-top: 14px; font-size: 13px; color: #9aa0ab; line-height: 1.8; }
.help .muted { color: #6a707c; }
.help b { color: #ffd75e; }

/* ---------- upgrade (prototype §04) ---------- */
.levelup {
  font-size: 40px; font-weight: 900; letter-spacing: 6px;
  color: #ffd75e; text-shadow: 0 3px 0 rgba(0,0,0,0.5), 0 0 26px rgba(255,204,51,0.45);
}
.pick-one { color: #9aa0ab; margin: 4px 0 18px; font-size: 15px; }
.up-row { display: flex; gap: 18px; justify-content: center; }
.up-card {
  width: 210px; border-radius: 14px; padding: 20px 14px 14px; cursor: pointer;
  background: #2e323d; border: 2px solid #3a3e4a;
  transition: transform .12s, box-shadow .12s;
}
.up-card:hover { transform: translateY(-6px); }
.up-card.common { border-bottom: 5px solid #6fbf4a; }
.up-card.rare { border-bottom: 5px solid #4a9df0; }
.up-card.epic { border-bottom: 5px solid #b06df5; }
.up-card.common:hover { box-shadow: 0 10px 30px rgba(111,191,74,0.25); }
.up-card.rare:hover { box-shadow: 0 10px 30px rgba(74,157,240,0.25); }
.up-card.epic:hover { box-shadow: 0 10px 30px rgba(176,109,245,0.3); }
.up-icon { font-size: 44px; line-height: 1; }
.up-name { font-weight: 800; font-size: 17px; margin: 10px 0 6px; }
.up-desc { font-size: 12.5px; color: #9aa0ab; min-height: 36px; }
.up-rar { font-size: 12px; font-weight: 700; margin-top: 8px; }

/* ---------- settle (prototype §09) ---------- */
.banner {
  font-size: 44px; font-weight: 900; letter-spacing: 4px; margin-bottom: 6px;
}
.banner.win { color: #ffd75e; text-shadow: 0 3px 0 rgba(0,0,0,0.5), 0 0 30px rgba(255,204,51,0.5); }
.banner.lose { color: #e8493f; text-shadow: 0 3px 0 rgba(0,0,0,0.5); }
.banner .wing { font-size: 34px; }
.stat-grid {
  display: grid; grid-template-columns: auto auto; gap: 6px 40px;
  justify-content: center; margin: 14px 0 20px; font-size: 19px;
}
.stat-k { color: #9aa0ab; text-align: left; }
.stat-v { color: #fff; font-weight: 800; text-align: right; }
.btn-row { display: flex; gap: 16px; justify-content: center; }
.btn-row .btn { font-size: 18px; padding: 12px 40px; letter-spacing: 3px; }
.confetti-line { margin-top: 10px; font-size: 22px; }

.p-title { font-size: 30px; font-weight: 800; margin-bottom: 16px; letter-spacing: 6px; }
.pause .btn { display: block; width: 260px; margin: 10px auto; }

.toast {
  position: absolute; top: 96px; left: 50%;
  transform: translate(-50%, -18px);
  background: rgba(24,26,32,0.94); color: #ffe27a;
  border: 1.5px solid #3a3e4a; border-radius: 12px;
  padding: 10px 24px; font-size: 17px; font-weight: 700;
  opacity: 0; transition: all .3s;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
