/* ==========================================================================
   Ahmet Ertas Zarif Insaat Proje Katalogu - 3D FlipBook
   - ACIK RENK UYUMLU LÜKS ARKA PLAN: Koyu renkli PDF ile tam kontrast sağlar, kitap belirginleşir
   - TAM EKRAN OLMADAN DA SEKMELERE KADAR EKRANI DOLDURAN BÜYÜK EBAT
   - Yön tuşları resim üzerine binmez (Sol kenar boşluğunda durur)
   - iPhone & Android %100 uyumlu tam ekran ve zoom
   ========================================================================== */

:root {
  --bg-primary: #eef1f5;
  --bg-secondary: #f8fafc;
  --bg-glass: rgba(255, 255, 255, 0.90);
  --bg-glass-hover: rgba(255, 255, 255, 0.98);
  --border-glass: rgba(15, 23, 42, 0.08);
  --border-glass-bright: rgba(15, 23, 42, 0.16);
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --accent-primary: #2563eb;
  --accent-glow: rgba(37, 99, 235, 0.28);
  --accent-gradient: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --header-height: 48px;
  --dock-height: 52px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

html, body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

/* App Viewport - Açık, Ferah ve Lüks Arka Plan */
.app-viewport {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: radial-gradient(circle at 50% 35%, #f8fafc 0%, #e2e8f0 70%, #cbd5e1 100%);
}

.ambient-light {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 800px;
  height: 450px;
  background: radial-gradient(ellipse, rgba(37, 99, 235, 0.06) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

/* ==========================================================================
   Header Navbar
   ========================================================================== */
.app-header {
  position: relative;
  z-index: 40;
  height: var(--header-height);
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-glass);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.book-title-tag {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  background: rgba(255, 255, 255, 0.85);
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid var(--border-glass);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 450px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-icon-only {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border-glass);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-icon-only:hover {
  background: #ffffff;
  color: var(--accent-primary);
  border-color: var(--border-glass-bright);
}

.btn-icon-only.active {
  color: #2563eb;
  background: rgba(37, 99, 235, 0.10);
  border-color: rgba(37, 99, 235, 0.30);
}

.btn-icon-only svg {
  width: 18px;
  height: 18px;
}

/* ==========================================================================
   Tam Ekrandan Çıkma Butonu (Floating X Button)
   ========================================================================== */
.fullscreen-exit-btn {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100000;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transition: all 0.2s ease;
}

.fullscreen-exit-btn:hover {
  background: rgba(239, 68, 68, 0.95);
  border-color: rgba(239, 68, 68, 0.5);
  transform: scale(1.08);
}

body:fullscreen .fullscreen-exit-btn,
body:-webkit-full-screen .fullscreen-exit-btn,
.is-fullscreen .fullscreen-exit-btn,
.app-viewport.is-fullscreen .fullscreen-exit-btn {
  display: flex !important;
}

/* ==========================================================================
   Tam Ekran Modunda Sayfa Görünümü (iPhone & Android Uyumlu)
   ========================================================================== */
.app-viewport.is-fullscreen {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  z-index: 99999 !important;
  background: var(--bg-primary) !important;
}

.app-viewport.is-fullscreen .app-header {
  display: none !important;
}

.app-viewport.is-fullscreen .main-stage {
  height: 100% !important;
  height: 100dvh !important;
  padding: 0 !important;
}

/* ==========================================================================
   Main Stage & Zoom/Pan Viewport
   ========================================================================== */
.main-stage {
  position: relative;
  flex: 1;
  width: 100%;
  height: calc(100vh - var(--header-height));
  height: calc(100dvh - var(--header-height));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  z-index: 10;
  padding: 4px;
}

.zoom-pan-viewport {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  touch-action: none;
}

/* Book Wrapper & Akıcı Kapak Ortalama */
.book-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-origin: center center;
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
  /* Koyu renkli PDF'in açık renkli zeminde parlaması için derin soft gölge */
  filter: drop-shadow(0 22px 40px rgba(15, 23, 42, 0.30)) drop-shadow(0 6px 12px rgba(15, 23, 42, 0.16));
}

.book-wrapper.is-panning {
  transition: none !important;
}

/* 1. Sayfa (Kapak): Ekranın tam ortasında */
.book-wrapper.cover-centered {
  transform: translate(var(--pan-x, 0px), var(--pan-y, 0px)) translateX(-25%) scale(var(--zoom-scale, 1));
}

/* Son Sayfa (Arka Kapak) */
.book-wrapper.back-cover-centered {
  transform: translate(var(--pan-x, 0px), var(--pan-y, 0px)) translateX(25%) scale(var(--zoom-scale, 1));
}

/* İki Sayfa Açıkken */
.book-wrapper.spread-view {
  transform: translate(var(--pan-x, 0px), var(--pan-y, 0px)) translateX(0) scale(var(--zoom-scale, 1));
}

/* Telefon Dikeyken 90 Derece Döndürülmüş Kapak ve Çift Sayfa Durumları (İncecik Çizgi Boşluklu Tam Oturan Ebat) */
.book-wrapper.rotated-landscape-view {
  transform: translate(var(--pan-x, 0px), var(--pan-y, 0px)) rotate(90deg) scale(calc(var(--zoom-scale, 1) * 1.135));
}

.book-wrapper.rotated-landscape-view.cover-centered {
  transform: translate(var(--pan-x, 0px), var(--pan-y, 0px)) rotate(90deg) translateX(-25%) scale(calc(var(--zoom-scale, 1) * 1.135));
}

.book-wrapper.rotated-landscape-view.back-cover-centered {
  transform: translate(var(--pan-x, 0px), var(--pan-y, 0px)) rotate(90deg) translateX(25%) scale(calc(var(--zoom-scale, 1) * 1.135));
}

/* Tam Ekranda İyice Büyütülmüş Durum */
.app-viewport.is-fullscreen .book-wrapper.rotated-landscape-view {
  transform: rotate(90deg) scale(calc(var(--zoom-scale, 1) * 1.28));
}

.app-viewport.is-fullscreen .book-wrapper.rotated-landscape-view.cover-centered {
  transform: rotate(90deg) translateX(-25%) scale(calc(var(--zoom-scale, 1) * 1.28));
}

.app-viewport.is-fullscreen .book-wrapper.rotated-landscape-view.back-cover-centered {
  transform: rotate(90deg) translateX(25%) scale(calc(var(--zoom-scale, 1) * 1.28));
}

/* Yatay Tam Ekranda (Landscape) */
.app-viewport.is-fullscreen .book-wrapper:not(.rotated-landscape-view) {
  transform: scale(calc(var(--zoom-scale, 1) * 1.15));
}

.app-viewport.is-fullscreen .book-wrapper:not(.rotated-landscape-view).cover-centered {
  transform: translateX(-25%) scale(calc(var(--zoom-scale, 1) * 1.15));
}

.app-viewport.is-fullscreen .book-wrapper:not(.rotated-landscape-view).back-cover-centered {
  transform: translateX(25%) scale(calc(var(--zoom-scale, 1) * 1.15));
}

#flipbook {
  position: relative;
  margin: 0 auto;
}

/* Pages Styling inside StPageFlip */
.st-page {
  background-color: #ffffff;
  overflow: hidden;
}

.page-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #ffffff;
}

.page-canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.page-loader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  color: #64748b;
  font-size: 0.85rem;
  gap: 12px;
  z-index: 5;
  transition: opacity 0.3s;
}

.page-loader.loaded {
  opacity: 0;
  pointer-events: none;
}

.spinner {
  width: 26px;
  height: 26px;
  border: 3px solid #e2e8f0;
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   Stage Navigation Arrows
   ========================================================================== */
.stage-arrow {
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass-bright);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 30;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.15);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.stage-arrow:hover:not(:disabled) {
  background: #ffffff;
  border-color: rgba(37, 99, 235, 0.4);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.25);
  color: #2563eb;
}

