* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  background: #F8FAFC; color: #1E293B; line-height: 1.7;
}
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: linear-gradient(135deg, #1E293B, #0F172A); }
.login-card {
  background: #FFF; border-radius: 16px; padding: 40px 44px; width: 380px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
.login-card .brand { font-size: 24px; font-weight: bold; color: #1E293B; }
.login-card .brand-sub { color: #64748B; margin: 6px 0 26px; font-size: 14px; }
.login-card label { display: block; font-size: 13px; color: #475569; margin: 14px 0 6px; }
.login-card input {
  width: 100%; padding: 11px 12px; border: 1px solid #CBD5E1; border-radius: 8px; font-size: 14px;
}
.login-card button {
  width: 100%; margin-top: 22px; padding: 12px; background: #2563EB; color: #FFF;
  border: none; border-radius: 8px; font-size: 15px; font-weight: bold; cursor: pointer;
}
.login-card button:hover { background: #1D4ED8; }
.error { color: #DC2626; font-size: 13px; margin-top: 10px; min-height: 18px; }
.note { color: #94A3B8; font-size: 12px; text-align: center; margin-top: 20px; }
.foot { color: #CBD5E1; font-size: 12px; text-align: center; margin-top: 10px; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  background: #1E293B; color: #FFF; padding: 0 28px; height: 60px; position: sticky; top: 0;
}
.topbar .brand { font-size: 18px; font-weight: bold; }
.topbar nav { display: flex; gap: 8px; }
.topbar button {
  background: transparent; border: none; color: #CBD5E1; padding: 8px 14px;
  border-radius: 6px; cursor: pointer; font-size: 14px;
}
.topbar button:hover { background: #334155; color: #FFF; }
.topbar button.active { background: #2563EB; color: #FFF; font-weight: bold; }
main { max-width: 860px; margin: 30px auto; padding: 0 20px; }
h1 { font-size: 24px; margin-bottom: 18px; }
.post-item {
  background: #FFF; border: 1px solid #E2E8F0; border-radius: 12px;
  padding: 18px 22px; margin-bottom: 14px; cursor: pointer; transition: box-shadow .15s;
}
.post-item:hover { box-shadow: 0 6px 20px rgba(15,23,42,.08); }
.post-item h2 { font-size: 18px; color: #0F172A; }
.post-item .meta { color: #94A3B8; font-size: 12px; margin-top: 6px; }
.post-item .excerpt { color: #475569; font-size: 14px; margin-top: 8px; }
.tag { display: inline-block; background: #EFF6FF; color: #2563EB; border-radius: 20px; padding: 2px 10px; font-size: 12px; margin: 6px 6px 0 0; }
.link { background: none; border: none; color: #2563EB; cursor: pointer; font-size: 14px; padding: 0; margin-bottom: 14px; }
.article { background: #FFF; border: 1px solid #E2E8F0; border-radius: 12px; padding: 30px 36px; }
.article h1, .article h2, .article h3 { margin: 22px 0 10px; }
.article p { margin: 10px 0; }
.article code { background: #F1F5F9; padding: 2px 6px; border-radius: 4px; font-size: 13px; }
.article pre { background: #0F172A; color: #E2E8F0; padding: 16px; border-radius: 8px; overflow: auto; }
.article img { max-width: 100%; border-radius: 8px; }
.admin-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.admin-head h1 { margin: 0; }
.admin-head button, .editor-actions button {
  background: #2563EB; color: #FFF; border: none; border-radius: 8px; padding: 9px 18px; cursor: pointer; font-weight: bold;
}
.editor { background: #FFF; border: 1px solid #E2E8F0; border-radius: 12px; padding: 24px 28px; margin-top: 16px; }
.editor label { display: block; font-size: 13px; color: #475569; margin: 14px 0 6px; }
.editor input, .editor textarea {
  width: 100%; padding: 10px 12px; border: 1px solid #CBD5E1; border-radius: 8px; font-size: 14px; font-family: inherit;
}
.editor label.inline { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 14px; }
.editor label.inline input { width: auto; }
.editor-actions { display: flex; gap: 10px; margin-top: 18px; }
.editor-actions button:last-child { background: #F1F5F9; color: #334155; }
.empty { color: #94A3B8; text-align: center; padding: 60px 0; }
.hidden { display: none; }
