/* =========================================================================
   IMonitor Blog 现代化美化层 (modern-override.css)
   -----------------------------------------------------------------------
   独立覆盖文件，用于把 ColdBlue 老主题的外观升级为现代风格。
   不修改原主题任何文件。删除本文件 + mu-plugin 即可完全回滚。
   加载顺序：排在线性样式之后，故此处的重定义能覆盖旧样式。
   ========================================================================= */

/* ---------- 基础：现代化排版与配色 ---------- */
body {
	background: #eef1f5 !important;
	color: #2b3340 !important;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif !important;
	font-size: 15px !important;
	line-height: 1.7 !important;
}

a { color: #2563eb; transition: color .15s ease; }
a:hover { color: #1d4ed8; }

h1, h2, h3, h4, h5, h6 { color: #111827; line-height: 1.3; letter-spacing: 0 !important; }
h2 { font-size: 26px !important; }
h3 { font-size: 20px !important; }

/* ---------- 页头 Header ---------- */
div#header {
	background: linear-gradient(135deg, #1d3a8f 0%, #2563eb 100%) !important;
	border-bottom: none !important;
	box-shadow: 0 2px 8px rgba(15,30,80,.25);
	position: relative;
	z-index: 5;
}
div#header h1 { float: none; width: 100%; padding: 8px 0 4px; font-size: 28px; letter-spacing: 0 !important; color: #fff; }
div#header h1 a { color: #fff; }
ul#navigation {
	float: none; width: 100%; position: static; text-align: left;
	display: flex; flex-wrap: wrap; gap: 2px; margin-top: 4px;
	background: rgba(0,0,0,.12);
	border-radius: 8px;
	padding: 8px;
}
ul#navigation li { display: inline-block; }
ul#navigation li a {
	color: #dfe8ff !important; font-size: 14px; font-weight: 500;
	padding: 8px 14px; border-radius: 6px; text-shadow: none !important;
}
ul#navigation li a:hover { color: #fff !important; background: rgba(255,255,255,.16); text-decoration: none !important; }
ul#navigation li.active a { color: #fff !important; background: rgba(255,255,255,.22); }

/* ---------- 搜索条 ---------- */
div#search { background: #ffffff !important; box-shadow: 0 2px 6px rgba(15,30,80,.12); }
div#search div.inner { padding: 10px 0; }
input#s {
	border: 1px solid #cbd5e1; border-radius: 6px; padding: 7px 12px;
	font-size: 14px; width: 260px; box-shadow: inset 0 1px 2px rgba(0,0,0,.05);
}
input#s:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.18); }

/* ---------- 主容器：卡片化的圆角布局 ---------- */
div#wrapper {
	width: auto !important; max-width: 1100px; margin: 28px auto;
	background: transparent !important; border: none !important;
	padding: 0 20px !important;
	display: flex; flex-wrap: wrap; gap: 28px;
}
div#content {
	float: none !important; width: auto !important; flex: 1 1 560px; padding: 0 !important;
}
ul#sidebar {
	float: none !important; width: 300px; padding: 0 !important;
	margin: 0; list-style: none;
}

