/* Loading Screen Styles */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Welcome Text */
.welcome-text {
  font-size: 2.5rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 2rem;
  text-align: center;
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards;
  animation-delay: 0.2s;
}

.welcome-text .highlight {
  background: linear-gradient(90deg, #ffbe33 0%, #138808 50%, #f56f02 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
  padding: 0 0.3rem;
}

/* Loader Container */
.loader-container {
  opacity: 0;
  animation: fadeIn 0.8s ease forwards;
  animation-delay: 0.5s;
}

.loader {
  width: 80px;
  height: 60px;
  text-align: center;
  font-size: 10px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 4px;
}

.loader > .col {
  height: 100%;
  width: 8px;
  display: inline-block;
  border-radius: 4px;
  animation: stretch 1.2s infinite ease-in-out;
}

/* Sri Lanka Flag Colors */
.loader > .col:nth-child(1) {
  background: linear-gradient(180deg, #f56f02 0%, #ff8c42 100%);
  animation-delay: -1.1s;
}

.loader > .col:nth-child(2) {
  background: linear-gradient(180deg, #ffbe33 0%, #ffd066 100%);
  animation-delay: -1s;
}

.loader > .col:nth-child(3) {
  background: linear-gradient(180deg, #138808 0%, #45a845 100%);
  animation-delay: -0.9s;
}

.loader > .col:nth-child(4) {
  background: linear-gradient(180deg, #f56f02 0%, #ff8c42 100%);
  animation-delay: -0.8s;
}

.loader > .col:nth-child(5) {
  background: linear-gradient(180deg, #ffbe33 0%, #ffd066 100%);
  animation-delay: -0.7s;
}

/* Loading Text */
.loading-text {
  margin-top: 1.5rem;
  font-size: 1.1rem;
  color: #666;
  font-weight: 500;
  opacity: 0;
  animation: fadeIn 0.8s ease forwards, pulse 2s ease-in-out infinite;
  animation-delay: 0.8s, 1.5s;
}

/* Animations */
@keyframes stretch {
  0%,
  40%,
  100% {
    transform: scaleY(0.4);
    opacity: 0.7;
  }
  20% {
    transform: scaleY(1);
    opacity: 1;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
}

/* Slide Up Exit Animation */
@keyframes slideUpExit {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(-50px);
    opacity: 0;
  }
}

.loading-screen.exit-animation .welcome-text,
.loading-screen.exit-animation .loader-container,
.loading-screen.exit-animation .loading-text {
  animation: slideUpExit 0.6s ease forwards;
}

.loading-screen.exit-animation .welcome-text {
  animation-delay: 0s;
}

.loading-screen.exit-animation .loader-container {
  animation-delay: 0.1s;
}

.loading-screen.exit-animation .loading-text {
  animation-delay: 0.2s;
}

/* Responsive Design */
@media (max-width: 768px) {
  .welcome-text {
    font-size: 2rem;
    padding: 0 20px;
  }

  .loader {
    width: 60px;
    height: 50px;
  }

  .loader > .col {
    width: 6px;
    gap: 3px;
  }

  .loading-text {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .welcome-text {
    font-size: 1.5rem;
    padding: 0 15px;
  }

  .loader {
    width: 50px;
    height: 40px;
  }

  .loader > .col {
    width: 5px;
    gap: 2px;
  }

  .loading-text {
    font-size: 0.9rem;
  }
}