/* Loading Screen Styles */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
  }
  
  .loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 300px;
  }
  
  /* Speedometer Styles */
  .speedometer-container {
    position: relative;
    width: 220px;
    height: 220px;
    margin-bottom: 30px;
  }
  
  .speedometer {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(145deg, #f0f0f0, #ffffff);
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border: 1px solid #f0f0f0;
  }
  
  .speedometer::before {
    content: "";
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border-radius: 50%;
    background: #ffffff;
    z-index: 1;
  }
  
  .speedometer::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(45deg, transparent, rgba(220, 38, 38, 0.05), transparent);
  }
  
  .speedometer-scale {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 2;
  }
  
  .scale-mark {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
  }
  
  .scale-mark span {
    position: absolute;
    font-size: 12px;
    font-weight: bold;
    color: #666;
    top: 20px;
  }
  
  .mark-0 {
    transform: rotate(-120deg);
  }
  .mark-0 span {
    transform: rotate(120deg);
  }
  
  .mark-20 {
    transform: rotate(-72deg);
  }
  .mark-20 span {
    transform: rotate(72deg);
  }
  
  .mark-40 {
    transform: rotate(-24deg);
  }
  .mark-40 span {
    transform: rotate(24deg);
  }
  
  .mark-60 {
    transform: rotate(24deg);
  }
  .mark-60 span {
    transform: rotate(-24deg);
  }
  
  .mark-80 {
    transform: rotate(72deg);
  }
  .mark-80 span {
    transform: rotate(-72deg);
  }
  
  .mark-100 {
    transform: rotate(120deg);
  }
  .mark-100 span {
    transform: rotate(-120deg);
  }
  
  .needle-container {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3;
    transform: rotate(-120deg);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  }
  
  .needle {
    position: absolute;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #dc2626, #ef4444);
    clip-path: polygon(0 0, 100% 50%, 0 100%);
    transform-origin: left center;
    left: 50%;
    top: calc(50% - 2px);
    box-shadow: 0 0 10px rgba(220, 38, 38, 0.5);
  }
  
  .needle-center {
    position: absolute;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle, #ef4444, #dc2626);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(220, 38, 38, 0.5);
  }
  
  .speed-display {
    position: absolute;
    bottom: 60px;
    text-align: center;
    z-index: 3;
    font-family: "Courier New", monospace;
  }
  
  #speed-value {
    font-size: 28px;
    font-weight: bold;
    color: #dc2626;
    text-shadow: 0 0 5px rgba(220, 38, 38, 0.2);
  }
  
  .speed-unit {
    font-size: 14px;
    color: #666;
    margin-left: 5px;
  }
  
  /* Loading Text */
  .loading-text {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
  }
  
  .loading-text span {
    font-size: 20px;
    font-weight: bold;
    color: #dc2626;
    margin: 0 2px;
    animation: bounce 0.6s ease-in-out infinite;
    animation-delay: calc(0.1s * var(--i));
  }
  
  .loading-text span:nth-child(1) {
    --i: 1;
  }
  .loading-text span:nth-child(2) {
    --i: 2;
  }
  .loading-text span:nth-child(3) {
    --i: 3;
  }
  .loading-text span:nth-child(4) {
    --i: 4;
  }
  .loading-text span:nth-child(5) {
    --i: 5;
  }
  .loading-text span:nth-child(6) {
    --i: 6;
  }
  .loading-text span:nth-child(7) {
    --i: 7;
  }
  .loading-text span:nth-child(8) {
    --i: 8;
  }
  .loading-text span:nth-child(9) {
    --i: 9;
  }
  .loading-text span:nth-child(10) {
    --i: 10;
  }
  
  /* Progress Bar */
  .progress-container {
    width: 100%;
    height: 6px;
    background-color: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
    box-shadow: 0 0 5px rgba(220, 38, 38, 0.2);
    margin-bottom: 15px;
  }
  
  .progress-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #dc2626, #ef4444);
    border-radius: 3px;
    transition: width 0.2s ease;
  }
  
  /* AUTOBUBA Text */
  .autobuba-text {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 2px;
    color: #dc2626;
    text-shadow: 0 2px 4px rgba(220, 38, 38, 0.2);
    margin-top: 5px;
    font-family: "Arial Black", "Helvetica Neue", sans-serif;
  }
  
  /* Animations */
  @keyframes bounce {
    0%,
    100% {
      transform: translateY(0);
    }
    50% {
      transform: translateY(-5px);
    }
  }