:root {
  color-scheme: dark;
  --fu-ink: #06080c;
  --fu-coal: #0b0f16;
  --fu-panel: #10151f;
  --fu-panel-raised: #151c28;
  --fu-line: rgba(233, 238, 246, 0.1);
  --fu-volt: #c8ff2e;
  --fu-cyan: #3ee6ff;
  --fu-amber: #ffb01f;
  --fu-red: #ff4d5e;
  --fu-mist: #e9eef6;
  --fu-dim: #8b96a8;
  font-family: Inter, "Segoe UI", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  background: var(--fu-ink);
  color: var(--fu-mist);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body, #root { width: 100%; min-width: 320px; min-height: 100%; margin: 0; }
body {
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% -28%, rgba(200, 255, 46, .11), transparent 52%),
    radial-gradient(ellipse at 100% 100%, rgba(62, 230, 255, .055), transparent 38%),
    var(--fu-ink);
}
button, select, input { font: inherit; }
button { cursor: pointer; }
::selection { background: var(--fu-volt); color: var(--fu-ink); }

.fu-shell {
  position: relative;
  display: grid;
  grid-template-rows: 70px minmax(0, 1fr);
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  isolation: isolate;
  background: transparent;
}
.fu-shell::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  pointer-events: none;
  opacity: .25;
  background-image: repeating-linear-gradient(-55deg, transparent 0 17px, rgba(255,255,255,.022) 17px 18px);
  mask-image: linear-gradient(to bottom, #000 0%, transparent 76%);
}
.fu-shell-header {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
  align-items: center;
  gap: 22px;
  padding: 9px clamp(12px, 2vw, 28px);
  border-bottom: 1px solid var(--fu-line);
  background: linear-gradient(100deg, rgba(11,15,22,.97), rgba(6,8,12,.95) 50%, rgba(11,15,22,.97));
  box-shadow: 0 10px 36px rgba(0,0,0,.34), inset 0 -1px 0 rgba(62,230,255,.035);
  backdrop-filter: blur(18px);
}
.fu-shell-header::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 1px;
  content: "";
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(200,255,46,.48) 28%, rgba(62,230,255,.32) 72%, transparent);
  opacity: .7;
}
.fu-brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 11px;
  min-width: 0;
  border: 0;
  padding: 0;
  color: var(--fu-mist);
  background: transparent;
  text-align: left;
}
.fu-brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  flex: none;
  place-items: center;
  clip-path: polygon(0 0, 77% 0, 100% 23%, 100% 100%, 23% 100%, 0 77%);
  color: var(--fu-ink);
  background: linear-gradient(145deg, #d9ff68, var(--fu-volt));
  box-shadow: 0 0 25px rgba(200,255,46,.18);
  font-size: 13px;
  font-weight: 1000;
  letter-spacing: -.06em;
}
.fu-brand strong, .fu-brand small { display: block; }
.fu-brand strong {
  font-size: 14px;
  font-weight: 1000;
  line-height: 1;
  letter-spacing: .105em;
  white-space: nowrap;
}
.fu-brand small {
  margin-top: 5px;
  color: var(--fu-dim);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.fu-shell-nav {
  display: flex;
  align-items: center;
  justify-self: center;
  gap: 3px;
  padding: 4px;
  border: 1px solid rgba(233,238,246,.085);
  border-radius: 8px;
  background: rgba(255,255,255,.025);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
}
.fu-shell-nav button {
  position: relative;
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 0 clamp(10px, 1.25vw, 18px);
  color: #929bad;
  background: transparent;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .115em;
  text-transform: uppercase;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease, transform 160ms ease;
}
.fu-shell-nav button:hover {
  color: var(--fu-mist);
  border-color: rgba(62,230,255,.2);
  background: rgba(62,230,255,.045);
  transform: translateY(-1px);
}
.fu-shell-nav button.active {
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
  color: var(--fu-ink);
  background: var(--fu-volt);
  box-shadow: 0 0 22px rgba(200,255,46,.12);
  border-color: var(--fu-volt);
}
.fu-build-state {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 10px;
  min-width: 0;
  padding-left: 10px;
}
.fu-build-state > span {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--fu-amber);
  box-shadow: 0 0 0 5px rgba(255,176,31,.08), 0 0 14px rgba(255,176,31,.45);
}
.fu-build-state > span.ready {
  background: var(--fu-volt);
  box-shadow: 0 0 0 5px rgba(200,255,46,.08), 0 0 13px rgba(200,255,46,.45);
}
.fu-build-state > span.error {
  background: var(--fu-red);
  box-shadow: 0 0 0 5px rgba(255,77,94,.08), 0 0 14px rgba(255,77,94,.45);
}
.fu-build-state strong, .fu-build-state small {
  display: block;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fu-build-state strong { color: #dce3ed; font-size: 10px; font-weight: 900; letter-spacing: .02em; }
.fu-build-state small { margin-top: 3px; color: #778297; font-size: 8px; font-weight: 750; letter-spacing: .04em; }
.fu-game-stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% -12%, rgba(200,255,46,.055), transparent 55%), #06080c;
}
.fu-game-stage::before {
  position: absolute;
  z-index: 1;
  inset: 0;
  content: "";
  pointer-events: none;
  background: linear-gradient(90deg, transparent 49.95%, rgba(62,230,255,.025) 50%, transparent 50.05%);
}
.fu-game-frame {
  position: relative;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--fu-ink);
  animation: fu-frame-in 360ms ease-out both;
}
.fu-loading, .fu-error {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 28px;
  text-align: center;
}
.fu-loading strong { margin-top: 22px; font-size: clamp(20px, 3vw, 34px); letter-spacing: -.045em; }
.fu-loading small { max-width: 460px; margin-top: 8px; color: var(--fu-dim); font-size: 12px; line-height: 1.65; }
.fu-loading-pitch {
  position: relative;
  width: 92px;
  height: 59px;
  clip-path: polygon(0 0, 89% 0, 100% 18%, 100% 100%, 11% 100%, 0 82%);
  border: 0;
  background: repeating-linear-gradient(90deg, #1b3021 0 15px, #223b26 15px 30px);
  box-shadow: 0 18px 50px rgba(0,0,0,.6);
  outline: 1px solid rgba(200,255,46,.5);
  animation: fu-pitch-breathe 1.25s ease-in-out infinite;
}
.fu-loading-pitch::before { position: absolute; inset: 5px; content: ""; border: 1px solid rgba(200,255,46,.45); }
.fu-loading-pitch::after { position: absolute; top: 50%; left: 50%; width: 17px; height: 17px; content: ""; border: 1px solid rgba(200,255,46,.75); border-radius: 50%; transform: translate(-50%, -50%); }
.fu-error span { color: var(--fu-volt); font-size: 10px; font-weight: 1000; letter-spacing: .22em; }
.fu-error h1 { margin: 12px 0 0; font-size: clamp(25px, 4vw, 46px); letter-spacing: -.05em; }
.fu-error p { max-width: 580px; color: #a0aabd; font-size: 13px; line-height: 1.7; }
.fu-error button { min-height: 44px; margin-top: 10px; clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%); border: 1px solid var(--fu-volt); border-radius: 0; padding: 0 20px; color: var(--fu-ink); background: var(--fu-volt); font-weight: 950; text-transform: uppercase; letter-spacing: .1em; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible { outline: 2px solid var(--fu-cyan); outline-offset: 3px; }
@keyframes fu-frame-in { from { opacity: 0; transform: scale(.998); } to { opacity: 1; transform: none; } }
@keyframes fu-pitch-breathe { 50% { transform: translateY(-4px); filter: brightness(1.15); } }

@media (max-width: 950px) {
  .fu-shell-header { grid-template-columns: minmax(175px, 1fr) auto; gap: 12px; }
  .fu-build-state { display: none; }
  .fu-shell-nav { justify-self: end; }
}
@media (max-width: 560px) {
  .fu-shell { grid-template-rows: 57px minmax(0, 1fr); }
  .fu-shell-header { grid-template-columns: minmax(105px, auto) minmax(0, 1fr); gap: 7px; padding: 7px 9px; }
  .fu-brand { gap: 7px; }
  .fu-brand-mark { width: 34px; height: 34px; font-size: 11px; }
  .fu-brand strong { font-size: 10px; letter-spacing: .055em; }
  .fu-brand small { display: none; }
  .fu-shell-nav { gap: 1px; max-width: 100%; padding: 3px; }
  .fu-shell-nav button { min-height: 34px; padding: 0 clamp(5px, 1.5vw, 9px); font-size: 8px; letter-spacing: .06em; }
  .fu-error { padding: 20px 16px; }
  .fu-error p { font-size: 12px; }
}
@media (max-width: 355px) {
  .fu-shell-header { padding-inline: 6px; gap: 4px; }
  .fu-brand-mark { width: 30px; height: 30px; }
  .fu-brand strong { font-size: 9px; }
  .fu-shell-nav button { padding-inline: 4px; font-size: 7px; }
}
@media (prefers-reduced-motion: reduce) {
  .fu-game-frame, .fu-loading-pitch { animation: none; }
  .fu-shell-nav button { transition: none; }
}
