/* 图书查询模块样式 */

.book-search-container {
  max-width: 1200px;
  margin: 80px auto 0;
  padding: 20px;
  font-family: Arial, sans-serif;
}

.book-search-header {
  text-align: center;
  margin-bottom: 30px;
  padding: 20px;
  background: linear-gradient(90deg, #E84A27 0%, #FF7A45 100%);
  color: white;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(232,74,39,0.1);
}

.book-search-header h1 {
  margin: 0;
  font-size: 32px;
  font-weight: 600;
}

.book-search-form {
  background: #F9F7F5;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(232,74,39,0.15);
  margin-bottom: 20px;
}

.search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 15px;
}

.search-group {
  flex: 1;
  min-width: 200px;
}

.search-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: #333333;
}

.search-group input,
.search-group select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
}

.search-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  background: linear-gradient(90deg, #E84A27 0%, #FF7A45 100%);
  color: white;
}

.btn-primary:hover {
  background: linear-gradient(90deg, #D83F22 0%, #FF6A35 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(232,74,39,0.2);
}

.btn-secondary {
  background: #666666;
  color: white;
}

.btn-secondary:hover {
  background: #555555;
  transform: translateY(-2px);
}

.upload-section {
  background: #F9F7F5;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(232,74,39,0.15);
  margin-bottom: 20px;
}

.upload-section h3 {
  margin-top: 0;
  color: #333333;
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 15px;
}

.upload-group {
  margin-bottom: 15px;
}

.upload-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: #333333;
}

.upload-group input[type="file"] {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
}

.upload-options {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.option-group {
  display: flex;
  align-items: center;
  gap: 5px;
}

.option-group label {
  margin: 0;
  font-weight: normal;
}

.book-list {
  background: #F9F7F5;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(232,74,39,0.15);
  margin-bottom: 20px;
}

.book-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #ddd;
}

.book-list-header h3 {
  margin: 0;
  color: #333333;
  font-size: 18px;
  font-weight: 500;
}

.selection-actions {
  display: flex;
  gap: 10px;
}

.book-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 15px;
}

.book-table th,
.book-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

.book-table th {
  background: #E84A27;
  color: white;
  font-weight: 500;
}

.book-table tr:hover {
  background: rgba(232,74,39,0.05);
}

.book-table .book-title {
  font-weight: 500;
  color: #E84A27;
  text-decoration: none;
}

.book-table .book-title:hover {
  text-decoration: underline;
}

.book-table .book-link {
  color: #0066cc;
  text-decoration: none;
}

.book-table .book-link:hover {
  text-decoration: underline;
}

.book-table .book-tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.book-tag {
  background: #FF7A45;
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}

.pagination button {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: white;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pagination button:hover {
  background: #E84A27;
  color: white;
  border-color: #E84A27;
}

.pagination button:disabled {
  background: #f0f0f0;
  color: #999;
  cursor: not-allowed;
  border-color: #ddd;
}

.pagination .page-info {
  font-size: 14px;
  color: #666666;
}

/* 详情页样式 */
.book-detail-container {
  max-width: 800px;
  margin: 80px auto 0;
  padding: 20px;
  font-family: Arial, sans-serif;
}

.book-detail-header {
  text-align: center;
  margin-bottom: 30px;
  padding: 20px;
  background: linear-gradient(90deg, #E84A27 0%, #FF7A45 100%);
  color: white;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(232,74,39,0.1);
}

.book-detail-header h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
}

.book-detail-content {
  background: #F9F7F5;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(232,74,39,0.15);
}

.book-detail-info {
  margin-bottom: 30px;
}

.book-detail-info h2 {
  margin-top: 0;
  color: #333333;
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #ddd;
}

.info-row {
  display: flex;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.info-label {
  width: 120px;
  font-weight: 500;
  color: #666666;
}

.info-value {
  flex: 1;
  color: #333333;
}

.book-description {
  margin-bottom: 30px;
}

.book-description h2 {
  margin-top: 0;
  color: #333333;
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #ddd;
}

.book-tags-section {
  margin-bottom: 30px;
}

.book-tags-section h2 {
  margin-top: 0;
  color: #333333;
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #ddd;
}

.back-button {
  display: inline-block;
  margin-top: 20px;
  padding: 10px 20px;
  background: linear-gradient(90deg, #E84A27 0%, #FF7A45 100%);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.back-button:hover {
  background: linear-gradient(90deg, #D83F22 0%, #FF6A35 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(232,74,39,0.2);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .search-row {
    flex-direction: column;
  }
  
  .search-group {
    width: 100%;
  }
  
  .upload-options {
    flex-direction: column;
  }
  
  .book-table {
    font-size: 14px;
  }
  
  .book-table th,
  .book-table td {
    padding: 8px;
  }
  
  .info-row {
    flex-direction: column;
  }
  
  .info-label {
    width: 100%;
    margin-bottom: 5px;
  }
}

/* 加载动画 */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
  font-size: 16px;
  color: #666666;
}

.loading::after {
  content: '';
  width: 20px;
  height: 20px;
  border: 2px solid #E84A27;
  border-top: 2px solid transparent;
  border-radius: 50%;
  margin-left: 10px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 错误提示 */
.error-message {
  background: #ffebee;
  color: #c62828;
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 15px;
  font-size: 14px;
}

/* 成功提示 */
.success-message {
  background: #e8f5e8;
  color: #2e7d32;
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 15px;
  font-size: 14px;
}

/* 确认弹窗 */
.confirm-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.confirm-modal-content {
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  max-width: 400px;
  width: 90%;
}

.confirm-modal h3 {
  margin-top: 0;
  color: #333333;
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 20px;
}

.confirm-modal p {
  margin-bottom: 20px;
  color: #666666;
}

.confirm-modal input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 20px;
}

.confirm-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}