/* ============================================
   PAPEL HOSTING PRELOADER - Modern & Clean
   ============================================ */

#fast-preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999 !important;
  overflow: hidden;
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: all;
}

#fast-preloader.loaded {
  opacity: 0;
  visibility: hidden;
}

/* Animated Background Circles */
#fast-preloader::before,
#fast-preloader::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  opacity: 0.06;
  animation: floatCircle 8s ease-in-out infinite;
}

#fast-preloader::before {
  width: 400px;
  height: 400px;
  background: linear-gradient(135deg, #FFA726, #FF9800);
  top: -200px;
  right: -200px;
  animation-delay: 0s;
}

#fast-preloader::after {
  width: 300px;
  height: 300px;
  background: linear-gradient(135deg, #FF9800, #F57C00);
  bottom: -150px;
  left: -150px;
  animation-delay: -4s;
}

/* Logo Container */
.preloader-logo {
  position: relative;
  text-align: center;
  z-index: 2;
  animation: logoEntrance 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Logo Image */
.preloader-logo img {
  max-width: 220px;
  height: auto;
  display: block;
  margin: 0 auto 30px;
  filter: drop-shadow(0 10px 30px rgba(0, 102, 204, 0.15));
  animation: logoPulse 2s ease-in-out infinite;
}

/* Slogan Text */
.preloader-slogan {
  color: #FF9800;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 2px;
  margin-bottom: 35px;
  opacity: 0;
  animation: sloganFadeIn 0.8s ease-out 0.3s forwards;
  text-transform: uppercase;
}

/* Modern Spinner - Logo Renkleri */
.preloader-spinner {
  width: 90px;
  height: 90px;
  margin: 30px auto;
  position: relative;
}

.spinner-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 4px solid transparent;
  border-radius: 50%;
  animation: spin3d 2s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

.spinner-ring:nth-child(1) {
  border-top-color: #FFA726;
  border-right-color: #FFA726;
  animation-delay: 0s;
}

.spinner-ring:nth-child(2) {
  border-bottom-color: #FF9800;
  border-left-color: #FF9800;
  animation-delay: -0.6s;
  width: 75%;
  height: 75%;
  top: 12.5%;
  left: 12.5%;
}

.spinner-ring:nth-child(3) {
  border-top-color: #F57C00;
  border-bottom-color: #F57C00;
  animation-delay: -1.2s;
  width: 50%;
  height: 50%;
  top: 25%;
  left: 25%;
}

/* Loading Text */
.preloader-text {
  color: #FF9800;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-top: 25px;
  opacity: 0;
  animation: textFadeIn 0.8s ease-out 0.4s forwards;
}

/* Animated Dots */
.preloader-text::after {
  content: '';
  animation: loadingDots 1.5s steps(4, end) infinite;
}

/* Modern Progress Bar */
.preloader-progress {
  width: 280px;
  height: 5px;
  background: #fff3e0;
  border-radius: 10px;
  margin: 35px auto 0;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 3px rgba(255, 152, 0, 0.1);
}

.preloader-progress::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 167, 38, 0.3) 50%,
    transparent 100%);
  animation: shimmer 2s infinite;
}

.preloader-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #FFA726 0%, #FF9800 50%, #F57C00 100%);
  background-size: 200% 100%;
  border-radius: 10px;
  animation: progressLoad 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards,
             gradientShift 2s ease-in-out infinite;
  box-shadow: 0 0 20px rgba(255, 167, 38, 0.5),
              0 0 40px rgba(255, 152, 0, 0.3);
  position: relative;
}

.preloader-progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 40px;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5));
  animation: progressGlow 1s ease-in-out infinite;
}

/* Percentage Counter */
.preloader-percentage {
  color: #FF9800;
  font-size: 52px;
  font-weight: 700;
  margin-top: 25px;
  font-family: 'Segoe UI', 'Arial', sans-serif;
  animation: percentageFade 0.8s ease-out 0.6s forwards;
  opacity: 0;
  text-shadow: 0 2px 10px rgba(255, 152, 0, 0.2);
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes floatCircle {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(30px, -30px) scale(1.1);
  }
}

@keyframes logoEntrance {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes logoPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.03);
  }
}

@keyframes spin3d {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes sloganFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes textFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes loadingDots {
  0% { content: ''; }
  25% { content: '.'; }
  50% { content: '..'; }
  75% { content: '...'; }
}

@keyframes progressLoad {
  from {
    width: 0%;
  }
  to {
    width: 100%;
  }
}

@keyframes gradientShift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

@keyframes progressGlow {
  0%, 100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

@keyframes percentageFade {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .preloader-logo img {
    width: 110px;
  }
  
  .preloader-slogan {
    font-size: 13px;
    letter-spacing: 0.5px;
  }
  
  .preloader-spinner {
    width: 70px;
    height: 70px;
  }
  
  .preloader-spinner::before {
    width: 70px;
    height: 70px;
  }
  
  .preloader-spinner::after {
    width: 50px;
    height: 50px;
  }
  
  .preloader-text {
    font-size: 12px;
    letter-spacing: 3px;
  }
  
  .preloader-progress {
    width: 200px;
  }
  
  .preloader-percentage {
    font-size: 36px;
  }
}

/* Performance Optimization */
#fast-preloader *,
#fast-preloader::before,
#fast-preloader::after {
  will-change: transform, opacity;
  backface-visibility: hidden;
  -webkit-font-smoothing: antialiased;
  transform: translateZ(0);
}