/* ---------- 单篇文章卡片 ---------- */
div.post {
	background: #ffffff; border: 1px solid #e5e7eb; border-radius: 12px;
	padding: 28px 28px 22px !important; margin: 0 0 28px !important;
	box-shadow: 0 1px 3px rgba(16,32,70,.08);
	transition: box-shadow .2s ease, transform .2s ease;
}
div.post:hover { box-shadow: 0 8px 24px rgba(16,32,70,.12); }
div.post-title { margin: 0 0 14px !important; }
div.post-title h2 { font-size: 24px !important; }
div.post-title h2 a { color: #111827; }
div.post-title h2 a:hover { color: #2563eb; text-decoration: none; }
div.post-title h3 { color: #6b7280; font-size: 13px !important; }
div.post-title h3 a { color: #6b7280; border: none !important; }
div.post-title h3 a:hover { color: #2563eb; border: none !important; }
div.post-content { margin-top: 14px; }
div.post-content p { font-size: 15px; line-height: 1.75 !important; color: #374151; }
div.post-content h1, div.post-content h2, div.post-content h3 { margin: 1.2em 0 .5em; }

/* ---------- 分页 ---------- */
#post-navigation, div.post-navigation { margin: 10px 0 20px; }
#post-navigation .left, #post-navigation .right, div.post-navigation .left, div.post-navigation .right {
	background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; padding: 8px 14px;
	font-size: 14px; box-shadow: 0 1px 2px rgba(16,32,70,.06);
}
#post-navigation a, div.post-navigation a { color: #2563eb; text-decoration: none; }
#post-navigation a:hover, div.post-navigation a:hover { text-decoration: underline; }

/* ---------- 侧边栏小工具 ---------- */
ul#sidebar h2 { font-size: 16px !important; color: #111827; padding-bottom: 8px; border-bottom: 2px solid #2563eb; }
@supports not (-moz-appearance:none) { ul#sidebar h2 { width: fit-content; } }
ul#sidebar li {
	background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
	padding: 16px 18px !important; margin: 0 0 18px !important;
	box-shadow: 0 1px 3px rgba(16,32,70,.08);
	border-bottom: 1px solid #e5e7eb !important;
}
ul#sidebar li ul li { background: none; border: none; box-shadow: none; padding: 0 !important; margin: 0 !important; }
ul#sidebar ul.block-list li a { border-bottom: 1px solid #eef2f7 !important; color: #374151; padding: 8px 0; }
ul#sidebar ul.block-list li a:hover { color: #2563eb; }
ul#sidebar a { color: #374151; }

/* ---------- 页脚 Footer ---------- */
div#footer {
	clear: both; width: 100% !important; max-width: none !important;
	margin: 0; border: none !important;
	background: #111827 !important; color: #9ca3af;
	padding: 36px 24px !important; text-align: center !important;
}
div#footer p { color: #9ca3af !important; margin: 4px 0 !important; font-size: 13px !important; }
div#footer a { color: #93c5fd !important; border: none !important; }
div#footer a:hover { color: #fff !important; border: none !important; }
div#footer p#blog-name { color: #f3f4f6 !important; font-size: 15px !important; }

/* ---------- 文章正文图片 ---------- */
div.post-content p img, div.post-content img {
	max-width: 100%; height: auto;
	border-radius: 8px; border: 1px solid #e5e7eb !important; background: #fff;
	box-shadow: 0 2px 8px rgba(16,32,70,.08);
}

/* ---------- 代码块 / 引用 ---------- */
code, pre {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	background: #f3f4f6 !important; border-radius: 6px; padding: 2px 6px; font-size: 14px;
}
pre { padding: 16px !important; overflow: auto; line-height: 1.5; }
blockquote {
	border-left: 4px solid #2563eb; background: #f8fafc;
	border-radius: 0 8px 8px 0; margin: 16px 0 !important; padding: 12px 20px;
}

/* ---------- 表格 / 评论区 ---------- */
table { border-collapse: collapse; width: 100%; }
table#wp-calendar td, table#wp-calendar th { font-size: 13px !important; }
li.comment { background: #fff !important; border: 1px solid #e5e7eb !important; border-radius: 10px; margin: 10px 0; }

/* ---------- 响应式：窄屏下侧栏下移、边距收窄 ---------- */
@media (max-width: 860px) {
	div#wrapper { display: block; padding: 0 14px; }
	div#content { width: 100% !important; }
	ul#sidebar { width: 100% !important; margin-top: 10px; }
	div#header h1 { font-size: 22px; }
	ul#navigation { flex-direction: column; gap: 0; }
	ul#navigation li a { display: block; }
	div#search form { float: none; width: 100%; text-align: left; }
	input#s { width: 100%; }
}
