/* Completely redesigned level system with rectangular bars and centered layout */

/* Facility Level Indicator - Now centered below title */
.facility-level-indicator {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
  margin-top: 1.5rem;
  z-index: 2;
  position: relative;
}

/* Level bars - Changed from dots to rectangles */
/* Aumentando opacidad del fondo para mejor legibilidad */
.level-bar {
  width: 2.5rem;
  height: 0.5rem;
  border-radius: 0.25rem;
  background: rgba(30, 41, 59, 0.85); /* Fondo más sólido y oscuro */
  border: 1px solid rgba(148, 163, 184, 0.5); /* Borde más visible */
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Sombra para profundidad */
}

.level-bar::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.6s ease;
}

/* Mejorando contraste de barras activas */
.level-bar.active {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  border-color: #4ade80; /* Borde más brillante */
  box-shadow: 0 0 16px rgba(34, 197, 94, 0.8), 0 0 8px rgba(34, 197, 94, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transform: scaleY(1.2);
}

.level-bar.active::before {
  left: 100%;
}

/* Pulsing animation for active levels */
@keyframes levelPulse {
  0%,
  100% {
    box-shadow: 0 0 16px rgba(34, 197, 94, 0.8), 0 0 8px rgba(34, 197, 94, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  }
  50% {
    box-shadow: 0 0 24px rgba(34, 197, 94, 1), 0 0 12px rgba(34, 197, 94, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  }
}

.level-bar.active {
  animation: levelPulse 2s ease-in-out infinite;
}

/* Locked Facility */
.facility-card.locked {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(0.7);
  background: linear-gradient(135deg, rgba(30, 30, 35, 0.95) 0%, rgba(20, 20, 25, 0.95) 100%) !important;
}

.facility-card.locked::after {
  content: "🔒";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3rem;
  z-index: 3;
  filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.8));
}

.facility-card.locked:hover {
  transform: none;
  border-color: rgba(239, 68, 68, 0.3);
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.15);
}

.facility-card.locked .facility-icon {
  opacity: 0.3;
}

/* Info Only Facility (Motor and Pit Line - no clickable, just info) */
.facility-card.info-only {
  cursor: default;
  pointer-events: none;
  opacity: 1;
  filter: none;
}

.facility-card.info-only:hover {
  transform: none;
  box-shadow: none;
}

/* Updating Status */
.updating-status {
  display: none;
  position: absolute;
  top: 1rem;
  right: 1rem;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(139, 92, 246, 0.2);
  border: 1px solid rgba(139, 92, 246, 0.5);
  border-radius: 2rem;
  color: #a78bfa;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  z-index: 3;
}

.updating-status svg {
  animation: spin 2s linear infinite;
}

.facility-pattern {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: linear-gradient(
      30deg,
      transparent 48%,
      rgba(255, 255, 255, 0.02) 49%,
      rgba(255, 255, 255, 0.02) 51%,
      transparent 52%
    ),
    linear-gradient(
      150deg,
      transparent 48%,
      rgba(255, 255, 255, 0.02) 49%,
      rgba(255, 255, 255, 0.02) 51%,
      transparent 52%
    );
  background-size: 40px 40px;
  pointer-events: none;
  opacity: 0.5;
}

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

/* Added styles for pilot blocked section */
.pilot-blocked-section {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.95) 100%);
}

.blocked-content {
  max-width: 600px;
  text-align: center;
  background: linear-gradient(135deg
