/* 小鲶鱼雷霆 —— 纵版弹幕射击（页面样式） */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0; width: 100%; height: 100%;
  overflow: hidden;
  background: #05070f;
  color: #e8eef8;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  -webkit-text-size-adjust: 100%;
  touch-action: none;
}

#cv { position: fixed; inset: 0; display: block; touch-action: none; }

/* ---------------- HUD ---------------- */
.hud { position: fixed; inset: 0; pointer-events: none; z-index: 10; }
.hud.hidden { display: none; }
.hud-row {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 10px 12px;
  padding-top: max(10px, env(safe-area-inset-top));
  gap: 10px;
}
.hud-left { display: flex; flex-direction: column; line-height: 1.2; }
.hud-left b { font-size: 22px; font-weight: 800; color: #fff; letter-spacing: .5px; text-shadow: 0 0 12px rgba(110, 200, 255, .5); }
.hud-left span { font-size: 11px; color: #8fa6c4; }
.hud-right { display: flex; align-items: center; gap: 6px; pointer-events: auto; }
.hud-lives, .hud-bombs, .hud-wpn { font-size: 12px; letter-spacing: .5px; color: #ff7a9c; white-space: nowrap; }
.hud-bombs { color: #ffd166; }
.hud-wpn { color: #8ff0cf; font-weight: 700; }
.hud-right { flex-wrap: wrap; justify-content: flex-end; max-width: 62%; }

/* 锁定激活态：亮青边 + 呼吸 */
.ico-btn.on {
  border-color: rgba(120, 230, 255, .85);
  color: #d9fbff;
  background: rgba(30, 80, 110, .85);
  box-shadow: 0 0 12px rgba(120, 230, 255, .55);
}

.toast {
  position: fixed; left: 50%; top: 18%; z-index: 12;
  transform: translate(-50%, -6px) scale(.96);
  padding: 8px 14px; border-radius: 999px;
  background: rgba(10, 16, 28, .82);
  border: 1px solid rgba(120, 200, 255, .35);
  color: #dbe9ff; font-size: 13px; letter-spacing: .5px;
  opacity: 0; pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  backdrop-filter: blur(6px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }

.ico-btn {
  width: 34px; height: 34px; border-radius: 10px;
  border: 1px solid rgba(120, 180, 255, .28);
  background: rgba(16, 26, 45, .72);
  color: #cfe3ff; font-size: 15px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(6px);
}
.ico-btn:active { transform: scale(.94); }

.boss-bar {
  position: relative; margin: 2px auto 0; width: min(78%, 420px); height: 10px;
  border-radius: 999px; background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 140, 190, .35); overflow: hidden;
}
.boss-bar.hidden { display: none; }
.boss-bar i {
  position: absolute; inset: 0; width: 100%;
  background: linear-gradient(90deg, #ff5f7e, #ffb547);
  transition: width .12s linear;
}
.boss-bar span {
  position: absolute; inset: 0; font-size: 9px; letter-spacing: 2px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .8);
}

.wave-tip {
  position: absolute; left: 0; right: 0; top: 34%;
  text-align: center; font-size: 26px; font-weight: 800; letter-spacing: 4px;
  color: #fff; text-shadow: 0 0 20px rgba(120, 200, 255, .8);
  animation: tipIn .5s ease-out;
  pointer-events: none;
}
.wave-tip.hidden { display: none; }
@keyframes tipIn { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }

.bomb-btn {
  position: fixed; right: 18px; bottom: max(24px, env(safe-area-inset-bottom));
  width: 64px; height: 64px; border-radius: 50%;
  border: 1px solid rgba(255, 209, 102, .45);
  background: radial-gradient(circle at 35% 30%, rgba(255, 209, 102, .35), rgba(20, 26, 45, .8));
  color: #ffd166; font-size: 26px; z-index: 11;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
}
.bomb-btn.hidden { display: none; }
.bomb-btn:active { transform: scale(.92); }

/* ---------------- 开始 / 暂停 / 结束 ---------------- */
.screen {
  position: fixed; inset: 0; z-index: 20;
  display: flex; align-items: center; justify-content: center;
  padding: 18px;
  background: radial-gradient(circle at 50% 0%, rgba(26, 42, 74, .92), rgba(4, 7, 14, .97) 60%);
  overflow: auto;
}
.screen.hidden { display: none; }

.card {
  width: min(460px, 100%);
  padding: 26px 22px;
  border-radius: 18px;
  border: 1px solid rgba(120, 180, 255, .18);
  background: linear-gradient(180deg, rgba(18, 28, 48, .92), rgba(8, 12, 22, .95));
  box-shadow: 0 24px 70px rgba(0, 0, 0, .55);
  text-align: center;
}
.card.small { width: min(360px, 100%); }

.card h1 {
  margin: 0 0 6px; font-size: 26px; letter-spacing: 1px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.card h2 { margin: 0 0 14px; font-size: 20px; letter-spacing: 1px; }
.logo {
  width: 38px; height: 38px; border-radius: 10px;
  box-shadow: 0 0 18px rgba(120, 200, 255, .45);
}
.sub { margin: 4px 0 14px; font-size: 13px; line-height: 1.7; color: #9db2cd; }

.rules {
  list-style: none; margin: 0 0 16px; padding: 12px 14px;
  text-align: left; font-size: 12.5px; line-height: 1.9; color: #b9cbe2;
  border-radius: 12px; background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(120, 180, 255, .12);
}
.rules li::before { content: '▸ '; color: #5fd0ff; }

/* 开始页的「此刻在线」对手列表 */
.roster {
  margin: 0 0 14px; padding: 10px 12px; text-align: left;
  border-radius: 12px; background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(120, 180, 255, .12);
}
.roster-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 11.5px; color: #8fa6c4; margin-bottom: 8px;
}
.roster-head em { font-style: normal; color: #7dd3fc; font-size: 11px; }
.roster-list { display: flex; flex-wrap: wrap; gap: 6px; }
.roster-empty { font-size: 12px; color: #6f86a4; line-height: 1.6; }
.roster-chip {
  padding: 5px 10px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(120, 180, 255, .25);
  background: rgba(20, 32, 52, .8);
  color: #cfe3ff; font-size: 12px;
}
.roster-chip.on {
  border-color: rgba(120, 230, 255, .9);
  background: rgba(30, 80, 110, .85);
  color: #eafaff;
  box-shadow: 0 0 10px rgba(120, 230, 255, .45);
}
.roster-chip:active { transform: scale(.96); }

.best-line { font-size: 12px; color: #8fa6c4; margin-bottom: 14px; }
.best-line b { color: #ffd166; }

.btn {
  display: block; width: 100%;
  margin: 10px 0 0; padding: 13px 18px;
  border-radius: 12px; border: 1px solid rgba(120, 180, 255, .25);
  background: rgba(255, 255, 255, .06);
  color: #dbe9ff; font-size: 15px; font-weight: 600; letter-spacing: 1px;
  cursor: pointer;
}
.btn:active { transform: scale(.98); }
.btn-primary {
  border: 0;
  background: linear-gradient(135deg, #4f8cff, #9b5cff);
  color: #fff;
  box-shadow: 0 10px 26px rgba(90, 120, 255, .35);
}
.link {
  display: inline-block; margin-top: 14px;
  font-size: 12.5px; color: #7fa3cc; text-decoration: none;
}
.link:hover { color: #a9cbff; }

.final {
  display: flex; gap: 10px; justify-content: center;
  margin: 6px 0 12px;
}
.final > div {
  flex: 1; padding: 10px; border-radius: 12px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(120, 180, 255, .12);
}
.final span { display: block; font-size: 11px; color: #8fa6c4; margin-bottom: 4px; }
.final b { font-size: 22px; color: #fff; }
.newbest {
  font-size: 12.5px; color: #ffd166; margin-bottom: 10px;
  animation: tipIn .4s ease-out;
}
.newbest.hidden { display: none; }

@media (max-width: 420px) {
  .card { padding: 20px 16px; }
  .card h1 { font-size: 22px; }
  .rules { font-size: 12px; }
}
