* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #050713;
  font-family: Arial, Helvetica, sans-serif;
  color: white;
  touch-action: none;
  overscroll-behavior: none;
}

#gameWrapper {
  position: relative;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at center, #111833, #050713 70%);
  overflow: hidden;
  touch-action: none;
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.hidden {
  display: none !important;
}

.hud {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 5;
  pointer-events: none;
}

.hud div {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(0, 220, 255, 0.35);
  padding: 8px 12px;
  border-radius: 12px;
  min-width: 80px;
}

.hud span {
  display: block;
  font-size: 11px;
  color: #55e8ff;
}

.hud strong {
  font-size: 22px;
}

#pauseBtn {
  pointer-events: auto;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.3);
  background: rgba(255,255,255,.08);
  color: white;
  font-size: 22px;
}

.screen {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgba(5, 7, 19, 0.94);
  padding: 24px;
  text-align: center;
}

.screen.small {
  inset: 10%;
  border-radius: 24px;
  border: 1px solid rgba(0, 220, 255, 0.35);
  background: rgba(8, 12, 32, 0.96);
}

h1 {
  margin: 0;
  font-size: 48px;
  line-height: .9;
  letter-spacing: 1px;
}

h1 span {
  color: #55e8ff;
}

h2 {
  margin: 0 0 20px;
  font-size: 38px;
  color: #55e8ff;
}

p {
  color: #d7d7d7;
  line-height: 1.45;
}

button {
  width: min(280px, 80vw);
  padding: 15px 20px;
  margin: 7px 0;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, #00d4ff, #8b5cff);
  color: white;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: .5px;
}

button:active {
  transform: scale(0.97);
}

#finalScore,
#finalBest,
#recordPanelBest {
  font-size: 42px;
  color: #ffd400;
  margin-bottom: 12px;
}

.menuBanner {
  position: relative;
  width: min(420px, 92vw);
  border-radius: 28px;
  overflow: hidden;
  margin-bottom: 28px;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow:
    0 0 40px rgba(0,212,255,.15),
    0 0 80px rgba(139,92,255,.08);
}

.menuBanner img {
  width: 100%;
  display: block;
}

.bannerOverlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(5,7,19,.92), rgba(5,7,19,.08));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
}

.bannerOverlay h1 {
  text-align: left;
}

.bannerOverlay p {
  margin-top: 14px;
  text-align: left;
  font-size: 15px;
}

.menuButtons {
  display: flex;
  flex-direction: column;
  align-items: center;
}