/* RiftShield Loading Screen Styles */
#loading-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
}

#loading-container.fade-out {
  opacity: 0;
  visibility: hidden;
}

/* Logo Container */
.logo-container {
  margin-bottom: 40px;
  animation: logoFloat 3s ease-in-out infinite;
}

.logo {
  width: 120px;
  height: 120px;
  background: linear-gradient(145deg, #00d4ff, #0099cc);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 20px 40px rgba(0, 212, 255, 0.3);
  position: relative;
  overflow: hidden;
}

.logo::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #00d4ff, #0099cc, #005577, #003344);
  border-radius: 26px;
  z-index: -1;
  animation: borderRotate 4s linear infinite;
}

.logo-icon {
  color: white;
  font-size: 48px;
  font-weight: bold;
}

/* VPN Shield Icon using CSS */
.vpn-shield {
  width: 60px;
  height: 72px;
  background: white;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vpn-shield::after {
  content: '🔒';
  font-size: 24px;
  color: #0099cc;
  position: absolute;
}

/* App Title */
.app-title {
  color: #ffffff;
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: 2px;
  text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.app-subtitle {
  color: #b0c4de;
  font-size: 16px;
  font-weight: 300;
  margin-bottom: 50px;
  opacity: 0.8;
}

/* Loading Animation */
.loading-animation {
  position: relative;
  width: 200px;
  height: 80px;
  margin-bottom: 30px;
}

/* VPN Tunnel Animation */
.tunnel-container {
  width: 200px;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.tunnel-progress {
  height: 100%;
  background: linear-gradient(90deg, #00d4ff, #0099cc, #005577);
  border-radius: 4px;
  width: 0%;
  animation: tunnelProgress 2.5s ease-in-out infinite;
  position: relative;
}

.tunnel-progress::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  width: 20px;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
  animation: shimmer 2.5s ease-in-out infinite;
}

/* Data Packets Animation */
.data-packets {
  position: absolute;
  top: -20px;
  left: 0;
  width: 100%;
  height: 40px;
}

.packet {
  position: absolute;
  width: 6px;
  height: 6px;
  background: #00d4ff;
  border-radius: 50%;
  opacity: 0;
  animation: packetFlow 3s linear infinite;
}

.packet:nth-child(1) { animation-delay: 0s; }
.packet:nth-child(2) { animation-delay: 0.3s; }
.packet:nth-child(3) { animation-delay: 0.6s; }
.packet:nth-child(4) { animation-delay: 0.9s; }
.packet:nth-child(5) { animation-delay: 1.2s; }

/* Connection Status */
.connection-status {
  color: #00d4ff;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  margin-bottom: 20px;
  animation: statusPulse 2s ease-in-out infinite;
}

/* Loading Dots */
.loading-dots {
  display: flex;
  gap: 8px;
}

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

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

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

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

@keyframes tunnelProgress {
  0% { width: 0%; }
  70% { width: 100%; }
  100% { width: 100%; }
}

@keyframes shimmer {
  0% { transform: translateX(-20px); }
  100% { transform: translateX(200px); }
}

@keyframes packetFlow {
  0% {
    left: -10px;
    opacity: 0;
    transform: scale(0.5);
  }
  10% {
    opacity: 1;
    transform: scale(1);
  }
  90% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    left: 210px;
    opacity: 0;
    transform: scale(0.5);
  }
}

@keyframes statusPulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

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

/* Security Badge */
.security-badge {
  position: absolute;
  bottom: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 212, 255, 0.1);
  padding: 12px 24px;
  border-radius: 25px;
  border: 1px solid rgba(0, 212, 255, 0.3);
  backdrop-filter: blur(10px);
}

.security-icon {
  color: #00d4ff;
  font-size: 20px;
}

.security-text {
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
  .logo {
    width: 100px;
    height: 100px;
  }
  
  .app-title {
    font-size: 24px;
  }
  
  .loading-animation {
    width: 160px;
  }
  
  .tunnel-container {
    width: 160px;
  }
}

@media (max-width: 480px) {
  .logo {
    width: 80px;
    height: 80px;
  }
  
  .vpn-shield {
    width: 40px;
    height: 48px;
  }
  
  .vpn-shield::after {
    font-size: 18px;
  }
  
  .app-title {
    font-size: 20px;
  }
  
  .app-subtitle {
    font-size: 14px;
  }
}
