/* ==========================================================================
   CoreV2 — On Yukleyici (harici dosya)
   Renkler PHP (core/loader/cv2-preloader-critical.php) tarafindan basilir:
   --pl-bg / --pl-bg-dark : sitenin kendi gunduz / gece zemini (tema motoru)
   --pl-ring, --pl-ring-rgb, --pl-grad : vurgu rengi ve ikinci tonu
   Her stil anahtari panelde secilen etiketle ayni gorunur
   (admin/theme-settings/supplied/mapping.json "xy:1").
   ========================================================================== */

html.cv2-preloader-active,
body.cv2-preloader-active { overflow: hidden}
html.cv2-preloader-active { background: var(--pl-bg, #fbfcfc)}
html.cv2-preloader-active.dark-mode,
html.cv2-preloader-active[data-theme="dark"] { background: var(--pl-bg-dark, #17181b)}
body.cv2-preloader-active { visibility: visible; background: inherit}
html.cv2-preloader-active #corev2-preloader,
body.cv2-preloader-active #corev2-preloader {
  visibility: visible; display: flex; opacity: 1; pointer-events: auto;
  animation: cv2-preloader-failsafe 1ms linear var(--cv2-preloader-failsafe-delay, 16400ms) 1 both}

#corev2-preloader {
  --pl-soft: rgba(var(--pl-ring-rgb, 59, 130, 246), .16);
  position: fixed; inset: 0; z-index: 2147482000;
  display: flex; align-items: center; justify-content: center;
  background: var(--pl-bg, #fbfcfc);
  opacity: 1; pointer-events: auto;
  transition: opacity .3s ease, visibility .3s ease}
html.dark-mode #corev2-preloader,
html[data-theme="dark"] #corev2-preloader {
  --pl-soft: rgba(var(--pl-ring-rgb, 59, 130, 246), .24);
  background: var(--pl-bg-dark, #17181b)}
#corev2-preloader.preloader-closing,
#corev2-preloader[data-closed] { opacity: 0; visibility: hidden; pointer-events: none}

@keyframes cv2-preloader-failsafe { to { opacity: 0; visibility: hidden; pointer-events: none} }

/* Sahne: golgesiz, duz; zemin sitenin kendi zemini */
#corev2-preloader .preloader-inner {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 180px; height: 180px;
  transition: transform .3s ease}
#corev2-preloader.preloader-closing .preloader-inner { transform: scale(.94)}
#corev2-preloader .pl-gif { position: relative; max-width: 96px; max-height: 96px; width: auto; height: auto; border-radius: 14px}

.pl-x { position: relative; display: flex; align-items: center; justify-content: center}

/* Logo Nabzi / Logo Yorunge: oval (yuvarlak) karo */
.pl-x--logo { width: 104px; height: 104px}
.pl-x__tile {
  position: relative; z-index: 1; display: grid; place-items: center;
  width: 64px; height: 64px; border-radius: 50%; color: #fff;
  background: linear-gradient(145deg, var(--pl-ring), var(--pl-grad));
  animation: plx-glow 1.6s ease-in-out infinite}
/* Sitenin favicon'u beyaz olarak, site renginde zeminin ustunde */
.pl-x__tile img,
.pl-x__hex img { width: 32px; height: 32px; object-fit: contain; filter: brightness(0) invert(1)}
.pl-x__tile svg,
.pl-x__hex svg { width: 26px; height: 26px}
.pl-x__halo {
  position: absolute; inset: 20px; border-radius: 50%;
  border: 2px solid rgba(var(--pl-ring-rgb, 59, 130, 246), .45);
  animation: plx-halo 1.6s ease-out infinite}
.pl-x__orbit {
  position: absolute; inset: 4px; border-radius: 50%;
  border: 2px solid var(--pl-soft); border-top-color: var(--pl-ring);
  animation: plx-spin 1.1s linear infinite}

/* Yorunge: halka uzerinde kuyruklu uc nokta */
.pl-x--orbit {
  width: 68px; height: 68px; border-radius: 50%;
  border: 1.5px solid var(--pl-soft);
  animation: plx-spin 1.8s linear infinite}
.pl-x--orbit span { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--pl-ring)}
.pl-x--orbit span:nth-child(1) { top: -5px; left: 29px}
.pl-x--orbit span:nth-child(2) { top: 0; left: 12px; opacity: .6; transform: scale(.8)}
.pl-x--orbit span:nth-child(3) { top: 12px; left: 0; opacity: .3; transform: scale(.62)}

/* Cift Halka */
.pl-x--dual { width: 64px; height: 64px}
.pl-x--dual span { position: absolute; border-radius: 50%; border: 3px solid var(--pl-soft)}
.pl-x--dual span:first-child { inset: 0; border-top-color: var(--pl-ring); border-bottom-color: var(--pl-ring); animation: plx-spin 1.1s linear infinite}
.pl-x--dual span:last-child { inset: 14px; border-left-color: var(--pl-grad); border-right-color: var(--pl-grad); animation: plx-spin 1.6s linear infinite reverse}

/* Nokta Akisi / Dalga Noktalari */
.pl-x--dots { gap: 10px; height: 44px}
.pl-x--dots span { width: 13px; height: 13px; border-radius: 50%; background: var(--pl-ring); animation: plx-pop 1.1s ease-in-out infinite}
.pl-x--dots span:nth-child(2) { animation-delay: .12s}
.pl-x--dots span:nth-child(3) { animation-delay: .24s}
.pl-x--dots span:nth-child(4) { animation-delay: .36s}
.pl-x--dots span:nth-child(5) { animation-delay: .48s}
.pl-x--hop span { width: 11px; height: 11px; animation-name: plx-hop; animation-duration: 1s}

/* Spektrum */
.pl-x--spectrum { gap: 6px; height: 52px}
.pl-x--spectrum span {
  width: 5px; height: 100%; border-radius: 99px;
  background: linear-gradient(var(--pl-ring), var(--pl-grad));
  transform: scaleY(.3); animation: plx-bars 1s ease-in-out infinite}
.pl-x--spectrum span:nth-child(2) { animation-delay: .1s}
.pl-x--spectrum span:nth-child(3) { animation-delay: .2s}
.pl-x--spectrum span:nth-child(4) { animation-delay: .3s}
.pl-x--spectrum span:nth-child(5) { animation-delay: .4s}
.pl-x--spectrum span:nth-child(6) { animation-delay: .5s}

/* Tarama */
.pl-x--scan {
  width: 112px; height: 72px; overflow: hidden; border-radius: 14px;
  border: 1px solid rgba(var(--pl-ring-rgb, 59, 130, 246), .32);
  background:
    repeating-linear-gradient(0deg, transparent 0 9px, rgba(var(--pl-ring-rgb, 59, 130, 246), .09) 9px 10px),
    linear-gradient(rgba(var(--pl-ring-rgb, 59, 130, 246), .04), rgba(var(--pl-ring-rgb, 59, 130, 246), .1))}
.pl-x--scan span {
  position: absolute; left: 10px; right: 10px; top: 7px; height: 2px; border-radius: 2px;
  background: var(--pl-ring);
  animation: plx-scan 1.6s ease-in-out infinite alternate}

/* Kup Izgara */
.pl-x--cubes { display: grid; grid-template-columns: repeat(3, 14px); gap: 6px}
.pl-x--cubes span { width: 14px; height: 14px; border-radius: 4px; background: var(--pl-ring); animation: plx-pop 1.1s ease-in-out infinite}
.pl-x--cubes span:nth-child(2) { animation-delay: .07s}
.pl-x--cubes span:nth-child(3) { animation-delay: .14s}
.pl-x--cubes span:nth-child(4) { animation-delay: .21s}
.pl-x--cubes span:nth-child(5) { animation-delay: .28s}
.pl-x--cubes span:nth-child(6) { animation-delay: .35s}
.pl-x--cubes span:nth-child(7) { animation-delay: .42s}
.pl-x--cubes span:nth-child(8) { animation-delay: .49s}
.pl-x--cubes span:nth-child(9) { animation-delay: .56s}

/* Dairesel Iz: ince halka, parlak nokta ve arkasinda solan iz */
.pl-x--trail { width: 64px; height: 64px; border-radius: 50%; animation: plx-spin 1.25s cubic-bezier(.4, 0, .2, 1) infinite}
.pl-x--trail::before,
.pl-x--trail::after { content: ""; position: absolute; inset: 0; border-radius: 50%}
.pl-x--trail::before { border: 1.5px solid var(--pl-soft)}
.pl-x--trail::after {
  background: conic-gradient(from 0deg, transparent 0 45%, var(--pl-ring) 100%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px))}
.pl-x--trail span {
  position: absolute; z-index: 1; top: -4px; left: 27px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--pl-ring)}

