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

body {
  font-family: 'Noto Sans', sans-serif;
  background: #f0f0f0;
  overflow: hidden;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

#game-container {
  width: 100%;
  height: 100vh;
  position: relative;
  background: linear-gradient(to bottom, #87CEEB 0%, #E0F6FF 50%, #90EE90 50%, #C8E6C9 100%);
}

#score-container {
  position: absolute;
  top: 20px;
  left: 20px;
  right: 20px;
  display: flex;
  justify-content: space-between;
  z-index: 100;
  font-size: 16px;
  font-weight: bold;
  color: #333;
  text-shadow: 0 0 4px white;
}

#car-info-display {
  position: absolute;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 500px;
  background: white;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  z-index: 90;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
}

#car-emoji-display {
  font-size: 72px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
  grid-row: 1 / 4;
}

#car-emoji-display.bounce {
  animation: carBounce 0.6s ease-in-out infinite;
}

@keyframes carBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

#car-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: #333;
  font-weight: 600;
}

#car-details > div {
  padding: 8px 12px;
  background: #f8f8f8;
  border-radius: 8px;
  border-left: 4px solid #333;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
}

#road-container {
  position: absolute;
  top: 38%;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 500px;
  height: 28%;
  perspective: 500px;
}

#road {
  width: 100%;
  height: 100%;
  background: #555;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.lane {
  flex: 1;
  border-bottom: 3px dashed #FFD700;
  position: relative;
}

.lane:last-child {
  border-bottom: none;
}

#car-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.car {
  position: absolute;
  width: 80px;
  height: 80px;
  transition: left 3.5s linear, transform 3.5s linear, opacity 0.5s ease-out;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
  opacity: 1;
}

.car.active[data-direction="left-to-right"] {
  left: 110%;
}

.car.active[data-direction="right-to-left"] {
  left: -100px;
}

#choices-container {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 500px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.choice-btn {
  padding: 16px;
  font-size: 16px;
  font-weight: bold;
  background: white;
  border: 3px solid #333;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 0 #333;
  font-family: 'Noto Sans', sans-serif;
}

.choice-btn:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 #333;
}

.choice-btn.correct {
  background: #4CAF50;
  color: white;
  border-color: #2E7D32;
  animation: pulse 0.3s;
}

.choice-btn.wrong {
  background: #f44336;
  color: white;
  border-color: #c62828;
  animation: shake 0.3s;
}

.choice-btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

#feedback {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 48px;
  font-weight: bold;
  color: white;
  text-shadow: 0 0 10px rgba(0,0,0,0.5);
  animation: fadeOut 1s forwards;
  pointer-events: none;
  z-index: 200;
}

#feedback.hidden {
  display: none;
}

@keyframes fadeOut {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.5); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  75% { transform: translateX(10px); }
}