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

html, body {
  min-height: 100vh;
  background:
    radial-gradient(ellipse at center, #0a1530 0%, #000 70%),
    #000;
  color: #cfe;
  font-family: 'Courier New', monospace;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px;
}

.arcade-frame {
  width: min(520px, 100%);
  background: linear-gradient(180deg, #1a1a2a 0%, #050510 100%);
  border: 3px solid #334;
  border-radius: 10px;
  box-shadow:
    0 0 40px #44aaff33,
    inset 0 0 20px #000;
  overflow: hidden;
  margin-top: 10px;
}

header {
  display: flex;
  align-items: center;
  padding: 8px 14px;
  background: #0a0a18;
  border-bottom: 2px solid #223;
  gap: 10px;
}

.back-link {
  color: #88bbff;
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 2px;
  padding: 4px 10px;
  border: 1px solid #334;
  border-radius: 3px;
  transition: all 0.15s;
}
.back-link:hover { color: #ffd633; border-color: #ffd633; }

.logo {
  flex: 1;
  text-align: center;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 4px;
  color: #66ccff;
  text-shadow: 0 0 8px #44aaff, 0 0 16px #44aaff66;
}
.logo span {
  color: #ffd633;
  text-shadow: 0 0 8px #ffaa00;
}

.hi-score {
  color: #ff5599;
  font-size: 14px;
  letter-spacing: 2px;
  min-width: 80px;
  text-align: right;
  text-shadow: 0 0 6px #ff5599aa;
}

.playfield {
  position: relative;
  background: #000;
  line-height: 0;
}

#game {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
}

.overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 10, 30, 0.88);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 20px;
  text-align: center;
  backdrop-filter: blur(2px);
}

.overlay.hidden { display: none; }

.overlay h2 {
  font-size: 44px;
  letter-spacing: 8px;
  color: #66ccff;
  text-shadow:
    0 0 12px #44aaff,
    0 0 32px #44aaff66,
    4px 4px 0 #003366;
}
.overlay h2.go  { color: #ff4466; text-shadow: 0 0 12px #ff4466, 4px 4px 0 #660022; }
.overlay h2.win { color: #ffd633; text-shadow: 0 0 16px #ffaa00, 4px 4px 0 #663300; }

.overlay .sub {
  letter-spacing: 4px;
  color: #88bbcc;
  font-size: 14px;
}

.controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: #aaccff;
  line-height: 1.4;
  letter-spacing: 1px;
}

kbd {
  display: inline-block;
  background: #1a2a44;
  border: 1px solid #334488;
  border-radius: 3px;
  padding: 2px 6px;
  margin: 0 2px;
  font-family: inherit;
  font-size: 12px;
  color: #ffd633;
  min-width: 22px;
}

.press-start, .alt-btn {
  background: #ff3cf0;
  color: #000;
  border: none;
  padding: 10px 28px;
  font-family: inherit;
  font-size: 18px;
  font-weight: bold;
  letter-spacing: 4px;
  cursor: pointer;
  border-radius: 3px;
  box-shadow: 0 0 16px #ff3cf0aa;
  text-decoration: none;
  display: inline-block;
  animation: pulse 1.2s ease-in-out infinite;
}

.alt-btn {
  background: transparent;
  color: #88bbff;
  border: 1px solid #334488;
  box-shadow: none;
  animation: none;
  font-size: 13px;
  padding: 6px 20px;
}
.alt-btn:hover { color: #ffd633; border-color: #ffd633; }

@keyframes pulse {
  0%,100% { transform: scale(1);    box-shadow: 0 0 12px #ff3cf0aa; }
  50%     { transform: scale(1.04); box-shadow: 0 0 24px #ff3cf0; }
}

.final {
  color: #ffd633;
  font-size: 18px;
  letter-spacing: 3px;
  line-height: 1.6;
}
.final span { color: #fff; margin-left: 10px; }
