/* assets/kitap.css
 * Kitap okuyucu sayfası (kitap.php). Okuyucu kuralları İVİS app.css .gz-* kurallarından; renkler tema değişkenleriyle
 * (sahne koyu lacivert, etkin düğme altın). StPageFlip kendi <style>'ını ekleyemez (İVİS yaması) → .stf__* kuralları burada.
 */

.kitap-sayfa { padding-top: 20px; }
.kitap-bas { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px 20px; margin-bottom: 18px; }
.kitap-bas h1 { margin: 0; font-size: clamp(22px, 3.2vw, 32px); font-weight: 600; line-height: 1.25; letter-spacing: -.2px; }
.kitap-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; color: var(--metin-2); font-size: 14px; }
.kitap-meta b { font-weight: 600; color: var(--metin); font-variant-numeric: tabular-nums; }
.kitap-aciklama { max-width: 860px; margin: 22px 0 0; color: var(--metin-2); font-size: 15.5px; line-height: 1.7; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .kitap-sayfa { padding-top: 12px; }
  .kitap-bas { grid-template-columns: minmax(0, 1fr); }
  .kitap-bas .dugme { justify-self: start; }
}

.onizleme-bant { margin: 0 0 14px; padding: 10px 14px; border-radius: var(--kose); background: #fff4e5; color: #8a5300; font-size: 14px; }

/* ---------- Okuyucu ---------- */
.gz { --gz-zemin: var(--lacivert-koyu); --gz-cubuk: #0a1030; --gz-vurgu: var(--altin); border-radius: 14px; overflow: hidden; }
.gz-hazir { background: var(--gz-zemin); box-shadow: 0 6px 24px rgba(10, 20, 50, .25); }
.gz-sahne { position: relative; display: flex; align-items: center; justify-content: center; padding: 28px 8px; min-height: 300px; user-select: none;
  background-color: var(--gz-zemin);
  background-image: radial-gradient(ellipse at 50% 40%, rgba(255, 255, 255, .07), rgba(0, 0, 0, .22) 85%),
    radial-gradient(ellipse at 90% 0%, rgba(254, 173, 2, .08), transparent 50%); }
.gz-kitap { margin: 0 auto; transform-origin: center; }
.gz-pf-sayfa { background: #fff; overflow: hidden; }
.gz-pf-sayfa img { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; -webkit-user-drag: none; }
.gz-ok { position: absolute; top: 50%; z-index: 5; display: grid; place-items: center; width: 44px; height: 44px; margin-top: -22px; padding: 0; border: 0; border-radius: 50%;
  color: #fff; background: rgba(255, 255, 255, .12); cursor: pointer; transition: background .15s ease, opacity .15s ease; }
.gz-ok:hover { background: rgba(255, 255, 255, .26); }
.gz-ok:disabled { opacity: 0; pointer-events: none; }
.gz-ok-sol { left: 12px; } .gz-ok-sag { right: 12px; }
@media (max-width: 600px) { .gz-ok { width: 36px; height: 36px; margin-top: -18px; background: rgba(13, 26, 61, .45); } .gz-ok-sol { left: 4px; } .gz-ok-sag { right: 4px; } }

.gz-arac { display: flex; align-items: center; gap: 4px; padding: 8px 12px; background: var(--gz-cubuk); color: #e8edf8; }
.gz-arac button, .gz-arac a { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 8px; color: inherit; background: transparent; cursor: pointer; }
.gz-arac button:hover, .gz-arac a:hover { background: rgba(255, 255, 255, .1); }
.gz-arac [aria-pressed="true"][data-gz="serit"], .gz-arac [aria-pressed="true"][data-gz="oto"] { color: var(--gz-vurgu); }
.gz-arac :focus-visible { outline-color: var(--gz-vurgu); }
.gz-durdur, .gz.oynuyor .gz-oynat, .gz-ses-kapali, .gz.sessiz .gz-ses-acik { display: none; }
.gz.oynuyor .gz-durdur, .gz.sessiz .gz-ses-kapali { display: inline; }
.gz-no { min-width: 78px; padding: 0 8px; text-align: center; font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gz-kaydirac { flex: 1; min-width: 60px; accent-color: var(--gz-vurgu); }
@media (max-width: 600px) {
  .gz-arac { flex-wrap: wrap; justify-content: space-between; row-gap: 4px; gap: 0; padding: 6px; }
  .gz-arac button, .gz-arac a { width: 40px; }
  .gz-no { min-width: 60px; font-size: 14px; }
  .gz-arac .gz-kaydirac { order: 10; flex: 1 1 100%; min-width: 0; }
}

.gz-kucukler { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; list-style: none; margin: 12px 0 0; padding: 0; }
.gz-hazir .gz-kucukler { display: none; gap: 10px; margin: 0; overflow-x: auto; padding: 10px 12px; background: var(--gz-cubuk); border-bottom: 1px solid rgba(255, 255, 255, .08); scroll-snap-type: x proximity; }
.gz-hazir.serit .gz-kucukler { display: flex; }
.gz-hazir .gz-kucukler li { flex: none; width: 62px; scroll-snap-align: center; }
.gz-kucukler a { display: grid; gap: 2px; justify-items: center; text-decoration: none; color: var(--soluk); font-size: 12px; font-weight: 600; }
.gz-hazir .gz-kucukler a { color: #b8c3de; }
.gz-kucukler img { display: block; width: 100%; aspect-ratio: 1 / 1.414; object-fit: cover; object-position: top; background: #fff; border-radius: 3px;
  border: 2px solid transparent; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: border-color .15s ease, transform .15s ease; }
.gz-kucukler a:hover img { transform: translateY(-2px); }
.gz-kucukler a[aria-current] { color: var(--gz-vurgu); }
.gz-kucukler a[aria-current] img { border-color: var(--gz-vurgu); }
.gz-ipucu { margin: 0; padding: 6px 12px 8px; text-align: center; color: #9fb0d6; background: var(--gz-cubuk); font-size: 12.5px; }
@media (hover: none) { .gz-ipucu { display: none; } }

/* tam ekran: sahne ekranı doldurur, şerit ve araç çubuğu altta */
.gz.gz-tam { display: flex; flex-direction: column; border-radius: 0; background: var(--gz-zemin); }
.gz.gz-tam .gz-sahne { flex: 1; min-height: 0; }
.gz.gz-tam .gz-ipucu { display: none; }
.gz-kapat { display: none; position: absolute; top: 12px; right: 12px; z-index: 6; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
  color: #fff; background: rgba(0, 0, 0, .35); cursor: pointer; }
.gz-kapat:hover { background: rgba(0, 0, 0, .55); }
.gz.gz-tam .gz-kapat { display: grid; }
/* tek sayfada çevrilen yaprağın arkası: aynı sayfanın ayna görüntüsü, kâğıttan soluk görünür */
.gz-pf-sayfa.gz-kopya img { transform: scaleX(-1); }
.gz-pf-sayfa.gz-kopya::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, rgba(250, 250, 248, .74), rgba(255, 255, 255, .62) 55%, rgba(235, 235, 232, .7)); pointer-events: none; }

/* StPageFlip'in kendi CSS'i (kütüphane <style> ekleyemez: İVİS yaması) */
.stf__parent { position: relative; display: block; box-sizing: border-box; transform: translateZ(0); -ms-touch-action: pan-y; touch-action: pan-y; }
.sft__wrapper { position: relative; width: 100%; box-sizing: border-box; }
.stf__parent canvas { position: absolute; width: 100%; height: 100%; left: 0; top: 0; }
.stf__block { position: absolute; width: 100%; height: 100%; box-sizing: border-box; perspective: 2000px; }
.stf__item { display: none; position: absolute; transform-style: preserve-3d; }
.stf__outerShadow, .stf__innerShadow, .stf__hardShadow, .stf__hardInnerShadow { position: absolute; left: 0; top: 0; }

/* Sunum gösterimi: yatay sayfa ikiye bölünür (kitap_dizilim) — yarım sayfa aynı resmin sol / sağ yarısı; boş sayfa hizalama içindir */
.gz-pf-sayfa.gz-sol img, .gz-pf-sayfa.gz-sag img { object-fit: cover; }
.gz-pf-sayfa.gz-sol img { object-position: left center; }
.gz-pf-sayfa.gz-sag img { object-position: right center; }
.gz-kucukler .gz-sol img { object-position: left top; }
.gz-kucukler .gz-sag img { object-position: right top; }
.gz-bos-kucuk { display: block; width: 100%; aspect-ratio: 1 / 1.414; background: #fff; border-radius: 3px; opacity: .5; }

/* yakınlaştırma yerinde: kitap dönüşümle büyür, sahne taşanı keser; yakınken sürükleyerek gezilir */
.gz.gz-yakin .gz-sahne { overflow: hidden; touch-action: none; cursor: grab; }
.gz.gz-yakin.gz-suruk .gz-sahne { cursor: grabbing; }
.gz [data-gz="buyut"][aria-pressed="true"] { background: rgba(255, 255, 255, .22); }

/* telefonda açılış perdesi: tam ekran / sayfada oku */
.gz-baslat { position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: rgba(8, 14, 34, .55); }
.gz-baslat-tam { min-height: 52px; padding: 0 34px; border: 0; border-radius: 999px; background: var(--altin); color: var(--lacivert-koyu); font: 600 20px var(--yazi-tipi); cursor: pointer; box-shadow: 0 8px 30px rgba(0, 0, 0, .35); }
.gz-baslat-sayfa { min-height: 44px; padding: 0 20px; border: 1px solid rgba(255, 255, 255, .5); border-radius: 999px; background: transparent; color: #fff; font: 500 15px var(--yazi-tipi); cursor: pointer; }

@media (max-width: 640px) {
  .gz { border-radius: 10px; }
}

/* "Diğer yayınlar" katmanı: kitap bitince / araç çubuğu düğmesiyle; sahnenin üstünde, tam ekranda da görünür */
.gz-son { position: absolute; inset: 0; z-index: 15; display: flex; align-items: safe center; justify-content: center; overflow-y: auto; padding: 24px 16px;
  background: rgba(8, 14, 34, .9); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); animation: gz-son-gir .25s ease; }
.gz-son[hidden] { display: none; }
@keyframes gz-son-gir { from { opacity: 0; } to { opacity: 1; } }
.gz-son-ic { width: 100%; max-width: 820px; color: #fff; text-align: center; }
.gz-son h2 { margin: 0 0 18px; font-size: clamp(18px, 2.6vw, 24px); font-weight: 600; }
.gz-son-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 14px; align-items: start; margin: 0; padding: 0; list-style: none; }
.gz-son-kart { display: block; color: #e8edf8; text-decoration: none; text-align: left; border-radius: 8px; }
.gz-son-resim { position: relative; display: block; overflow: hidden; border-radius: 8px; background: #1b2550; box-shadow: 0 4px 14px rgba(0, 0, 0, .35); }
.gz-son-kitap .gz-son-resim { aspect-ratio: 3 / 4; }
.gz-son-yayin .gz-son-resim { aspect-ratio: 16 / 9; }
.gz-son-resim img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .2s ease; }
.gz-son-kart:hover img, .gz-son-kart:focus-visible img { transform: scale(1.04); }
.gz-son-tur { position: absolute; left: 6px; bottom: 6px; padding: 2px 7px; border-radius: 999px; background: rgba(8, 14, 34, .78); font-size: 11.5px; font-weight: 500; }
.gz-son-ad { display: -webkit-box; margin-top: 6px; overflow: hidden; font-size: 13.5px; line-height: 1.35; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.gz-son-dugmeler { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 22px; }
.gz-son-dugme { display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border: 1px solid rgba(255, 255, 255, .45); border-radius: 999px;
  background: transparent; color: #fff; font: 500 15px var(--yazi-tipi); text-decoration: none; cursor: pointer; }
.gz-son-dugme:hover { background: rgba(255, 255, 255, .1); }
.gz-son-dugme[hidden] { display: none; }
.gz-son-tumu { border-color: var(--altin); background: var(--altin); color: var(--lacivert-koyu); font-weight: 600; }
.gz-son-tumu:hover { background: var(--altin-acik); }
.gz-son-kart:focus-visible, .gz-son-dugme:focus-visible { outline: 3px solid var(--altin); outline-offset: 2px; }
.gz-arac [data-gz="diger"] { color: var(--gz-vurgu); }
.gz.gz-son-acik .gz-ok, .gz.gz-son-acik .gz-kapat { visibility: hidden; }
@media (max-width: 600px) {
  .gz-son-liste { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .gz-son-ad { font-size: 12.5px; }
}

/* sayfa altındaki raflar ve tam ekrandan çıkınca çıkan ipucu */
.diger-raflar { scroll-margin-top: 88px; }
.diger-ipucu { position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); z-index: 50; transform: translateX(-50%); padding: 12px 22px; border-radius: 999px;
  background: var(--lacivert); color: #fff; font-weight: 600; text-decoration: none; box-shadow: 0 8px 24px rgba(12, 15, 91, .35);
  animation: diger-ipucu-gir .3s ease; transition: opacity .3s ease; }
.diger-ipucu.gidiyor { opacity: 0; }
@keyframes diger-ipucu-gir { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .gz-son, .diger-ipucu { animation: none; } }

/* iPhone Safari: gerçek tam ekran yok → okuyucu sayfanın üstüne sabitlenir (kitap.js sahteTam); arkadaki sayfa kaymaz */
.gz.gz-sahte-tam { position: fixed; inset: 0; z-index: 1000; width: 100%; height: 100vh; height: 100dvh; margin: 0;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); background: var(--gz-cubuk); }
html.gz-kilit, html.gz-kilit body { overflow: hidden; }
