body {
  background-color: #1a1a1a;
  color: #eee;
  font-family: 'Courier New', monospace;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  margin: 0;
}
#game-container {
  position: relative;
  width: 500px;
  height: 500px;
  background-color: #3d3d3d;
  border: 8px solid #222;
  overflow: hidden;
  image-rendering: pixelated;
}
#road-lines {
  position: absolute;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    #3d3d3d,
    #3d3d3d 40px,
    #444 40px,
    #444 41px
  );
}
.lane-sep {
  position: absolute;
  width: 2px;
  height: 100%;
  border-left: 2px dashed rgba(255, 255, 255, 0.1);
  top: 0;
}
.sep1 {
  left: 100px;
}
.sep2 {
  left: 200px;
}
.sep3 {
  left: 300px;
}
.sep4 {
  left: 400px;
}

.car {
  position: absolute;
  width: 40px;
  border-radius: 2px;
  z-index: 5;
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.car.moto {
  transition: left 0.15s ease-out;
}
.car::before {
  content: '';
  position: absolute;
  left: 10%;
  right: 10%;
  height: 50%;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 2px;
}

#player {
  height: 60px;
  background: #c0392b;
  bottom: 50px;
  left: 230px;
  z-index: 20;
  transition:
    left 0.15s,
    bottom 0.15s;
}
#player .f-l {
  position: absolute;
  top: 0;
  width: 100%;
  display: flex;
  justify-content: space-around;
}
#player .f-l div {
  width: 8px;
  height: 4px;
  background: #fff;
  box-shadow: 0 -5px 10px #fff;
}
#player .b-l {
  position: absolute;
  bottom: 0;
  width: 100%;
  display: flex;
  justify-content: space-around;
}
#player .b-l div {
  width: 8px;
  height: 4px;
  background: #ff0000;
}

.enemy .f-l {
  position: absolute;
  bottom: 0;
  width: 100%;
  display: flex;
  justify-content: space-around;
}
.enemy .f-l div {
  width: 8px;
  height: 4px;
  background: #fff;
  box-shadow: 0 5px 10px #fff;
}
.enemy .b-l {
  position: absolute;
  top: 0;
  width: 100%;
  display: flex;
  justify-content: space-around;
}
.enemy .b-l div {
  width: 8px;
  height: 4px;
  background: #ff0000;
  opacity: 0.6;
}

.signal-l,
.signal-r {
  position: absolute;
  width: 6px;
  height: 6px;
  background: #ffa500;
  border-radius: 50%;
  opacity: 0;
}
.blink {
  animation: blinker 0.1s infinite;
}
@keyframes blinker {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.siren {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 6px;
  animation: flash 0.1s infinite alternate;
}
@keyframes flash {
  from {
    background: #f00;
    box-shadow: 0 0 15px #f00;
  }
  to {
    background: #00f;
    box-shadow: 0 0 15px #00f;
  }
}

.overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.hidden {
  display: none !important;
}
#score-tag {
  position: absolute;
  top: 15px;
  left: 20px;
  font-size: 22px;
  font-weight: bold;
  color: #f1c40f;
  z-index: 50;
}

.ui-area {
  margin-top: 20px;
  width: 500px;
}
.main-btn {
  width: 100%;
  padding: 18px;
  font-family: inherit;
  font-size: 20px;
  background: #27ae60;
  border: none;
  color: white;
  cursor: pointer;
}
