/* ============================================================================
   LLVIP UNIVERSAL ENGINE CSS - "TEK BEYIN"
   16.5.2026 v20260516FULLSCALE
   ----------------------------------------------------------------------------
   Bu dosya artik 2 eski CSS'in TUM kurallarini icerir:
     1) llvip-stage-base.css    (scaleRoot/scaleRoot 1920x1080 sahne, iOS
                                safe-area, html/body overflow:hidden,
                                img max-width, vipRemote hidden)
     2) llvip-shared-overlay.css (ARKA/HERO/TUNEK/TATOZEKA/TATOHUD class'lari,
                                CSS variables, transform/clamp formulleri,
                                marquee animation, iOS webm fix)
   Eski CSS'ler artik HTML'lere YUKLENMEZ.
   ----------------------------------------------------------------------------
   TEK PARCA OLCEKLEME SISTEMI:
   - Tasarim 1920x1080 sabit boyutta yapilir (sabit tuval)
   - JS Math.min(genislik/1920, yukseklik/1080) ile olcek hesaplar (CONTAIN)
   - Tum sahne transform: scale() ile tek parca olarak buyur/kuculur
   - Hicbir sey yer degistirmez, sadece orantili olceklenir
   - Arka plan COVER, icerik CONTAIN (tasmaz, kaybolmaz)
   ============================================================================ */

/* ============================================================================
   0) UNIVERSAL CSS RESET - tum cihazlarda tutarli davranis
   ----------------------------------------------------------------------------
   Varsayilan margin/padding tarayiciya gore degisir; bu reset tutarliligi saglar.
   ============================================================================ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ============================================================================
   1) BOOT GUARD - "refresh ile her sey dev oluyor" fix
   ============================================================================ */
html[data-llvip-boot="1"] body{
  opacity: 0 !important;
  transition: none !important;
}
html[data-llvip-boot="0"] body{
  opacity: 1;
  transition: opacity .18s ease;
}

/* 13.5.2026 v20260513AA TUNEK + TATOZEKA + TATOHUD TAMAMEN KALDIRILDI -
   kullanici talebi. CSS variable defaults silindi. */

/* ============================================================================
   3) HTML / BODY TEMEL  (eski stage-base.css + shared-overlay.css birlesim)
   ============================================================================ */
