/* Genel Sayfa Stil Ayarları */
body {
  margin: 0;
  padding: 0;
  background-color: #f0f0f0;
  font-family: 'Roboto', sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

/* Flipbook Konteyner ve Sayfa Ayarları */
#flipbook-container {
  position: relative;
  width: 100%;
  max-width: 800px;
  height: 600px;
}

#flipbook {
  width: 100%;
  height: 100%;
}

#flipbook .page {
  background-color: white;
  border: 1px solid #c0c0c0;
  overflow: hidden;
}

#flipbook .page canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (max-width: 768px) {
  #flipbook-container {
    max-width: 450px;
  }
}

/* Navigasyon Düğmeleri */
.nav-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 1000;
  border-radius: 50%;
  font-size: 24px;
}

#prev-button {
  left: 10px;
}

#next-button {
  right: 10px;
}

@media (max-width: 768px) {
  .nav-button {
    width: 30px;
    height: 30px;
    font-size: 18px;
  }
}

/* Yüklenme Göstergesi */
#loading-indicator {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 10px 20px;
  border-radius: 5px;
  z-index: 2000;
}

/* Sayfa Navigasyon Bölümü */
#page-navigation {
  padding: 12px 15px;
  background-color: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  gap: 10px;
  backdrop-filter: blur(8px);
}

#page-navigation.desktop {
  position: absolute;
  top: 20px;
  right: 20px;
}

#page-navigation.mobile {
  display: none;
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  min-width: 200px;
  max-width: 300px;
  z-index: 2000;
}

#page-input,
#page-input-mobile {
  width: 70px;
  padding: 8px 12px;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 12px;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.9);
  transition: all 0.2s ease;
}

#page-input:focus,
#page-input-mobile:focus {
  outline: none;
  border-color: rgba(76, 175, 80, 0.5);
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

#go-to-page,
#go-to-page-mobile {
  padding: 8px 15px;
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  white-space: nowrap;
}

#go-to-page:hover,
#go-to-page-mobile:hover {
  background-color: #45a049;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.2);
}

#go-to-page:active,
#go-to-page-mobile:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.15);
}

@media (max-width: 768px) {
  #page-navigation.desktop {
    display: none;
  }
  #page-navigation.mobile {
    display: flex;
    padding: 10px 12px;
  }
  #page-input-mobile {
    width: 60px;
    padding: 6px 10px;
    font-size: 13px;
  }
  #go-to-page-mobile {
    padding: 6px 12px;
    font-size: 13px;
  }
}

#current-page-display {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(255, 255, 255, 0.8);
  padding: 5px 10px;
  border-radius: 15px;
  font-size: 14px;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Modern Burger Menü İkonu */
#burger-menu {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 3000;
  cursor: pointer;
  width: 45px;
  height: 45px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
  opacity: 1;
  visibility: visible;
}

#burger-menu.hidden {
  opacity: 0;
  visibility: hidden;
}

#burger-menu i {
  color: #333;
  font-size: 22px;
  transition: transform 0.3s ease;
}

#burger-menu:hover {
  background: #f8f8f8;
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0,0,0,0.12);
}

#burger-menu:hover i {
  transform: scale(1.1);
}

/* Modern İçindekiler Menüsü (TOC) */
#toc-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 340px;
  max-width: 90%;
  height: 100%;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  box-shadow: 5px 0 30px rgba(0,0,0,0.15);
  z-index: 2500;
  transform: translateX(-100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  border-right: 1px solid rgba(0,0,0,0.05);
}

/* Menü açıldığında */
#toc-menu.open {
  transform: translateX(0);
}

/* Menü Başlığı ve Kapatma Butonu */
#toc-menu .menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 1;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

#toc-menu .menu-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 500;
  color: #333;
}

#toc-menu .menu-header button {
  background: transparent;
  border: none;
  color: #666;
  font-size: 20px;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s ease;
}

#toc-menu .menu-header button:hover {
  background: rgba(0,0,0,0.05);
  color: #333;
}

/* İçindekiler Listesi Stil Ayarları */
#toc-menu ul {
  list-style: none;
  padding: 15px 20px;
  margin: 0;
}

#toc-menu li {
  margin-bottom: 8px;
}

#toc-menu li.chapter {
  font-weight: 600;
  margin-top: 25px;
  margin-bottom: 15px;
  color: #333;
  font-size: 15px;
  letter-spacing: 0.5px;
  border-bottom: 2px solid rgba(0,0,0,0.08);
  padding-bottom: 8px;
}

#toc-menu a {
  text-decoration: none;
  color: #555;
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
  font-size: 14px;
  line-height: 1.4;
  position: relative;
}

#toc-menu a.active {
  background: rgba(76, 175, 80, 0.08);
  color: #4CAF50;
  font-weight: 500;
}

#toc-menu a.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 70%;
  background: #4CAF50;
  border-radius: 0 2px 2px 0;
}

#toc-menu a:hover {
  background: rgba(0,0,0,0.03);
  color: #000;
  transform: translateX(4px);
}

/* Mobil Cihazlar için Ayarlamalar */
@media (max-width: 768px) {
  #flipbook-container {
    max-width: 450px;
  }
  #burger-menu {
    top: 15px;
    left: 15px;
    width: 40px;
    height: 40px;
  }
  #page-navigation.desktop {
    display: none;
  }
  #page-navigation.mobile {
    display: block;
  }
  #toc-menu {
    width: 300px;
  }
  #toc-menu .menu-header {
    padding: 15px;
  }
  #toc-menu .menu-header h2 {
    font-size: 18px;
  }
  #toc-menu ul {
    padding: 12px 15px;
  }
  #toc-menu a {
    padding: 8px 10px;
    font-size: 13px;
  }
}
