/* ===========================================
   VOXLIBER - 책 상세 페이지 모던 디자인
   =========================================== */

/* 전역 변수 */
/* 컨테이너 */
.book-detail-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  min-height: 100vh;
  margin-top: 90px;
}

/* ===========================================
   책 헤더 섹션 (표지 + 정보)
   =========================================== */
.app-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.5);
    overflow: auto;
}

.app-modal-content {
    background-color: #2a2a2a;
    margin: 10% auto;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    text-align: center;
}

.close-modal {
    float: right;
    font-size: 24px;
    cursor: pointer;
}

.install-app-btn {
    display: inline-block;
    margin-top: 12px;
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border-radius: 6px;
    text-decoration: none;
}

.install-app-btn:hover {
    background-color: #0056b3;
}

.book-header {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
  padding: 2rem;
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border-radius: 24px;
  border: 1px solid var(--border-color);
}

/* 3D 책 표지 */
.book-cover-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 2/3;
  perspective: 1000px;
  transition: transform 0.6s;
}

.book-cover-wrapper:hover {
  transform: scale(1.05);
}

.book-cover-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
    border-radius: 0px 10px 10px 0px;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.1),
    -10px 0 30px rgba(102, 126, 234, 0.3);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.book-cover-wrapper:hover img {
  box-shadow: 
    0 30px 80px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.2),
    -15px 0 40px rgba(102, 126, 234, 0.5);
  transform: rotateY(-5deg) rotateX(2deg);
}

.book-cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
    border-radius: 0px 10px 10px 0px;
  font-size: 4rem;
  font-weight: 900;
  color: white;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* 책 정보 섹션 */
