#activeCss{width:auto;height:auto;left:2px;bottom:1px;color:#c60a1e;font-size:9px;font-weight:bold;position:fixed;z-index:0;}
@media (max-width: 768px) {
  #activeCss{text-align:center;display:block;position:static;}
}

.hidden {
  display: none !important;
}

#simulator {
  background: #e9ecef;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

h1 {
  line-height: 64px;
  position: relative;
}

#mainlink {
  color: #1b323e;
  display: inline-block;
  text-decoration: none;
}

@media (max-width: 768px) {
  .header-title {
      display: none;
  }
}

#pauseButton {
  position: absolute;
  left: 10px;
  top: 10px;
  width: 64px;
  height: 64px;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: none;
  box-shadow: none;
  border: none;
  color: #1b323e;
  cursor: pointer;
}

#pauseButton i {  
  font-size: 24px;
  margin-bottom: 6px;
}

#pauseButton small {
  font-size: 9px;
  display: block;
  text-align: center;
  line-height: 1;
}

#logo {
  width: 64px;
  height: auto;
}

.language-switcher {
  display: flex;
  gap: 10px;
  position: absolute;
  right: 10px;
  top: 10px;
}

.language-flag {
  opacity: 0.5;
  transition: opacity 0.3s;
}

.language-flag.active {
  opacity: 1;
  pointer-events: none;
}

.flag-icon {
  width: 32px;
  height: auto;
  display: block;
}

.unit-switcher {
  width: 74px;
  gap: 10px;
  display: flex;
  justify-content: space-between;
  position: absolute;
  right: 10px;
  top: 40px;
}

.unit-switcher .unit {
  width: 32px;
  height: 20px;
  text-align: center;
  display: flex;
  font-size: 11px;
  font-weight: normal;
  text-decoration: none;
  align-items: center;
  justify-content: center;
}

.unit-switcher .unit.active {
  font-weight: bold;
  text-decoration: underline;
  pointer-events: none;
}

.lane {
  flex: 0 0 auto;
  height: 35px;
  background: #f0f0f0;
  border-top: 3px solid #ccc;
  border-bottom: 3px solid #ccc;
  display: flex;
  align-items: center;
  position: relative;
  background-image: url("/img/lane.png");
  background-size: contain;
  background-repeat: repeat;
  background-position: center;
}

.lane.reverse {
  transform: scaleX(-1);
}

.vehicle {
  position: absolute;
  cursor: pointer;
  background-size: contain;
  background-repeat: no-repeat;
  box-sizing: content-box;
}

.vehicle.active-vehicle {
  outline: 2px solid #007bff;
  box-shadow: 0 0 10px rgba(0, 123, 255, 0.5);
}

.vehicle.braking::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 2px;
  width: 4px;
  height: 4px;
  background-color: red;
  border-radius: 50%;
  box-shadow: 0 0 5px red;
}

.vehicle.braking::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 4px;
  height: 4px;
  background-color: red;
  border-radius: 50%;
  box-shadow: 0 0 5px red;
}

.vehicle.accident {
  border: 2px solid red;
  box-shadow: 0 0 10px red;
}

.vehicle.accident.active-accident {
  border-right: 0px;
}

.vehicle.accident.target-accident {
  border-left: 0px;
}

#controls {
  background: #f8f9fa;
  padding: 10px;
}

#speedVariation {
  margin-right: 5px;
}

label[for="speedVariation"] {
  font-weight: bold;
  color: #007bff;
  cursor: pointer;
}

.slider-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 15px;
}

.form-label span {
  font-weight: bold;
  color: #007bff;
  min-width: 50px;
  text-align: center;
}

.form-range {
  width: 100%;
  appearance: none;
  height: 8px;
  background: linear-gradient(to right, #007bff 50%, #e9ecef 50%);
  border-radius: 5px;
}


.form-range::-webkit-slider-runnable-track {
  width: 100%;
  height: 8px;
  background: transparent;
  border-radius: 5px;
}

.form-range::-webkit-slider-thumb {
  width: 15px;
  height: 15px;
  background: #007bff;
  border-radius: 50%;
  cursor: pointer;
  appearance: none;
}

.form-range::-moz-range-track {
  width: 100%;
  height: 8px;
  background: #e9ecef;
  border-radius: 5px;
}

.form-range::-moz-range-progress {
  background: #007bff;
  border-radius: 5px;
}

.form-range::-moz-range-thumb {
  width: 15px;
  height: 15px;
  background: #007bff;
  border-radius: 50%;
  cursor: pointer;
}

.form-range::-ms-track {
  width: 100%;
  height: 8px;
  background: transparent;
  border-radius: 5px;
  border-color: transparent;
  color: transparent;
}

.form-range::-ms-thumb {
  width: 15px;
  height: 15px;
  background: #007bff;
  border-radius: 50%;
  cursor: pointer;
}

.stats-display {
  min-width: 300px;
  border: 1px solid black;
  border-radius: 5px;
  padding: 20px;
  background: #ffffff;
  margin-bottom: 10px;
}

.formula-stats-wrapper {
  font-family: 'Arial', sans-serif;
  font-size: 14px;
  gap: 10px;
}

.formula {
  font-size: 12px;
  color: #6c757d;
  margin-bottom: 5px;
}

.active-vehicle-info {
  margin-top: 0px;
  border-radius: 5px;
  font-family: 'Arial', sans-serif;
  font-size: 14px;
}

.active-vehicle-info h4, .rear-vehicle-info h4 {
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: bold;
}

.active-vehicle-info p {
  margin: 0px;
  font-size: 12px;
}

@media (max-width: 768px) {
  .formula-stats-wrapper {
      flex-direction: column-reverse;
      gap: 0;
  }

  .stats-display {
      width: 100%; /* Nimmt die gesamte Breite ein */
      margin-bottom: 1rem; /* Fügt einen Abstand nach unten hinzu */
      text-align: center; /* Zentriert den Text für eine bessere Darstellung */
  }

  .formula-stats-wrapper {
      text-align: center;
  }

  .text-end {
      text-align: center !important; /* Stellt sicher, dass die Checkbox auf mobilen Geräten zentriert ist */
  }

  #brakeButton {
      width: 100%; /* Buttons auf mobilen Geräten in voller Breite */
  }
}

.rotating-icon {
  width: 16px; 
  height: auto; 
  animation: rotate 8s linear infinite;
  animation-play-state: running;
  margin-top: -24px;
  margin-left: 4px;
}

.paused .rotating-icon {
  animation-play-state: paused;
}

@keyframes rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

footer {
  background-color: #f8f9fa;
  padding: 20px 0;
  text-align: center;
  border-top: 1px solid #e7e7e7;
}

.footer-links {
  list-style-type: none;
  margin: 0;
  padding: 0;
}

.footer-links li {
  display: inline;
  margin: 0 15px;
}

.footer-links a {
  color: #007bff;
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

.footer-note {
  margin-top: 10px;
  font-size: 14px;
  color: #6c757d;
}

#rearVehiclesInfo p {
  margin: 0px;
  font-size: 12px;
}