/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Arial', sans-serif;
  overflow: hidden;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: linear-gradient(135deg, #2a8a94, #3ba8b8, #4cc7d4);
  background-size: 400% 400%;
  animation: backgroundPulse 6s ease-in-out infinite;
}

@keyframes backgroundPulse {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* Loading Container */
.loading-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Background Animation Elements */
.bg-animation {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
}

.floating-circle {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  animation: float 6s ease-in-out infinite;
}

.floating-circle:nth-child(1) {
  width: 80px;
  height: 80px;
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.floating-circle:nth-child(2) {
  width: 120px;
  height: 120px;
  top: 60%;
  right: 15%;
  animation-delay: 2s;
}

.floating-circle:nth-child(3) {
  width: 60px;
  height: 60px;
  bottom: 20%;
  left: 20%;
  animation-delay: 4s;
}

.floating-circle:nth-child(4) {
  width: 100px;
  height: 100px;
  top: 10%;
  right: 30%;
  animation-delay: 1s;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
    opacity: 0.3;
  }
  50% {
    transform: translateY(-20px) rotate(180deg);
    opacity: 0.8;
  }
}

/* Logo Container */
.logo-container {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Circular Logo Background */
.logo-circle {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2a8a94, #3ba8b8);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 
    0 0 0 4px rgba(255, 255, 255, 0.1),
    0 0 0 8px rgba(255, 255, 255, 0.05),
    0 20px 40px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
  
  /* Initial position - above the screen */
  transform: translateY(-100vh) scale(0.5);
  opacity: 0;
  
  /* Animation sequence */
  animation: logoAnimation 4s ease-out 0.5s forwards;
}

/* Main Logo Animation Sequence */
@keyframes logoAnimation {
  /* Drop from above (0-20%) */
  0% {
    transform: translateY(-100vh) scale(0.5);
    opacity: 0;
  }
  20% {
    transform: translateY(0) scale(0.5);
    opacity: 1;
  }
  
  /* Bounce (20-40%) */
  25% {
    transform: translateY(-30px) scale(0.8);
  }
  30% {
    transform: translateY(0) scale(1.2);
  }
  35% {
    transform: translateY(-15px) scale(1.3);
  }
  40% {
    transform: translateY(0) scale(1.5);
  }
  
  /* Stay large size (40-55%) */
  55% {
    transform: translateY(0) scale(1.5);
  }
  
  /* Enlarge even more (55-70%) */
  70% {
    transform: translateY(0) scale(1.8);
  }
  
  /* Shrink back to normal (70-85%) */
  85% {
    transform: translateY(0) scale(1.5);
  }
  
  /* Slide right and fade out (85-100%) */
  100% {
    transform: translateX(100vw) scale(0.5);
    opacity: 0;
  }
}

/* Logo Image */
.logo-image {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  z-index: 2;
}

/* Rotating border effect */
.logo-circle::before {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  background: linear-gradient(45deg, #2a8a94, #3ba8b8, #4cc7d4, #2a8a94);
  animation: rotate 3s linear infinite;
  z-index: -1;
}

.logo-circle::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  right: 4px;
  bottom: 4px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2a8a94, #3ba8b8);
  z-index: 1;
}

@keyframes rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Company Name Animation */
.company-name {
  color: white;
  font-size: 1.8rem;
  font-weight: 700;
  margin-top: 2rem;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s ease-out 1.8s forwards;
  text-align: center;
  letter-spacing: 1px;
}

.tagline {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1rem;
  font-weight: 400;
  margin-top: 0.5rem;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s ease-out 2.2s forwards;
  text-align: center;
  letter-spacing: 0.5px;
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Loading Dots */
.loading-dots {
  display: flex;
  gap: 8px;
  margin-top: 3rem;
  opacity: 0;
  animation: fadeInUp 0.8s ease-out 2.6s forwards;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  animation: pulse 1.5s ease-in-out infinite;
}

.dot:nth-child(1) {
  animation-delay: 0s;
}

.dot:nth-child(2) {
  animation-delay: 0.2s;
}

.dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.3);
  }
}

/* Progress Bar */
.progress-container {
  position: absolute;
  bottom: 10%;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
  opacity: 0;
  animation: fadeInUp 0.8s ease-out 3s forwards;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #2a8a94, #3ba8b8, #4cc7d4);
  border-radius: 2px;
  width: 0%;
  animation: fillProgress 3s ease-out 1s forwards;
}

@keyframes fillProgress {
  0% {
    width: 0%;
  }
  100% {
    width: 100%;
  }
}

/* Fade out animation for entire screen */
.loading-container.fade-out {
  animation: fadeOut 0.8s ease-out forwards;
}

@keyframes fadeOut {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.1);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .logo-circle {
    width: 180px;
    height: 180px;
  }
  
  .logo-image {
    width: 100px;
    height: 100px;
  }
  
  .company-name {
    font-size: 1.5rem;
  }
  
  .tagline {
    font-size: 0.9rem;
  }
  
  .progress-container {
    width: 250px;
  }
}

@media (max-width: 480px) {
  .logo-circle {
    width: 150px;
    height: 150px;
  }
  
  .logo-image {
    width: 80px;
    height: 80px;
  }
  
  .company-name {
    font-size: 1.3rem;
  }
  
  .progress-container {
    width: 200px;
  }
}
