/* ==========================================
   RETRO PONG - ARCADE STYLE CSS
   ========================================== */

/* Reset & Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Courier New', 'Courier', monospace;
  background: #000000;
  color: #00ff00;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  position: relative;
}

/* Scanline Effect */
.scanlines {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.15),
    rgba(0, 0, 0, 0.15) 1px,
    transparent 1px,
    transparent 2px
  );
  animation: scanline-movement 8s linear infinite;
}

@keyframes scanline-movement {
  0% { transform: translateY(0); }
  100% { transform: translateY(10px); }
}

/* Game Container */
.game-container {
  max-width: 900px;
  width: 100%;
  padding: 2rem;
  text-align: center;
  position: relative;
  z-index: 1;
}

/* Header Styles */
header {
  margin-bottom: 1.5rem;
}

.game-title {
  font-size: 3.5rem;
  font-weight: bold;
  letter-spacing: 0.5rem;
  color: #00ff00;
  text-shadow: 
    0 0 10px #00ff00,
    0 0 20px #00ff00,
    0 0 30px #00ff00,
    0 0 40px #00ff00;
  animation: title-pulse 2s ease-in-out infinite;
  margin-bottom: 0.5rem;
}

@keyframes title-pulse {
  0%, 100% { 
    text-shadow: 
      0 0 10px #00ff00,
      0 0 20px #00ff00,
      0 0 30px #00ff00,
      0 0 40px #00ff00;
  }
  50% { 
    text-shadow: 
      0 0 20px #00ff00,
      0 0 30px #00ff00,
      0 0 40px #00ff00,
      0 0 50px #00ff00,
      0 0 60px #00ff00;
  }
}

.subtitle {
  font-size: 1rem;
  letter-spacing: 0.2rem;
  color: #00cc00;
  text-shadow: 0 0 5px #00ff00;
}

/* Scoreboard */
.scoreboard {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(0, 255, 0, 0.05);
  border: 2px solid #00ff00;
  border-radius: 10px;
  box-shadow: 
    0 0 10px rgba(0, 255, 0, 0.3),
    inset 0 0 10px rgba(0, 255, 0, 0.1);
}

.score-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.score-label {
  font-size: 0.875rem;
  letter-spacing: 0.15rem;
  color: #00cc00;
  margin-bottom: 0.5rem;
}

.score-value {
  font-size: 3rem;
  font-weight: bold;
  color: #00ff00;
  text-shadow: 
    0 0 10px #00ff00,
    0 0 20px #00ff00;
  min-width: 60px;
}

.score-divider {
  font-size: 2rem;
  color: #00ff00;
  opacity: 0.5;
}

/* Canvas Wrapper */
.canvas-wrapper {
  position: relative;
  display: inline-block;
  margin: 0 auto;
  border: 3px solid #00ff00;
  border-radius: 5px;
  box-shadow: 
    0 0 20px rgba(0, 255, 0, 0.5),
    0 0 40px rgba(0, 255, 0, 0.3),
    inset 0 0 20px rgba(0, 255, 0, 0.1);
  background: #000000;
}

#pongCanvas {
  display: block;
  background: #000000;
  cursor: none;
}

/* Overlay Styles */
.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
  border-radius: 5px;
}

.overlay.hidden {
  display: none;
}

.overlay-content {
  text-align: center;
  padding: 2rem;
}

.overlay-content h2 {
  font-size: 2.5rem;
  color: #00ff00;
  text-shadow: 
    0 0 10px #00ff00,
    0 0 20px #00ff00,
    0 0 30px #00ff00;
  margin-bottom: 1.5rem;
  letter-spacing: 0.3rem;
  animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {
  0%, 49%, 100% { opacity: 1; }
  50%, 99% { opacity: 0.5; }
}

.overlay-content p {
  font-size: 1.1rem;
  color: #00cc00;
  margin-bottom: 1rem;
  letter-spacing: 0.1rem;
}

.controls-hint {
  font-size: 0.9rem !important;
  color: #009900 !important;
}

/* Button Styles */
.game-btn {
  padding: 1rem 2.5rem;
  font-size: 1.2rem;
  font-family: 'Courier New', monospace;
  font-weight: bold;
  letter-spacing: 0.2rem;
  background: transparent;
  color: #00ff00;
  border: 3px solid #00ff00;
  border-radius: 5px;
  cursor: pointer;
  margin: 0.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
}

.game-btn:hover {
  background: #00ff00;
  color: #000000;
  box-shadow: 
    0 0 20px rgba(0, 255, 0, 0.8),
    0 0 30px rgba(0, 255, 0, 0.6),
    inset 0 0 10px rgba(0, 0, 0, 0.2);
  transform: scale(1.05);
}

.game-btn:active {
  transform: scale(0.98);
}

.game-btn.secondary {
  border-color: #00cc00;
  color: #00cc00;
  box-shadow: 0 0 10px rgba(0, 204, 0, 0.3);
}

.game-btn.secondary:hover {
  background: #00cc00;
  color: #000000;
  box-shadow: 
    0 0 20px rgba(0, 204, 0, 0.8),
    0 0 30px rgba(0, 204, 0, 0.6);
}

/* Controls Info */
.controls-info {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 1.5rem;
  padding: 1rem;
  flex-wrap: wrap;
}

.control-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.key {
  padding: 0.5rem 1rem;
  background: rgba(0, 255, 0, 0.1);
  border: 2px solid #00ff00;
  border-radius: 5px;
  font-weight: bold;
  font-size: 0.875rem;
  letter-spacing: 0.1rem;
  box-shadow: 0 0 5px rgba(0, 255, 0, 0.3);
}

.action {
  font-size: 0.75rem;
  color: #00cc00;
  letter-spacing: 0.05rem;
}

/* Game Status */
.game-status {
  margin-top: 1rem;
  min-height: 30px;
}

.message {
  font-size: 1.1rem;
  color: #00ff00;
  text-shadow: 0 0 10px #00ff00;
  letter-spacing: 0.1rem;
  animation: fade-in 0.5s ease-in;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Footer */
footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 255, 0, 0.3);
  font-size: 0.875rem;
  color: #009900;
  letter-spacing: 0.05rem;
}

footer a {
  color: #00cc00;
  text-decoration: none;
  transition: color 0.3s ease;
}

footer a:hover {
  color: #00ff00;
  text-shadow: 0 0 5px #00ff00;
}

/* Responsive Design */
@media (max-width: 900px) {
  .game-container {
    padding: 1rem;
  }

  .game-title {
    font-size: 2.5rem;
    letter-spacing: 0.3rem;
  }

  #pongCanvas {
    max-width: 100%;
    height: auto;
  }

  .scoreboard {
    gap: 2rem;
  }

  .score-value {
    font-size: 2rem;
  }

  .controls-info {
    gap: 1rem;
  }

  .overlay-content h2 {
    font-size: 2rem;
  }

  .game-btn {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }
}

@media (max-width: 600px) {
  .game-title {
    font-size: 2rem;
    letter-spacing: 0.2rem;
  }

  .subtitle {
    font-size: 0.875rem;
  }

  .scoreboard {
    gap: 1.5rem;
    padding: 0.75rem;
  }

  .score-value {
    font-size: 1.75rem;
  }

  .controls-info {
    flex-direction: column;
    gap: 0.75rem;
  }

  .overlay-content {
    padding: 1rem;
  }

  .overlay-content h2 {
    font-size: 1.5rem;
  }

  .overlay-content p {
    font-size: 0.9rem;
  }
}
