/* =============================================================================
   MarsGames · Yükleme ekranı (preloader.css)
   -----------------------------------------------------------------------------
   Tasarım kararı: dağınık öğeler yerine TEK BİR AMBLEM.
   Ortada dairesel madalyon (içindeki görsel yüklenirken değişir), çevresinde
   ilerleme halkası, altında marka ve tek satır durum. Ayrı ilerleme çubuğu YOK:
   ilerleme amblemin kendisinde okunur.
   Tokens.css olmayan sayfalarda da (admin) doğru görünmesi için her değişkenin
   yedek değeri vardır.
   ============================================================================= */

/* Yükleme sürerken içerik gizlenir: yarım çizilmiş, zıplayan bir ekran yerine
   kullanıcı hazır sayfayı görür. */
html.hy-loading { overflow: hidden; }
html.hy-loading body > *:not(.hy-pl) { visibility: hidden; }
html.hy-loading body { overflow: hidden; }

.hy-pl {
  --pl-ink: #0D1117;
  --pl-ink-2: #111827;
  --pl-accent: var(--hy-color-primary, #E8001A);
  --pl-gold: #FFC93D;
  --pl-text: #EEF0F4;
  --pl-muted: #7D8AA0;
  --pl-ring-track: rgba(255, 255, 255, .07);
  --pl-wordmark: #FFFFFF;          /* kelime işaretinde MARS */
  --pl-wordmark-accent: #F01A2E;   /* kelime işaretinde GAMES */

  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--pl-text);
  font-family: var(--hy-font-body, "Segoe UI", system-ui, -apple-system, sans-serif);
  background:
    radial-gradient(58% 44% at 50% 42%, rgba(232, 0, 26, .10), transparent 70%),
    radial-gradient(90% 70% at 50% 108%, rgba(255, 201, 61, .07), transparent 68%),
    linear-gradient(178deg, var(--pl-ink) 0%, var(--pl-ink-2) 62%, #070C1A 100%);
  opacity: 1;
  transition: opacity .5s cubic-bezier(.4, 0, .2, 1), visibility .5s;
}

.hy-pl.is-out { opacity: 0; visibility: hidden; pointer-events: none; }

/* Vinyet: kenarları içeri doğru koyultur, gözü merkeze toplar */
.hy-pl::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(72% 62% at 50% 46%, transparent 42%, rgba(2, 5, 12, .62) 100%);
}

/* İnce doku: düz gradyanın "dijital" hissini kırar */
.hy-pl::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .45;
  background-image: radial-gradient(rgba(255, 255, 255, .028) 1px, transparent 1px);
  background-size: 3px 3px;
}

.hy-pl__inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  /* Optik merkez gerçek merkezin biraz üstündedir */
  transform: translateY(-3%);
  animation: hy-pl-in .62s cubic-bezier(.22, .9, .3, 1) both;
}

@keyframes hy-pl-in {
  from { opacity: 0; transform: translateY(calc(-3% + 14px)); }
  to   { opacity: 1; transform: translateY(-3%); }
}

/* ============================== AMBLEM ============================== */

.hy-pl__emblem {
  position: relative;
  width: 184px;
  height: 184px;
  display: grid;
  place-items: center;
}

/* Arkadaki yumuşak ışık havuzu */
.hy-pl__aura {
  position: absolute;
  inset: -26%;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--pl-accent) 22%, transparent) 0%, transparent 66%);
  filter: blur(10px);
  animation: hy-pl-aura 4.2s ease-in-out infinite;
}

@keyframes hy-pl-aura {
  0%, 100% { opacity: .5; transform: scale(.95); }
  50%      { opacity: .9; transform: scale(1.05); }
}

/* İlerleme halkası: SVG, taşıyıcı + dolan yay */
.hy-pl__ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);   /* 12 yönünden başlasın */
  overflow: visible;
}

.hy-pl__ring-track { fill: none; stroke: var(--pl-ring-track); stroke-width: 2.5; }

.hy-pl__ring-fill {
  fill: none;
  stroke: url(#hy-pl-grad);
  stroke-width: 2.5;
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--pl-accent) 70%, transparent));
  transition: stroke-dashoffset .24s cubic-bezier(.4, 0, .2, 1);
}

/* Madalyon: dairesel görsel + ince metalik kenar */
.hy-pl__disc {
  position: relative;
  width: 146px;
  height: 146px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(165deg, #0E1729, #070C18);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .08),
    0 0 0 4px rgba(6, 10, 22, .9),
    0 14px 40px rgba(0, 0, 0, .55),
    inset 0 1px 0 rgba(255, 255, 255, .1);
}

/* Kenardan içeri düşen ince ışık: madalyona hacim verir */
.hy-pl__disc::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  background:
    radial-gradient(78% 60% at 50% 8%, rgba(255, 255, 255, .12), transparent 60%),
    radial-gradient(90% 80% at 50% 108%, rgba(255, 201, 61, .16), transparent 62%);
}

