:root {
  --bg: #0a0a0a;
  --panel: #101010;
  --line: rgba(255, 255, 255, 0.12);
  --text: #f5f5f5;
  --muted: #9d9d9d;
  --dim: #5d5d5d;
  --danger: #b40019;
  --danger-glow: rgba(255, 0, 51, 0.22);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.05), transparent 40%),
    linear-gradient(180deg, #050505 0%, var(--bg) 100%);
  color: var(--text);
  font-family: "Courier New", "Fira Code", "JetBrains Mono", monospace;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.app-shell {
  width: min(100%, 980px);
}

.hud-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 90vh;
  min-height: 540px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0)),
    var(--panel);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 24px 80px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

#gameCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.hud-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hud-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  color: var(--text);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
  font-size: clamp(14px, 4vw, 18px);
  font-weight: bold;
  letter-spacing: 0.04em;
}

.status-badge,
.pause-badge {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(0, 0, 0, 0.88);
  color: var(--text);
  letter-spacing: 0.16em;
  font-size: clamp(12px, 1.8vw, 16px);
  text-align: center;
  backdrop-filter: blur(4px);
}

.status-badge {
  top: 72px;
}

.pause-badge {
  top: 124px;
}

.hidden {
  opacity: 0;
}

.notes {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 4px 0;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.05em;
}

.notes p {
  margin: 0;
}

@media (max-width: 720px) {
  body {
    padding: 0;
  }

  .app-shell {
    width: 100%;
  }

  .hud-frame {
    height: 100dvh;
    min-height: -webkit-fill-available;
    border: 0;
    max-height: none;
    aspect-ratio: auto;
  }

  .notes {
    display: none;
  }
}
