/* LoadingPage.css */
.loading-page {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.loading-container {
  position: relative;
  text-align: center;
  max-width: 500px;
  width: 90%;
}

/* Background Elements */
.background-elements {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

.floating-circle {
  position: absolute;
  border-radius: 50%;
  background: rgba(0, 184, 148, 0.1);
  animation: float 6s ease-in-out infinite;
}

.circle-1 {
  width: 80px;
  height: 80px;
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.circle-2 {
  width: 120px;
  height: 120px;
  top: 60%;
  right: 10%;
  animation-delay: 2s;
}

.circle-3 {
  width: 60px;
  height: 60px;
  bottom: 20%;
  left: 20%;
  animation-delay: 4s;
}

.circle-4 {
  width: 100px;
  height: 100px;
  top: 20%;
  right: 20%;
  animation-delay: 1s;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) scale(1);
    opacity: 0.3;
  }
  50% {
    transform: translateY(-20px) scale(1.1);
    opacity: 0.6;
  }
}

/* Mascot Styles */
.mascot-container {
  margin-bottom: 2rem;
}

/* Shield Mascot */
.mascot-shield {
  position: relative;
  display: inline-block;
  animation: bounce 2s ease-in-out infinite;
}

.shield-body {
  width: 120px;
  height: 140px;
  background: linear-gradient(135deg, #00b894, #00a085);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 8px 32px rgba(0, 184, 148, 0.3);
}

.shield-body::before {
  content: '';
  position: absolute;
  top: 5px;
  left: 5px;
  right: 5px;
  bottom: 5px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
}

.shield-inner {
  width: 60px;
  height: 80px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 40% 40% 40% 40% / 50% 50% 30% 30%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #00b894;
}

.shield-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 140px;
  height: 160px;
  background: radial-gradient(circle, rgba(0, 184, 148, 0.4) 0%, transparent 70%);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

/* Guard Mascot */
.mascot-guard {
  display: inline-block;
  animation: nod 3s ease-in-out infinite;
}

.guard-head {
  width: 80px;
  height: 80px;
  background: #00b894;
  border-radius: 50%;
  position: relative;
  margin: 0 auto;
}

.guard-face {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 40px;
}

.guard-eyes {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.guard-eyes .eye {
  width: 12px;
  height: 12px;
  background: white;
  border-radius: 50%;
  animation: blink 4s infinite;
}

.guard-mouth {
  width: 20px;
  height: 4px;
  background: white;
  border-radius: 2px;
  margin: 0 auto;
}

.guard-body {
  width: 100px;
  height: 80px;
  background: #00a085;
  border-radius: 20px 20px 0 0;
  margin: -10px auto 0;
}

/* Robot Mascot */
.mascot-robot {
  display: inline-block;
  animation: wiggle 3s ease-in-out infinite;
}

.robot-head {
  width: 100px;
  height: 80px;
  background: #00b894;
  border-radius: 20px 20px 0 0;
  position: relative;
  margin: 0 auto;
}

.robot-face {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
}

.robot-eyes {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.robot-eyes .eye {
  width: 15px;
  height: 15px;
  background: white;
  border-radius: 50%;
  animation: glow 2s ease-in-out infinite;
}

.robot-body {
  width: 120px;
  height: 100px;
  background: #00a085;
  border-radius: 0 0 20px 20px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.robot-pulse {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 10px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 5px;
  animation: scan 2s ease-in-out infinite;
}

/* Text Styles */
.loading-text {
  margin-bottom: 2rem;
}

.loading-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #2d3436;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #2d3436, #00b894);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.loading-subtitle {
  font-size: 1.1rem;
  color: #636e72;
  line-height: 1.6;
}

/* Progress Bar */
.progress-container {
  margin-bottom: 2rem;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: #e9ecef;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #00b894, #55efc4);
  border-radius: 4px;
  transition: width 0.3s ease;
  position: relative;
  overflow: hidden;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: shimmer 2s infinite;
}

.progress-text {
  font-size: 0.9rem;
  color: #636e72;
  font-weight: 500;
}

/* Loading Animation */
.loading-animation {
  margin-bottom: 2rem;
}

.loading-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.dot {
  width: 12px;
  height: 12px;
  background: #00b894;
  border-radius: 50%;
  animation: dotPulse 1.4s ease-in-out infinite both;
}

.dot-1 { animation-delay: -0.32s; }
.dot-2 { animation-delay: -0.16s; }
.dot-3 { animation-delay: 0s; }

/* Tips Section */
.loading-tips {
  background: rgba(255, 255, 255, 0.8);
  border-radius: 12px;
  padding: 1.5rem;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 184, 148, 0.1);
}

.tip-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  color: #636e72;
}

.tip-item:last-child {
  margin-bottom: 0;
}

.tip-item i {
  color: #00b894;
  width: 16px;
}

/* Animations */
@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.4;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 0.8;
    transform: translate(-50%, -50%) scale(1.1);
  }
}

@keyframes nod {
  0%, 100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(5deg);
  }
  75% {
    transform: rotate(-5deg);
  }
}

@keyframes blink {
  0%, 90%, 100% {
    transform: scaleY(1);
  }
  95% {
    transform: scaleY(0.1);
  }
}

@keyframes wiggle {
  0%, 100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(2deg);
  }
  75% {
    transform: rotate(-2deg);
  }
}

@keyframes glow {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@keyframes scan {
  0% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(40px);
  }
  100% {
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes dotPulse {
  0%, 80%, 100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* Size Variants */
.loading-small .loading-title {
  font-size: 1.8rem;
}

.loading-small .shield-body {
  width: 80px;
  height: 100px;
}

.loading-small .shield-inner {
  width: 40px;
  height: 60px;
  font-size: 1.5rem;
}

.loading-large .loading-title {
  font-size: 3rem;
}

.loading-large .shield-body {
  width: 160px;
  height: 180px;
}

.loading-large .shield-inner {
  width: 80px;
  height: 100px;
  font-size: 2.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .loading-title {
    font-size: 2rem;
  }
  
  .loading-subtitle {
    font-size: 1rem;
  }
  
  .shield-body {
    width: 100px;
    height: 120px;
  }
  
  .shield-inner {
    width: 50px;
    height: 70px;
    font-size: 1.8rem;
  }
}

@media (max-width: 480px) {
  .loading-title {
    font-size: 1.6rem;
  }
  
  .loading-tips {
    padding: 1rem;
  }
  
  .tip-item {
    font-size: 0.8rem;
  }
}
