:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #010207;
  overscroll-behavior: none;
}

body {
  display: grid;
  place-items: center;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

#game-shell {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 45%, rgba(27, 37, 92, 0.34), transparent 46%),
    #010207;
}

#game {
  display: block;
  width: min(100vw, calc(100vh * 4 / 3));
  height: min(100vh, calc(100vw * 3 / 4));
  max-width: 800px;
  max-height: 600px;
  background: #02040c;
  outline: none;
  cursor: crosshair;
  touch-action: none;
  box-shadow:
    0 0 0 1px rgba(25, 231, 255, 0.12),
    0 0 44px rgba(25, 231, 255, 0.08),
    0 0 80px rgba(157, 99, 255, 0.06);
}

#sound-toggle {
  position: absolute;
  top: max(10px, calc((100vh - min(100vh, calc(100vw * 3 / 4))) / 2 + 10px));
  right: max(10px, calc((100vw - min(100vw, calc(100vh * 4 / 3))) / 2 + 10px));
  width: 42px;
  height: 42px;
  border: 1px solid rgba(25, 231, 255, 0.34);
  border-radius: 12px;
  background: rgba(5, 8, 24, 0.88);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(10px);
  box-shadow:
    0 0 16px rgba(25, 231, 255, 0.1),
    inset 0 0 16px rgba(157, 99, 255, 0.08);
}

#sound-toggle:hover,
#sound-toggle:focus-visible {
  border-color: rgba(255, 43, 214, 0.78);
  background: rgba(14, 13, 39, 0.96);
  box-shadow:
    0 0 20px rgba(255, 43, 214, 0.16),
    inset 0 0 18px rgba(25, 231, 255, 0.1);
}

#sound-toggle:focus-visible {
  outline: 2px solid rgba(25, 231, 255, 0.9);
  outline-offset: 2px;
}

.powered-by {
  position: absolute;
  right: max(12px, calc((100vw - min(100vw, calc(100vh * 4 / 3))) / 2 + 12px));
  bottom: max(8px, calc((100vh - min(100vh, calc(100vw * 3 / 4))) / 2 + 8px));
  color: rgba(179, 233, 255, 0.48);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-shadow: 0 0 8px rgba(25, 231, 255, 0.28);
}

.powered-by:hover,
.powered-by:focus-visible {
  color: rgba(255, 114, 229, 0.95);
}
