/* ===== 极简博客 全局样式 ===== */
* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", sans-serif;
	font-size: 16px;
	line-height: 1.75;
	color: #333;
	background: #fafafa;
}

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

a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }

/* 顶部 */
.site-header {
	background: #fff;
	border-bottom: 1px solid #e8e8e8;
	padding: 18px 0;
}
.site-title {
	margin: 0;
	font-size: 22px;
	font-weight: 700;
}
.site-title a { color: #222; text-decoration: none; }

/* 列表页 */
main.container { padding-top: 28px; padding-bottom: 40px; }

.post-list { display: block; }

.post-item {
	background: #fff;
	border: 1px solid #ececec;
	border-radius: 8px;
	padding: 20px 24px;
	margin-bottom: 18px;
}

.post-title {
	margin: 0 0 6px;
	font-size: 20px;
	line-height: 1.4;
}
.post-title a { color: #1f2937; }
.post-title a:hover { color: #2563eb; text-decoration: none; }

.post-meta { color: #999; font-size: 13px; margin-bottom: 8px; }

.post-excerpt {
	margin: 0 0 10px;
	color: #555;
	font-size: 15px;
	word-break: break-word;
}

.read-more { font-size: 14px; }

.empty { color: #888; text-align: center; padding: 40px 0; }

/* 分页 */
.pagination { text-align: center; margin: 24px 0; }
.page-numbers {
	display: inline-block;
	padding: 6px 14px;
	margin: 0 4px;
	border: 1px solid #ddd;
	border-radius: 6px;
	background: #fff;
	color: #555;
	font-size: 14px;
}
.page-numbers.current { background: #2563eb; border-color: #2563eb; color: #fff; }
a.page-numbers:hover { text-decoration: none; background: #eef2ff; }

/* 详情页 */
.single .entry {
	background: #fff;
	border: 1px solid #ececec;
	border-radius: 8px;
	padding: 28px 30px;
}
.entry-title {
	margin: 0 0 8px;
	font-size: 26px;
	line-height: 1.4;
}
.entry-content {
	font-size: 16px;
	line-height: 1.9;
	color: #333;
	word-break: break-word;
}
.entry-content h1 { font-size: 21px; margin: 22px 0 10px; }
.entry-content h2 { font-size: 21px; margin: 22px 0 10px; }
.entry-content h3 { font-size: 18px; margin: 18px 0 8px; }
.entry-content h4 { font-size: 16px; margin: 16px 0 6px; }
.entry-content p { margin: 12px 0; }
.entry-content blockquote {
	margin: 14px 0;
	padding: 10px 16px;
	border-left: 4px solid #d1d5db;
	background: #f9fafb;
	color: #555;
}
.entry-content pre {
	background: #f3f4f6;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	padding: 12px 14px;
	overflow: auto;
	font-size: 14px;
	line-height: 1.6;
}
.entry-content code {
	background: #f3f4f6;
	border-radius: 4px;
	padding: 2px 5px;
	font-size: 14px;
}
.entry-content pre code { background: none; padding: 0; }
.entry-content img { max-width: 100%; height: auto; border-radius: 6px; }
.entry-content hr { border: none; border-top: 1px solid #e5e7eb; margin: 22px 0; }

.post-nav { margin: 18px 0 0; font-size: 14px; }

/* 404 */
.error-404 { text-align: center; padding: 60px 0; }
.error-404 h1 { font-size: 26px; }

/* 页脚 */
.site-footer {
	border-top: 1px solid #e8e8e8;
	padding: 18px 0 30px;
	margin-top: 20px;
	text-align: center;
	color: #aaa;
	font-size: 13px;
}

/* ===== 后台样式 ===== */
.admin-body { background: #f4f5f7; }
.admin-body .container { max-width: 860px; }

.admin-bar {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px 0;
}
.admin-title { font-size: 18px; font-weight: 700; margin-right: auto; }

.admin-card {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	padding: 22px 26px;
	margin-bottom: 20px;
}
.admin-card h1 { font-size: 20px; margin: 0 0 14px; }

.admin-msg { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; padding: 10px 14px; border-radius: 8px; }
.admin-error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; padding: 10px 14px; border-radius: 8px; }
.admin-back { margin-top: 16px; }

label { display: block; margin-bottom: 4px; font-size: 14px; color: #555; }

input[type="text"], input[type="password"], select {
	width: 100%;
	max-width: 460px;
	padding: 9px 12px;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	font-size: 15px;
	background: #fff;
}
input:focus, select:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }

.btn {
	display: inline-block;
	padding: 8px 18px;
	border: 1px solid #2563eb;
	border-radius: 8px;
	background: #2563eb;
	color: #fff;
	font-size: 14px;
	cursor: pointer;
	text-decoration: none;
}
.btn:hover { background: #1d4ed8; border-color: #1d4ed8; text-decoration: none; }
.btn-plain { background: #fff; color: #2563eb; }
.btn-plain:hover { background: #eef2ff; }
.btn-danger { background: #dc2626; border-color: #dc2626; }
.btn-danger:hover { background: #b91c1c; }
.btn-small { padding: 4px 10px; font-size: 13px; border-radius: 6px; }

/* 富文本编辑器 */
.editor-toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	padding: 8px;
	border: 1px solid #d1d5db;
	border-bottom: none;
	border-radius: 8px 8px 0 0;
	background: #f9fafb;
}
.editor-toolbar button {
	padding: 5px 10px;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	background: #fff;
	color: #374151;
	font-size: 13px;
	cursor: pointer;
}
.editor-toolbar button:hover { background: #eef2ff; border-color: #c7d2fe; }
.toolbar-sep { width: 1px; background: #e5e7eb; margin: 2px 4px; }

.editor-content {
	min-height: 320px;
	padding: 14px 16px;
	border: 1px solid #d1d5db;
	border-radius: 0 0 8px 8px;
	background: #fff;
	font-size: 15px;
	line-height: 1.8;
	overflow-y: auto;
}
.editor-content:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.editor-content:empty:before { content: attr(data-placeholder); color: #aaa; }
.editor-content blockquote {
	margin: 10px 0;
	padding: 8px 14px;
	border-left: 4px solid #d1d5db;
	background: #f9fafb;
}
.editor-content pre { background: #f3f4f6; border-radius: 6px; padding: 10px 12px; overflow: auto; }
.editor-content img { max-width: 100%; }

/* 后台表格 */
.admin-table { width: 100%; border-collapse: collapse; margin-top: 6px; }
.admin-table th, .admin-table td {
	text-align: left;
	padding: 10px 12px;
	border-bottom: 1px solid #eef0f2;
	font-size: 14px;
}
.admin-table th { color: #888; font-weight: 600; background: #fafafa; }
.admin-table td a { color: #1f2937; }
.admin-table td a:hover { color: #2563eb; }

.tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; }
.tag-pub { background: #ecfdf5; color: #065f46; }
.tag-draft { background: #fef3c7; color: #92400e; }

.inline { display: inline; margin-left: 6px; }
