 * { margin: 0; padding: 0; box-sizing: border-box; }
 body {
   font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
   background: #f5f5f5;
   color: #333;
   min-height: 100vh;
 }
 header {
   background: #fff;
   padding: 24px 32px;
   border-bottom: 1px solid #e0e0e0;
   box-shadow: 0 1px 3px rgba(0,0,0,0.05);
 }
 header h1 { font-size: 22px; font-weight: 600; }
 
 #bookshelf {
   display: grid;
   grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
   gap: 24px;
   padding: 32px;
   max-width: 1200px;
   margin: 0 auto;
 }
 .book-card {
   background: #fff;
   border-radius: 8px;
   overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transition: box-shadow 0.2s, transform 0.2s;
 }
 .book-card:hover {
   box-shadow: 0 4px 12px rgba(0,0,0,0.15);
   transform: translateY(-2px);
 }
 .book-cover {
   width: 100%;
   aspect-ratio: 3 / 4;
   object-fit: cover;
   background: #e8e8e8;
   display: flex;
   align-items: center;
   justify-content: center;
 }
 .book-cover.no-image {
   background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
   color: #fff;
   font-size: 16px;
   font-weight: 600;
   text-align: center;
   padding: 16px;
 }
 .book-info {
   padding: 12px 16px;
 }
 .book-info .title {
   font-size: 15px;
   font-weight: 600;
   margin-bottom: 4px;
   overflow: hidden;
   text-overflow: ellipsis;
   white-space: nowrap;
 }
 .book-info .author {
   font-size: 13px;
  color: #888;
}

.book-actions {
  display: flex;
  gap: 8px;
  padding: 0 16px 12px;
}
.book-actions button {
  flex: 1;
  padding: 6px 0;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.book-actions button:hover {
  background: #f0f0f0;
}
.book-actions .btn-pdf {
  border-color: #2563eb;
  color: #2563eb;
}
.book-actions .btn-pdf:hover {
  background: #e8f0fe;
}
.book-actions .btn-html {
  border-color: #f59e0b;
  color: #d97706;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}
.book-actions .btn-html:hover {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}
.loading {
   grid-column: 1 / -1;
   text-align: center;
   padding: 48px;
   color: #999;
 }
 @media (max-width: 600px) {
   #bookshelf { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; padding: 16px; }
   header { padding: 16px; }
 }
