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

body {
  font-family: 'Noto Sans', sans-serif;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem 1rem;
}

.main-container {
  display: flex;
  align-items: center;
  gap: 3rem;
  max-width: 1200px;
}

.car-section {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.settings-panel {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  min-width: 300px;
}

.car-rear {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(90vw, 400px);
  height: 150px;
  background: linear-gradient(180deg, #3a3a3a 0%, #4d4d4d 100%);
  border-radius: 8px;
  padding: 0 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  position: relative;
}

.car-rear::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 4px;
  background: #ff0000;
  border-radius: 2px;
}

.light {
  width: 60px;
  height: 60px;
  background: #4a0000;
  border-radius: 8px;
  border: 3px solid #2d0000;
  transition: background 0.1s, box-shadow 0.1s;
}

.light.square {
  border-radius: 4px;
}

.light.triangle {
  border-radius: 4px;
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

.light.rounded {
  border-radius: 50%;
}

.light.horizontal {
  width: 90px;
  height: 30px;
  border-radius: 15px;
}

.light.vertical {
  width: 30px;
  height: 90px;
  border-radius: 15px;
}

.light.arrow {
  border-radius: 4px;
  clip-path: polygon(0% 40%, 60% 40%, 60% 0%, 100% 50%, 60% 100%, 60% 60%, 0% 60%);
}

.light.hexagon {
  border-radius: 4px;
  clip-path: polygon(30% 0%, 70% 0%, 100% 50%, 70% 100%, 30% 100%, 0% 50%);
}

.light.star {
  border-radius: 4px;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

:root {
  --blink-color: #ffff00;
}

.light.active {
  background: var(--blink-color);
  box-shadow: 0 0 30px var(--blink-color), 0 0 60px var(--blink-color);
}



.control-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.control-label {
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  opacity: 0.8;
}

.controls {
  display: flex;
  gap: 1rem;
}

.btn {
  width: 60px;
  height: 60px;
  background: #333;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 24px;
  cursor: pointer;
  transition: background 0.2s;
}

.btn:active {
  background: #555;
}

.btn.active {
  background: #ffff00;
}

.color-picker {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#colorPicker {
  width: 80px;
  height: 40px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  background: transparent;
}

.speed-control {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.speed-label {
  color: #fff;
  font-size: 12px;
  opacity: 0.6;
}

#speedSlider {
  width: 200px;
  height: 40px;
  cursor: pointer;
  accent-color: #ffff00;
}

.pattern-control {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  max-width: min(90vw, 450px);
}

.pattern-btn {
  padding: 0.5rem 1rem;
  background: #333;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.pattern-btn:active {
  background: #555;
}

.pattern-btn.active {
  background: #ffff00;
  color: #000;
}

.shape-control {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  max-width: min(90vw, 450px);
}

.shape-btn {
  width: 50px;
  height: 50px;
  background: #333;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 24px;
  cursor: pointer;
  transition: background 0.2s;
}

.shape-btn:active {
  background: #555;
}

.shape-btn.active {
  background: #ffff00;
}

@media (max-width: 900px) {
  .main-container {
    flex-direction: column;
    gap: 2rem;
  }
  
  .settings-panel {
    width: 100%;
    max-width: 400px;
  }
}

@media (max-width: 600px) {
  .car-rear {
    height: 120px;
  }
  
  .light {
    width: 50px;
    height: 50px;
  }
}