.book-info-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.book-title {
  font-size: 2.5rem;
  font-weight: 900;
  line-height: 1.2;
  background: linear-gradient(135deg, #fff 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
}

.book-author {
  display: flex;
  align-items: center;
  font-size: 1.1rem;
  color: var(--text-secondary);
  font-weight: 600;
}

/* 장르 태그 */
.book-genres {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.genre-tag {
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid;
  transition: all 0.3s;
}

.genre-tag:hover {
  transform: translateY(-2px);
  filter: brightness(1.2);
}

/* 북 태그 */
.book-tag {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: #a78bfa;
  border-radius: 16px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  transition: all 0.3s;
}

.book-tag:hover {
  background: rgba(139, 92, 246, 0.2);
  transform: translateY(-2px);
}

/* 통계 행 */
.book-stats-row {
  display: flex;
  gap: 2rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  border: 1px solid var(--border-color);
}

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

.rating-number {
  font-size: 2.5rem;
  font-weight: 900;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.rating-stars {
  display: flex;
  gap: 0.25rem;
}

.rating-stars .star {
  font-size: 1.2rem;
  opacity: 0.3;
  transition: all 0.3s;
}

.rating-stars .star.active {
  opacity: 1;
  filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.6));
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* 상태 뱃지 */
.book-status {
  display: inline-block;
}

.status-badge {
  padding: 0.5rem 1.2rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.status-badge.ongoing {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #10b981;
}

.status-badge.ongoing::before {
  content: '●';
  animation: pulse 2s infinite;
}

.status-badge.paused {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #f59e0b;
}

.status-badge.ended {
  background: rgba(107, 114, 128, 0.1);
  border: 1px solid rgba(107, 114, 128, 0.3);
  color: #6b7280;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* 공유 버튼 */
.share-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 12px;
  color: #818cf8;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.3s;
  white-space: nowrap;
}

.share-btn:hover {
  background: rgba(99, 102, 241, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* ===========================================
   미리듣기 오디오 플레이어
   =========================================== */

.intro-audio-wrapper {
  margin-bottom: 3rem;
  padding: 2rem;
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border-radius: 24px;
  border: 1px solid var(--border-color);
}

.intro-audio-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

.intro-audio-title svg {
  color: #667eea;
}

/* 커스텀 오디오 플레이어 */
.custom-audio-player {
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  border: 1px solid var(--border-color);
}

.audio-controls-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.audio-play-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gradient-primary);
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
  flex-shrink: 0;
}

.audio-play-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(102, 126, 234, 0.6);
}

.audio-play-btn.playing {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.audio-progress-wrapper {
  flex: 1;
  min-width: 0;
}

.audio-progress-container {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.audio-progress-bar {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 3px;
  transition: width 0.1s;
  position: relative;
}

.audio-progress-bar::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity 0.3s;
}

.audio-progress-container:hover .audio-progress-bar::after {
  opacity: 1;
}

.audio-time-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 600;
  white-space: nowrap;
}

.audio-volume-control {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.audio-volume-btn {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.audio-volume-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.audio-volume-slider {
  width: 80px;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.audio-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  background: white;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: all 0.3s;
}

.audio-volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.no-audio-message {
  text-align: center;
  padding: 2rem;
  color: var(--text-tertiary);
  font-size: 1rem;
}

/* ===========================================
   콘텐츠 섹션 공통
   =========================================== */

.content-section {
  margin-bottom: 3rem;
  padding: 2rem;
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border-radius: 24px;
  border: 1px solid var(--border-color);
}

.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* 작품 소개 */
.book-description {
  line-height: 1.8;
  color: var(--text-secondary);
  font-size: 1.05rem;
}

/* ===========================================
   작가 공지사항
   =========================================== */

.announcements-section {
  margin: 3rem 0;
  padding: 2rem;
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border-radius: 24px;
  border: 1px solid var(--border-color);
}

.announcement-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: all 0.3s;
}

.announcement-card:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
}

/* ===========================================
   에피소드 목록
   =========================================== */

.episodes-section {
  /* 공통 스타일 적용 */
}

.episodes-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.episode-wrapper {
  display: flex;
  align-items: stretch;
  gap: 1rem;
}

.drag-handle {
  display: flex;
  align-items: center;
  cursor: grab;
  padding: 0 0.75rem;
  color: rgba(255, 255, 255, 0.3);
  transition: color 0.3s;
}

.drag-handle:hover {
  color: rgba(255, 255, 255, 0.6);
}

.drag-handle:active {
  cursor: grabbing;
}

.episode-card {
  flex: 1;
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 1.5rem;
  align-items: center;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.3s;
}

.episode-card:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateX(8px);
  border-color: rgba(102, 126, 234, 0.4);
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.2);
}

.episode-number {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
  border-radius: 12px;
  font-size: 1.8rem;
  font-weight: 900;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.episode-info {
  min-width: 0;
}

.episode-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.episode-meta {
  font-size: 0.9rem;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
}

.episode-play-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(102, 126, 234, 0.2);
  border-radius: 50%;
  font-size: 1.2rem;
  color: #818cf8;
  transition: all 0.3s;
}

.episode-card:hover .episode-play-icon {
  background: var(--gradient-primary);
  color: white;
  transform: scale(1.1);
}

/* 페이지네이션 */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
}

.page-btn {
  padding: 0.75rem 1.25rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s;
}

.page-btn:hover:not(.disabled) {
  background: rgba(102, 126, 234, 0.2);
  border-color: rgba(102, 126, 234, 0.4);
  color: var(--text-primary);
}

.page-btn.active {
  background: var(--gradient-primary);
  border-color: transparent;
  color: white;
}

.page-btn.disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* ===========================================
   리뷰 작성
   =========================================== */

.review-write-section {
  margin-bottom: 3rem;
  padding: 2rem;
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border-radius: 24px;
  border: 1px solid var(--border-color);
}

.star-rating-input {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  font-size: 2.5rem;
}

.star-rating-input .star {
  cursor: pointer;
  transition: all 0.3s;
  color: rgba(251, 191, 36, 0.3);
}

.star-rating-input .star:hover,
.star-rating-input .star.active {
  color: #fbbf24;
  filter: drop-shadow(0 0 12px rgba(251, 191, 36, 0.6));
  transform: scale(1.1);
}

