/* ========================================
   Genre Curation Section - 장르 큐레이션 (크기 축소 반응형)
   ======================================== */

/* Genre 섹션 헤더 */
.genre-curation-section {
  margin-bottom: var(--spacing-2xl);
}
.genre-curation-section .section-header {
  display: flex;
  justify-content: space-between;
  align-items:baseline;
  margin-bottom: var(--spacing-lg);
}

/* Genre 필터 */
.genre-filters {
  display: flex;
  gap: 10px;
  margin-bottom: var(--spacing-2xl);
  overflow-x: auto;
  padding-bottom: var(--spacing-sm);
  scrollbar-width: thin;
}
.genre-filters::-webkit-scrollbar {
  height: 6px;
}
.genre-filters::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: var(--radius-full);
}
.genre-filter-btn {
  padding: 12px 28px;
  background: var(--glass-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-base);
}
.genre-filter-btn:hover {
  background: var(--glass-hover);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}
.genre-filter-btn.active {
  background: var(--gradient-primary);
  border-color: transparent;
  color: white;
  box-shadow: 0 6px 24px rgba(99, 102, 241, 0.4);
}

/* Genre Carousel 기본 */
.genre-carousel {
  display: flex;
  gap: 10px;
  padding: var(--spacing-md) 0;
  scroll-behavior: smooth;
  height: 400px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scroll-snap-type: x proximity;
}
.genre-carousel::-webkit-scrollbar {
  height: 8px;
}
.genre-carousel::-webkit-scrollbar-track {
  background: var(--bg-tertiary);
  border-radius: 4px;
}
.genre-carousel::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
}
.genre-carousel::-webkit-scrollbar-thumb:hover {
  background: var(--secondary);
}

/* Genre Book Card */
.genre-book-card {
  position: relative;               /* absolute link를 위한 기준 */
  flex: 0 0 auto;
  transition: transform 0.3s ease;
  scroll-snap-align: start;
}
.genre-book-card:hover {
  transform: translateY(-8px);
}

/* Genre Book Link - gap 문제 완전 해결 */
.genre-book-link {
  position: absolute;
  inset: 0;
  z-index: 2;
  text-decoration: none;
}

/* Genre Book Cover */
.genre-book-cover {
  position: relative;
  overflow: hidden;
  background: var(--bg-tertiary);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  border-radius: 0px 10px 10px 0px;
  transition: all 0.3s ease;
}
body.light-mode .genre-book-cover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}
.genre-book-card:hover .genre-book-cover {
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.2);
  transform: scale(1.02);
}
.genre-book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.genre-book-card:hover .genre-book-cover img {
  transform: scale(1.05);
}
.genre-book-cover .book-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  font-weight: 700;
  color: var(--text-tertiary);
  background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary));
}

/* Genre Book Info */
.genre-book-info {
  padding: var(--spacing-md) var(--spacing-xs);
}
.genre-book-info h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
  transition: color 0.2s;
}
.genre-book-card:hover .genre-book-info h4 {
  color: var(--primary);
}
.genre-book-author {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.genre-book-stats {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 500;
}
.genre-book-stats span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Genre 미리듣기 버튼 */
.genre-preview {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.3s ease;
  z-index: 3;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
body.light-mode .genre-preview {
  background: rgba(255, 255, 255, 0.98);
}
.genre-book-card:hover .genre-preview {
  opacity: 1;
  transform: scale(1);
}
.genre-preview:hover {
  background: var(--primary);
  transform: scale(1.1);
}
.genre-preview:hover svg {
  color: white;
}
.genre-preview svg {
  color: var(--primary);
  transition: color 0.2s;
}

/* Genre Responsive - 크기 더 작게 축소 */
@media (min-width: 1201px) {
  .genre-carousel {
    gap: 10px;
  }
  .genre-book-card {
    min-width: 160px;
  }
  .genre-book-cover {
    width: 160px;
    height: 240px;
  }
  .genre-book-info h4 {
    font-size: 14px;
  }
  .genre-book-author,
  .genre-book-stats {
    font-size: 11px;
  }
  .genre-preview {
    width: 38px;
    height: 38px;
    padding: 8px;
  }
}

@media (max-width: 1200px) {
  .genre-carousel {
    gap: 10px;
  }
  .genre-book-card {
    min-width: 140px;
  }
  .genre-book-cover {
    width: 140px;
    height: 210px;
  }
  .genre-book-info h4 {
    font-size: 13.5px;
  }
  .genre-preview {
    width: 36px;
    height: 36px;
    padding: 7px;
  }
}

@media (max-width: 992px) {
  .genre-carousel {
    display: flex;
    overflow-x: auto;
    gap: 10px;
  }
  .genre-book-card {
    min-width: 130px;
  }
  .genre-book-cover {
    width: 130px;
    height: 195px;
  }
  .genre-book-info h4 {
    font-size: 13px;
  }
  .genre-preview {
    width: 34px;
    height: 34px;
    padding: 6.5px;
  }
}

@media (max-width: 768px) {
  .genre-carousel {
    gap: 10px;
  }
  .genre-book-card {
    min-width: 115px;
  }
  .genre-book-cover {
    width: 115px;
    height: 172px;
    border-radius: 4px 8px 8px 0px;
  }
  .genre-book-info {
    padding: calc(var(--spacing-md) * 0.7);
  }
  .genre-book-info h4 {
    font-size: 12px;
  }
  .genre-book-author,
  .genre-book-stats {
    font-size: 10px;
  }
  .genre-preview {
    width: 32px;
    height: 32px;
    top: 10px;
    right: 10px;
    padding: 6px;
  }
}

@media (max-width: 480px) {
  
  .genre-filters {
    gap: var(--spacing-sm);
  }
  .genre-filter-btn {
    padding: 4px 10px;
    font-size: 9px;
  }
  .genre-carousel {
    gap: 8px;
      height: 270px;
      

  }
  .genre-carousel::-webkit-scrollbar {
  display: none; /* Chrome, Safari */
}
  .genre-book-card {
    min-width: 90px;
  }
  .genre-book-cover {
    width: 90px;
    height: 135px;
    border-radius: 3px 6px 6px 0px;
  }
  .genre-book-info {
    padding: calc(var(--spacing-md) * 0.5);
  }
  .genre-book-info h4 {
    font-size: 11px;
  }
  .genre-book-author,
  .genre-book-stats {
    font-size: 9px;
  }
  .genre-preview {
    width: 26px;
    height: 26px;
    top: 8px;
    right: 8px;
    padding: 5px;
  }
}