/* ========================================
   lonewolf.cn 个人博客专用样式
   保持原有网站风格
   ======================================== */

/* 全局平滑滚动 */
html {
	scroll-behavior: smooth;
}

/* 选中文字颜色 */
::selection {
	background: rgba(103, 122, 255, 0.4);
	color: #fff;
}

::-moz-selection {
	background: rgba(103, 122, 255, 0.4);
	color: #fff;
}

/* ========================================
   打字动画 - 首页标语
   ======================================== */
.typedWrapper {
	display: inline-block;
}

.typedText {
	display: inline-block;
	overflow: hidden;
	white-space: nowrap;
	border-right: 3px solid #677aff;
	animation: typing 2.5s steps(15) 0.5s forwards, blink 0.8s step-end infinite;
	width: 0;
	max-width: fit-content;
}

@keyframes typing {
	from { width: 0; }
	to { width: 100%; }
}

@keyframes blink {
	50% { border-color: transparent; }
}

.taglineSub {
	opacity: 0;
	animation: fadeUp 0.8s ease 3s forwards;
}

@keyframes fadeUp {
	from { opacity: 0; transform: translateY(12px); }
	to { opacity: 1; transform: translateY(0); }
}

/* ========================================
   阅读进度条
   ======================================== */
.readProgress {
	position: fixed;
	top: 0;
	left: 0;
	width: 0%;
	height: 3px;
	background: linear-gradient(90deg, #677aff, #00c6ff);
	z-index: 10000;
	transition: width 0.1s ease;
	box-shadow: 0 0 10px rgba(103, 122, 255, 0.5);
}

/* ========================================
   首页快速入口
   ======================================== */
.quickLinks {
	display: flex;
	justify-content: center;
	gap: 30px;
	padding: 0 20px 40px;
	position: relative;
	z-index: 100;
	flex-wrap: wrap;
}

.quickLinkItem {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 16px;
	padding: 24px 40px;
	text-decoration: none;
	color: #fff;
	transition: all 0.3s ease;
	backdrop-filter: blur(10px);
}

.quickLinkItem:hover {
	background: rgba(88, 107, 240, 0.6);
	border-color: #677aff;
	transform: translateY(-4px);
	box-shadow: 0 8px 30px rgba(88, 107, 240, 0.3);
}

.quickLinkItem .quickIcon {
	font-size: 36px;
	line-height: 1;
}

.quickLinkItem .quickText {
	font-size: 15px;
	color: rgba(255, 255, 255, 0.9);
}

/* 查看全部按钮 */
.viewAllBtn {
	display: inline-block;
	padding: 12px 36px;
	background: rgba(255, 255, 255, 0.12);
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-radius: 30px;
	color: #fff;
	font-size: 16px;
	text-decoration: none;
	transition: all 0.3s ease;
}

.viewAllBtn:hover {
	background: #677aff;
	border-color: #677aff;
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(88, 107, 240, 0.3);
}

/* 响应式 - 快速入口 */
@media only screen and (max-width: 768px) {
	.quickLinks {
		gap: 15px;
	}
	.quickLinkItem {
		padding: 18px 28px;
		width: calc(50% - 30px);
		box-sizing: border-box;
	}
	.quickLinkItem .quickIcon {
		font-size: 28px;
	}
}

/* ========================================
   回到顶部按钮
   ======================================== */
.backToTop {
	position: fixed;
	bottom: 40px;
	right: 30px;
	width: 46px;
	height: 46px;
	background: rgba(88, 107, 240, 0.85);
	color: #fff;
	border: none;
	border-radius: 50%;
	font-size: 22px;
	line-height: 46px;
	text-align: center;
	cursor: pointer;
	z-index: 9999;
	opacity: 0;
	visibility: hidden;
	transition: all 0.3s ease;
	box-shadow: 0 4px 15px rgba(88, 107, 240, 0.3);
}

.backToTop.show {
	opacity: 1;
	visibility: visible;
}

.backToTop:hover {
	background: #586bf0;
	transform: translateY(-3px);
	box-shadow: 0 6px 25px rgba(88, 107, 240, 0.5);
}

/* ========================================
   搜索框
   ======================================== */
.searchBar {
	max-width: 600px;
	margin: 0 auto 20px;
	position: relative;
	z-index: 100;
}

.searchInput {
	width: 100%;
	padding: 14px 20px;
	border: 2px solid rgba(255,255,255,0.15);
	border-radius: 30px;
	font-size: 16px;
	color: #fff;
	background: rgba(255,255,255,0.08);
	outline: none;
	transition: all 0.3s;
	box-sizing: border-box;
	font-family: inherit;
}

.searchInput::placeholder {
	color: rgba(255,255,255,0.4);
}

.searchInput:focus {
	border-color: #677aff;
	background: rgba(255,255,255,0.12);
	box-shadow: 0 0 20px rgba(88, 107, 240, 0.15);
}

/* ========================================
   阅读时间
   ======================================== */
.readTime {
	display: inline-block;
	font-size: 13px;
	color: rgba(255,255,255,0.5);
	margin-left: 12px;
}

/* ========================================
   相关文章
   ======================================== */
.relatedPosts {
	width: 900px;
	margin: 0 auto 60px;
	position: relative;
	z-index: 100;
}

.relatedPosts h3 {
	font-size: 24px;
	color: #fff;
	font-weight: normal;
	margin-bottom: 25px;
	padding-bottom: 10px;
	border-bottom: 2px solid rgba(255,255,255,0.1);
}

.relatedList {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
}

.relatedItem {
	background: rgba(255,255,255,0.08);
	border-radius: 12px;
	padding: 20px;
	text-decoration: none;
	transition: all 0.3s;
	display: block;
}

.relatedItem:hover {
	background: rgba(255,255,255,0.15);
	transform: translateY(-2px);
}

.relatedItem .relTitle {
	font-size: 16px;
	color: #fff;
	margin-bottom: 8px;
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.relatedItem .relMeta {
	font-size: 12px;
	color: rgba(255,255,255,0.5);
}

/* ========================================
   文章目录 TOC
   ======================================== */
.postContentWrap {
	display: flex;
	gap: 30px;
	position: relative;
}

.tocSidebar {
	width: 220px;
	flex-shrink: 0;
	position: sticky;
	top: 80px;
	max-height: calc(100vh - 120px);
	overflow-y: auto;
	padding-right: 10px;
}

.tocSidebar::-webkit-scrollbar {
	width: 3px;
}

.tocSidebar::-webkit-scrollbar-thumb {
	background: rgba(255,255,255,0.2);
	border-radius: 3px;
}

.tocTitle {
	font-size: 13px;
	color: rgba(255,255,255,0.5);
	text-transform: uppercase;
	letter-spacing: 1px;
	margin-bottom: 12px;
	padding-bottom: 8px;
	border-bottom: 1px solid rgba(255,255,255,0.1);
}

.tocList {
	list-style: none;
	padding: 0;
	margin: 0;
}

.tocList li {
	margin-bottom: 4px;
}

.tocList a {
	display: block;
	padding: 5px 10px;
	font-size: 13px;
	color: rgba(255,255,255,0.6);
	text-decoration: none;
	border-radius: 4px;
	transition: all 0.2s;
	line-height: 1.4;
	border-left: 2px solid transparent;
}

.tocList a:hover,
.tocList a.active {
	color: #fff;
	background: rgba(103,122,255,0.15);
	border-left-color: #677aff;
}

.tocList .toc-h2 {
	padding-left: 10px;
}

.tocList .toc-h3 {
	padding-left: 24px;
	font-size: 12px;
}

/* 响应式 TOC */
@media only screen and (max-width: 1240px) {
	.tocSidebar {
		display: none;
	}
}

/* ========================================
   分享按钮
   ======================================== */
.shareBtn {
	display: inline-block;
	padding: 8px 18px;
	border-radius: 20px;
	color: #fff;
	font-size: 13px;
	text-decoration: none;
	margin: 0 4px;
	transition: all 0.2s;
}

.shareBtn:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* ========================================
   Google AdSense 广告样式
   ======================================== */
.adContainer {
	text-align: center;
	margin: 30px auto;
	padding: 20px;
	background: rgba(255, 255, 255, 0.05);
	border-radius: 12px;
	position: relative;
	z-index: 100;
	overflow: hidden;
	max-width: 100%;
}

.adContainer::before {
	content: "广告";
	position: absolute;
	top: 6px;
	right: 10px;
	font-size: 11px;
	color: rgba(255, 255, 255, 0.3);
	z-index: 1;
}

/* 联系表单消息 */
#formMessage {
	padding: 12px 16px;
	border-radius: 8px;
	font-size: 14px;
	margin-bottom: 15px;
	display: none;
}

#formMessage.success {
	display: block !important;
	background: #e8f5e9;
	color: #2e7d32;
	border: 1px solid #a5d6a7;
}