.stage-arrow:active:not(:disabled) {
  opacity: 0.82;
}

.stage-arrow:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

.stage-arrow svg {
  width: 22px;
  height: 22px;
}

/* Masaüstü ve Normal Konumlandırma */
.stage-arrow.nav-arrow-prev {
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.stage-arrow.nav-arrow-next {
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}

/* ==========================================================================
   Bottom Floating Dock (Controls)
   ========================================================================== */
.floating-dock-container {
  position: absolute;
  bottom: max(14px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Tam ekranda Android toast bildiriminin butonları kapatmaması için konum */
.app-viewport.is-fullscreen .floating-dock-container {
  bottom: max(45px, calc(env(safe-area-inset-bottom) + 32px)) !important;
  z-index: 100001;
}

.floating-dock {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 14px;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass-bright);
  border-radius: 36px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
}

.dock-separator {
  width: 1px;
  height: 20px;
  background: var(--border-glass-bright);
  margin: 0 3px;
}

.page-nav-wrapper {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
}

.page-num-input {
  width: 42px;
  height: 28px;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid var(--border-glass-bright);
  border-radius: 6px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  outline: none;
}

.page-range-slider {
  width: 80px;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(0, 0, 0, 0.12);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.page-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-primary);
  cursor: pointer;
}

.zoom-level-badge {
  font-size: 0.78rem;
  font-weight: 600;
  color: #2563eb;
  min-width: 38px;
  text-align: center;
}

.mobile-fullscreen-btn {
  color: #2563eb;
  background: rgba(37, 99, 235, 0.10);
  border-color: rgba(37, 99, 235, 0.30);
}

/* ==========================================================================
   Thumbnails Drawer
   ========================================================================== */
.thumbnails-drawer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 165px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-glass-bright);
  z-index: 50;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.10);
}

