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

:root {
  --res: #ff2d78;
  --neon: #00f0ff;
  --oro: #ffd166;
  --dim: #8a93ad;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0a0510;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: #f2f7ff;
  -webkit-user-select: none;
  user-select: none;
  touch-action: none;
}

#game {
  position: fixed;
  inset: 0;
  display: block;
}

.overlay {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
  text-align: center;
  background: radial-gradient(ellipse at center, rgba(18,6,16,.88) 0%, rgba(8,3,10,.97) 100%);
  z-index: 10;
  padding: 24px;
}

.hidden { display: none !important; }

.game-title {
  font-size: clamp(56px, 11vw, 110px);
  font-weight: 800;
  letter-spacing: 16px;
  line-height: 1;
  color: #f8fbff;
  margin-left: 16px;
}

.game-title span {
  color: var(--res);
  text-shadow: 0 0 28px var(--res), 0 0 70px rgba(255,45,120,.35);
}

.tagline {
  font-size: clamp(12px, 2vw, 17px);
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--neon);
}

.rules p { margin: 3px 0; color: #c6cce2; font-size: clamp(11.5px, 1.65vw, 14.5px); }
.rules strong { color: var(--res); }
.rules p:nth-child(1) strong { color: var(--oro); }
.rules p:nth-child(2) strong { color: var(--neon); }
.rules p:nth-child(4) strong { color: var(--oro); }
.rules p:nth-child(5) strong { color: var(--neon); }

.btn {
  margin-top: 6px;
  padding: 14px 38px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 4px;
  font-family: inherit;
  color: var(--res);
  background: transparent;
  border: 2px solid var(--res);
  border-radius: 40px;
  cursor: pointer;
  transition: all .18s;
  box-shadow: 0 0 18px rgba(255,45,120,.2), inset 0 0 14px rgba(255,45,120,.06);
}

.btn:hover {
  background: rgba(255,45,120,.12);
  box-shadow: 0 0 30px rgba(255,45,120,.42), inset 0 0 18px rgba(255,45,120,.1);
}

.btn.secondary {
  color: #99a1bd;
  border-color: rgba(150,160,190,.5);
  box-shadow: none;
}

.btn.secondary:hover { background: rgba(150,160,190,.1); box-shadow: none; }

.btn-row { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

.over-title {
  font-size: clamp(26px, 5.5vw, 46px);
  letter-spacing: 8px;
  color: var(--neon);
  text-shadow: 0 0 28px rgba(0,240,255,.45);
}

.final-wrap { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.final-label { font-size: 11px; letter-spacing: 4px; color: var(--dim); }

.final-score {
  font-size: clamp(38px, 7.5vw, 62px);
  font-weight: 800;
  color: #fff;
  text-shadow: 0 0 24px rgba(255,255,255,.35);
  font-variant-numeric: tabular-nums;
}

.dim { color: #9aa4c0; font-size: 13px; letter-spacing: 1.5px; }

.best {
  min-height: 20px;
  font-size: 12.5px;
  letter-spacing: 2px;
  color: #ffd97a;
}