.review-textarea {
  width: 100%;
  min-height: 150px;
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 1rem;
  line-height: 1.6;
  resize: vertical;
  transition: all 0.3s;
}

.review-textarea:focus {
  outline: none;
  border-color: rgba(102, 126, 234, 0.5);
  background: rgba(255, 255, 255, 0.08);
}

.submit-review-btn {
  margin-top: 1rem;
  padding: 1rem 2rem;
  background: var(--gradient-primary);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

.submit-review-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(102, 126, 234, 0.5);
}

/* ===========================================
   리뷰 목록
   =========================================== */

.reviews-list {
  /* 공통 스타일 적용 */
}

.review-item {
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  margin-bottom: 1rem;
  transition: all 0.3s;
}

.review-item:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

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

.reviewer-name {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 1.05rem;
}

.review-stars {
  font-size: 1.1rem;
}

.review-date {
  font-size: 0.85rem;
  color: var(--text-tertiary);
}

.review-text {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 1rem;
}

/* ===========================================
   댓글 섹션
   =========================================== */

.comments-section {
  /* 공통 스타일 적용 */
}

.comment-input {
  width: 100%;
  min-height: 120px;
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 1rem;
  line-height: 1.6;
  resize: vertical;
  transition: all 0.3s;
  margin-bottom: 1rem;
}

.comment-input:focus {
  outline: none;
  border-color: rgba(102, 126, 234, 0.5);
  background: rgba(255, 255, 255, 0.08);
}

.submit-comment-btn {
  padding: 0.9rem 2rem;
  background: var(--gradient-primary);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

.submit-comment-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(102, 126, 234, 0.5);
}

.comment-item {
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  margin-bottom: 1rem;
  transition: all 0.3s;
}

.comment-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.comment-author {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 1rem;
}

.comment-date {
  font-size: 0.85rem;
  color: var(--text-tertiary);
}

.comment-text {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 1rem;
  margin-top: 0.75rem;
}

.reply-btn {
  margin-top: 0.75rem;
  padding: 0.5rem 1rem;
  background: rgba(102, 126, 234, 0.1);
  border: 1px solid rgba(102, 126, 234, 0.3);
  border-radius: 8px;
  color: #818cf8;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s;
}

.reply-btn:hover {
  background: rgba(102, 126, 234, 0.2);
}

.reply-form {
  display: none;
  margin-top: 1rem;
}

.reply-form.active {
  display: block;
}

.comment-reply {
  margin-left: 2rem;
  margin-top: 1rem;
  padding: 1.25rem;
  background: rgba(102, 126, 234, 0.05);
  border-left: 3px solid #667eea;
  border-radius: 12px;
}

/* ===========================================
   반응형 디자인 - 데스크탑 레이아웃 유지, 비례 축소
   =========================================== */

/* 태블릿 */
@media (max-width: 1024px) {
  .book-header {
    grid-template-columns: 240px 1fr;
    gap: 2rem;
    padding: 1.5rem;
  }

  .book-title {
    font-size: 2rem;
  }

  .book-stats-row {
    flex-wrap: wrap;
    gap: 1.5rem;
  }

  .episode-card {
    grid-template-columns: 70px 1fr auto;
  }

  .episode-number {
    width: 70px;
    height: 70px;
    font-size: 1.5rem;
  }
}

