:root {
  color-scheme: dark;
  --bg1: #10051d;
  --bg2: #1d1036;
  --panel: rgba(10, 12, 24, 0.84);
  --line: rgba(255, 255, 255, 0.14);
  --text: #f4f4ff;
  --accent: #ffd166;
  --accent2: #78f0ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top, rgba(120, 240, 255, 0.16), transparent 30%),
    linear-gradient(180deg, var(--bg2), var(--bg1));
  color: var(--text);
}

.shell {
  width: min(1100px, calc(100vw - 24px));
  margin: 0 auto;
  padding: 16px 0 20px;
}

.hud-top,
.hud-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.hud-top {
  margin-bottom: 14px;
}

.hud-top h1 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 3rem);
  letter-spacing: 0.08em;
}

.tag {
  margin: 4px 0 0;
  opacity: 0.82;
}

.controls-card,
.hud-bottom {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  backdrop-filter: blur(8px);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
}

.controls-card {
  display: grid;
  gap: 6px;
  min-width: 280px;
  padding: 12px 14px;
  font-size: 0.95rem;
}

main {
  display: flex;
  justify-content: center;
}

canvas {
  width: 100%;
  max-width: 960px;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #342d5f 0%, #182133 58%, #0d1424 100%);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.38);
}

.hud-bottom {
  margin-top: 14px;
  padding: 12px 14px;
  font-size: 0.94rem;
}

@media (max-width: 840px) {
  .hud-top,
  .hud-bottom {
    flex-direction: column;
    align-items: stretch;
  }

  .controls-card {
    min-width: 0;
  }
}