.hy-pl__art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity .7s cubic-bezier(.4, 0, .2, 1), transform 4.5s linear;
}

/* Görseller sırayla geçer: görünen kavat yavaşça yakınlaşır (Ken Burns) */
.hy-pl__art.is-on { opacity: 1; transform: scale(1); }

/* Yüzde: halkanın alt yayına oturan küçük altın rozet */
.hy-pl__pct {
  position: absolute;
  bottom: -9px;
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 11px;
  border-radius: 999px;
  background: linear-gradient(180deg, #121A2C, #0A101E);
  border: 1px solid rgba(255, 201, 61, .3);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .5);
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
  color: var(--pl-gold);
}

/* ============================== METİN ============================== */

/* Kelime işareti (belirtecler.json logo.kelimeIsareti): MARS beyaz, GAMES #F01A2E,
   Inter 800, harf aralığı -0.025em, büyük harf. */
.hy-pl__brand {
  margin-top: 26px;
  font-family: var(--hy-font-display, Inter, "Segoe UI", system-ui, sans-serif);
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.025em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--pl-wordmark);
}
.hy-pl__brand b { color: var(--pl-wordmark-accent); font-weight: 800; }

.hy-pl__title {
  margin: 12px 0 0;
  font-family: var(--hy-font-display, inherit);
  font-size: clamp(1.0625rem, .95rem + .5vw, 1.3125rem);
  font-weight: 700;
  letter-spacing: -.006em;
  line-height: 1.3;
  color: var(--pl-text);
  text-wrap: balance;
}

.hy-pl__sub {
  margin: 7px 0 0;
  font-size: .78125rem;
  line-height: 1.5;
  color: var(--pl-muted);
  min-height: 1.2em;
  max-width: 30ch;
}

/* Uzun sürerse çıkan sessiz kaçış kapısı */
.hy-pl__skip {
  margin-top: 22px;
  padding: 7px 16px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 999px;
  background: transparent;
  color: var(--pl-muted);
  font: inherit;
  font-size: .71875rem;
  letter-spacing: .01em;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity .45s ease, color .2s ease, border-color .2s ease;
}
.hy-pl__skip.is-on { opacity: 1; pointer-events: auto; }
.hy-pl__skip:hover { color: var(--pl-text); border-color: rgba(255, 255, 255, .26); }
.hy-pl__skip:focus-visible { outline: 2px solid var(--pl-accent); outline-offset: 3px; }

/* Yavaşça yükselen altın zerreler: ekranı canlı tutan tek ambiyans katmanı */
.hy-pl__motes { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; }
.hy-pl__motes i {
  position: absolute;
  bottom: -10px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--pl-gold);
  opacity: 0;
  animation: hy-pl-mote linear infinite;
}
@keyframes hy-pl-mote {
  0%   { transform: translateY(0) scale(.6); opacity: 0; }
  12%  { opacity: .5; }
  80%  { opacity: .32; }
  100% { transform: translateY(-104vh) scale(1); opacity: 0; }
}

/* ====================== SAYFA TÜRÜNE GÖRE AKSAN ====================== */

.hy-pl[data-kind="oyun"]  { --pl-accent: #E8001A; }
.hy-pl[data-kind="masa"]  { --pl-accent: #4ADE80; }
.hy-pl[data-kind="hesap"] { --pl-accent: #FFC93D; --pl-gold: #FFE9A8; }
.hy-pl[data-kind="yasal"] { --pl-accent: #7D8AA0; --pl-gold: #D4DAE5; }

/* Yönetim paneli: sakin, süssüz, hızlı */
.hy-pl[data-kind="admin"] {
  --pl-accent: #FF2A3D;
  --pl-gold: #D4DAE5;
  background: linear-gradient(178deg, #0D1117 0%, #111827 100%);
}
.hy-pl[data-kind="admin"] .hy-pl__motes,
.hy-pl[data-kind="admin"]::after { display: none; }
.hy-pl[data-kind="admin"] .hy-pl__emblem { width: 138px; height: 138px; }
.hy-pl[data-kind="admin"] .hy-pl__disc { width: 108px; height: 108px; }
.hy-pl[data-kind="admin"] .hy-pl__aura { animation: none; opacity: .4; }

/* ============================== KÜÇÜK EKRAN ============================== */

@media (max-width: 480px) {
  .hy-pl__emblem { width: 150px; height: 150px; }
  .hy-pl__disc { width: 118px; height: 118px; }
  .hy-pl__brand { margin-top: 22px; font-size: 1.125rem; }
}

/* ============================== HAREKET AZALTMA ============================== */

@media (prefers-reduced-motion: reduce) {
  .hy-pl__inner { animation: none; }
  .hy-pl__aura { animation: none; opacity: .7; }
  .hy-pl__motes { display: none; }
  .hy-pl__art { transition: opacity .3s linear; transform: none; }
  .hy-pl__art.is-on { transform: none; }
}
