/**
 * 이북 모드 스타일
 */

.ebook-toggle-btn {
  margin-left: 10px;
  padding: 4px 10px;
  background-color: var(--primary-color, #0366d6);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85em;
  transition: background-color 0.3s;
}

.ebook-toggle-btn:hover {
  background-color: var(--primary-hover-color, #0256b9);
}

.ebook-toggle-btn i {
  margin-right: 4px;
}

/* 이북 모드 활성화 시 바디 스타일 */
body.ebook-mode-active {
  overflow: hidden;
  background-color: var(--bg-color, #f8f8f8);
}

/* 이북 모드에서 숨김 요소 */
body.ebook-mode-active .sidebar,
body.ebook-mode-active .sidebar-toggle,
body.ebook-mode-active footer,
body.ebook-mode-active .post-header,
body.ebook-mode-active .post-meta,
body.ebook-mode-active .post-tags,
body.ebook-mode-active .related-posts,
body.ebook-mode-active .comments-section {
  display: none !important;
}

/* 전체 화면 사용 */
body.ebook-mode-active .container,
body.ebook-mode-active .main-content {
  max-width: 100%;
  width: 100%;
  padding: 0;
  margin: 0;
}

body.ebook-mode-active .post {
  border: none;
  padding: 0;
  margin: 0;
}

/* 컨텐츠 영역 스타일 */
body.ebook-mode-active .post-content {
  height: 100vh;
  overflow: hidden;
  padding: 30px 50px;
  background-color: white;
  max-width: 900px;
  margin: 0 auto;
  border-radius: 0;
  position: relative;
  box-shadow: none;
  font-size: 1.05em;
  line-height: 1.7;
}

/* 페이지 내용 숨김 (페이지 단위로 표시) */
body.ebook-mode-active .ebook-content {
  position: relative;
  overflow: hidden;
  transition: none;
}

/* 페이지 네비게이션 컨트롤 */
.ebook-page-nav {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  background-color: var(--primary-color, #0366d6);
  padding: 10px 15px;
  border-radius: 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  z-index: 1000;
}

.ebook-page-nav .ebook-nav-btn {
  background: none;
  border: none;
  color: white;
  font-size: 1.2em;
  cursor: pointer;
  padding: 0 15px;
  transition: transform 0.2s;
}

.ebook-page-nav .ebook-nav-btn:hover {
  transform: scale(1.1);
}

.ebook-page-nav .ebook-nav-btn:focus {
  outline: none;
}

.ebook-page-nav .ebook-page-info {
  color: white;
  font-size: 0.9em;
  margin: 0 10px;
  min-width: 60px;
  text-align: center;
}

/* 이북 모드 종료 버튼 */
.ebook-exit-btn {
  position: fixed;
  top: 15px;
  right: 15px;
  background-color: #f5f5f5;
  color: #333;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1001;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: background-color 0.2s;
}

.ebook-exit-btn:hover {
  background-color: #e0e0e0;
}

/* 모바일 대응 */
@media (max-width: 768px) {
  body.ebook-mode-active .post-content {
    height: 100vh;
    padding: 20px;
  }
  
  .ebook-page-nav {
    bottom: 10px;
    padding: 8px 12px;
  }
  
  .ebook-page-nav .ebook-nav-btn {
    padding: 0 10px;
  }
} 