/* Premium Enterprise Splash Screen Styles */
#loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  overflow: hidden;
}

/* Background Pattern */
.background-pattern {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 25% 25%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(16, 185, 129, 0.08) 0%, transparent 50%);
  animation: patternFloat 20s ease-in-out infinite;
}

.grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: gridMove 30s linear infinite;
}

@keyframes gridMove {
  0% { transform: translate(0, 0); }
  100% { transform: translate(50px, 50px); }
}

@keyframes patternFloat {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(1deg); }
}

.splash-container {
  text-align: center;
  max-width: 500px;
  padding: 40px 20px;
  position: relative;
  z-index: 10;
}

/* Logo Section */
.logo-section {
  margin-bottom: 40px;
  animation: logoEntrance 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.logo-wrapper {
  position: relative;
  display: inline-block;
  cursor: pointer;
  background: radial-gradient(circle, 
    rgba(255, 255, 255, 0.98) 0%, 
    rgba(239, 246, 255, 0.95) 50%, 
    rgba(219, 234, 254, 0.9) 100%);
  border-radius: 50%;
  padding: 15px;
  box-shadow: 
    0 0 30px rgba(59, 130, 246, 0.3),
    0 0 60px rgba(147, 197, 253, 0.15),
    inset 0 0 15px rgba(255, 255, 255, 0.2);
}

.logo-wrapper::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, 
    rgba(255, 255, 255, 0.95) 0%, 
    rgba(239, 246, 255, 0.9) 25%, 
    rgba(219, 234, 254, 0.8) 50%, 
    rgba(191, 219, 254, 0.6) 75%, 
    rgba(147, 197, 253, 0.3) 90%, 
    transparent 100%);
  border-radius: 50%;
  z-index: -2;
  box-shadow: 
    0 0 40px rgba(59, 130, 246, 0.2),
    0 0 80px rgba(147, 197, 253, 0.1),
    inset 0 0 20px rgba(255, 255, 255, 0.2);
}

.logo-wrapper::before {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  background: linear-gradient(45deg, 
    rgba(59, 130, 246, 0.2), 
    rgba(16, 185, 129, 0.15), 
    rgba(139, 92, 246, 0.2), 
    rgba(59, 130, 246, 0.2));
  background-size: 400% 400%;
  border-radius: 50%;
  animation: logoShine 6s ease-in-out infinite;
  z-index: -1;
}

.app-logo {
  width: 140px;
  height: 140px;
  object-fit: contain;
  animation: logoFloat 3s ease-in-out infinite;
  filter: drop-shadow(0 8px 25px rgba(0,0,0,0.15)) 
          drop-shadow(0 0 20px rgba(59, 130, 246, 0.4))
          drop-shadow(0 0 40px rgba(16, 185, 129, 0.2));
  transition: all 0.3s ease;
  z-index: 10;
  position: relative;
}

.app-logo:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 12px 35px rgba(0,0,0,0.2)) 
          drop-shadow(0 0 30px rgba(59, 130, 246, 0.6))
          drop-shadow(0 0 60px rgba(16, 185, 129, 0.3))
          drop-shadow(0 0 80px rgba(139, 92, 246, 0.2));
}

.logo-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.3) 0%, rgba(59, 130, 246, 0.15) 30%, transparent 70%);
  border-radius: 50%;
  animation: glowPulse 4s ease-in-out infinite;
}

.logo-glow::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.35) 0%, rgba(16, 185, 129, 0.15) 40%, transparent 60%);
  border-radius: 50%;
  animation: glowPulse 4s ease-in-out infinite reverse;
}

.logo-glow::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.3) 0%, rgba(139, 92, 246, 0.1) 50%, transparent 80%);
  border-radius: 50%;
  animation: glowPulse 3s ease-in-out infinite;
}

