/**
 * Premium Loading Screen
 * Entrepreneur-Focused, Sophisticated Design
 */

.loader-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000000;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  overflow: hidden;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

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

/* Hide main content until loader finishes */
body.loading #header,
body.loading section {
  opacity: 0;
  visibility: hidden;
}

body:not(.loading) #header,
body:not(.loading) section {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

/* Animated Background */
.loader-screen::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 50%, rgba(18, 214, 64, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 40% 20%, rgba(6, 182, 212, 0.15) 0%, transparent 50%);
  animation: loaderBackgroundShift 8s ease infinite;
  z-index: 0;
}

@keyframes loaderBackgroundShift {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.1);
  }
}

/* Main Content Container */
.loader-content {
  position: relative;
  z-index: 1;
  text-align: center;
  width: 100%;
  max-width: 800px;
  padding: 20px;
}

/* Name Animation */
.loader-name {
  font-size: 64px;
  font-weight: 700;
  font-family: "Poppins", sans-serif;
  margin-bottom: 20px;
  position: relative;
  display: inline-block;
  opacity: 0;
  animation: nameReveal 1.5s ease 0.5s forwards;
}

.loader-name .name-part {
  display: inline-block;
  background: linear-gradient(135deg, #fff 0%, #12d640 50%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 30px rgba(18, 214, 64, 0.5);
  position: relative;
}

.loader-name .name-part::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #12d640, #8b5cf6, #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0;
  animation: nameGlow 2s ease-in-out infinite;
}

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

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

/* Tagline */
.loader-tagline {
  font-size: 20px;
  font-weight: 300;
  font-family: "Raleway", sans-serif;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 40px;
  opacity: 0;
  animation: taglineReveal 1s ease 1.5s forwards;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.loader-tagline .tagline-text {
  display: inline-block;
  position: relative;
}

.loader-tagline .tagline-text::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #12d640, #8b5cf6);
  animation: underlineExpand 1s ease 2s forwards;
}

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

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

/* Progress Container */
.loader-progress-container {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  position: relative;
  opacity: 0;
  animation: progressReveal 0.8s ease 2s forwards;
}

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

/* Circular Progress */
.loader-progress-circle {
  width: 120px;
  height: 120px;
  margin: 0 auto 20px;
  position: relative;
}

.loader-progress-circle svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.loader-progress-circle .progress-ring {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
}

.loader-progress-circle .progress-ring-bg {
  stroke: rgba(255, 255, 255, 0.1);
}

.loader-progress-circle .progress-ring-fill {
  stroke: url(#gradient);
  stroke-dasharray: 314;
  stroke-dashoffset: 314;
  transition: stroke-dashoffset 0.3s ease;
  filter: drop-shadow(0 0 10px rgba(18, 214, 64, 0.5));
}

/* Gradient Definition */
.loader-progress-circle defs linearGradient {
  --gradient-color-1: #12d640;
  --gradient-color-2: #8b5cf6;
  --gradient-color-3: #06b6d4;
}

/* Progress Percentage */
.loader-progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 24px;
  font-weight: 600;
  font-family: "Poppins", sans-serif;
  color: #12d640;
  text-shadow: 0 0 10px rgba(18, 214, 64, 0.5);
}

/* Loading Message */
.loader-message {
  font-size: 14px;
  font-weight: 400;
  font-family: "Raleway", sans-serif;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 20px;
  text-transform: uppercase;
  letter-spacing: 3px;
  animation: messagePulse 2s ease-in-out infinite;
}

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

/* Animated Dots */
.loader-dots {
  display: inline-block;
}

.loader-dots span {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #12d640;
  margin: 0 4px;
  animation: dotBounce 1.4s ease-in-out infinite;
  box-shadow: 0 0 10px rgba(18, 214, 64, 0.5);
}

.loader-dots span:nth-child(1) {
  animation-delay: 0s;
}

.loader-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.loader-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes dotBounce {
  0%, 80%, 100% {
    transform: translateY(0) scale(1);
    opacity: 0.7;
  }
  40% {
    transform: translateY(-15px) scale(1.2);
    opacity: 1;
  }
}

/* Floating Particles */
.loader-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.loader-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: #12d640;
  border-radius: 50%;
  opacity: 0.4;
  animation: particleFloat 8s infinite ease-in-out;
  box-shadow: 0 0 10px rgba(18, 214, 64, 0.5);
}

@keyframes particleFloat {
  0%, 100% {
    transform: translateY(0) translateX(0);
    opacity: 0.4;
  }
  50% {
    transform: translateY(-100px) translateX(50px);
    opacity: 0.8;
  }
}

/* Skip Button */
.loader-skip {
  position: absolute;
  bottom: 40px;
  right: 40px;
  padding: 12px 24px;
  background: rgba(18, 214, 64, 0.1);
  border: 1px solid rgba(18, 214, 64, 0.3);
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  font-family: "Raleway", sans-serif;
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: pointer;
  border-radius: 30px;
  transition: all 0.3s ease;
  opacity: 0;
  animation: skipReveal 0.5s ease 3s forwards;
  z-index: 2;
}

.loader-skip:hover {
  background: rgba(18, 214, 64, 0.2);
  border-color: rgba(18, 214, 64, 0.5);
  color: #12d640;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(18, 214, 64, 0.3);
}

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

/* Mobile Optimizations */
@media (max-width: 768px) {
  .loader-name {
    font-size: 42px;
  }
  
  .loader-tagline {
    font-size: 16px;
  }
  
  .loader-progress-circle {
    width: 100px;
    height: 100px;
  }
  
  .loader-progress-text {
    font-size: 20px;
  }
  
  .loader-skip {
    bottom: 20px;
    right: 20px;
    padding: 10px 20px;
    font-size: 11px;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .loader-screen::before,
  .loader-name,
  .loader-tagline,
  .loader-message,
  .loader-dots span,
  .loader-particle {
    animation: none !important;
  }
  
  .loader-name,
  .loader-tagline,
  .loader-progress-container {
    opacity: 1;
    transform: none;
  }
}