#formMessage.error {
	display: block !important;
	background: #fbe9e7;
	color: #c62828;
	border: 1px solid #ef9a9a;
}

/* 博客首页 - 文章列表 */
.blogContainer {
	width: 1200px;
	margin: 0 auto;
	position: relative;
	z-index: 100;
	padding-bottom: 80px;
}

.blogContainer .blogTit {
	text-align: center;
	padding: 80px 0 40px;
}

.blogContainer .blogTit h2 {
	font-size: 42px;
	color: #fff;
	font-weight: normal;
}

.blogContainer .blogTit span {
	width: 120px;
	height: 4px;
	border-radius: 2px;
	background: #677aff;
	display: inline-block;
	margin-top: 15px;
}

/* 文章卡片 - 毛玻璃效果 */
.postCard {
	background: rgba(255, 255, 255, 0.07);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 16px;
	margin-bottom: 25px;
	padding: 32px;
	overflow: hidden;
	transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	cursor: pointer;
	position: relative;
}

.postCard::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(135deg, rgba(103, 122, 255, 0.08), transparent 50%);
	opacity: 0;
	transition: opacity 0.4s;
	border-radius: 16px;
	pointer-events: none;
}

.postCard:hover {
	transform: translateY(-6px) scale(1.01);
	border-color: rgba(103, 122, 255, 0.25);
	box-shadow: 0 20px 60px rgba(88, 107, 240, 0.15);
	background: rgba(255, 255, 255, 0.1);
}