.thumbnails-drawer.open {
  transform: translateY(0);
}

.thumb-header {
  height: 36px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-glass);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.thumb-header-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
}

.thumb-header-close:hover {
  color: var(--text-primary);
}

.thumb-scroll-track {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 20px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
}

.thumb-scroll-track::-webkit-scrollbar {
  height: 6px;
}

.thumb-scroll-track::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 3px;
}

.thumb-item {
  flex-shrink: 0;
  height: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.thumb-item:hover {
  transform: translateY(-3px);
}

.thumb-canvas-box {
  height: 80px;
  aspect-ratio: 1 / 1.414;
  background: #f1f5f9;
  border-radius: 4px;
  border: 2px solid transparent;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.thumb-item.active .thumb-canvas-box {
  border-color: var(--accent-primary);
  box-shadow: 0 0 12px var(--accent-glow);
}

.thumb-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
}

.thumb-item.active .thumb-label {
  color: #2563eb;
  font-weight: 600;
}

/* ==========================================================================
   TELEFON MODU VE ERGONOMİK DÖNDÜRÜLMÜŞ YERLEŞİM (KULLANICI TALEBİNE GÖRE)
   - Üst Başlık (Proje İsmi, Ses, Tam Ekran): Sağ kenar boşluğunda 90° döndürülmüş
     Telefon sola çevrildiğinde tam paftanın ÜSTÜNDE yatay durur.
   - Kontrol Çubuğu (Sayfa Sayacı, Zoom, Küçük Resimler): Sol kenar boşluğunda 90° döndürülmüş
     İki beyaz yön okunun tam ortasında yer alır.
     Telefon sola çevrildiğinde [ < Ok ] --- [ Kontroller ] --- [ > Ok ] şeklinde tam paftanın ALTINDA yatay durur.
   - Her iki çubuk da yarı şeffaf (Glassmorphism), lüks ve paftayla tam uyumludur.
   ========================================================================== */

@media (orientation: portrait) and (max-width: 850px) {
  /* Kataloğun tam ekran dikey alana yerleşmesi */
  .main-stage {
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    padding: 0 !important;
  }

  .zoom-pan-viewport {
    transform: none !important;
  }

  /* -------------------------------------------------------------------------
     1. ÜST BAŞLIK & BUTONLAR (KULLANICININ YEŞİL ÇİZİMİ)
     - Ekranın sağ kenar boşluğunda dikey durur
     - 90 derece döndürülmüştür; telefon sola yatırılınca paftanın tam ÜSTÜNDE yatay görünür
     - Yarı şeffaf modern lüks cam efekti (Glassmorphism)
     ------------------------------------------------------------------------- */
  .app-header {
    position: fixed !important;
    top: 50% !important;
    left: calc(100vw - 26px) !important;
    right: auto !important;
    bottom: auto !important;
    width: min(84dvh, 520px) !important;
    height: 38px !important;
    transform: translate(-50%, -50%) rotate(90deg) !important;
    transform-origin: center center !important;
    z-index: 60 !important;
    background: rgba(255, 255, 255, 0.28) !important;
    backdrop-filter: blur(14px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(14px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.45) !important;
    border-radius: 22px !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08) !important;
    padding: 0 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
  }

  .app-viewport.is-fullscreen .app-header {
    display: flex !important;
    left: calc(100vw - 26px) !important;
    z-index: 100002 !important;
  }

  .book-title-tag {
    font-size: 0.76rem !important;
    padding: 3px 10px !important;
    max-width: 240px !important;
    background: rgba(255, 255, 255, 0.25) !important;
    border: 1px solid rgba(255, 255, 255, 0.40) !important;
    border-radius: 12px !important;
    color: #0f172a !important;
    font-weight: 700 !important;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .header-right {
    gap: 6px !important;
  }

  .header-right .btn-icon-only {
    width: 28px !important;
    height: 28px !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, 0.25) !important;
    border: 1px solid rgba(255, 255, 255, 0.40) !important;
    color: #0f172a !important;
  }

  .header-right .btn-icon-only svg {
    width: 15px !important;
    height: 15px !important;
  }

  /* -------------------------------------------------------------------------
     2. OKLAR (İKİ BEYAZ YÖN OKU - ŞEFFAF CAM EFEKTİ)
     - Ekranın sol kenar boşluğunda, biri üstte biri altta
     - Telefon sola çevrildiğinde okuyucunun tam SOLUNA (<) ve SAĞINA (>) bakar
     ------------------------------------------------------------------------- */
  .stage-arrow {
    position: fixed !important;
    left: 8px !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.35) !important;
    backdrop-filter: blur(14px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(14px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.50) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10) !important;
    color: #0f172a !important;
    z-index: 60 !important;
  }

  .stage-arrow.nav-arrow-prev {
    top: 14% !important;
    bottom: auto !important;
    right: auto !important;
    transform: none !important;
  }

  .stage-arrow.nav-arrow-next {
    top: auto !important;
    bottom: 14% !important;
    right: auto !important;
    transform: none !important;
  }

  .stage-arrow svg {
    transform: rotate(90deg) !important;
  }

  /* -------------------------------------------------------------------------
     3. ALT KONTROL ÇUBUĞU (KULLANICININ TURUNCU ÇİZİMİ - ŞEFFAF CAM EFEKTİ)
     - İki beyaz okun TAM ORTASINA yerleştirilir
     - Gerçek yarı şeffaf cam efekti: Yakınlaştırıldığında arkasındaki mimari çizimi gösterir
     ------------------------------------------------------------------------- */
  .floating-dock-container {
    position: fixed !important;
    top: 50% !important;
    left: 28px !important;
    right: auto !important;
    bottom: auto !important;
    width: auto !important;
    max-width: none !important;
    transform: translate(-50%, -50%) rotate(90deg) !important;
    transform-origin: center center !important;
    z-index: 60 !important;
  }

  .app-viewport.is-fullscreen .floating-dock-container {
    left: 28px !important;
    bottom: auto !important;
    top: 50% !important;
    z-index: 100002 !important;
  }

  .floating-dock {
    padding: 3px 8px !important;
    gap: 4px !important;
    background: rgba(255, 255, 255, 0.28) !important;
    backdrop-filter: blur(14px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(14px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.45) !important;
    border-radius: 26px !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08) !important;
  }

  /* Dock içindeki küçük ileri/geri butonları gizlenir çünkü hemen yanında büyük oklar var */
  .floating-dock #btnPrev,
  .floating-dock #btnNext {
    display: none !important;
  }

  /* Mobilde tam ekran butonları kaldırıldı (Android sistem uyarısı ve iPhone kafa karışıklığı sıfırlandı) */
  #btnFullscreen,
  #btnMobileFullscreen,
  .fullscreen-exit-btn {
    display: none !important;
  }

  .page-range-slider {
    display: none !important;
  }

  .page-num-input {
    width: 34px !important;
    height: 24px !important;
    font-size: 0.80rem !important;
    background: rgba(255, 255, 255, 0.30) !important;
    border: 1px solid rgba(255, 255, 255, 0.45) !important;
    color: #0f172a !important;
    font-weight: 700 !important;
  }

  .page-nav-wrapper {
    font-size: 0.80rem !important;
    gap: 4px !important;
    color: #0f172a !important;
    font-weight: 700 !important;
  }

  .floating-dock .btn-icon-only {
    width: 28px !important;
    height: 28px !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, 0.22) !important;
    border: 1px solid rgba(255, 255, 255, 0.40) !important;
    color: #0f172a !important;
  }

  .floating-dock .btn-icon-only svg {
    width: 15px !important;
    height: 15px !important;
  }

  .zoom-level-badge {
    font-size: 0.72rem !important;
    min-width: 32px !important;
    color: #1d4ed8 !important;
    font-weight: 700 !important;
  }
}

