@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

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

body {
  background: #000;
  font-family: 'Press Start 2P', monospace;
  color: #33ff33;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  overflow: hidden;
}

.crt {
  position: relative;
  border-radius: 12px;
  box-shadow: 0 0 60px rgba(51, 255, 51, 0.15), inset 0 0 120px rgba(0,0,0,0.6);
}

.scanlines {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 20;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0,0,0,0) 0px,
    rgba(0,0,0,0) 2px,
    rgba(0,0,0,0.25) 3px,
    rgba(0,0,0,0.25) 4px
  );
  animation: flicker 0.15s infinite;
}

@keyframes flicker {
  0% { opacity: 0.95; }
  50% { opacity: 1; }
  100% { opacity: 0.97; }
}

#game-container {
  position: relative;
  background: #050a05;
  padding: 10px 20px 16px;
  border: 3px solid #1a4d1a;
  border-radius: 12px;
}

header, footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 640px;
  padding: 10px 4px;
  font-size: 11px;
  text-shadow: 0 0 6px #33ff33;
}

.title-small { text-align: center; color: #ffff66; text-shadow: 0 0 8px #ffff66; }

#lives { color: #ff5555; text-shadow: 0 0 6px #ff5555; }

canvas {
  display: block;
  background: #000;
  border: 2px solid #1a4d1a;
  image-rendering: pixelated;
}

.overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  background: rgba(0, 5, 0, 0.93);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 24px;
  text-align: center;
  padding: 20px;
}

.hidden { display: none !important; }

h1 {
  font-size: 32px;
  line-height: 1.4;
  letter-spacing: 4px;
}

.glow { color: #33ff33; text-shadow: 0 0 12px #33ff33, 0 0 40px #33ff33; }
.glow.red { color: #ff3333; text-shadow: 0 0 12px #ff3333, 0 0 40px #ff3333; }

.blink { animation: blink 1s step-end infinite; font-size: 12px; }
.blink.small { font-size: 9px; }

@keyframes blink { 50% { opacity: 0; } }

.controls p, .credit { font-size: 9px; color: #22aa22; }

.lb-preview h2 {
  font-size: 12px;
  color: #ffff66;
  text-shadow: 0 0 8px #ffff66;
  margin-bottom: 12px;
}

table {
  border-collapse: collapse;
  font-size: 11px;
  min-width: 340px;
}

td {
  padding: 5px 14px;
  text-shadow: 0 0 5px #33ff33;
}

tr:first-child td { color: #ffff66; text-shadow: 0 0 8px #ffff66; }
tr:nth-child(2) td { color: #cccccc; }
tr:nth-child(3) td { color: #cc8844; }

td.rank { color: inherit; }
td.pts { text-align: right; }

#name-entry input {
  background: #000;
  border: 2px solid #33ff33;
  color: #33ff33;
  font-family: inherit;
  font-size: 28px;
  text-align: center;
  width: 120px;
  padding: 10px;
  margin-top: 12px;
  text-transform: uppercase;
  text-shadow: 0 0 8px #33ff33;
  outline: none;
  caret-color: #33ff33;
}

#name-entry p { font-size: 11px; margin-top: 10px; }