.postCard:hover::before {
	opacity: 1;
}

.postCard .postDate {
	color: rgba(255, 255, 255, 0.5);
}

.postCard h3 a {
	color: #fff;
}

.postCard .postSummary {
	color: rgba(255, 255, 255, 0.7);
}

.postCard .postDate {
	font-size: 13px;
	color: #999;
	margin-bottom: 10px;
}

.postCard .postDate .tag {
	display: inline-block;
	background: #677aff;
	color: #fff;
	padding: 2px 12px;
	border-radius: 20px;
	font-size: 12px;
	margin-left: 10px;
}

.postCard h3 {
	font-size: 24px;
	color: #202543;
	font-weight: normal;
	margin-bottom: 12px;
	line-height: 1.4;
}

.postCard h3 a {
	color: #202543;
	text-decoration: none;
}

.postCard h3 a:hover {
	color: #677aff;
}

.postCard .postSummary {
	font-size: 15px;
	color: #666;
	line-height: 1.8;
	margin-bottom: 15px;
}

.postCard .readMore {
	font-size: 14px;
	color: #677aff;
	text-decoration: none;
}

.postCard .readMore:hover {
	text-decoration: underline;
}

/* 文章详情页 */
.postDetail {
	width: 900px;
	margin: 0 auto;
	position: relative;
	z-index: 100;
	padding: 60px 0 80px;
}

