.custom-loading-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  z-index: 1050;
  overflow-y: auto;
  padding: 2rem;
}

.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 90%;
  text-align: center;
}

/* Improved Loading Animation CSS */

/* Container spacing and layout improvements */
.loading-animation {
  position: relative;
  width: 220px; /* Slightly wider to avoid crowding */
  height: 150px; /* Taller to give more space between elements */
  margin-bottom: 2.5rem;
}

/* Replace the current football CSS with this improved transparent version */
.football {
  position: absolute;
  width: 70px;
  height: 70px;
  /* Remove background color - make it transparent */
  background: transparent;
  /* Remove box-shadow since it's for a white background */
  box-shadow: none;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  animation: bounce 2.5s infinite;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Update the football icon to use main blue color */
.football::before {
  content: '\f1e3'; /* Football/soccer ball icon */
  font-family: 'Font Awesome 5 Free';
  font-weight: 400;
  font-size: 48px; /* Larger size */
  color: #043d7c; /* Using your primary blue color */
  animation: rotate 10s linear infinite;
  display: block;
  /* Add shadow to the icon text itself for depth */
  text-shadow: 0 4px 8px rgba(4, 61, 124, 0.2);
}

/* Better positioned shadow that works with transparent ball */
.football::after {
  content: '';
  position: absolute;
  bottom: -25px;
  left: 50%;
  transform: translateX(-50%);
  width: 45px;
  height: 8px;
  background: rgba(0, 0, 0, 0.15); /* Slightly darker shadow */
  border-radius: 50%;
  filter: blur(5px); /* More blur for softer shadow */
  z-index: -1;
  animation: shadow-move 2.5s infinite;
}
/* Improved travel path positioning */
.travel-path {
  position: absolute;
  bottom: 30px; /* Move up slightly */
  left: 0;
  right: 0;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px; /* More padding on sides */
}

/* Cleaner city markers */
.city-marker {
  width: 30px; /* Slightly larger */
  height: 30px;
  border-radius: 50%;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
  border: 2px solid white;
  flex-shrink: 0; /* Prevent squishing */
}

/* Fix the start marker */
.marker-start {
  background: linear-gradient(135deg, #0066cc, #004d99);
}

.marker-start::before {
  content: '\f3c5'; /* Map marker icon */
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  font-size: 12px;
  color: white;
}

/* Fix the end marker to be a hotel */
.marker-end {
  background: linear-gradient(135deg, #28a745, #218838);
}

.marker-end::before {
  content: '\f594'; /* Hotel icon */
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  font-size: 12px;
  color: white;
}

/* Use better stadium icon for middle marker */
.marker-mid {
  background: linear-gradient(135deg, #17a2b8, #138496);
}

.marker-mid::before {
  content: '\f145'; 
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  font-size: 13px; 
  color: white;
}

/* Smoother travel line with better gradient */
.travel-line {
  height: 4px; /* Slightly thinner */
  flex-grow: 1;
  margin: 0 5px; /* Add margin for spacing */
  background: linear-gradient(to right, rgba(4, 61, 124, 0.7), rgba(23, 162, 184, 0.7));
  position: relative;
  overflow: hidden;
  border-radius: 4px;
}

.travel-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, transparent, white, transparent);
  animation: travel 2s infinite;
}

/* Improved loading messages spacing */
.loading-messages {
  position: relative;
  height: 38px; /* Slightly taller */
  overflow: hidden;
  min-width: 300px;
  margin: 0 auto 20px; /* Center horizontally and add bottom margin */
  display: flex;
  justify-content: center;
}

/* Better message animation and alignment */
.loading-message {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  margin: 0;
  padding: 8px 0;
  color: #043d7c;
  font-weight: 500;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s, transform 0.5s;
  display: inline-block;
  width: 100%;
  text-align: center;
}

/* Improved loading indicator */
.loading-message::before {
  content: '';
  width: 6px;
  height: 6px;
  margin-right: 8px;
  background-color: #043d7c;
  border-radius: 50%;
  animation: blink 1s infinite;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
  position: relative;
  top: -1px;
}

.loading-message.active {
  opacity: 1;
  transform: translateY(0);
}

/* Improved pulse animation for better visibility */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(4, 61, 124, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(4, 61, 124, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(4, 61, 124, 0);
  }
}

/* Cancel button styling */
.cancel-search-btn {
  margin-top: 2rem;
  padding: 0.65rem 1.5rem;
  background-color: transparent;
  border: 1px solid rgba(4, 61, 124, 0.3);
  color: var(--primary-color);
  border-radius: 50px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.cancel-search-btn:hover {
  background-color: rgba(4, 61, 124, 0.05);
  border-color: rgba(4, 61, 124, 0.5);
}

.cancel-search-btn i {
  font-size: 1rem;
  color: #dc3545;
}

/* Body class for preventing scroll */
body.no-scroll {
  overflow: hidden;
  height: 100%;
  width: 100%;
  position: fixed;
}

/* Animations */
@keyframes bounce {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
    animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
  }
  50% {
    transform: translateX(-50%) translateY(-25px);
    animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
  }
}

@keyframes travel {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

@keyframes blink {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

/* Update rotation animation to work with the icon */
@keyframes rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Shadow animation synchronized with bounce */
@keyframes shadow-move {
  0%, 100% {
    transform: translateX(-50%) scale(1);
    opacity: 0.12;
  }
  50% {
    transform: translateX(-50%) scale(0.7);
    opacity: 0.08;
  }
}

/* Simple No Results Message */
.no-results-message {
  text-align: center;
  padding: 1.5rem;
  color: var(--primary-color);
  background-color: white;
  border-radius: 16px;
  margin-top: 1rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  animation: fadeIn 0.5s ease-out;
  max-width: 320px;
}

.no-results-message i {
  font-size: 2.5rem;
  color: var(--secondary-color);
  display: block;
  margin-bottom: 1rem;
}

.no-results-message h4 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.no-results-message p {
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  color: var(--neutral-text);
}

/* Return to Search Button */
.return-to-search-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0.65rem 1.25rem;
  border-radius: 50px;
  font-weight: 500;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(4, 61, 124, 0.25);
}

.return-to-search-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(4, 61, 124, 0.3);
}

.return-to-search-btn i {
  font-size: 0.85rem;
  color: white;
  display: inline;
  margin: 0;
}

/* Animations for the icon */
@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes shadow {
  0%, 100% {
    transform: translateX(-50%) scale(1);
    opacity: 0.6;
  }
  50% {
    transform: translateX(-50%) scale(0.8);
    opacity: 0.4;
  }
}

/* Responsive adjustments */
@media (max-width: 576px) {
  .no-results-container {
    padding: 2rem 1.5rem;
  }
  
  .no-results-title {
    font-size: 1.5rem;
  }
  
  .suggestion-item {
    padding: 0.75rem 1rem;
  }
}

/* Mobile optimization for loading animation to prevent overlap */
@media (max-width: 767.98px) {
  /* Increase container height to provide more vertical space */
  .loading-animation {
    height: 180px; /* Increased from 150px */
  }
  
  /* Move the football higher up */
  .football {
    top: 0; /* Changed from 10px to move it higher */
  }
  
  /* Modify the bounce animation for mobile */
  @keyframes bounce {
    0%, 100% {
      transform: translateX(-50%) translateY(0);
      animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
    }
    50% {
      transform: translateX(-50%) translateY(-20px); /* Reduced from -25px for shorter bounce */
      animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
    }
  }
  
  /* Move travel path lower to create more space */
  .travel-path {
    bottom: 20px; /* Changed from 30px to move it down */
  }
  
  /* Slightly reduce city marker size */
  .city-marker {
    width: 28px; /* Reduced from 30px */
    height: 28px; /* Reduced from 30px */
  }
  
  /* Adjust shadow position for the new ball position */
  .football::after {
    bottom: -15px; /* Changed from -25px */
  }
  
  /* Adjust shadow animation to match new bounce height */
  @keyframes shadow-move {
    0%, 100% {
      transform: translateX(-50%) scale(1);
      opacity: 0.12;
    }
    50% {
      transform: translateX(-50%) scale(0.75); /* Changed from 0.7 */
      opacity: 0.08;
    }
  }
}

/* Further adjustments for very small screens */
@media (max-width: 374px) {
  .loading-animation {
    height: 160px; /* Reduce height slightly */
    width: 200px; /* Reduce width slightly */
  }
  
  .football::before {
    font-size: 40px; /* Smaller football */
  }
  
  .city-marker {
    width: 24px; /* Even smaller markers */
    height: 24px;
  }
  
  .football::after {
    width: 36px; /* Smaller shadow */
  }
}

/* Static loading message above the animated messages */
.loading-static-message {
  font-weight: 600;
  color: #043d7c; /* Your main blue */
  font-size: 1.08rem;
  margin-bottom: 0.5rem;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
}

.loading-static-message i {
  color: #043d7c; /* Match icon color to text */
  font-size: 1.1em;
  margin-right: 0.3em;
}