body {
  margin: 0;
  padding: 0;
  font-family: 'Press Start 2P', cursive;
  background: linear-gradient(to top, #0f0c29, #302b63, #24243e);
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.container {
  width: 500px;
}

h1 {
  text-align: center;
  color: #00ffea;
  text-shadow: 0 0 10px #00ffea, 0 0 20px #ff00ff;
  margin-bottom: 16px;
  font-size: 20px;
  line-height: 1.5;
}

.game {
  position: relative;
}

.paragraph-box {
  background: rgba(0, 0, 0, 0.6);
  padding: 16px;
  border-radius: 12px;
  min-height: 120px;
  line-height: 1.8;
  font-size: 14px;
  color: #d0e8ff;
  overflow-y: auto;
  margin-bottom: 12px;
  border: 2px solid #00ffea;
  box-shadow: 0 0 10px #00ffea inset, 0 0 15px #ff00ff inset;
}

.paragraph-box span.char { color:#9fc9ff; }
.paragraph-box span.correct { color:#7fff7f; background: rgba(0,255,0,0.15); border-radius:3px; }
.paragraph-box span.incorrect { color:#ff7f7f; background: rgba(255,0,0,0.15); border-radius:3px; text-decoration: underline; }

textarea#inputArea {
  width: 100%;
  height: 120px;
  margin-top: 8px;
  padding: 12px;
  font-size: 14px;
  font-family: 'Press Start 2P', cursive;
  border-radius: 12px;
  resize: vertical;
  background: rgba(0,0,0,0.6);
  color: #e8f7ff;
  border: 2px solid #00ffea;
  outline: none;
  box-shadow: 0 0 10px #00ffea inset, 0 0 15px #ff00ff inset;
  line-height: 1.6;
}

.hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  gap: 12px;
}

.stats {
  display: flex;
  gap: 18px;
  font-size: 10px;
  color: #00ffea;
  text-shadow: 0 0 6px #00ffea;
}

.controls button {
  padding: 8px 14px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(90deg,#00ffff,#ff4ed6);
  color: #001;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 0 10px #00ffff, 0 0 20px #ff4ed6;
  transition: transform 0.1s;
}

.controls button:hover { transform: scale(1.05); }

.road-wrap {
  margin-top: 18px;
  padding: 12px;
  background: #1a1a1a;
  border-radius: 12px;
  overflow: hidden;
}

.road {
  position: relative;
  height: 200px;
  background: linear-gradient(to bottom, #2e2e2e 0%, #1a1a1a 100%);
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid #00ffea;
}

.center-line {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  width: 8px;
  height: 100%;
  background: repeating-linear-gradient(to bottom, #fff 0 18px, transparent 18px 36px);
  opacity: 0.9;
  animation: moveLines 0.5s linear infinite;
}

@keyframes moveLines {
  0% { background-position-y: 0; }
  100% { background-position-y: 36px; }
}

.car {
  position: absolute;
  width: 80px;
  height: auto;
  transition: bottom 0.1s linear;
  transform: rotate(-90deg);
  transform-origin: center;
}

.car-player {
  bottom: 20px;
  left: 30px;
  filter: hue-rotate(0deg) saturate(1.2);
}

.car-opponent-1 {
  bottom: 20px;
  left: 130px;
  filter: hue-rotate(120deg) saturate(1.3);
}

.car-opponent-2 {
  bottom: 20px;
  left: 230px;
  filter: hue-rotate(240deg) saturate(1.3);
}

.car-opponent-3 {
  bottom: 20px;
  left: 330px;
  filter: hue-rotate(60deg) saturate(1.3) brightness(1.1);
}

.result {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;
  padding: 24px;
  background: rgba(0, 0, 0, 0.95);
  border-radius: 16px;
  font-size: 12px;
  text-align: center;
  color: #00ffea;
  border: 3px solid #00ffea;
  box-shadow: 0 0 20px #00ffea, 0 0 30px #ff00ff, 0 0 40px rgba(0, 255, 234, 0.5);
  line-height: 1.8;
  min-width: 300px;
  max-width: 90%;
}

.result-content {
  margin-bottom: 20px;
}

.result-restart-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(90deg, #00ffff, #ff4ed6);
  color: #000;
  font-family: 'Press Start 2P', cursive;
  font-weight: 700;
  font-size: 10px;
  cursor: pointer;
  box-shadow: 0 0 15px #00ffff, 0 0 25px #ff4ed6;
  transition: transform 0.1s;
  margin-top: 10px;
}

.result-restart-btn:hover {
  transform: scale(1.05);
}

.result-restart-btn:active {
  transform: scale(0.95);
}

.result-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 999;
  backdrop-filter: blur(4px);
}

.hidden {
  display: none !important;
}