/* Veri Cubugu */
.pl-x--data { width: 156px; height: 6px; overflow: hidden; border-radius: 99px; background: var(--pl-soft)}
.pl-x--data span {
  position: absolute; top: 0; bottom: 0; left: 0; width: 34%; border-radius: inherit;
  background: linear-gradient(90deg, var(--pl-grad), var(--pl-ring));
  animation: plx-slide 1.5s ease-in-out infinite}

/* Dalga */
.pl-x--wave { align-items: flex-end; gap: 6px; height: 44px}
.pl-x--wave span {
  width: 8px; height: 100%; border-radius: 99px;
  background: linear-gradient(var(--pl-ring), var(--pl-grad));
  transform-origin: bottom; transform: scaleY(.35);
  animation: plx-wave 1s ease-in-out infinite}
.pl-x--wave span:nth-child(2) { animation-delay: .08s}
.pl-x--wave span:nth-child(3) { animation-delay: .16s}
.pl-x--wave span:nth-child(4) { animation-delay: .24s}
.pl-x--wave span:nth-child(5) { animation-delay: .32s}

/* Altigen */
.pl-x--hex { width: 104px; height: 104px}
.pl-x--hex::before {
  content: ""; position: absolute; inset: 14px;
  background: rgba(var(--pl-ring-rgb, 59, 130, 246), .22);
  clip-path: polygon(25% 6%, 75% 6%, 100% 50%, 75% 94%, 25% 94%, 0 50%);
  animation: plx-halo 1.5s ease-out infinite}
