/* THE NIGHT SHIFT — game page */

.game-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.game-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}
.game-head .back { color: var(--text-dim); font-weight: 700; font-size: .9rem; }
.game-head .back:hover { color: var(--accent); }
.game-title {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .22em;
  color: var(--text-dim);
}

.game-wrap {
  flex: 1;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  padding: 16px 16px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hud {
  display: flex;
  gap: 10px;
}
.hud-cell {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hud-label {
  font-size: .62rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-dim);
}
.hud-value { font-size: 1.3rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.hud-value.accent { color: var(--accent); }

.stage {
  position: relative;
  background: linear-gradient(180deg, #17181b, #0d0e10);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  touch-action: manipulation;
}
#gameSvg { display: block; width: 100%; height: auto; }

/* flakes are tappable; the hit area is larger than the visible fleck */
.flake { cursor: pointer; }
.flake-hit { fill: transparent; }

/* overlays */
.screen {
  position: absolute;
  inset: 0;
  background: rgba(9,9,10,0.92);
  backdrop-filter: blur(3px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px 26px;
  gap: 10px;
}
.screen.hidden { display: none; }
.screen h1 {
  font-size: 1.5rem;
  letter-spacing: .14em;
  margin: 0 0 6px;
}
.screen h2 { font-size: 1.2rem; margin: 0; color: var(--text-dim); font-weight: 600; }
.screen p { margin: 0; color: var(--text-dim); font-size: .9rem; max-width: 30ch; line-height: 1.5; }
.screen p strong { color: var(--accent); }

.game-btn {
  margin-top: 14px;
  background: linear-gradient(135deg, var(--accent), #ff5e3a);
  color: #1a1000;
  font: inherit;
  font-weight: 800;
  font-size: .95rem;
  padding: 12px 26px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(255,138,61,.3);
}
.game-btn:hover { transform: translateY(-1px); }
.game-btn.ghost {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  box-shadow: none;
  display: inline-flex;
  align-items: center;
}

.final-score {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 6px 0 2px;
}
.final-score span { font-size: 3.4rem; font-weight: 800; color: var(--accent); line-height: 1; }
.final-score small { font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; color: var(--text-dim); }
.best-line { font-size: .78rem; }
.end-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

.game-hint {
  text-align: center;
  color: var(--text-dim);
  font-size: .78rem;
  font-style: italic;
  margin: 0;
}

/* the warning flash before a sweep */
.stage.sweeping { box-shadow: inset 0 0 50px rgba(255,79,163,.22); }
