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

:root {
  --bg: #0a0e27;
  --bg2: #0d1235;
  --card: #111530;
  --border: #1e2a5e;
  --cyan: #00f0ff;
  --magenta: #ff006e;
  --lime: #b0ff00;
  --purple: #c77dff;
  --gold: #ffa90e;
  --text: #f0f0ff;
  --text-dim: #8892b0;
  --pixel: 'Press Start 2P', monospace;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--pixel);
  font-size: 10px;
  line-height: 1.8;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Scanline overlay */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.08) 2px,
    rgba(0, 0, 0, 0.08) 4px
  );
  pointer-events: none;
  z-index: 1000;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { color: var(--gold); }

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 20px;
  background: transparent;
  border: 2px solid var(--cyan);
  color: var(--cyan);
  font-family: var(--pixel);
  font-size: 9px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 2px;
  transition: all 0.15s;
  image-rendering: pixelated;
  position: relative;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--cyan);
  opacity: 0;
  transition: opacity 0.15s;
}
.btn:hover {
  color: var(--bg);
  box-shadow: 0 0 20px var(--cyan), 0 0 40px rgba(0, 240, 255, 0.3);
}
.btn:hover::after { opacity: 1; }
.btn span { position: relative; z-index: 1; }

.btn-play {
  border-color: var(--lime);
  color: var(--lime);
  font-size: 8px;
  padding: 12px 24px;
}
.btn-play:hover {
  color: var(--bg);
  box-shadow: 0 0 20px var(--lime), 0 0 40px rgba(176, 255, 0, 0.3);
}
.btn-play::after { background: var(--lime); }

/* Pixel border effect */
.pixel-border {
  border: 3px solid var(--border);
  box-shadow:
    0 0 0 1px var(--bg),
    0 0 0 2px var(--border),
    inset 0 0 0 1px var(--border);
}

/* Glow text */
.glow-cyan { text-shadow: 0 0 10px var(--cyan), 0 0 20px rgba(0, 240, 255, 0.5); }
.glow-magenta { text-shadow: 0 0 10px var(--magenta), 0 0 20px rgba(255, 0, 110, 0.5); }
.glow-lime { text-shadow: 0 0 10px var(--lime), 0 0 20px rgba(176, 255, 0, 0.5); }
.glow-gold { text-shadow: 0 0 10px var(--gold), 0 0 20px rgba(255, 160, 14, 0.5); }

/* Navigation */
.site-nav {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  z-index: 900;
  background: rgba(10, 14, 39, 0.95);
  border-bottom: 2px solid var(--border);
  backdrop-filter: blur(8px);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-size: 11px;
  color: var(--cyan);
  text-shadow: 0 0 8px var(--cyan);
}
.nav-logo span { color: var(--magenta); }
.nav-back {
  font-size: 8px;
  color: var(--text-dim);
  border: 1px solid var(--border);
  padding: 6px 12px;
  transition: all 0.15s;
}
.nav-back:hover { color: var(--cyan); border-color: var(--cyan); }

/* Game page layout */
.game-page {
  padding-top: 70px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.game-header {
  text-align: center;
  padding: 24px 20px 16px;
}
.game-title {
  font-size: 18px;
  margin-bottom: 8px;
}
.game-subtitle {
  font-size: 8px;
  color: var(--text-dim);
  line-height: 2;
}
.score-bar {
  display: flex;
  gap: 30px;
  justify-content: center;
  align-items: center;
  padding: 10px 20px;
  margin-bottom: 16px;
  font-size: 9px;
}
.score-item span { color: var(--text-dim); margin-right: 8px; }
.score-item .value { color: var(--gold); }
.score-item .hi-value { color: var(--cyan); }

/* Canvas container */
.canvas-wrap {
  position: relative;
  border: 3px solid var(--border);
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.1), 0 0 60px rgba(0, 240, 255, 0.05);
  background: #000;
  image-rendering: pixelated;
}
canvas {
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* Overlay screens */
.overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 14, 39, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  z-index: 10;
}
.overlay h2 { font-size: 20px; }
.overlay p { font-size: 8px; color: var(--text-dim); text-align: center; line-height: 2.2; }
.overlay.hidden { display: none; }

/* Controls hint */
.controls-hint {
  margin-top: 12px;
  text-align: center;
  font-size: 7px;
  color: var(--text-dim);
  padding: 0 20px 20px;
  line-height: 2.2;
}
.controls-hint kbd {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 2px 6px;
  color: var(--text);
  font-family: var(--pixel);
  font-size: 7px;
}

/* Footer */
.site-footer {
  background: var(--card);
  border-top: 2px solid var(--border);
  padding: 30px 20px;
  text-align: center;
  margin-top: 60px;
}
.footer-text { font-size: 7px; color: var(--text-dim); line-height: 2.5; }
.footer-games {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin: 16px 0;
}
.footer-games a { font-size: 7px; color: var(--text-dim); }
.footer-games a:hover { color: var(--cyan); }

/* Pixel animation */
@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 10px var(--cyan), 0 0 20px rgba(0, 240, 255, 0.2); }
  50% { box-shadow: 0 0 20px var(--cyan), 0 0 40px rgba(0, 240, 255, 0.4); }
}
@keyframes scanin {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.blink { animation: blink 1s infinite; }
.float { animation: float 3s ease-in-out infinite; }

/* Responsive */
@media (max-width: 600px) {
  body { font-size: 8px; }
  .game-title { font-size: 14px; }
  .score-bar { gap: 16px; font-size: 7px; }
}