html{
  background-color: var(--LLVIP_FRAME_BG, var(--bg-deep, #0a1226)) !important;
  height: 100%;
  -webkit-text-size-adjust: 100%;
          text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
body{
  background-color: transparent !important;
  background-image: none !important;
  height: 100%;
  /* 16.5.2026: overflow:visible - kumandayla elementi hareket ettirince kesilmesin.
     Scroll engeli overscroll-behavior ile saglanir. */
  overflow: visible;
  /* notch / dynamic island guvenli alan padding (sahne 1920x1080 sabit
     oldugu icin sahneyi etkilemez; viewport-fixed HUD'larda etkili) */
  padding: env(safe-area-inset-top) env(safe-area-inset-right)
           env(safe-area-inset-bottom) env(safe-area-inset-left);
  overscroll-behavior: none;
  -webkit-overflow-scrolling: auto;
}
/* 16.5.2026: overflow:visible - kumandayla tasirken elementler kesilmesin */
html{ overflow: visible; }

/* TUM gorseller container'larini asmasin (iPhone dar ekran) */
img, video, picture, svg, canvas{
  max-width: 100%;
  height: auto;
}
/* Sahne icindeki gorseller absolute pixel-pozisyonu kullaniyor, max-width
   override gerek - aksi halde 1920x1080 sahnede gorseller kucur */
#scaleRoot img, #scaleRoot img,
#scaleRoot img, #vip-stage img,
#ykPageStage img,
.kaScene img, .holoClock img{
  max-width: none;
  height: auto;
}
video{
  height: auto;
  max-width: 100%;
}

/* ============================================================================
   4) STAGE - gereklı.docx tam uyum: iki katmanli sahne
   ----------------------------------------------------------------------------
   #vip-stage  = VIEWPORT-FIXED dis kutu. 100vw x 100dvh, overflow:hidden, scroll
                yasak. Gelecekte arka plan .layerBg buraya yerlesir (object-fit:
                cover ile ekrana yayilir).
   #scaleRoot  = 1920x1080 SABIT ic kutu. transform: scale(--ui-scale) ile tum
                cihazlarda orantili kuculur. Tum sahne ogeleri (sticky, topicGrid,
                contactBar, vb.) bu kutu icinde absolute konumlanir.
   ----------------------------------------------------------------------------
   13.5.2026 v20260513AC: eski tek-katman (#menuStage / #topicStage) yapisi
   rename ile #scaleRoot'a donustu, dis sarmal #vip-stage YENI eklendi.
   ============================================================================ */
#vip-stage{
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;       /* fallback */
  height: 100dvh;      /* iOS Safari + Android dinamik viewport */
  /* 16.5.2026 v20260516L: overflow visible yapildi - kumanda ile tasirken
     elementler viewport sinirina kadar gorunur, frame.png bitmeden kaybolmaz.
     html/body overflow:hidden zaten scroll'u engelliyor. */
  overflow: visible;
  background: #000;
  z-index: 0;
}
#scaleRoot{
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1920px;
  height: 1080px;
  /* 16.5.2026 v20260516FULLSCALE TEK PARCA OLCEKLEME:
     Tum sahne 1920x1080 sabit boyutta tasarlanir; JS hesapladigi
     --ui-scale-contain (Math.min) ile ekrana orantili sigar.
     Math.min = CONTAIN: icerik ekrana tam sigar, tasmaz.
     Math.max = COVER: ekrani doldurur ama kenarlar kirpilir.
     Biz CONTAIN kullaniyoruz; arka plan ayri viewport-fixed layer ile COVER. */
  -webkit-transform: translate(-50%, -50%) scale(var(--ui-scale-contain, var(--ui-scale, 1)));
          transform: translate(-50%, -50%) scale(var(--ui-scale-contain, var(--ui-scale, 1)));
  -webkit-transform-origin: center center;
          transform-origin: center center;
  /* scaleRoot 1920x1080 kutusunun disina cikan elementler artik kirpilmaz. */
  overflow: visible;
  z-index: 1;
  /* VIP/Smart TV + eski WebKit icin GPU hizlandirmasi */
  will-change: transform;
  -webkit-backface-visibility: hidden;
          backface-visibility: hidden;
  -webkit-perspective: 1000px;
          perspective: 1000px;
  /* 3D katman olustur - transform daha hizli render edilir */
  -webkit-transform-style: preserve-3d;
          transform-style: preserve-3d;
}




/* 13.5.2026 v20260513AA SHARED OVERLAY (TUNEK + TATOZEKA + TATOHUD) TAMAMEN
   KALDIRILDI - kullanici talebi. Eski .llvip-shared-tunek / .llvip-shared-zeka
   / .llvip-shared-tatohud kurallari + iOS webm saydamlik fix + outline kurallari
   ve @keyframes llvipSharedHudMarquee silindi. Geriye-uyumluluk icin
   llvip-shared-overlay.css'te display:none guvenligi var. */

/* ============================================================================
   13) VIP REMOTE GLOBAL HIDDEN STATE  (eski stage-base.css)
   Kumanda paneli data-hidden="1" iken her sayfada gizli.
   ============================================================================ */
#vipRemote[data-hidden="1"],
#vipRemote[hidden],
#vipRemote[aria-hidden="true"]{
  display: none !important;
}

/* ============================================================================
   14) CIHAZ DUYARLI KURALLAR  (yeni engine)
   ============================================================================ */
body[data-nav="keyboard"] *:focus-visible{
  outline: 2px solid #38bdf8 !important;
  outline-offset: 3px !important;
  border-radius: 4px;
}

/* ============================================================================
   15) PRINT - kumanda + HUD yazdirma
   ============================================================================ */
@media print{
  #vipRemote{
    display: none !important;
  }
}

/* ============================================================================
   16) REDUCED MOTION - kullanici "azalmis hareket" tercih etmis
   ============================================================================ */
@media (prefers-reduced-motion: reduce){
  html[data-llvip-boot="0"] body{ transition: none; }
}
