/* 图书页面专用样式 - books.css */
/* 注意：大部分通用样式已移至 page.css，此文件仅包含图书页面特有的样式 */

/* 页面标题 */
.page-header {
  background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(248,246,244,0.9) 100%);
  padding: 32px;
  border-radius: 16px;
  margin-bottom: 32px;
  text-align: center;
  position: relative;
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 4px;
  background: linear-gradient(90deg, transparent, #b81f2d, transparent);
  border-radius: 2px;
}

.page-title {
  font-size: 28px;
  font-weight: 700;
  color: #222;
  margin-bottom: 8px;
}

.page-subtitle {
  color: #6b7280;
  font-size: 16px;
}

/* 筛选和搜索区域 */
.filter-section {
  background: #ffffff;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 32px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.05);
  border: 1px solid rgba(184, 31, 45, 0.1);
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-label {
  font-weight: 500;
  color: #374151;
  white-space: nowrap;
}

.filter-select {
  padding: 8px 12px;
  border: 1px solid #e3e6ec;
  border-radius: 8px;
  background: #fff;
  color: #2a2f3a;
  font-size: 14px;
  transition: all .3s ease;
  min-width: 120px;
}

.filter-select:focus {
  outline: none;
  border-color: #b81f2d;
  box-shadow: 0 0 0 3px rgba(184,31,45,0.12);
}

.search-input-small {
  padding: 8px 12px;
  border: 1px solid #e3e6ec;
  border-radius: 8px;
  background: #fff;
  color: #2a2f3a;
  font-size: 14px;
  transition: all .3s ease;
  min-width: 200px;
}

.search-input-small:focus {
  outline: none;
  border-color: #b81f2d;
  box-shadow: 0 0 0 3px rgba(184,31,45,0.12);
}

.filter-btn {
  padding: 8px 16px;
  background: linear-gradient(135deg, #b81f2d, #9f1925);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all .3s ease;
}

.filter-btn:hover {
  background: linear-gradient(135deg, #9f1925, #8a1520);
  transform: translateY(-1px);
}

/* 图书网格 */
.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 32px;
  margin-bottom: 32px;
}

/* 图书卡片样式 */
.book-card {
  background: #ffffff;
  border: 1px solid rgba(184, 31, 45, 0.1);
  border-radius: 16px;
  overflow: hidden;
  transition: all .3s ease;
  cursor: pointer;
  height: 220px;
  display: flex;
  box-shadow: 0 4px 16px rgba(0,0,0,0.05);
  padding: 20px;
}

.book-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(184, 31, 45, 0.15);
}

.book-cover-container {
  width: 120px;
  height: 160px;
  flex-shrink: 0;
  position: relative;
  background: #f8f9fa;
  margin-right: 20px;
  align-self: center;
}

.book-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0;
}

.book-content {
  flex: 1;
}

.book-title {
  font-size: 18px;
  font-weight: 600;
  color: #222;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.book-author {
  color: #6b7280;
  font-size: 14px;
  margin-bottom: 8px;
}

.book-description {
  color: #6b7280;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.book-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}

.book-tag {
  display: inline-block;
  padding: 4px 10px;
  background: linear-gradient(135deg, #f4e9ea, #ede0e1);
  color: #b81f2d;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.book-read-btn {
  padding: 8px 16px;
  background: linear-gradient(135deg, #b81f2d, #9f1925);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all .3s ease;
  align-self: flex-start;
}

.book-read-btn:hover {
  background: linear-gradient(135deg, #9f1925, #8a1520);
  transform: translateY(-1px);
}

/* 分页组件 */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 32px 0;
}

.pagination-btn {
  padding: 8px 12px;
  border: 1px solid #e3e6ec;
  background: #fff;
  color: #2a2f3a;
  border-radius: 6px;
  cursor: pointer;
  transition: all .3s ease;
  font-size: 14px;
}

.pagination-btn:hover {
  border-color: #b81f2d;
  color: #b81f2d;
}

.pagination-btn.active {
  background: #b81f2d;
  color: #fff;
  border-color: #b81f2d;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 响应式样式 */
@media (max-width: 768px) {
  .page-header {
    padding: 20px;
    margin-bottom: 20px;
  }

  .page-title {
    font-size: 22px;
  }

  .filter-section {
    padding: 16px;
  }

  .filter-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .filter-group {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  .search-input-small {
    min-width: 100%;
  }

  .books-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .book-card {
    height: auto;
    flex-direction: column;
    padding: 16px;
  }

  .book-cover-container {
    width: 100%;
    height: 200px;
    margin-right: 0;
    margin-bottom: 16px;
    align-self: stretch;
  }

  .pagination {
    flex-wrap: wrap;
    gap: 4px;
  }
}

@media (max-width: 480px) {
  .page-title {
    font-size: 20px;
  }

  .book-card {
    padding: 12px;
  }

  .book-cover-container {
    height: 180px;
  }
}