.pl-x__hex {
  position: relative; display: grid; place-items: center; width: 68px; height: 68px; color: #fff;
  background: linear-gradient(145deg, var(--pl-ring), var(--pl-grad));
  clip-path: polygon(25% 6%, 75% 6%, 100% 50%, 75% 94%, 25% 94%, 0 50%);
  animation: plx-glow 1.5s ease-in-out infinite}

/* Minimal Cizgi */
.pl-x--line { width: 156px; height: 2px; overflow: hidden; border-radius: 99px; background: var(--pl-soft)}
.pl-x--line span {
  position: absolute; top: 0; bottom: 0; left: 0; width: 34%; border-radius: inherit;
  background: var(--pl-ring); animation: plx-slide 1.5s ease-in-out infinite}

@keyframes plx-spin { to { transform: rotate(360deg)} }
@keyframes plx-pop { 0%, 100% { transform: scale(.45); opacity: .35} 50% { transform: scale(1); opacity: 1} }
@keyframes plx-hop { 0%, 100% { transform: translateY(0); opacity: .5} 50% { transform: translateY(-14px); opacity: 1} }
@keyframes plx-bars { 0%, 100% { transform: scaleY(.3); opacity: .45} 50% { transform: scaleY(1); opacity: 1} }
@keyframes plx-wave { 0%, 100% { transform: scaleY(.35)} 50% { transform: scaleY(1)} }
@keyframes plx-scan { from { transform: translateY(0); opacity: .35} 50% { opacity: 1} to { transform: translateY(56px); opacity: .35} }
@keyframes plx-slide { from { transform: translateX(-110%)} to { transform: translateX(300%)} }
/* Yalniz transform: ekran kartinda calisir, sayfa yuklenirken ana is parcacigi mesgulken bile takilmaz */
@keyframes plx-glow { 0%, 100% { transform: scale(.92)} 50% { transform: scale(1.04)} }
@keyframes plx-halo { from { transform: scale(.9); opacity: .75} to { transform: scale(1.45); opacity: 0} }

@media (max-width: 480px) {
  #corev2-preloader .preloader-inner { width: 150px; height: 150px}
}

@media (prefers-reduced-motion: reduce) {
  #corev2-preloader *, #corev2-preloader *::before, #corev2-preloader *::after { animation: none}
}

