/* Truck Preloader Styles */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: var(--background);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100000;
  transition: opacity 0.5s ease, visibility 0.5s ease;
  pointer-events: all;
}

.preloader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-content {
  text-align: center;
  max-width: 400px;
  padding: 2rem;
}

.truck-container {
  position: relative;
  margin-bottom: 2rem;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.truck {
  animation: truck-drive 2s ease-in-out infinite;
  filter: drop-shadow(0 10px 20px rgba(109, 40, 217, 0.3));
}

@keyframes truck-drive {
  0%, 100% {
    transform: translateX(-20px) translateY(0);
  }
  50% {
    transform: translateX(20px) translateY(-5px);
  }
}

.truck circle:nth-child(7),
.truck circle:nth-child(9) {
  animation: wheel-rotate 0.8s linear infinite;
  transform-origin: center;
}

@keyframes wheel-rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.road {
  position: absolute;
  bottom: 25px;
  left: 0;
  right: 0;
  height: 3px;
  background: repeating-linear-gradient(
    90deg,
    var(--border) 0px,
    var(--border) 20px,
    transparent 20px,
    transparent 40px
  );
  animation: road-move 1s linear infinite;
}

@keyframes road-move {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 40px 0;
  }
}

.loading-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--surface-elevated);
  border-radius: var(--radius-full);
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  animation: progress-load 5s ease-out forwards;
  box-shadow: 0 0 10px rgba(109, 40, 217, 0.5);
}

@keyframes progress-load {
  0% {
    width: 0%;
  }
  100% {
    width: 100%;
  }
}
