* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #1a1a2e;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  font-family: 'Courier New', monospace;
  overflow: hidden;
  touch-action: none;
}

#game-container {
  position: relative;
  border: 2px solid #0f3460;
  box-shadow: 0 0 20px rgba(0, 100, 255, 0.3);
}

#game-canvas {
  display: block;
  background: #0a0a1a;
}

#ui-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.screen.active {
  opacity: 1;
  pointer-events: auto;
}

.screen h1 {
  font-size: 48px;
  margin-bottom: 20px;
  text-shadow: 0 0 10px rgba(0, 200, 255, 0.8);
}

.screen p {
  font-size: 18px;
  color: #aaa;
}

#hud {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  color: #fff;
  font-size: 16px;
  text-shadow: 0 0 5px rgba(0, 200, 255, 0.5);
}

#hud span {
  color: #00c8ff;
  font-weight: bold;
}

/* Responsive scaling */
#game-container {
  max-width: calc(100vw - 20px);
  max-height: calc(100vh - 20px);
}

#game-canvas {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  width: auto;
  height: auto;
}

@media (max-width: 720px) {
  .screen h1 {
    font-size: 32px;
  }
  .screen p {
    font-size: 14px;
  }
  #hud {
    font-size: 12px;
    padding: 6px 10px;
  }
}
