/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #fff;
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Typography */
h1 {
  font-size: 2rem;
  margin-bottom: 2rem;
  font-weight: 600;
}

h2 {
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

h3 {
  font-size: 1.2rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

/* Links */
a {
  color: #0066cc;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

nav a {
  color: #666;
  font-size: 0.9rem;
}

/* Header */
header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #eee;
}

/* Book list */
#book-list {
  list-style: none;
}

.book-item {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #f0f0f0;
}

.book-item:last-child {
  border-bottom: none;
}

.book-item h2 {
  margin: 0 0 0.25rem 0;
  font-size: 1.25rem;
}

.book-item .author {
  color: #666;
  font-size: 0.9rem;
  font-style: italic;
}

/* Book detail page */
.book-header {
  margin-bottom: 2rem;
}

.book-header h1 {
  margin-bottom: 0.5rem;
}

.book-header .author {
  color: #666;
  font-style: italic;
  margin-bottom: 1rem;
  display: block;
}

.book-header .description {
  color: #555;
  margin-top: 1rem;
  line-height: 1.7;
}

.book-header .cover {
  max-width: 200px;
  margin: 1rem 0;
}

.book-header .cover img {
  width: 100%;
  height: auto;
  border: 1px solid #ddd;
}

/* Notes section */
.notes-section {
  margin-top: 3rem;
}

.notes-section h2 {
  margin-top: 0;
  margin-bottom: 1.5rem;
}

.note {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #f0f0f0;
}

.note:last-child {
  border-bottom: none;
}

.note-content {
  line-height: 1.7;
  color: #333;
}

.note-content p {
  margin-bottom: 1rem;
}

.note-content ul,
.note-content ol {
  margin-left: 2rem;
  margin-bottom: 1rem;
}

.note-content code {
  background: #f5f5f5;
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
}

.note-content pre {
  background: #f5f5f5;
  padding: 1rem;
  border-radius: 3px;
  overflow-x: auto;
  margin-bottom: 1rem;
}

.note-content pre code {
  background: none;
  padding: 0;
}

.note-meta {
  color: #999;
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

/* Loading state */
.loading {
  color: #999;
  font-style: italic;
}

/* Error messages */
.error {
  color: #cc0000;
  padding: 1rem;
  border: 1px solid #ffcccc;
  background: #fff5f5;
  border-radius: 3px;
  margin: 1rem 0;
}

/* Responsive */
@media (max-width: 600px) {
  body {
    padding: 1rem 0.75rem;
  }
  
  h1 {
    font-size: 1.5rem;
  }
  
  h2 {
    font-size: 1.25rem;
  }
}
