@font-face {
    font-family: "maple";
    src: url("../font/maple.ttf") format("truetype");
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f5f5f5;
  color: #333;
}

header {
  background: #2c3e50;
  color: #fff;
  padding: 20px 40px;
  display: flex;
  align-items: center;
  gap: 16px;
}

header h1 { font-size: 24px; cursor: pointer; }
header h1:hover { opacity: 0.8; }
.header-desc { font-size: 14px; color: #95a5a6; }

#app, #breadcrumb { max-width: 1000px; margin: 0 auto; padding: 0 20px; }

.breadcrumb {
  font-size: 14px; color: #7f8c8d;
  padding: 12px 20px; margin-top: 12px;
}
.breadcrumb .crumb { cursor: pointer; }
.breadcrumb .crumb:hover { color: #2980b9; text-decoration: underline; }
.breadcrumb .sep { margin: 0 8px; color: #bbb; }

.card {
  border-radius: 10px; padding: 24px; cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,0.1); }
.card h2, .card h3, .card h4 { margin-bottom: 6px; }
.card .desc { font-size: 13px; color: #95a5a6; }

.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.category-card { background: #fff; }
.category-card h2 { font-size: 20px; }

.column-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.column-card { background: #fff; }
.column-card h3 { font-size: 18px; }

.article-list { display: flex; flex-direction: column; gap: 10px; }
.article-card { background: #fff; }
.article-card h4 { font-size: 16px; }

.article-detail {
  background: #fff; border-radius: 12px; padding: 32px 36px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06); line-height: 1.8;
}
.article-detail h2 { font-size: 28px; margin-bottom: 10px; }
.article-detail .meta { font-size: 13px; color: #95a5a6; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid #eee; }
.article-detail .content h2 { font-size: 22px; margin: 24px 0 12px; }
.article-detail .content h3 { font-size: 18px; margin: 20px 0 10px; }
.article-detail .content p { margin: 10px 0; }
.article-detail .content ul, .article-detail .content ol { margin: 10px 0; padding-left: 24px; }
.article-detail .content li { margin: 4px 0; }
.article-detail .content code.code-inline { background: #f0f0f0; padding: 2px 6px; border-radius: 4px; font-size: 14px; font-family: "maple", monospace; }
.article-detail .content .code-block { background: #1e1e2e; border-radius: 8px; overflow-x: auto; margin: 14px 0; padding: 16px; font-family: "maple", monospace; font-size: 14px; line-height: 1.6; white-space: pre-wrap; }
.article-detail .content img { max-width: 100%; border-radius: 8px; margin: 10px 0; }
.article-detail .content table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 14px; }
.article-detail .content th, .article-detail .content td { border: 1px solid #ddd; padding: 8px 12px; text-align: left; }
.article-detail .content th { background: #f8f9fa; font-weight: 600; }
.article-detail .content hr { margin: 24px 0; border: 0; border-top: 1px solid #eee; }
.article-detail .content blockquote { border-left: 4px solid #2980b9; padding: 10px 16px; margin: 14px 0; background: #f8f9fa; color: #555; }

.article-nav { display: flex; justify-content: space-between; margin-top: 40px; padding-top: 20px; border-top: 1px solid #eee; }
.article-nav span[data-path] { cursor: pointer; color: #2980b9; font-size: 15px; }
.article-nav span[data-path]:hover { text-decoration: underline; }

.error { text-align: center; padding: 60px 20px; color: #e74c3c; }
.error button { margin-top: 16px; padding: 8px 20px; border: 0; border-radius: 6px; background: #2980b9; color: #fff; cursor: pointer; }

.github-btn {
  color: #fff; text-decoration: none; font-size: 14px;
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 6px;
  background: rgba(255,255,255,0.1); transition: background 0.15s;
}
.github-btn:hover { background: rgba(255,255,255,0.2); }

@media (max-width: 700px) {
  header { padding: 16px 20px; }
  .category-grid, .column-list { grid-template-columns: 1fr; }
  .article-detail { padding: 20px; }
}
