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

body {
  background: linear-gradient(135deg, #0a0a15 0%, #1a0a2e 50%, #0a0a15 100%);
  min-height: 100vh;
  font-family: 'Orbitron', sans-serif;
  color: #fff;
  overflow-x: hidden;
}

#arcade-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

#header {
  text-align: center;
  padding: 15px 0;
}

.title {
  font-family: 'Press Start 2P', cursive;
  font-size: clamp(1.2rem, 5vw, 2rem);
  background: linear-gradient(90deg, #ff00ff, #00ffff, #ff00ff);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite;
  text-shadow: 0 0 30px rgba(255, 0, 255, 0.5);
  margin-bottom: 15px;
}

@keyframes shimmer {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

.game-switcher {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.arcade-btn {
  font-family: 'Press Start 2P', cursive;
  font-size: clamp(0.6rem, 2.5vw, 0.9rem);
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  background: linear-gradient(180deg, #333 0%, #1a1a1a 100%);
  color: #888;
  box-shadow: 
    0 4px 0 #000,
    0 0 10px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.1);
  transition: all 0.15s ease;
}

.arcade-btn:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 6px 0 #000,
    0 0 20px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.1);
}

.arcade-btn:active {
  transform: translateY(2px);
  box-shadow: 
    0 2px 0 #000,
    0 0 10px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.1);
}

.arcade-btn.active {
  background: linear-gradient(180deg, #4a1a5e 0%, #2a0a3e 100%);
  color: #ff00ff;
  box-shadow: 
    0 4px 0 #1a0a2e,
    0 0 20px rgba(255, 0, 255, 0.4),
    inset 0 1px 0 rgba(255,255,255,0.2);
  animation: pulse-glow 1.5s ease-in-out infinite;
}

#btn-pool.active {
  background: linear-gradient(180deg, #1a4a2e 0%, #0a2a1e 100%);
  color: #00ff88;
  box-shadow: 
    0 4px 0 #0a1a0e,
    0 0 20px rgba(0, 255, 136, 0.4),
    inset 0 1px 0 rgba(255,255,255,0.2);
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 4px 0 #1a0a2e, 0 0 20px rgba(255, 0, 255, 0.4); }
  50% { box-shadow: 0 4px 0 #1a0a2e, 0 0 35px rgba(255, 0, 255, 0.6); }
}

#btn-pool.active {
  animation-name: pulse-glow-green;
}

@keyframes pulse-glow-green {
  0%, 100% { box-shadow: 0 4px 0 #0a1a0e, 0 0 20px rgba(0, 255, 136, 0.4); }
  50% { box-shadow: 0 4px 0 #0a1a0e, 0 0 35px rgba(0, 255, 136, 0.6); }
}

#canvas-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
  min-height: 300px;
}

#canvas {
  border-radius: 8px;
  cursor: crosshair;
}

#controls {
  padding: 15px;
  text-align: center;
}

#game-info {
  font-size: clamp(0.7rem, 2.5vw, 1rem);
  margin-bottom: 12px;
  min-height: 24px;
  color: #0ff;
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.control-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.control-btn {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.85rem;
  padding: 10px 20px;
  border: 2px solid #0ff;
  border-radius: 5px;
  background: transparent;
  color: #0ff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.control-btn:hover {
  background: rgba(0, 255, 255, 0.2);
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.4);
}

#difficulty-container {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ff0;
}

#difficulty-select {
  font-family: 'Orbitron', sans-serif;
  padding: 8px 12px;
  border: 2px solid #ff0;
  border-radius: 5px;
  background: #1a1a2e;
  color: #ff0;
  cursor: pointer;
}

#footer {
  text-align: center;
  padding: 15px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.coin-slot {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.6rem;
  color: #ffd700;
  margin-bottom: 8px;
  animation: blink 1s step-end infinite;
}

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

.footer-link {
  color: #888;
  text-decoration: none;
  font-size: 0.8rem;
  transition: color 0.2s;
}

.footer-link:hover {
  color: #ff69b4;
}

/* Insert Coin Overlay */
#insert-coin-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at center, #1a0a2e 0%, #0a0a15 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  cursor: pointer;
  transition: opacity 0.5s ease;
}

.coin-text {
  font-family: 'Press Start 2P', cursive;
  font-size: clamp(1rem, 4vw, 2rem);
  color: #ffd700;
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
  animation: coin-blink 0.8s step-end infinite;
  margin-bottom: 30px;
}

@keyframes coin-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.coin-icon {
  font-size: 4rem;
  animation: coin-bounce 1s ease-in-out infinite;
}

@keyframes coin-bounce {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(180deg); }
}

.press-start {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.7rem;
  color: #888;
  margin-top: 40px;
  animation: fade-pulse 1.5s ease-in-out infinite;
}

@keyframes fade-pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* Mobile adjustments */
@media (max-width: 600px) {
  .arcade-btn {
    padding: 10px 15px;
  }
  
  .control-btn {
    padding: 8px 15px;
    font-size: 0.75rem;
  }
  
  #canvas-wrapper {
    min-height: 250px;
  }
}