:root {
  color-scheme: dark;
  --bg: #070910;
  --panel: #0e1220;
  --panel-2: #141a2b;
  --text: #eef3ff;
  --muted: #8f9ab6;
  --line: #27304a;
  --accent: #66e3ff;
  --accent-2: #a6ff6a;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 50% -10%, #17213d 0, transparent 34rem),
    linear-gradient(180deg, #090c15, var(--bg));
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, kbd { font: inherit; }
button {
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  padding: .55rem .8rem;
  border-radius: .65rem;
  cursor: pointer;
}
button:hover { border-color: #53607d; }
.shell {
  width: min(1500px, 100%);
  margin: 0 auto;
  padding: 18px;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.brand { display: flex; gap: 10px; align-items: center; }
.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid var(--accent);
  position: relative;
  box-shadow: 0 0 24px #66e3ff55;
}
.brand-mark::after {
  content: "";
  position: absolute;
  width: 36px;
  height: 10px;
  border: 2px solid var(--accent-2);
  border-radius: 50%;
  left: -7px;
  top: 6px;
  transform: rotate(-20deg);
}
.brand strong { display: block; letter-spacing: .12em; font-size: .95rem; }
.brand span { color: var(--muted); font-size: .76rem; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.status {
  color: var(--muted);
  border: 1px solid var(--line);
  background: #0a0e18bb;
  border-radius: 999px;
  padding: .5rem .7rem;
  font-size: .82rem;
}
.status.connected { color: var(--accent-2); border-color: #456a3a; }
.game-wrap {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #05070d;
  box-shadow: 0 22px 70px #0008;
}
canvas {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16 / 9;
  outline: none;
  background: #05070d;
  image-rendering: auto;
}
.focus-hint {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  color: #d9e1f7;
  background: #080b13dd;
  border: 1px solid #26304b;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s ease;
}
.focus-hint.show { opacity: 1; }
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 18px;
  color: var(--muted);
  margin-top: 12px;
  font-size: .82rem;
}
kbd {
  min-width: 1.5rem;
  display: inline-block;
  text-align: center;
  color: #dbe6ff;
  background: #121829;
  border: 1px solid #35405d;
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: .1rem .3rem;
  font-size: .76rem;
}
@media (max-width: 760px) {
  .shell { padding: 8px; }
  .topbar { align-items: flex-start; }
  .actions { gap: 5px; }
  .status { width: 100%; text-align: center; order: 3; }
  button { padding: .45rem .6rem; font-size: .8rem; }
  .brand span { display: none; }
  .controls { font-size: .75rem; gap: 6px 12px; }
}