.mode-phone #btnFullscreen,
.mode-phone #btnMobileFullscreen,
.mode-phone .fullscreen-exit-btn {
  display: none !important;
}

/* Telefon Yatayken (Landscape) */
@media (orientation: landscape) and (max-height: 600px), (orientation: landscape) and (max-width: 1024px) {
  #btnFullscreen,
  #btnMobileFullscreen,
  .fullscreen-exit-btn {
    display: none !important;
  }
  .app-header {
    height: 40px;
    padding: 0 12px;
  }
  .book-title-tag {
    font-size: 0.78rem;
    max-width: 280px;
  }
  .main-stage {
    padding: 0;
    height: calc(100vh - 40px);
    height: calc(100dvh - 40px);
  }
  .stage-arrow {
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.85);
  }
  .stage-arrow.nav-arrow-prev {
    left: max(10px, env(safe-area-inset-left));
    top: 50%;
    transform: translateY(-50%);
  }
  .stage-arrow.nav-arrow-next {
    right: max(22px, env(safe-area-inset-right));
    top: 50%;
    transform: translateY(-50%);
  }
  .floating-dock-container {
    bottom: max(6px, env(safe-area-inset-bottom));
  }
  .floating-dock {
    padding: 4px 10px;
    gap: 4px;
  }
  .page-range-slider {
    display: none;
  }
}

/* Global Loader */
.global-loader {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  transition: opacity 0.5s ease;
}

.global-loader.hidden {
  opacity: 0;
  pointer-events: none;
}

.loader-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.loader-progress-bar-bg {
  width: 250px;
  height: 5px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

.loader-progress-bar-fill {
  width: 0%;
  height: 100%;
  background: var(--accent-gradient);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.loader-text {
  font-size: 0.85rem;
  color: var(--text-muted);
}
