* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  color: #333;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  display: flex;
}

a {
  text-decoration: none;
  color: inherit;
}

a:hover {
  color: #2563eb;
}

.empty-message {
  text-align: center;
  opacity: 0.7;
  font-style: italic;
  margin-top: 2rem;
}

.post-list {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.post-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #eee;
}

.post-title {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.25rem;
}

.post-title a:hover {
  color: #3498db;
}

.post-date {
  color: #666;
  font-size: 0.9rem;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.book-card {
  display: flex;
  flex-direction: column;
  text-align: center;
}

.book-card > a {
  display: block;
  height: 220px;
  margin-bottom: 0.75rem;
}

.book-cover,
.book-cover-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s;
  display: block;
}

.book-cover {
  object-fit: cover;
}

.book-cover-placeholder {
  background-color: #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
  font-size: 1rem;
  padding: 1rem;
}

.book-card a:hover .book-cover,
.book-card a:hover .book-cover-placeholder {
  transform: translateY(-4px);
}

.book-title {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
}

.book-title a {
  color: inherit;
  transition: color 0.2s;
}

.book-title a:hover {
  color: #3498db;
}

.navbar {
  border-bottom: 1px solid #ddd;
  padding: 1rem 2rem;
}

.nav-container {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  display: flex;
  align-items: center;
}

.nav-logo {
  height: 40px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.footer {
  border-top: 1px solid #ddd;
  padding: 2rem;
}

.footer-container {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
}

.footer-text {
  color: #666;
  font-style: italic;
}

.footer-text a {
  color: inherit;
  font-style: inherit;
  text-decoration: none;
  cursor: text;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1rem 0;
  width: 100%;
  flex: 1;
}

.page-title {
  font-size: 2rem;
  margin-bottom: 2rem;
}

.hero {
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.hero-container {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  align-items: center;
}

.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-image img {
  width: 100%;
  max-width: 250px;
  border-radius: 8px;
}

.hero-text h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.hero-text p {
  margin-bottom: 0.75rem;
}

.hero-links {
  margin-top: 1.5rem;
}

.hero-links a {
  color: #2563eb;
  text-decoration: underline;
}

.article {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1rem 0;
  width: 100%;
}

.article-header {
  margin-bottom: 2rem;
}

.article-title {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.article-date {
  color: #666;
  display: block;
  margin-bottom: 2rem;
}

.article-content {
  font-size: 1.1rem;
  line-height: 1.8;
}

.article-content h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-size: 1.8rem;
}

.article-content h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-size: 1.4rem;
}

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

.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 2rem 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.article-content ul,
.article-content ol {
  margin: 1rem 0 1rem 2rem;
}

.article-content li {
  margin-bottom: 0.5rem;
}

.article-content blockquote {
  border-left: 4px solid #3498db;
  padding-left: 1rem;
  margin: 1.5rem 0;
  color: #555;
  font-style: italic;
}

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

.article-content pre {
  background: #2d2d2d;
  color: #f8f8f2;
  padding: 1rem;
  border-radius: 4px;
  overflow-x: auto;
  margin: 1rem 0;
}

.article-content pre code {
  background: none;
  padding: 0;
  color: #f8f8f2;
}

.article-content a {
  color: #3498db;
  text-decoration: underline;
}

.article-content a:hover {
  color: #2980b9;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  border-radius: 4px;
}

.article-content table thead {
  background-color: #3498db;
  color: white;
}

.article-content table th,
.article-content table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

.article-content table th {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}

.article-content table tbody tr:hover {
  background-color: #f5f5f5;
}

.article-content table tbody tr:last-child td {
  border-bottom: none;
}

@media (max-width: 768px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }

  .hero {
    padding: 1.5rem;
  }

  .hero-text h1 {
    font-size: 1.5rem;
  }

  .nav-container {
    flex-direction: column;
    gap: 1rem;
  }

  .nav-links {
    gap: 1.5rem;
    font-size: 1rem;
  }

  .nav-logo {
    height: 30px;
  }

  .navbar {
    padding: 1rem;
  }

  .book-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .book-card > a {
    height: 200px;
  }

  .book-title {
    font-size: 0.9rem;
  }

  .post-item {
    gap: 0.25rem;
  }

  .post-title {
    font-size: 1.1rem;
    line-height: 1.3;
  }

  .post-date {
    font-size: 0.85rem;
  }

  .container {
    padding: 1rem;
  }

  .page-title {
    font-size: 1.75rem;
  }

  .footer-container {
    flex-direction: column-reverse;
    align-items: center;
    gap: 1rem;
    text-align: center;
  }

  .footer {
    padding: 1.5rem;
  }

  .footer-links {
    gap: 1.5rem;
  }

  .article {
    padding: 1.5rem;
  }

  .article-title {
    font-size: 1.75rem;
    line-height: 1.3;
  }

  .article-content {
    font-size: 1rem;
  }

  .article-content table {
    font-size: 0.9rem;
  }

  .article-content table th,
  .article-content table td {
    padding: 0.5rem 0.75rem;
  }
}

@media (max-width: 480px) {
  .book-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .book-card > a {
    height: 180px;
  }

  .nav-links {
    gap: 1rem;
    font-size: 0.95rem;
  }

  .post-title {
    font-size: 1rem;
  }

  .hero-text h1 {
    font-size: 1.25rem;
  }

  .article-content table {
    font-size: 0.85rem;
  }

  .article-content table th,
  .article-content table td {
    padding: 0.4rem 0.5rem;
  }
}
