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

body {
  font-family: 'Noto Sans', sans-serif;
  overflow: hidden;
  background: #000;
  touch-action: none;
}

#game-container {
  width: 100vw;
  height: 100vh;
  position: relative;
  background: #87CEEB;
}

#game-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

#hud {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  color: white;
  font-size: 16px;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
  z-index: 10;
  pointer-events: none;
}

.popup {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.popup.hidden {
  display: none;
}

.popup-content {
  background: white;
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  max-width: 90%;
  width: 350px;
}

.popup-title {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 15px;
  color: #d32f2f;
}

#violation-text {
  font-size: 14px;
  margin-bottom: 20px;
  line-height: 1.6;
  text-align: left;
}

.violation-title {
  font-size: 20px;
  font-weight: bold;
  color: #d32f2f;
  margin-bottom: 12px;
  text-align: center;
}

.violation-description {
  font-size: 15px;
  margin-bottom: 12px;
  color: #333;
}

.violation-fine {
  font-size: 18px;
  font-weight: bold;
  color: #000;
  margin: 12px 0;
  padding: 8px;
  background: #fff3cd;
  border-radius: 5px;
  border: 2px solid #ffc107;
}

.violation-law {
  font-size: 13px;
  color: #666;
  font-style: italic;
}

#final-score {
  font-size: 18px;
  margin-bottom: 20px;
}

button {
  background: #000;
  color: white;
  border: none;
  padding: 12px 30px;
  font-size: 16px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  transition: transform 0.1s;
}

button:active {
  transform: scale(0.95);
}

#mobile-controls {
  position: absolute;
  bottom: 20px;
  left: 20px;
  width: 120px;
  height: 120px;
  z-index: 50;
}

#joystick-zone {
  width: 100%;
  height: 100%;
}

@media (min-width: 768px) {
  #mobile-controls {
    display: none;
  }
}