/* Book Reader 樣式 */

.book-reader-wrapper {
  display: flex;
  flex-direction: column;
  gap: 15px;
  background: #f5f5f5;
  padding: 20px;
  border-radius: 8px;
  max-width: 800px;
  margin: 0 auto;
}

.book-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  padding: 15px;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  gap: 15px;
  flex-wrap: wrap;
}

.nav-btn {
  background: #4CAF50;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  transition: background 0.3s ease;
  display: flex;
  align-items: center;
  gap: 5px;
}

.nav-btn:hover:not(:disabled) {
  background: #45a049;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.nav-btn:disabled {
  background: #cccccc;
  cursor: not-allowed;
  opacity: 0.6;
}

.nav-btn span {
  font-size: 16px;
}

.page-info {
  font-size: 16px;
  font-weight: bold;
  color: #333;
  min-width: 80px;
  text-align: center;
  background: #f0f0f0;
  padding: 8px 12px;
  border-radius: 4px;
}

.book-display {
  position: relative;
  background: white;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.book-image-container {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #fff;
  position: relative;
  min-height: 400px;
}

.book-image {
  max-width: 100%;
  max-height: 600px;
  object-fit: contain;
  display: block;
  margin: auto;
}

.image-counter {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
}

.book-footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: white;
  padding: 15px;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.page-slider {
  width: 100%;
  height: 8px;
  border-radius: 5px;
  background: #ddd;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.page-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #4CAF50;
  cursor: pointer;
  transition: background 0.3s;
}

.page-slider::-webkit-slider-thumb:hover {
  background: #45a049;
}

.page-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #4CAF50;
  cursor: pointer;
  border: none;
  transition: background 0.3s;
}

.page-slider::-moz-range-thumb:hover {
  background: #45a049;
}

.keyboard-hint {
  text-align: center;
  font-size: 12px;
  color: #666;
  margin-top: 5px;
}

/* 響應式設計 */
@media (max-width: 768px) {
  .book-reader-wrapper {
    padding: 15px;
  }

  .book-controls {
    flex-direction: column;
    padding: 12px;
  }

  .nav-btn {
    width: 100%;
    justify-content: center;
  }

  .book-image-container {
    min-height: 300px;
  }

  .book-image {
    max-height: 400px;
  }

  .page-info {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .book-reader-wrapper {
    padding: 10px;
    gap: 10px;
  }

  .book-controls {
    padding: 10px;
    gap: 8px;
  }

  .nav-btn {
    padding: 8px 12px;
    font-size: 12px;
  }

  .page-info {
    font-size: 14px;
    padding: 6px 8px;
  }

  .book-image-container {
    min-height: 250px;
  }

  .book-image {
    max-height: 300px;
  }
}
