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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #f7f5f2;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

header {
  background: #6c4f3d;
  color: #fff;
  padding: 40px 0 20px;
  text-align: center;
}

header h1 {
  font-size: 2rem;
  margin-bottom: 8px;
}

header p {
  color: #e8d5c4;
  font-size: 1rem;
  margin-bottom: 20px;
}

nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 15px;
}

nav a {
  color: #fff;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 4px;
  background: rgba(255,255,255,0.15);
  transition: background 0.3s;
}

nav a:hover {
  background: rgba(255,255,255,0.25);
}

main {
  padding: 40px 0;
}

section {
  background: #fff;
  border-radius: 8px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

section h2 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: #6c4f3d;
  border-left: 4px solid #6c4f3d;
  padding-left: 12px;
}

section h2 .article-count {
  font-size: 0.9rem;
  font-weight: normal;
  color: #999;
  margin-left: 10px;
}

section p {
  color: #555;
  margin-bottom: 10px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

article {
  background: #faf8f5;
  border-radius: 6px;
  padding: 20px;
  border-left: 4px solid #a1887f;
}

article h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: #6c4f3d;
}

article p {
  font-size: 0.95rem;
  color: #666;
}

.article-list {
  list-style: none;
  margin-top: 15px;
}

.article-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #eee;
  flex-wrap: wrap;
  gap: 8px;
}

.article-list li:last-child {
  border-bottom: none;
}

.article-list a {
  color: #6c4f3d;
  text-decoration: none;
  font-weight: 500;
}

.article-list a:hover {
  color: #4a3528;
  text-decoration: underline;
}

.article-list span {
  color: #999;
  font-size: 0.85rem;
  white-space: nowrap;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.pagination a, .pagination span {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 4px;
  text-decoration: none;
  color: #555;
  background: #f4f6f8;
  transition: all 0.3s;
}

.pagination a:hover {
  background: #6c4f3d;
  color: #fff;
}

.pagination .current {
  background: #6c4f3d;
  color: #fff;
}

.pagination .prev, .pagination .next {
  background: #f5ebe5;
  color: #6c4f3d;
}

footer {
  background: #6c4f3d;
  color: #e8d5c4;
  text-align: center;
  padding: 30px 0;
  font-size: 0.9rem;
}

footer p {
  margin-bottom: 6px;
}

.friend-links {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.2);
}

.friend-links h4 {
  color: #fff;
  margin-bottom: 12px;
  font-size: 1rem;
}

.friend-links ul {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
}

.friend-links a {
  color: #e8d5c4;
  text-decoration: none;
  transition: color 0.3s;
}

.friend-links a:hover {
  color: #fff;
  text-decoration: underline;
}

@media (max-width: 600px) {
  header h1 { font-size: 1.5rem; }
  nav a { padding: 6px 12px; font-size: 0.9rem; }
  section { padding: 20px; }
  .grid { grid-template-columns: 1fr; }
  .article-list li { flex-direction: column; align-items: flex-start; }
}

.category-header { padding: 20px 0; border-bottom: 1px solid #eee; margin-bottom: 20px; }
.category-header h2 { font-size: 1.8rem; color: #6c4f3d; margin-bottom: 5px; }
.category-header p { color: #999; font-size: 0.9rem; }
.back-link { margin-top: 30px; padding-top: 20px; border-top: 1px solid #eee; }
.back-link a { color: #6c4f3d; text-decoration: none; font-weight: 500; }
.back-link a:hover { text-decoration: underline; }
article h3 a { color: inherit; text-decoration: none; }