* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: #10131a;
  color: #f4f7fb;
  font-family: Arial, Helvetica, sans-serif;
  display: grid;
  place-items: center;
}
.start-screen {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(7, 10, 17, .92);
  backdrop-filter: blur(12px);
}
.start-screen.hidden { display: none; }
.bop-screen {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(7, 10, 17, .78);
  backdrop-filter: blur(8px);
}
.bop-screen.hidden { display: none; }
.bop-card {
  width: min(420px, 100%);
  padding: 32px;
  text-align: center;
  background: #1a2030;
  border: 1px solid #f6d365;
  border-radius: 24px;
  box-shadow: 0 30px 100px rgba(0,0,0,.65);
}
.bop-mark { color: #f6d365; font-size: 34px; font-weight: 900; }
.bop-card h2 { margin: 10px 0 8px; font-size: 26px; }
.bop-actions { margin-top: 24px; }
.bop-actions button.ghost { margin-top: 0; }
.start-card {
  width: min(440px, 100%);
  padding: 36px;
  text-align: center;
  background: #1a2030;
  border: 1px solid #394154;
  border-radius: 24px;
  box-shadow: 0 30px 100px rgba(0,0,0,.55);
}
.start-mark {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  border-radius: 18px;
  color: #10131a;
  background: #f6d365;
  font-size: 38px;
  font-weight: 900;
}
.start-card h1 { margin-bottom: 8px; }
.start-card > p { line-height: 1.5; }
.start-form { margin-top: 24px; text-align: left; }
.start-status { min-height: 20px; margin: 0 0 8px; color: #fb7185; font-size: 13px; }
button.start-continue { margin-top: 10px; }
button.text-button {
  width: 100%;
  margin-top: 10px;
  padding: 6px;
  color: #aeb7c7;
  background: transparent;
}
button.text-button:hover { color: #f6d365; }
.start-note { margin-top: 18px !important; font-size: 13px; }
.shell { width: min(1380px, 96vw); }
.topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 14px;
}
h1 { margin: 0 0 4px; font-size: 42px; letter-spacing: -0.06em; }
p { margin: 0; color: #aeb7c7; }
.stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.stats span, .controls div, .card {
  background: #1a2030;
  border: 1px solid #2c3448;
}
.stats span {
  padding: 10px 14px;
  border-radius: 999px;
}
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 14px;
  align-items: start;
}
.game-wrap { min-width: 0; }
canvas {
  width: 100%;
  height: auto;
  display: block;
  background: #171d28;
  border: 1px solid #394154;
  border-radius: 18px;
  box-shadow: 0 20px 80px rgba(0,0,0,.35);
}
.panel { display: grid; gap: 14px; }
.card { border-radius: 18px; padding: 14px; }
h2 { margin: 0 0 10px; font-size: 18px; }
.muted { font-size: 13px; margin-bottom: 10px; min-height: 18px; }
input {
  width: 100%;
  margin-bottom: 8px;
  border: 1px solid #394154;
  background: #10131a;
  color: #fff;
  border-radius: 10px;
  padding: 10px;
  outline: none;
}
.row { display: flex; gap: 8px; }
button {
  flex: 1;
  border: 0;
  border-radius: 10px;
  padding: 10px;
  color: #10131a;
  background: #f6d365;
  font-weight: 700;
  cursor: pointer;
}
button.ghost { width: 100%; background: #2c3448; color: #f4f7fb; margin-top: 8px; }
.hidden { display: none; }
.leaderboard { margin: 0; padding-left: 22px; color: #dbe3f3; }
.leaderboard li { margin: 8px 0; }
.leaderboard small { display: block; color: #8f9bb1; }
.controls {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  color: #c5ccda;
  margin-top: 12px;
  font-size: 14px;
}
.controls div {
  padding: 8px 11px;
  border-radius: 12px;
}
@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; }
  .topbar { align-items: start; flex-direction: column; }
  .stats { justify-content: flex-start; }
}
.connection {
  position: absolute;
  left: 16px;
  bottom: 16px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(0,0,0,.5);
  color: #fff;
  font-size: 13px;
  backdrop-filter: blur(8px);
}
.game-wrap { position: relative; }
