*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  background: #020617;
  color: #fff;
  font-family: "Inter", sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  margin: 0;
  overflow: hidden;
  user-select: none;
}

.back-home {
  position: fixed;
  top: 20px;
  left: 24px;
  font-size: 0.85rem;
  color: #475569;
  text-decoration: none;
  z-index: 10;
}

.back-home:hover {
  color: #fff;
}

.hud {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  gap: 20px;
}

.hud-stat {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(51, 65, 85, 0.6);
  border-radius: 12px;
  padding: 7px 16px;
  text-align: center;
  backdrop-filter: blur(10px);
}

.hud-val {
  font-family: "Syne", sans-serif;
  font-size: 1.2rem;
  font-weight: 900;
  color: #f8fafc;
}

.hud-label {
  font-size: 0.62rem;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

canvas#game {
  display: block;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 50;
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.overlay.show {
  opacity: 1;
  pointer-events: all;
}

.ov-emoji {
  font-size: 3.5rem;
  margin-bottom: 10px;
}

.ov-title {
  font-family: "Syne", sans-serif;
  font-size: clamp(1.8rem, 7vw, 2.8rem);
  font-weight: 900;
  margin: 0 0 8px;
}

.ov-sub {
  color: #64748b;
  font-size: 0.95rem;
  margin-bottom: 24px;
  text-align: center;
  max-width: 340px;
}

.ov-btn {
  padding: 12px 32px;
  background: rgba(37, 99, 235, 0.3);
  border: 1.5px solid rgba(96, 165, 250, 0.45);
  border-radius: 999px;
  color: #fff;
  font-family: "Syne", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

.ov-btn:hover {
  background: rgba(37, 99, 235, 0.5);
}

.controls-hint {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  color: #334155;
  white-space: nowrap;
}
