/* Mô phỏng xe — dùng chung home banner & auth */

.home-sim-wrap {
  padding: 4px 6px;
  height: 100%;
  min-height: 0;
}

.home-sim-stage {
  height: 100%;
  min-height: 0;
  margin: 0;
  border-radius: 8px;
}

.mascot-deco-card .home-sim-wrap {
  display: flex;
  align-items: stretch;
}

.mascot-deco-card .home-sim-stage {
  flex: 1;
  min-height: 52px;
}

.auth-sim-stage {
  position: relative;
  overflow: hidden;
  border: 1px solid #d8e3f0;
  background: linear-gradient(180deg, #eef3fa 0%, #e2eaf5 100%);
}

.auth-sim-road {
  position: absolute;
  left: 6%;
  right: 6%;
  height: 2px;
  background: #94a3b8;
  border-radius: 999px;
}

.auth-sim-road::after {
  content: '';
  position: absolute;
  inset: -7px 0;
  background: repeating-linear-gradient(
    90deg,
    transparent 0 12px,
    rgba(148, 163, 184, 0.55) 12px 22px
  );
  opacity: 0.55;
}

.auth-sim-road--moto { top: 41%; }
.auth-sim-road--car { top: 71%; }

.auth-sim-point {
  position: absolute;
  top: 16px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  box-shadow: 0 3px 8px rgba(15, 29, 61, 0.18);
  z-index: 2;
}

.auth-sim-point--a { left: 7%; background: #3b82f6; }
.auth-sim-point--b { right: 7%; background: #f59e0b; }

.auth-sim-vehicle {
  position: absolute;
  width: 38px;
  height: 20px;
  border-radius: 7px 10px 6px 6px;
  box-shadow: 0 6px 14px rgba(15, 29, 61, 0.2);
  animation-duration: 5.4s;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}

.auth-sim-vehicle::before,
.auth-sim-vehicle::after {
  content: '';
  position: absolute;
  bottom: -3px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #334155;
  border: 1.5px solid #fff;
}

.auth-sim-vehicle::before { left: 5px; }
.auth-sim-vehicle::after { right: 5px; }

.auth-sim-vehicle span {
  position: absolute;
  right: 5px;
  top: 3px;
  width: 10px;
  height: 6px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.75);
}

.auth-sim-vehicle--moto {
  top: calc(41% - 16px);
  left: 12%;
  background: #60a5fa;
  animation-name: auth-sim-moto-run;
}

.auth-sim-vehicle--car {
  top: calc(71% - 16px);
  left: 7%;
  background: #fbbf24;
  animation-name: auth-sim-car-run;
}

.auth-sim-catch {
  position: absolute;
  left: calc(57% + 14px);
  top: 32%;
  bottom: 14%;
  width: 2px;
  background: #10b981;
  border-radius: 999px;
  opacity: 0;
  animation: auth-sim-catch 5.4s ease-in-out infinite;
}

.auth-sim-fireworks {
  position: absolute;
  left: 57%;
  top: 38%;
  width: 0;
  height: 0;
  animation: auth-sim-fireworks-wrap 5.4s ease-in-out infinite;
}

.auth-sim-fireworks i {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fde047;
  opacity: 0;
}

.auth-sim-fireworks i:nth-child(1) { animation: auth-sim-fw-1 5.4s ease-out infinite; }
.auth-sim-fireworks i:nth-child(2) { background: #93c5fd; animation: auth-sim-fw-2 5.4s ease-out infinite; }
.auth-sim-fireworks i:nth-child(3) { background: #f9a8d4; animation: auth-sim-fw-3 5.4s ease-out infinite; }
.auth-sim-fireworks i:nth-child(4) { background: #86efac; animation: auth-sim-fw-4 5.4s ease-out infinite; }
.auth-sim-fireworks i:nth-child(5) { background: #c4b5fd; animation: auth-sim-fw-5 5.4s ease-out infinite; }
.auth-sim-fireworks i:nth-child(6) { background: #fdba74; animation: auth-sim-fw-6 5.4s ease-out infinite; }

@keyframes auth-sim-moto-run {
  0%, 14% { left: 15%; opacity: 1; }
  52% { left: 57%; opacity: 1; }
  78% { left: 57%; opacity: 1; }
  92% { left: 57%; opacity: 0; }
  93% { left: 15%; opacity: 0; }
  100% { left: 15%; opacity: 1; }
}

@keyframes auth-sim-car-run {
  0%, 14% { left: 9%; opacity: 1; }
  58% { left: 60%; opacity: 1; }
  78% { left: 60%; opacity: 1; }
  92% { left: 60%; opacity: 0; }
  93% { left: 9%; opacity: 0; }
  100% { left: 9%; opacity: 1; }
}

@keyframes auth-sim-catch {
  0%, 52% { opacity: 0; transform: scaleY(0.5); }
  58%, 82% { opacity: 1; transform: scaleY(1); }
  92%, 100% { opacity: 0; transform: scaleY(0.5); }
}

@keyframes auth-sim-fireworks-wrap {
  0%, 60% { opacity: 0; }
  66%, 84% { opacity: 1; }
  92%, 100% { opacity: 0; }
}

@keyframes auth-sim-fw-1 {
  0%, 62% { transform: translate(-50%, -50%) scale(0.2); }
  74% { transform: translate(-50%, -34px) scale(1); }
  88%, 100% { transform: translate(-50%, -50%) scale(0.2); }
}

@keyframes auth-sim-fw-2 {
  0%, 62% { transform: translate(-50%, -50%) scale(0.2); }
  74% { transform: translate(22px, -24px) scale(1); }
  88%, 100% { transform: translate(-50%, -50%) scale(0.2); }
}

@keyframes auth-sim-fw-3 {
  0%, 62% { transform: translate(-50%, -50%) scale(0.2); }
  74% { transform: translate(26px, 6px) scale(1); }
  88%, 100% { transform: translate(-50%, -50%) scale(0.2); }
}

@keyframes auth-sim-fw-4 {
  0%, 62% { transform: translate(-50%, -50%) scale(0.2); }
  74% { transform: translate(-50%, 26px) scale(1); }
  88%, 100% { transform: translate(-50%, -50%) scale(0.2); }
}

@keyframes auth-sim-fw-5 {
  0%, 62% { transform: translate(-50%, -50%) scale(0.2); }
  74% { transform: translate(-30px, 8px) scale(1); }
  88%, 100% { transform: translate(-50%, -50%) scale(0.2); }
}

@keyframes auth-sim-fw-6 {
  0%, 62% { transform: translate(-50%, -50%) scale(0.2); }
  74% { transform: translate(-26px, -24px) scale(1); }
  88%, 100% { transform: translate(-50%, -50%) scale(0.2); }
}

@media (prefers-reduced-motion: reduce) {
  .auth-sim-vehicle,
  .auth-sim-catch,
  .auth-sim-fireworks,
  .auth-sim-fireworks i {
    animation: none !important;
  }
}
