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

body {
  margin: 0;
  padding: 0;
  background-color: #2b2b2b;
  background-image: 
    linear-gradient(#333 1px, transparent 1px),
    linear-gradient(90deg, #333 1px, transparent 1px);
  background-size: 20px 20px;
  font-family: 'Press Start 2P', cursive;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.retro-container {
  background-color: #1a1a1a;
  border: 4px solid #ff6b6b;
  box-shadow: 0 0 0 8px #4ecdc4, 
              0 0 0 12px #ff6b6b, 
              0 0 0 16px #ffe66d;
  padding: 20px;
  max-width: 900px;
  margin: 20px;
}

.retro-title {
  color: #ffe66d;
  text-align: center;
  font-size: 2.5rem;
  margin: 0 0 20px 0;
  text-shadow: 4px 4px 0 #ff6b6b;
}

.blink {
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  from, to { opacity: 0; }
  50% { opacity: 1; }
}

.controls-panel {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-bottom: 30px;
}

.button-column {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.retro-btn {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.8rem;
  padding: 12px 20px;
  border: none;
  cursor: pointer;
  position: relative;
  text-transform: uppercase;
  transition: all 0.2s;
  box-shadow: 4px 4px 0px rgba(0,0,0,0.8);
}

.retro-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px rgba(0,0,0,0.8);
}

.retro-btn:active {
  transform: translate(1px, 1px);
  box-shadow: 2px 2px 0px rgba(0,0,0,0.8);
}

.green-btn { background-color: #6bbf59; color: #1a1a1a; }
.blue-btn { background-color: #4a6fa5; color: white; }
.purple-btn { background-color: #9b59b6; color: white; }
.yellow-btn { background-color: #f8d56b; color: #1a1a1a; }
.red-btn { background-color: #e74c3c; color: white; }

#grid-container {
  display: flex;
  justify-content: center;
  margin: 20px 0;
}

.retro-footer {
  margin-top: 20px;
  padding: 10px;
  background-color: #333;
  border-top: 3px solid #4ecdc4;
}

.legend {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
}

.legend-item {
  display: flex;
  align-items: center;
  color: white;
  font-size: 0.7rem;
}

.legend-color {
  display: inline-block;
  width: 20px;
  height: 20px;
  margin-right: 8px;
  border: 2px solid white;
}

.start { background-color: #6bbf59; }
.end { background-color: #e74c3c; }
.wall { background-color: #333; }
.path { background-color: #4a6fa5; }

.cell {
  border: 1px solid #444;
}