/* ==== Yeni ön yükleyiciler: Neon Halkalar, Cam Kart, Sonsuz Dalga, Nabız Yörünge ==== */
.pl-x--neon, .pl-x--glass, .pl-x--inf, .pl-x--porbit { --c1: var(--pl-ring, var(--cv2p-accent, #3b82f6)); --c2: #a855f7; --c3: #22d3ee; position: relative; display: grid; place-items: center; }
.pl-x--neon { width: 96px; height: 96px; }
.pl-x--neon span { position: absolute; border-radius: 50%; border: 3px solid transparent; animation: plx-spin 1.4s cubic-bezier(.6,.2,.4,.8) infinite; }
.pl-x--neon span:nth-child(1) { inset: 0; border-top-color: var(--c1); border-right-color: var(--c1); filter: drop-shadow(0 0 6px var(--c1)); }
.pl-x--neon span:nth-child(2) { inset: 14px; border-bottom-color: var(--c2); border-left-color: var(--c2); filter: drop-shadow(0 0 6px var(--c2)); animation-direction: reverse; animation-duration: 1.1s; }
.pl-x--neon span:nth-child(3) { inset: 28px; border-top-color: var(--c3); filter: drop-shadow(0 0 6px var(--c3)); animation-duration: .8s; }
.pl-x--glass .pl-x__glass { position: relative; display: grid; justify-items: center; gap: 14px; padding: 22px 26px 18px; border-radius: 24px; background: linear-gradient(145deg, rgba(255,255,255,.22), rgba(255,255,255,.06)); border: 1px solid rgba(255,255,255,.28);  backdrop-filter: blur(14px); overflow: hidden; }
.pl-x--glass .pl-x__glass::before { content: ''; position: absolute; inset: -40%; background: conic-gradient(from 0deg, transparent, rgba(var(--pl-ring-rgb,59,130,246),.35), transparent 40%); animation: plx-spin 3s linear infinite; z-index: -1; }
.pl-x--glass .pl-x__tile { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: linear-gradient(135deg, var(--c1), var(--c2)); color: #fff; font-weight: 700; animation: plx-float 1.6s ease-in-out infinite; }
.pl-x--glass .pl-x__tile img, .pl-x--glass .pl-x__tile svg { width: 24px; height: 24px; object-fit: contain; }
.pl-x--glass i { display: block; width: 72px; height: 4px; border-radius: 99px; background: rgba(127,127,127,.25); overflow: hidden; position: relative; }
.pl-x--glass i::after { content: ''; position: absolute; inset: 0; width: 40%; border-radius: inherit; background: linear-gradient(90deg, var(--c1), var(--c2)); animation: plx-slide 1.2s ease-in-out infinite; }
.pl-x--inf svg { width: 120px; height: 60px; overflow: visible; }
.pl-x--inf path { fill: none; stroke-width: 6; stroke-linecap: round; }
.pl-x--inf .pl-x__inf-bg { stroke: rgba(var(--pl-ring-rgb,59,130,246), .15); }
.pl-x--inf .pl-x__inf { stroke: var(--c1); stroke-dasharray: 60 200; animation: plx-dash 1.6s linear infinite; filter: drop-shadow(0 0 5px var(--c1)); }
.pl-x--porbit { width: 100px; height: 100px; }
.pl-x--porbit b { position: absolute; inset: 22px; border-radius: 50%; border: 2px solid var(--c1); opacity: 0; animation: plx-pulse 1.8s ease-out infinite; }
.pl-x--porbit b + b { animation-delay: .9s; }
.pl-x--porbit > span:not(.pl-x__tile) { position: absolute; inset: 0; animation: plx-spin 2.2s linear infinite; }
.pl-x--porbit > span:not(.pl-x__tile)::before { content: ''; position: absolute; top: 0; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--c1);  }
.pl-x--porbit > span:nth-of-type(2) { animation-duration: 3s; animation-direction: reverse; }
.pl-x--porbit > span:nth-of-type(2)::before { background: var(--c2);  width: 8px; height: 8px; }
.pl-x--porbit > span:nth-of-type(3) { inset: 12px; animation-duration: 1.6s; }
.pl-x--porbit > span:nth-of-type(3)::before { background: var(--c3);  width: 7px; height: 7px; }
.pl-x--porbit .pl-x__tile { position: relative; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(135deg, var(--c1), var(--c2)); color: #fff; font-weight: 700; z-index: 1; }
.pl-x--porbit .pl-x__tile img, .pl-x--porbit .pl-x__tile svg { width: 22px; height: 22px; object-fit: contain; }
.pl-x--mini { transform: scale(.62); }
@keyframes plx-spin { to { transform: rotate(360deg); } }
@keyframes plx-float { 50% { transform: translateY(-4px); } }
@keyframes plx-slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
@keyframes plx-dash { to { stroke-dashoffset: -260; } }
@keyframes plx-pulse { 0% { transform: scale(.8); opacity: .8; } 100% { transform: scale(2.1); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .pl-x--neon span, .pl-x--glass *, .pl-x--inf path, .pl-x--porbit * { animation-duration: 3s !important; } }
