.container {
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #f5f5f5;
  transition: background-color 0.3s ease;
}

.container.dark {
  background-color: #1a1a1a;
  color: #ffffff;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8em 2em;
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  z-index: 9999;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  transition: background-color 0.5s ease;
}

.dark .toolbar {
  background-color: rgba(26, 26, 26, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.backButton {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0;
  border: none;
  background: none;
  font-size: 1.5em;
  font-weight: 600;
  cursor: pointer;
  color: #1d1d1f;
  text-decoration: none;
  transition: opacity 0.2s ease;
  margin: 0;
}

.dark .backButton {
  color: #ffffff;
}

.backButton img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.backButton span {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  letter-spacing: -0.02em;
}

.backButton:hover {
  opacity: 0.8;
}

.controls {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.fontSizeControl {
  display: flex;
  gap: 0.5rem;
}

.controlButton {
  padding: 0.5rem 1rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  background-color: white;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dark .controlButton {
  background-color: #2c2c2e;
  border-color: rgba(255, 255, 255, 0.1);
  color: white;
}

.controlButton:hover {
  background-color: #f0f0f0;
}

.dark .controlButton:hover {
  background-color: #3a3a3c;
}

.readerContainer {
  flex: 1;
  overflow: hidden;
  position: relative;
  margin-top: 4rem;
}

.clickArea {
  position: absolute;
  top: 0;
  height: 100%;
  width: 40%;
  z-index: 10;
  cursor: pointer;
}

.clickArea.left {
  left: 0;
}

.clickArea.right {
  right: 0;
}

.pageInfo {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 12px;
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  border-radius: 16px;
  font-size: 14px;
  z-index: 20;
  bottom: 20px;
}

.dark .pageInfo {
  background-color: rgba(255, 255, 255, 0.2);
}

.epubViewer {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
}

/* epub.js iframe styles */
.epubViewer iframe {
  border: none;
  width: 100%;
  height: 100%;
}

/* Custom scrollbar for webkit browsers */
.epubViewer ::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.epubViewer ::-webkit-scrollbar-track {
  background: transparent;
}

.epubViewer ::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.dark .epubViewer ::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
}

/* Page turn animation */
.epubViewer div[style*="transform"] {
  transition: transform 0.3s ease;
}

/* Navigation buttons */
.navigationButtons {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 0 1rem;
  pointer-events: none;
}

.navigationButton {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  pointer-events: auto;
  color: #333;
  font-size: 1.2rem;
}

.dark .navigationButton {
  background-color: rgba(44, 44, 46, 0.9);
  border-color: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.navigationButton:hover {
  background-color: rgba(255, 255, 255, 1);
  transform: scale(1.1);
}

.dark .navigationButton:hover {
  background-color: rgba(58, 58, 60, 1);
}

.navigationButton:active {
  transform: scale(0.95);
}

.navigationButton.prev {
  margin-right: auto;
}

.navigationButton.next {
  margin-left: auto;
}