/* 모바일 - 같은 레이아웃 유지, 크기만 축소 */
@media (max-width: 768px) {
  .book-detail-wrapper {
    padding: 1rem 0.75rem;
    margin-top: 60px;
  }

  .book-header {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding: 1.25rem;
    border-radius: 16px;
    margin-bottom: 1.5rem;
  }

  .book-cover-wrapper {
    width: 180px;
    margin: 0 auto;
  }

  .book-title {
    font-size: 1.4rem;
    text-align: center;
  }

  .book-author {
    justify-content: center;
    font-size: 0.9rem;
  }

  .book-genres {
    justify-content: center;
    gap: 0.5rem;
  }

  .genre-tag {
    padding: 0.3rem 0.7rem;
    font-size: 0.78rem;
  }

  .book-stats-row {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 12px;
  }

  .rating-display {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .rating-number {
    font-size: 1.8rem;
  }

  .rating-stars .star {
    font-size: 1rem;
  }

  .stat-item {
    align-items: center;
    text-align: center;
  }

  .stat-value {
    font-size: 1.1rem;
  }

  .stat-label {
    font-size: 0.75rem;
  }

  .content-section {
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    border-radius: 16px;
  }

  .section-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
  }

  .book-description {
    font-size: 0.9rem;
    line-height: 1.7;
  }

  .intro-audio-wrapper {
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    border-radius: 16px;
  }

  .intro-audio-title {
    font-size: 1.05rem;
    margin-bottom: 1rem;
  }

  .audio-controls-row {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .audio-play-btn {
    width: 48px;
    height: 48px;
    font-size: 1.2rem;
  }

  .audio-volume-control {
    width: 100%;
    justify-content: center;
  }

  .audio-volume-slider {
    flex: 1;
    max-width: 180px;
  }

  .episode-card {
    grid-template-columns: 52px 1fr auto;
    gap: 0.75rem;
    padding: 0.85rem;
    border-radius: 12px;
  }

  .episode-number {
    width: 52px;
    height: 52px;
    font-size: 1.1rem;
    border-radius: 10px;
  }

  .episode-title {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
  }

  .episode-meta {
    font-size: 0.78rem;
  }

  .episode-play-icon {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }

  .drag-handle {
    display: none;
  }

  .comment-reply {
    margin-left: 0.75rem;
  }

  .star-rating-input {
    font-size: 1.8rem;
    justify-content: center;
  }

  .review-textarea {
    min-height: 120px;
    font-size: 0.9rem;
  }

  .comment-input {
    min-height: 100px;
    font-size: 0.9rem;
  }

  .review-item,
  .comment-item {
    padding: 1rem;
    border-radius: 12px;
  }

  .reviewer-name,
  .comment-author {
    font-size: 0.9rem;
  }

  .review-text,
  .comment-text {
    font-size: 0.88rem;
  }

  .review-date,
  .comment-date {
    font-size: 0.75rem;
  }

  .status-badge {
    font-size: 0.8rem;
    padding: 0.4rem 1rem;
  }

  .page-btn {
    padding: 0.5rem 0.9rem;
    font-size: 0.85rem;
    border-radius: 6px;
  }

  .announcements-section {
    margin: 1.5rem 0;
    padding: 1.25rem;
    border-radius: 16px;
  }
}

/* 초소형 모바일 */
@media (max-width: 480px) {
  .book-detail-wrapper {
    padding: 0.75rem 0.5rem;
    margin-top: 55px;
  }

  .book-header {
    padding: 1rem;
    gap: 1rem;
    border-radius: 14px;
    margin-bottom: 1rem;
  }

  .book-cover-wrapper {
    width: 150px;
  }

  .book-title {
    font-size: 1.2rem;
    line-height: 1.3;
  }

  .book-author {
    font-size: 0.85rem;
  }

  .genre-tag {
    padding: 0.25rem 0.6rem;
    font-size: 0.72rem;
  }

  .book-stats-row {
    padding: 0.85rem;
    gap: 0.75rem;
    border-radius: 10px;
  }

  .rating-number {
    font-size: 1.5rem;
  }

  .rating-stars .star {
    font-size: 0.85rem;
  }

  .stat-value {
    font-size: 1rem;
  }

  .stat-label {
    font-size: 0.7rem;
  }

  .content-section {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 14px;
  }

  .section-title {
    font-size: 1.1rem;
    margin-bottom: 0.85rem;
    gap: 0.5rem;
  }

  .book-description {
    font-size: 0.85rem;
    line-height: 1.65;
  }

  .intro-audio-wrapper {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 14px;
  }

  .intro-audio-title {
    font-size: 0.95rem;
    margin-bottom: 0.85rem;
    gap: 0.5rem;
  }

  .audio-play-btn {
    width: 42px;
    height: 42px;
    font-size: 1rem;
  }

  .audio-time-info {
    font-size: 0.8rem;
  }

  .episode-card {
    grid-template-columns: 44px 1fr;
    gap: 0.65rem;
    padding: 0.75rem;
    border-radius: 10px;
  }

  .episode-number {
    width: 44px;
    height: 44px;
    font-size: 0.95rem;
    border-radius: 8px;
  }

  .episode-title {
    font-size: 0.85rem;
  }

  .episode-meta {
    font-size: 0.72rem;
  }

  .episode-play-icon {
    display: none;
  }

  .star-rating-input {
    font-size: 1.6rem;
  }

  .review-textarea,
  .comment-input {
    min-height: 100px;
    padding: 1rem;
    font-size: 0.85rem;
  }

  .submit-review-btn,
  .submit-comment-btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    border-radius: 10px;
  }

  .page-btn {
    padding: 0.45rem 0.75rem;
    font-size: 0.8rem;
  }

  .share-btn,
  .bookmark-btn {
    padding: 8px 12px;
    font-size: 0.8rem;
    border-radius: 10px;
  }

  .announcements-section {
    margin: 1rem 0;
    padding: 1rem;
    border-radius: 14px;
  }

  .no-audio-message {
    font-size: 0.88rem;
    padding: 1.5rem;
  }
}

