.page-loader {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #022045 0%, #001428 60%, #000a17 100%);
  overflow: hidden;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.55s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.55s ease;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

.page-loader.loaded {
  opacity: 0;
  visibility: hidden;
  transform: scale(1.04);
  pointer-events: none;
}

/* Arka Plan Enerji Izgarası & Parıltısı */
.loader-ambient {
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(circle at 50% 50%, rgba(141, 198, 63, 0.12) 0%, transparent 60%),
    radial-gradient(circle at 50% 40%, rgba(0, 229, 255, 0.1) 0%, transparent 50%),
    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: 100% 100%, 100% 100%, 48px 48px, 48px 48px;
  background-position: center;
  pointer-events: none;
}

/* İçerik Kutusu */
.loader-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 90vw;
}

/* Enerji Çekirdeği (Core Container) */
.energy-core {
  position: relative;
  width: 210px;
  height: 210px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 26px;
}

/* Yayılan Ultrasonik Enerji Dalgaları (Ultrasonic / Thermal Waves) */
.energy-wave {
  position: absolute;
  inset: 15px;
  border-radius: 50%;
  border: 1px solid rgba(141, 198, 63, 0.4);
  opacity: 0;
  pointer-events: none;
}

.wave-1 {
  animation: energyPulseWave 2.8s cubic-bezier(0.1, 0.6, 0.3, 1) infinite;
}

.wave-2 {
  animation: energyPulseWave 2.8s cubic-bezier(0.1, 0.6, 0.3, 1) infinite 1.4s;
}

@keyframes energyPulseWave {
  0% {
    transform: scale(0.7);
    opacity: 0.6;
    border-color: rgba(0, 229, 255, 0.6);
  }
  50% {
    border-color: rgba(141, 198, 63, 0.4);
  }
  100% {
    transform: scale(1.45);
    opacity: 0;
    border-color: rgba(141, 198, 63, 0);
  }
}

/* SVG Yörünge Halkaları */
.energy-rings-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform-origin: center;
  overflow: visible;
}

.ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.05);
  stroke-width: 2;
}

.ring-bg-inner {
  fill: none;
  stroke: rgba(255, 255, 255, 0.04);
  stroke-width: 1.5;
  stroke-dasharray: 4 6;
}

.ring-outer {
  fill: none;
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-dasharray: 140 40 70 30;
  transform-origin: 100px 100px;
  animation: spinClockwise 4s linear infinite;
  filter: drop-shadow(0 0 8px rgba(141, 198, 63, 0.5));
}

.ring-inner {
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 60 30 40 40;
  transform-origin: 100px 100px;
  animation: spinCounter 2.8s linear infinite;
  filter: drop-shadow(0 0 6px rgba(0, 229, 255, 0.6));
}

@keyframes spinClockwise {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes spinCounter {
  0% { transform: rotate(360deg); }
  100% { transform: rotate(0deg); }
}

/* Yörünge Parçacığı (Orbital Sparks) */
.orbit-spark-wrapper {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  animation: spinClockwise 3.2s linear infinite;
}

.orbit-spark {
  position: absolute;
  top: 13px;
  left: 50%;
  width: 8px;
  height: 8px;
  margin-left: -4px;
  background: #00E5FF;
  border-radius: 50%;
  box-shadow: 0 0 12px #00E5FF, 0 0 20px #8DC63F;
}

.orbit-spark-inner-wrap {
  position: absolute;
  inset: 22px;
  border-radius: 50%;
  animation: spinCounter 2.2s linear infinite;
}

.orbit-spark-inner {
  position: absolute;
  bottom: 0px;
  left: 50%;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  background: #8DC63F;
  border-radius: 50%;
  box-shadow: 0 0 10px #8DC63F, 0 0 16px rgba(141, 198, 63, 0.8);
}

/* Merkez Logo Kapsülü */
.core-logo-capsule {
  position: relative;
  z-index: 3;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(1, 58, 113, 0.85) 0%, rgba(0, 26, 54, 0.96) 100%);
  border: 1px solid rgba(141, 198, 63, 0.4);
  box-shadow: 
    0 0 35px rgba(141, 198, 63, 0.25),
    inset 0 0 25px rgba(0, 229, 255, 0.15),
    0 15px 30px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  animation: coreGlowPulse 2.5s ease-in-out infinite alternate;
}

@keyframes coreGlowPulse {
  0% {
    border-color: rgba(141, 198, 63, 0.35);
    box-shadow: 
      0 0 30px rgba(141, 198, 63, 0.2),
      inset 0 0 20px rgba(0, 229, 255, 0.12),
      0 12px 25px rgba(0, 0, 0, 0.5);
  }
  100% {
    border-color: rgba(0, 229, 255, 0.6);
    box-shadow: 
      0 0 45px rgba(0, 229, 255, 0.35),
      inset 0 0 30px rgba(141, 198, 63, 0.25),
      0 16px 35px rgba(0, 0, 0, 0.6);
  }
}

.core-logo {
  width: 80px;
  height: auto;
  max-height: 48px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  transition: transform 0.3s ease;
}

/* Loader Alt Bilgi / Metrikler */
.loader-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.loader-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(141, 198, 63, 0.08);
  border: 1px solid rgba(141, 198, 63, 0.25);
  border-radius: 999px;
  padding: 4px 14px;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8DC63F;
  box-shadow: 0 0 8px #8DC63F;
  animation: dotBlink 1.4s ease-in-out infinite;
}

@keyframes dotBlink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}

.badge-text {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: #8DC63F;
  text-transform: uppercase;
}

.loader-status {
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: #CBD5E1;
  letter-spacing: 0.2px;
  min-height: 22px;
  transition: opacity 0.3s ease;
}

/* İlerleme Çubuğu & Yüzde */
.loader-progress-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 4px;
}

.loader-progress-track {
  width: 190px;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
}

.loader-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #013A71 0%, #8DC63F 60%, #00E5FF 100%);
  border-radius: 999px;
  position: relative;
  box-shadow: 0 0 10px rgba(141, 198, 63, 0.8);
  transition: width 0.12s ease-out;
}

.loader-progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
  animation: shimmerProgress 1.5s infinite;
}

@keyframes shimmerProgress {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.loader-percent {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  color: #8DC63F;
  width: 40px;
  text-align: left;
  font-variant-numeric: tabular-nums;
}

/* Erişilebilirlik: prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .page-loader {
    transition: opacity 0.2s ease, visibility 0.2s ease;
  }
  .ring-outer, .ring-inner, .orbit-spark-wrapper, .orbit-spark-inner-wrap, .wave-1, .wave-2, .core-logo-capsule, .badge-dot, .loader-progress-bar::after {
    animation: none !important;
  }
}


/* Decorative overlay never blocks links, keyboard access or a failed script. */
.page-loader{pointer-events:none;animation:pay-loader-failsafe .4s ease 1.8s forwards}
@keyframes pay-loader-failsafe{to{opacity:0;visibility:hidden;transform:scale(1.04)}}
@media(prefers-reduced-motion:reduce){.page-loader{display:none!important}}