@keyframes logoEntrance {
  0% {
    opacity: 0;
    transform: translateY(-50px) scale(0.8);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes logoFloat {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

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

@keyframes logoShine {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}

/* App Name */
.app-name {
  margin-bottom: 50px;
  animation: titleEntrance 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.3s both;
}

.app-name h1 {
  font-size: 3.5rem;
  font-weight: 800;
  color: white;
  margin: 0 0 15px 0;
  letter-spacing: -2px;
  text-shadow: 0 4px 20px rgba(0,0,0,0.4);
  background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.title-underline {
  width: 0;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6, #10b981);
  margin: 0 auto 20px;
  border-radius: 2px;
  animation: underlineExpand 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) 1s both;
}

.app-name p {
  font-size: 1.3rem;
  color: rgba(226, 232, 240, 0.9);
  margin: 0;
  font-weight: 500;
  letter-spacing: 1px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

@keyframes titleEntrance {
  0% {
    opacity: 0;
    transform: translateY(-30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes underlineExpand {
  0% {
    width: 0;
  }
  100% {
    width: 250px;
  }
}

/* Loading Section */
.loading-section {
  margin-bottom: 40px;
  animation: loadingEntrance 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.6s both;
}

.loading-container {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto 25px;
}

.spinner-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 3px solid transparent;
  border-radius: 50%;
  animation: spinnerRotate 2s linear infinite;
}

.spinner-ring:nth-child(1) {
  border-top-color: #3b82f6;
  animation-delay: 0s;
}

.spinner-ring:nth-child(2) {
  border-right-color: #10b981;
  animation-delay: 0.5s;
}

.spinner-ring:nth-child(3) {
  border-bottom-color: #f59e0b;
  animation-delay: 1s;
}

.loading-text {
  font-size: 1.1rem;
  color: rgba(226, 232, 240, 0.9);
  font-weight: 500;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* Status Indicators */
.status-indicators {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-bottom: 40px;
  animation: statusEntrance 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.9s both;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(226, 232, 240, 0.8);
  font-size: 0.9rem;
  font-weight: 500;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
  0%, 100% {
    opacity: 0.7;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

@keyframes statusEntrance {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes loadingEntrance {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spinnerRotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Footer */
.footer {
  position: absolute;
  bottom: 40px;
  left: 0;
  right: 0;
  animation: footerEntrance 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) 1.2s both;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(226, 232, 240, 0.7);
  font-size: 0.9rem;
}

.footer-main {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-main span {
  font-weight: 400;
}

.footer-main a {
  color: #3b82f6;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.footer-main a:hover {
  color: #60a5fa;
  text-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
  transform: translateY(-1px);
}

.version-info {
  color: rgba(226, 232, 240, 0.5);
  font-size: 0.8rem;
  font-weight: 400;
}

@keyframes footerEntrance {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .app-name h1 {
    font-size: 2.8rem;
  }
  
  .app-name p {
    font-size: 1.1rem;
  }
  
  .app-logo {
    width: 120px;
    height: 120px;
  }
  
  .logo-wrapper::before {
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
  }
  
  .logo-glow {
    width: 160px;
    height: 160px;
  }
}

@media (max-width: 480px) {
  .splash-container {
    padding: 20px;
  }
  
  .app-name h1 {
    font-size: 2.4rem;
  }
  
  .app-name p {
    font-size: 1rem;
  }
  
  .app-logo {
    width: 100px;
    height: 100px;
  }
  
  .logo-wrapper::before {
    top: -6px;
    left: -6px;
    right: -6px;
    bottom: -6px;
  }
  
  .logo-glow {
    width: 140px;
    height: 140px;
  }
  
  .footer {
    bottom: 30px;
  }
}

/* Legacy styles for backward compatibility */
h1, h2, h3, h4 {
    font-weight: bolder;
    color: #8100FFFF;
}

.center {
    margin-left: auto;
    margin-right: auto;
    display: block;
    top: 50%;
}

.fixedBottom {
    position: fixed;
    text-align: center;
    bottom: 10px;
    width: 100%;
}

.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 50%;
    left: 50%;
    -ms-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
}

/* ----- Legacy Preloader ----- */
#loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

#loader {
    width: 200px;
    height: 200px;
    margin: -100px 0 0 -100px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: #3498db;
    -webkit-animation: spin 2s linear infinite;
    animation: spin 2s linear infinite;
}

#loader:before {
    content: "";
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: #e74c3c;
    -webkit-animation: spin 3s linear infinite;
    animation: spin 3s linear infinite;
}

#loader:after {
    content: "";
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 15px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: #f9c922;
    -webkit-animation: spin 1.5s linear infinite;
    animation: spin 1.5s linear infinite;
}

@-webkit-keyframes spin {
    0% {
        -webkit-transform: rotate(0deg);
        -ms-transform: rotate(0deg);
        transform: rotate(0deg);
    }
    100% {
        -webkit-transform: rotate(360deg);
        -ms-transform: rotate(360deg);
        transform: rotate(360deg);
    }
}

@keyframes spin {
    0% {
        -webkit-transform: rotate(0deg);
        -ms-transform: rotate(0deg);
        transform: rotate(0deg);
    }
    100% {
        -webkit-transform: rotate(360deg);
        -ms-transform: rotate(360deg);
        transform: rotate(360deg);
    }
}