/* Fő tűzoltóautó konténer */
.truck {
  position: absolute;
  left: 0;
  top: 0;
  width: 46px;
  height: 74px;
}

.truck-body {
  position: relative;
  width: 100%;
  height: 100%;
  transform-origin: 50% 50%;
}

/* Fő alváz / karosszéria */
.truck-body .tb-main {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #dc2626, #991b1b);
  border-radius: 8px;
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.4);
  border: 1px solid #7f1d1d;
}

/* Fülke (eleje) */
.truck-body .tb-cab {
  position: absolute;
  left: 8%;
  top: 2%;
  width: 84%;
  height: 28%;
  background: linear-gradient(180deg, #ef4444, #b91c1c);
  border-radius: 6px 6px 3px 3px;
}

/* Szélvédő */
.truck-body .tb-window {
  position: absolute;
  left: 15%;
  top: 6%;
  width: 70%;
  height: 14%;
  background: linear-gradient(180deg, #93c5fd, #3b82f6);
  border-radius: 3px;
  opacity: 0.9;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.5);
}

/* Oldalsó redőnyök / szerszámrekeszek */
.truck-body .tb-compartments {
  position: absolute;
  left: 4%;
  top: 32%;
  width: 92%;
  height: 52%;
  background: repeating-linear-gradient(
    180deg,
    #475569,
    #475569 2px,
    #1e293b 2px,
    #1e293b 4px
  );
  border-radius: 2px;
}

/* Saját víztartály a tetőn — ugyanaz a szín, mint a jobb alsó víz-mérő */
.truck-body .tb-tank {
  position: absolute;
  left: 28%;
  top: 34%;
  width: 44%;
  height: 58%;
  background: #dfe6ea;
  border-left: 3px solid #64748b;
  border-right: 3px solid #64748b;
  border-radius: 3px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), inset 0 1px 2px rgba(255,255,255,0.4);
  overflow: hidden;
}

.truck-body .tb-tank-fill {
  position: absolute;
  left: 0; right: 0; bottom: 0; height: 100%;
  background: linear-gradient(180deg, #3fb6ff, #1e8fd9);
  transform-origin: bottom;
  transform: scaleY(var(--tb-tank-frac, 1));
}

/* Kék és Piros sziréna villogók */
.truck-body .tb-light {
  position: absolute;
  top: 1.5%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.truck-body .tb-light::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: radial-gradient(circle, currentColor 0%, transparent 70%);
  opacity: 0.55;
}

.truck-body .tb-light.l {
  left: 16%;
  background: #3b82f6;
  color: #3b82f6;
  animation: flashBlue 0.6s infinite alternate;
}

.truck-body .tb-light.r {
  right: 16%;
  background: #ef4444;
  color: #ef4444;
  animation: flashRed 0.6s infinite alternate 0.3s;
}

@keyframes flashBlue {
  0% { opacity: 0.3; transform: scale(0.8); }
  100% { opacity: 1; transform: scale(1.2); }
}

@keyframes flashRed {
  0% { opacity: 0.3; transform: scale(0.8); }
  100% { opacity: 1; transform: scale(1.2); }
}

/* Kevés víz figyelmeztető ikon */
.truck-water-warn {
  position: absolute;
  left: 50%;
  top: -26px;
  transform: translateX(-50%) scale(1);
  font-size: 22px;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.truck-water-warn.show {
  opacity: 1;
  animation: truckDropPulse 0.85s ease-in-out infinite;
}

@keyframes truckDropPulse {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.4); }
}