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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: #0f172a;
  color: #f8fafc;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 16px;
}

.game-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 840px;
  width: 100%;
}

header {
  text-align: center;
  margin-bottom: 12px;
}

h1 {
  font-size: 2rem;
  color: #38bdf8;
  margin-bottom: 4px;
}

.subtitle {
  font-size: 0.95rem;
  color: #94a3b8;
}

.hud {
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 800px;
  background-color: #1e293b;
  padding: 10px 20px;
  border-radius: 8px 8px 0 0;
  font-weight: bold;
  font-size: 1.1rem;
  color: #e2e8f0;
  border: 1px solid #334155;
  border-bottom: none;
}

.canvas-wrapper {
  position: relative;
  width: 100%;
  max-width: 800px;
}

canvas {
  display: block;
  width: 100%;
  height: auto;
  background-color: #1e293b;
  border: 1px solid #334155;
  border-radius: 0 0 8px 8px;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 23, 42, 0.85);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 24px;
  border-radius: 0 0 8px 8px;
  backdrop-filter: blur(4px);
}

.overlay h2 {
  font-size: 2rem;
  color: #f8fafc;
  margin-bottom: 12px;
}

.overlay p {
  font-size: 1.05rem;
  color: #cbd5e1;
  max-width: 500px;
  margin-bottom: 24px;
  line-height: 1.5;
}

.btn {
  background-color: #0284c7;
  color: #ffffff;
  border: none;
  padding: 12px 28px;
  font-size: 1.1rem;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.btn:hover {
  background-color: #0369a1;
}

.btn:active {
  transform: scale(0.98);
}

.controls-hint {
  margin-top: 12px;
  font-size: 0.85rem;
  color: #64748b;
  text-align: center;
}

#mis-leaderboard {
  margin-top: 24px;
  width: 100%;
  max-width: 800px;
}
