/* Custom STN Tugboat Loader */
#stn-loader {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: #0b213f;
  /* STN premium dark blue */
  z-index: 9999;
}

.app-loading {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.spinner-title {
  margin-top: 30px;
  color: white;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 1.1rem;
  animation: pulse-text 1.5s infinite;
}

@keyframes pulse-text {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

.tugboat-loader {
  position: relative;
  width: 400px;
  height: 120px;
  overflow: hidden;
  border-radius: 8px;
}

/* Water / Waves moving left to give illusion of boat moving right */
.water {
  position: absolute;
  bottom: 0;
  left: -200px;
  width: 800px;
  height: 40px;
  background: #1a5fa3;
  border-radius: 20px;
  animation: move-water 2s linear infinite;
}

@keyframes move-water {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-100px);
  }
}

.moving-scene {
  position: absolute;
  bottom: 25px;
  /* sit on water */
  left: 0;
  width: 100%;
  animation: sail-across 6s linear infinite;
}

@keyframes sail-across {
  0% {
    transform: translateX(-350px);
  }

  100% {
    transform: translateX(450px);
  }
}

/* The tugboat bobbing */
.tugboat {
  position: absolute;
  right: 0;
  bottom: 0px;
  width: 80px;
  height: 35px;
  background-color: #e03131;
  /* STN Red */
  border-radius: 10px 40px 10px 10px;
  animation: bobbing 1.5s ease-in-out infinite alternate;
  z-index: 2;
}

.cabin {
  position: absolute;
  bottom: 35px;
  right: 20px;
  width: 35px;
  height: 25px;
  background-color: white;
  border-radius: 5px 15px 0 0;
  box-shadow: inset -5px 0 0 rgba(0, 0, 0, 0.1);
}

.window {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 10px;
  height: 10px;
  background-color: #bbcedd;
  border-radius: 50%;
}

.chimney {
  position: absolute;
  bottom: 25px;
  left: 5px;
  width: 8px;
  height: 20px;
  background-color: #495057;
}

.smoke {
  position: absolute;
  bottom: 45px;
  left: -5px;
  width: 15px;
  height: 15px;
  background-color: rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  animation: smoke-puff 1.5s linear infinite;
}

@keyframes smoke-puff {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 0.8;
  }

  100% {
    transform: translate(-30px, -40px) scale(3);
    opacity: 0;
  }
}

@keyframes bobbing {
  0% {
    transform: translateY(0px) rotate(-1deg);
  }

  100% {
    transform: translateY(3px) rotate(2deg);
  }
}

/* The rope connecting them */
.rope {
  position: absolute;
  right: 65px;
  bottom: 10px;
  width: 50px;
  height: 2px;
  background-color: #f8f9fa;
  animation: rope-bobbing 1.5s ease-in-out infinite alternate;
  transform-origin: right;
}

@keyframes rope-bobbing {
  0% {
    transform: rotate(5deg);
  }

  100% {
    transform: rotate(-5deg);
  }
}

/* The cargo container */
.cargo-container {
  position: absolute;
  right: 110px;
  /* sit behind the rope */
  bottom: -5px;
  width: 100px;
  height: 40px;
  background-color: #1971c2;
  /* STN blue */
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.2);
  /* ribbed visual for container */
  background-image: repeating-linear-gradient(90deg, transparent, transparent 10px, rgba(255, 255, 255, 0.1) 10px, rgba(255, 255, 255, 0.1) 20px);
  animation: cargo-bobbing 1.5s ease-in-out infinite alternate 0.2s;
  z-index: 1;
}

.cargo-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-weight: bold;
  letter-spacing: 2px;
  font-size: 14px;
}

@keyframes cargo-bobbing {
  0% {
    transform: translateY(2px) rotate(1deg);
  }

  100% {
    transform: translateY(-2px) rotate(-2deg);
  }
}