/* 초소형 360px */
@media (max-width: 360px) {
  .book-detail-wrapper {
    padding: 0.5rem;
    margin-top: 50px;
  }

  .book-cover-wrapper {
    width: 130px;
  }

  .book-title {
    font-size: 1.05rem;
  }

  .section-title {
    font-size: 1rem;
  }

  .episode-card {
    grid-template-columns: 38px 1fr;
    gap: 0.5rem;
    padding: 0.6rem;
  }

  .episode-number {
    width: 38px;
    height: 38px;
    font-size: 0.85rem;
  }

  .episode-title {
    font-size: 0.8rem;
  }
}
/* ===========================================
   북마크 버튼
   =========================================== */
.bookmark-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 12px;
  color: #fbbf24;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s;
  white-space: nowrap;
}

.bookmark-btn:hover {
  background: rgba(251, 191, 36, 0.2);
  transform: translateY(-2px);
}

.bookmark-btn svg {
  flex-shrink: 0;
  transition: all 0.3s;
}

.bookmark-btn.bookmarked {
  background: rgba(251, 191, 36, 0.2);
  border-color: rgba(251, 191, 36, 0.5);
}

.bookmark-btn.bookmarked svg {
  fill: #fbbf24;
}
/* ===========================================
   책 헤더 래퍼 (제목 + 버튼)
   =========================================== */
.book-header-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
  gap: 16px;
}

.book-title {
  margin: 0;
  flex: 1;
}

.book-action-buttons {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
  .book-header-wrapper {
    flex-direction: column;
    align-items: center;
  }

  .book-title {
    text-align: center;
    width: 100%;
  }

  .book-action-buttons {
    justify-content: center;
  }

  .bookmark-btn,
  .share-btn {
    flex: 0 1 auto;
  }
}



/* 전체 통계 뷰 */
#bookView {
    margin-top: 40px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 16px;
    margin-bottom: 20px;
}

/* 차트 그리드 */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    
}

/* 개별 차트 박스 */
.chart-container {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 20px;
    position: relative;
    height: 360px;

    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* 차트 제목 */
.chart-title {
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 12px;
    color: #e5e7eb;
}

/* canvas 크기 고정 (중요) */
.chart-container canvas {
    width: 100% !important;
    height: 260px !important;
}

/* 모바일 대응 */
@media (max-width: 768px) {
    #bookView {
        padding: 16px;
    }

    .chart-container {
        height: 320px;
    }

    .chart-container canvas {
        height: 220px !important;
    }
}

