* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  background: #1a1a2e;
  display: flex; justify-content: center; align-items: center;
  height: 100vh; overflow: hidden;
  font-family: 'Segoe UI', Arial, sans-serif;
}
#game-container { position: relative; width: 800px; height: 600px; }
canvas {
  display: block; border: 3px solid #e94560; border-radius: 8px;
  background: #0f3460;
}

/* ── HUD ── */
#ui {
  position: absolute; top: 10px; left: 10px; right: 10px;
  display: flex; gap: 10px; font-size: 15px; font-weight: bold; color: #fff;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.9);
  pointer-events: none; flex-wrap: wrap;
}
#ui div {
  background: rgba(0,0,0,0.65); padding: 5px 12px; border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.15);
  white-space: nowrap;
}
#level-name {
  font-size: 14px; color: #f39c12;
  border-color: rgba(243,156,18,0.3);
}
#score { border-color: rgba(46,204,113,0.3); color: #2ecc71; }
#item-box {
  margin-left: auto; font-size: 26px; padding: 2px 10px;
  border-color: rgba(241,196,15,0.4);
}

/* ── Start Screen ── */
#start-screen, #finish-screen {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: rgba(6, 3, 110, 0.805); color: #fff; z-index: 10;
  border-radius: 8px;
}
#start-screen h1 {
  font-size: 39px; margin-bottom: 20px; color: #ea1337;
  text-shadow: 0 0 20px rgba(233,69,96,0.5);
}

.controls-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px 30px; margin-bottom: 16px;
}
.control-item {
  display: flex; align-items: center; gap: 10px;
}
.key {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 52px; height: 38px; padding: 0 10px;
  background: #333; border: 2px solid #555; border-bottom: 4px solid #555;
  border-radius: 6px; font-size: 14px; font-weight: bold; color: #fff;
  font-family: 'Consolas', monospace;
}
.action {
  font-size: 14px; color: #ccc;
}

.items-help {
  margin: 8px 0 4px;
  text-align: center;
}
.items-help p {
  font-size: 13px; color: #aaa; line-height: 1.8;
}

.sub-info {
  font-size: 13px; color: #777; margin: 6px 0 18px;
}

button {
  padding: 14px 44px; font-size: 20px; font-weight: bold;
  background: #02fb12; color: #fff; border: none; border-radius: 30px;
  cursor: pointer; transition: all 0.2s;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
button:hover { background: #ff6b81; transform: scale(1.05); box-shadow: 0 0 20px rgba(233,69,96,0.5); }

#finish-screen h1 { font-size: 42px; margin-bottom: 20px; }
