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

body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: Arial, sans-serif;
  background: linear-gradient(135deg, #111827, #1e3a8a);
  color: white;
}

.game-wrapper {
  width: min(92vw, 760px);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  gap: 20px;
}

h1 {
  font-size: 28px;
}

.topbar p {
  color: #cbd5e1;
  margin-top: 4px;
}

.stats {
  display: flex;
  gap: 18px;
  font-size: 18px;
  white-space: nowrap;
}

#game {
  position: relative;
  height: 520px;
  overflow: hidden;
  border: 3px solid rgba(255,255,255,.25);
  border-radius: 20px;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,.15) 2px, transparent 3px),
    radial-gradient(circle at 70% 40%, rgba(255,255,255,.13) 2px, transparent 3px),
    linear-gradient(#0f172a, #172554);
  background-size: 90px 90px, 130px 130px, auto;
  box-shadow: 0 20px 50px rgba(0,0,0,.35);
}

#player {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 52px;
  width: 70px;
  text-align: center;
  user-select: none;
}

.item {
  position: absolute;
  top: -60px;
  font-size: 38px;
  user-select: none;
}

.message {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: rgba(2, 6, 23, .72);
  backdrop-filter: blur(4px);
  padding: 20px;
}

.message h2 {
  font-size: 42px;
  margin-bottom: 10px;
}

.message p {
  color: #cbd5e1;
  margin-bottom: 22px;
}

button {
  border: none;
  border-radius: 12px;
  padding: 12px 20px;
  font-weight: bold;
  cursor: pointer;
  transition: .15s;
}

button:hover {
  transform: translateY(-2px);
}

#startBtn, #restartBtn {
  background: #3b82f6;
  color: white;
}

.controls {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 15px 0;
}

.controls button {
  width: 75px;
  font-size: 25px;
  background: #334155;
  color: white;
}

.bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #cbd5e1;
}

@media (max-width: 600px) {
  #game {
    height: 430px;
  }

  h1 {
    font-size: 21px;
  }

  .topbar {
    align-items: flex-start;
  }

  .stats {
    font-size: 14px;
    gap: 8px;
  }
}