.postDetail .postHeader {
	text-align: center;
	margin-bottom: 50px;
}

.postDetail .postHeader h1 {
	font-size: 36px;
	color: #fff;
	font-weight: normal;
	line-height: 1.4;
	margin-bottom: 15px;
}

.postDetail .postHeader .postMeta {
	font-size: 14px;
	color: rgba(255, 255, 255, 0.7);
}

.postDetail .postHeader .postMeta .tag {
	display: inline-block;
	background: #677aff;
	color: #fff;
	padding: 3px 14px;
	border-radius: 20px;
	font-size: 13px;
	margin: 0 4px;
}

.postDetail .postContent {
	background: rgba(255, 255, 255, 0.95);
	border-radius: 16px;
	padding: 50px;
	line-height: 2;
	font-size: 16px;
	color: #333;
	box-shadow: 0 4px 30px rgba(0,0,0,0.08);
}

/* 首字下沉 */
.postDetail .postContent > p:first-child::first-letter {
	font-size: 3.4em;
	float: left;
	padding-right: 10px;
	padding-top: 6px;
	line-height: 0.8;
	color: #677aff;
	font-weight: bold;
}

/* 文章链接下划线动画 */
.postDetail .postContent a {
	color: #677aff;
	text-decoration: none;
	background-image: linear-gradient(transparent calc(100% - 2px), #677aff 2px);
	background-repeat: no-repeat;
	background-size: 0% 100%;
	transition: background-size 0.3s ease;
}

.postDetail .postContent a:hover {
	background-size: 100% 100%;
}

/* 引用块美化 */
.postDetail .postContent blockquote {
	position: relative;
	border-left: none;
	padding: 20px 20px 20px 36px;
	margin: 25px 0;
	background: linear-gradient(135deg, #f8f9ff, #f0f2ff);
	border-radius: 0 12px 12px 0;
	color: #555;
	font-style: italic;
}

.postDetail .postContent blockquote::before {
	content: '"';
	position: absolute;
	left: 10px;
	top: 4px;
	font-size: 36px;
	color: #677aff;
	opacity: 0.3;
	font-family: Georgia, serif;
	line-height: 1;
}

/* 代码块美化 */
.postDetail .postContent pre {
	border-radius: 12px;
	padding: 24px;
	border: 1px solid rgba(255,255,255,0.06);
	position: relative;
}

.postDetail .postContent pre::before {
	content: attr(class);
	position: absolute;
	top: 10px;
	right: 16px;
	font-size: 11px;
	color: rgba(255,255,255,0.25);
	text-transform: uppercase;
	letter-spacing: 0.5px;
	font-style: normal;
}

/* 分隔线美化 */
.postDetail .postContent hr {
	border: none;
	height: 1px;
	background: linear-gradient(to right, transparent, rgba(103,122,255,0.25), transparent);
	margin: 40px 0;
}

/* 图片美化 */
.postDetail .postContent img {
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.postDetail .postContent img:hover {
	transform: scale(1.01);
	box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.postDetail .postContent h2 {
	font-size: 28px;
	color: #202543;
	margin: 40px 0 20px;
	font-weight: normal;
}

.postDetail .postContent h3 {
	font-size: 22px;
	color: #202543;
	margin: 30px 0 15px;
	font-weight: normal;
}

.postDetail .postContent p {
	margin-bottom: 20px;
}

.postDetail .postContent img {
	max-width: 100%;
	border-radius: 8px;
	margin: 20px 0;
}

.postDetail .postContent pre {
	background: #1e1e2e;
	border-radius: 10px;
	padding: 20px;
	overflow-x: auto;
	margin: 20px 0;
	font-size: 14px;
	line-height: 1.7;
	border: 1px solid rgba(255,255,255,0.08);
	position: relative;
}

.postDetail .postContent pre::before {
	content: attr(class);
	position: absolute;
	top: 8px;
	right: 14px;
	font-size: 11px;
	color: rgba(255,255,255,0.3);
	text-transform: uppercase;
}

.postDetail .postContent code {
	background: rgba(103, 122, 255, 0.12);
	padding: 2px 8px;
	border-radius: 4px;
	font-size: 13px;
	color: #e74c3c;
	font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
}

.postDetail .postContent pre code {
	background: none;
	padding: 0;
	color: #e6e6e6;
	font-size: 13px;
	line-height: 1.7;
	font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
}

.postDetail .postContent img {
	max-width: 100%;
	height: auto;
	border-radius: 10px;
	margin: 20px 0;
	box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.postDetail .postContent hr {
	border: none;
	height: 1px;
	background: linear-gradient(to right, transparent, rgba(103,122,255,0.3), transparent);
	margin: 30px 0;
}

.postDetail .postContent blockquote {
	border-left: 4px solid #677aff;
	padding: 15px 20px;
	margin: 20px 0;
	background: #f8f9ff;
	border-radius: 0 8px 8px 0;
	color: #555;
}

.postDetail .postContent ul,
.postDetail .postContent ol {
	margin: 15px 0;
	padding-left: 30px;
}

.postDetail .postContent li {
	margin-bottom: 8px;
}

.postDetail .postContent a {
	color: #677aff;
	text-decoration: underline;
}

.postDetail .postContent a:hover {
	color: #586bf0;
}

/* 文章导航（上一篇/下一篇） */
.postNav {
	display: flex;
	justify-content: space-between;
	margin-top: 40px;
	gap: 20px;
}

.postNav a {
	flex: 1;
	background: rgba(255, 255, 255, 0.1);
	border-radius: 10px;
	padding: 20px;
	color: #fff;
	text-decoration: none;
	transition: all 0.3s ease;
}

.postNav a:hover {
	background: rgba(255, 255, 255, 0.2);
}

.postNav .navLabel {
	font-size: 12px;
	color: rgba(255, 255, 255, 0.6);
	margin-bottom: 5px;
}

.postNav .navTitle {
	font-size: 16px;
	color: #fff;
}

.postNav .navRight {
	text-align: right;
}

/* 关于我页面 */
.aboutContainer {
	width: 900px;
	margin: 0 auto;
	position: relative;
	z-index: 100;
	padding: 60px 0 80px;
}

.aboutContainer .aboutCard {
	background: rgba(255, 255, 255, 0.95);
	border-radius: 16px;
	padding: 60px;
	text-align: center;
}

.aboutContainer .avatar {
	width: 140px;
	height: 140px;
	border-radius: 50%;
	border: 4px solid #677aff;
	margin: 0 auto 25px;
	overflow: hidden;
}

.aboutContainer .avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.aboutContainer .aboutCard h2 {
	font-size: 32px;
	color: #202543;
	font-weight: normal;
	margin-bottom: 8px;
}

.aboutContainer .aboutCard .subtitle {
	font-size: 16px;
	color: #677aff;
	margin-bottom: 30px;
}

.aboutContainer .aboutCard .bio {
	font-size: 16px;
	color: #555;
	line-height: 2;
	text-align: left;
	margin-bottom: 30px;
}

.aboutContainer .socialLinks {
	display: flex;
	justify-content: center;
	gap: 20px;
	flex-wrap: wrap;
}

.aboutContainer .socialLinks a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: #677aff;
	text-decoration: none;
	font-size: 15px;
	padding: 8px 20px;
	border: 1px solid #677aff;
	border-radius: 25px;
	transition: all 0.3s;
}

.aboutContainer .socialLinks a:hover {
	background: #677aff;
	color: #fff;
}

/* 标签云 */
.tagCloud {
	text-align: center;
	padding: 30px 0;
	position: relative;
	z-index: 100;
}

.tagCloud a {
	display: inline-block;
	padding: 6px 18px;
	margin: 5px;
	background: rgba(255, 255, 255, 0.15);
	border-radius: 20px;
	color: #fff;
	text-decoration: none;
	font-size: 14px;
	transition: all 0.3s;
}

.tagCloud a:hover {
	background: #677aff;
	transform: scale(1.05);
}

/* 分页 */
.pagination {
	text-align: center;
	padding: 40px 0;
	position: relative;
	z-index: 100;
}

.pagination a,
.pagination span {
	display: inline-block;
	padding: 8px 16px;
	margin: 0 4px;
	color: #fff;
	text-decoration: none;
	border-radius: 6px;
	transition: all 0.3s;
}

.pagination a:hover {
	background: rgba(255, 255, 255, 0.2);
}

.pagination .current {
	background: #677aff;
}

.pagination .disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

/* 加载状态 */
.loading {
	text-align: center;
	padding: 100px 0;
	color: rgba(255, 255, 255, 0.7);
	font-size: 18px;
	position: relative;
	z-index: 100;
}

.loading .spinner {
	display: inline-block;
	width: 40px;
	height: 40px;
	border: 3px solid rgba(255, 255, 255, 0.2);
	border-top-color: #677aff;
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
	margin-bottom: 15px;
}

@keyframes spin {
	to { transform: rotate(360deg); }
}

/* 空状态 */
.emptyState {
	text-align: center;
	padding: 100px 0;
	color: rgba(255, 255, 255, 0.6);
	font-size: 16px;
	position: relative;
	z-index: 100;
}

/* 归档页面 */
.archiveContainer {
	width: 900px;
	margin: 0 auto;
	position: relative;
	z-index: 100;
	padding: 60px 0 80px;
}

.archiveContainer .archiveYear {
	margin-bottom: 40px;
}

.archiveContainer .archiveYear h3 {
	font-size: 28px;
	color: #fff;
	font-weight: normal;
	margin-bottom: 20px;
	padding-bottom: 10px;
	border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.archiveContainer .archiveItem {
	display: flex;
	align-items: baseline;
	padding: 12px 20px;
	background: rgba(255, 255, 255, 0.08);
	border-radius: 8px;
	margin-bottom: 10px;
	transition: all 0.3s;
}

.archiveContainer .archiveItem:hover {
	background: rgba(255, 255, 255, 0.15);
}

.archiveContainer .archiveItem .date {
	font-size: 14px;
	color: rgba(255, 255, 255, 0.6);
	width: 80px;
	flex-shrink: 0;
}

.archiveContainer .archiveItem .title {
	font-size: 16px;
	color: #fff;
	text-decoration: none;
	flex: 1;
}

.archiveContainer .archiveItem .title:hover {
	color: #677aff;
}

/* 响应式 */
@media only screen and (max-width: 1240px) {
	.blogContainer {
		width: 90%;
	}
	.postDetail {
		width: 90%;
	}
	.aboutContainer {
		width: 90%;
	}
	.archiveContainer {
		width: 90%;
	}
	.postDetail .postContent {
		padding: 30px;
	}
	.aboutContainer .aboutCard {
		padding: 40px 30px;
	}
}

@media only screen and (max-width: 768px) {
	.blogContainer .blogTit h2 {
		font-size: 28px;
	}
	.postCard {
		padding: 20px;
	}
	.postCard h3 {
		font-size: 20px;
	}
	.postDetail .postHeader h1 {
		font-size: 26px;
	}
	.postDetail .postContent {
		padding: 20px;
		font-size: 15px;
	}
	.postNav {
		flex-direction: column;
	}
	.aboutContainer .aboutCard {
		padding: 30px 20px;
	}
	.archiveContainer .archiveItem {
		flex-direction: column;
	}
	.archiveContainer .archiveItem .date {
		width: auto;
		margin-bottom: 5px;
	}
}
