:root {
  --bg: #0c0d12;
  --panel: #1d1f27;
  --line: #343846;
  --text: #e8e9ef;
  --muted: #9aa0b4;
  --accent: #f2a93b;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: #05060a;
  color: var(--text);
  font-family: "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

/* 画面居中，只显示场景 */
#app { height: 100%; display: grid; place-items: center; }
.net-bar { position: absolute; top: 10px; z-index: 5; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; max-width: 98vw; padding: 5px; background: rgba(15,18,28,.85); border-radius: 8px; }
.net-bar button, .net-bar input { font: inherit; font-size: 12px; color: #eee; background: #252834; border: 1px solid #4a4e59; border-radius: 5px; padding: 5px 8px; }
.net-bar button { cursor: pointer; }
#roomCode { width: 84px; } #roomLink { width: 230px; } #netStatus { font-size: 12px; color: #f2a93b; }
.game-wrap { position: relative; line-height: 0; }
#game {
  display: block;
  background: #101218;
  border-radius: 12px;
  box-shadow: 0 18px 70px rgba(0,0,0,.6);
  max-width: 96vw;
  max-height: 96vh;
}

/* ---- 结束覆盖层 ---- */
.overlay {
  position: absolute; inset: 0; z-index: 6; display: none;
  align-items: center; justify-content: center;
  background: rgba(6,8,12,.66); backdrop-filter: blur(2px);
  border-radius: 12px;
}
.overlay-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  padding: 30px 40px; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.6);
}
.overlay-card h2 {
  margin: 0 0 20px; font-size: 40px; font-weight: 900; letter-spacing: 6px;
  color: #ff7a6b; text-shadow: 0 0 26px rgba(239,91,91,.5);
}
.act-btn {
  appearance: none; border: 1px solid var(--line); background: #252834;
  color: var(--text); border-radius: 9px; padding: 11px 22px; cursor: pointer;
  font-size: 14px; display: inline-flex; flex-direction: column; align-items: center; gap: 3px;
  transition: .12s; font-family: inherit;
}
.act-btn small { color: var(--muted); font-size: 10.5px; }
.act-btn.wide { width: 100%; }
.act-btn.primary { border-color: rgba(242,169,59,.6); color: #ffe0a8; }
.act-btn.primary:hover { background: rgba(242,169,59,.14); transform: translateY(-1px); }
