/* ========== 全局变量 ========== */
:root {
    --primary: #00d4ff;
    --primary-dark: #0099cc;
    --secondary: #7c3aed;
    --bg-dark: #0a0a0f;
    --bg-card: rgba(15, 25, 45, 0.7);
    --text: #e2e8f0;
    --text-dim: #94a3b8;
    --glow: 0 0 10px rgba(0, 212, 255, 0.5);
    --border-glow: 0 0 20px rgba(0, 212, 255, 0.2);
}

/* ========== 全局动画 ========== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 5px rgba(0, 212, 255, 0.3); }
    50% { box-shadow: 0 0 20px rgba(0, 212, 255, 0.6); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes rotateBg {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========== 主体背景 ========== */
body {
    background: linear-gradient(135deg, #0a0a0f 0%, #0f0f1a 25%, #0a0a0f 100%) fixed !important;
    color: var(--text) !important;
    font-family: 'JetBrains Mono', 'Fira Code', 'SF Mono', 'Microsoft YaHei', monospace !important;
    position: relative;
    overflow-x: hidden;
}

/* 动态粒子背景（需要配合js） */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(0, 212, 255, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* ========== 主容器 ========== */
#home {
    background: #0d1117 !important;
    border: 1px solid rgba(0, 212, 255, 0.2) !important;
    border-radius: 32px !important;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.05) !important;
    animation: fadeInUp 0.8s ease-out !important;
    position: relative;
    z-index: 1;
}

/* ========== 标题区域 ========== */
#blogTitle {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, rgba(124, 58, 237, 0.05) 100%) !important;
    border-radius: 24px !important;
    border: 1px solid rgba(0, 212, 255, 0.2) !important;
    position: relative;
    overflow: hidden;
}

#blogTitle::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(0, 212, 255, 0.05), transparent);
    transform: rotate(45deg);
    animation: rotateBg 6s linear infinite;
}

#blogTitle h1 a {
    font-size: 28px !important;
    background: linear-gradient(135deg, #fff, var(--primary)) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    color: transparent !important;
    font-weight: 800 !important;
    letter-spacing: -0.5px !important;
}

/* ========== 导航栏 ========== */
#navigator {
    background: #141e2b !important;
    border-radius: 50px !important;
    border: 1px solid rgba(0, 212, 255, 0.2) !important;
    padding: 0 !important;
    animation: glowPulse 3s infinite !important;
}

#navList li {
    float: left !important;
}

#navList li a {
    color: var(--text-dim) !important;
    font-weight: 500 !important;
    padding: 12px 24px !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    font-size: 14px !important;
    letter-spacing: 1px !important;
}

#navList li a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 0.3s ease;
}

#navList li a:hover::before,
#navList li a.active::before {
    width: 60%;
}

#navList li a:hover {
    color: var(--primary) !important;
    text-shadow: 0 0 8px rgba(0, 212, 255, 0.5) !important;
}

/* ========== 文章卡片 ========== */
.day, .entrylistItem {
    background: #111827 !important;
    border-radius: 24px !important;
    padding: 28px !important;
    margin-bottom: 30px !important;
    border: 1px solid rgba(0, 212, 255, 0.15) !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    overflow: hidden !important;
}

.day::before, .entrylistItem::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.1), transparent);
    transition: left 0.6s ease;
}

.day:hover::before, .entrylistItem:hover::before {
    left: 100%;
}

.day:hover, .entrylistItem:hover {
    transform: translateY(-8px) !important;
    border-color: rgba(0, 212, 255, 0.5) !important;
    box-shadow: 0 20px 40px -15px rgba(0,0,0,0.5), 0 0 0 1px rgba(0, 212, 255, 0.3) !important;
}

/* 文章标题 */
.postTitle a, .entrylistPosttitle a {
    font-size: 22px !important;
    font-weight: 700 !important;
    color: #fff !important;
    transition: all 0.3s ease !important;
    background: linear-gradient(120deg, #fff, var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent !important;
}

.postTitle a:hover, .entrylistPosttitle a:hover {
    transform: translateX(5px);
    display: inline-block;
}

/* 文章摘要 */
.postCon, .entrylistPostSummary {
    color: var(--text-dim) !important;
    line-height: 1.7 !important;
    font-size: 14px !important;
}

/* 文章信息 */
.postDesc, .entrylistItemPostDesc {
    color: #5a6e8a !important;
    background: none !important;
    padding: 12px 0 0 0 !important;
    border-top: 1px solid rgba(0, 212, 255, 0.15) !important;
    margin-top: 20px !important;
    font-size: 12px !important;
    font-family: monospace !important;
}

/* ========== 侧边栏 ========== */
.newsItem, .catListEssay, .catListLink, .catListPostCategory,
.catListPostArchive, .catListArticleArchive, .mySearch,
.catListBlogRank, .catListComment, .catListFeedback {
    background: #111827 !important;
    border-radius: 20px !important;
    border: 1px solid rgba(0, 212, 255, 0.15) !important;
    padding: 20px !important;
    margin-bottom: 25px !important;
    transition: all 0.3s ease !important;
}

.newsItem:hover, .catListEssay:hover {
    border-color: rgba(0, 212, 255, 0.4) !important;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.3) !important;
}

.catListTitle {
    color: var(--primary) !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    padding: 0 0 12px 0 !important;
    margin-bottom: 15px !important;
    border-bottom: 2px solid rgba(0, 212, 255, 0.3) !important;
    letter-spacing: 2px !important;
}

/* 侧边栏链接 - 高亮白色确保清晰可读 */
.catListEssay ul li a, .catListLink ul li a {
    color: #f1f5f9 !important;
    transition: all 0.3s ease !important;
    display: block !important;
    padding: 6px 0 !important;
    font-weight: 500 !important;
    font-size: 14px !important;
}

.catListEssay ul li a:hover, .catListLink ul li a:hover {
    color: var(--primary) !important;
    transform: translateX(5px) !important;
}

/* 搜索框 */
.input_my_zzk {
    background: rgba(20, 20, 35, 0.8) !important;
    border: 1px solid rgba(0, 212, 255, 0.3) !important;
    border-radius: 30px !important;
    padding: 8px 15px !important;
    color: var(--text) !important;
    transition: all 0.3s ease !important;
}

.input_my_zzk:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3) !important;
    outline: none !important;
}

.btn_my_zzk {
    background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
    border: none !important;
    border-radius: 30px !important;
    color: #fff !important;
    padding: 8px 20px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.btn_my_zzk:hover {
    transform: scale(1.05) !important;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.5) !important;
}

/* ========== 代码块 ========== */
.cnblogs_code {
    background: #0a0e1c !important;
    border-radius: 16px !important;
    border-left: 4px solid var(--primary) !important;
    position: relative !important;
    margin: 20px 0 !important;
    overflow-x: auto !important;
}

.cnblogs_code pre {
    background: transparent !important;
    font-family: 'Fira Code', 'JetBrains Mono', monospace !important;
    font-size: 13px !important;
    color: var(--text) !important;
}

.cnblogs_code_toolbar a {
    background: #1e293b !important;
    padding: 4px 12px !important;
    border-radius: 20px !important;
    font-size: 12px !important;
    transition: all 0.3s ease !important;
}

.cnblogs_code_toolbar a:hover {
    background: var(--primary) !important;
    color: #fff !important;
}

/* ========== 分页 ========== */
.Pager {
    text-align: center !important;
    margin: 40px 0 !important;
}

.Pager a, .Pager span {
    display: inline-block !important;
    padding: 8px 15px !important;
    margin: 0 5px !important;
    border-radius: 30px !important;
    background: rgba(0, 212, 255, 0.1) !important;
    border: 1px solid rgba(0, 212, 255, 0.2) !important;
    color: var(--text-dim) !important;
    transition: all 0.3s ease !important;
}

.Pager a:hover {
    background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
    color: #fff !important;
    transform: translateY(-2px) !important;
}

.Pager span.current {
    background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
    color: #fff !important;
    border-color: transparent !important;
}

/* ========== 评论区 ========== */
#comment_form {
    background: #111827 !important;
    border-radius: 20px !important;
    padding: 20px !important;
    border: 1px solid rgba(0, 212, 255, 0.15) !important;
}

.commentbox {
    background: rgba(20, 20, 35, 0.8) !important;
    border: 1px solid rgba(0, 212, 255, 0.2) !important;
    border-radius: 16px !important;
    color: var(--text) !important;
    padding: 12px !important;
    width: 100% !important;
}

.commentbox:focus {
    border-color: var(--primary) !important;
    outline: none !important;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.2) !important;
}

.feedbackListTitle {
    color: var(--primary) !important;
    font-weight: 600 !important;
    border-left: 3px solid var(--primary) !important;
    padding-left: 12px !important;
    margin: 20px 0 15px 0 !important;
}

.feedbackItem {
    background: rgba(0, 212, 255, 0.03) !important;
    border-radius: 16px !important;
    padding: 15px !important;
    margin-bottom: 15px !important;
    border: 1px solid rgba(0, 212, 255, 0.1) !important;
}

.blog_comment_body {
    color: var(--text-dim) !important;
    line-height: 1.6 !important;
}

/* ========== 页脚 ========== */
#footer {
    text-align: center !important;
    padding: 30px !important;
    color: #4a5a7a !important;
    font-size: 12px !important;
    border-top: 1px solid rgba(0, 212, 255, 0.15) !important;
    margin-top: 40px !important;
}

/* ========== 滚动条 ========== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #0a0a0f;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ========== 选中文字 ========== */
::selection {
    background: rgba(0, 212, 255, 0.3);
    color: #fff;
}

/* 1. 随笔档案 - 文章标题链接 */
.catListPostArchive ul li a,
.catListPostArchive li a,
#catListPostArchive ul li a {
    color: #f1f5f9 !important;
}
.catListPostArchive ul li a:hover,
.catListPostArchive li a:hover {
    color: #00d4ff !important;
}

/* 2. 随笔档案 - 括号里的数字（如 (1) ） */
.catListPostArchive ul li,
.catListPostArchive li {
    color: #94a3b8 !important;
}

/* 3. 阅读排行榜 - 文章标题链接 */
.catListBlogRank ul li a,
.catListBlogRank li a,
#catListBlogRank ul li a {
    color: #f1f5f9 !important;
}
.catListBlogRank ul li a:hover,
.catListBlogRank li a:hover {
    color: #00d4ff !important;
}

/* 4. 阅读排行榜 - 阅读次数 */
.catListBlogRank ul li,
.catListBlogRank li {
    color: #94a3b8 !important;
}

/* 5. 其他侧边栏模块 - 统一使用白色高亮文字 */
.newsItem ul li a,
.catListEssay ul li a,
.catListLink ul li a,
.catListPostCategory ul li a,
.mySearch,
#blog-calendar td a {
    color: #f1f5f9 !important;
    font-weight: 500 !important;
}

.newsItem ul li a:hover,
.catListEssay ul li a:hover,
.catListLink ul li a:hover,
.catListPostCategory ul li a:hover {
    color: #00d4ff !important;
}

.newsItem ul li,
.catListEssay ul li,
.catListLink ul li,
.catListPostCategory ul li {
    color: #cbd5e1 !important;
}


/* 1. 修复所有侧边栏链接颜色（包括昵称、园龄、粉丝、关注等） */
#sidebar a,
#sidebar a:link,
#sidebar a:visited,
#sidebar a:active,
.sidebar a,
.sidebar a:link,
.sidebar a:visited,
.profile-block a,
.profile-block a:link,
.profile-block a:visited,
#profile_block a,
#profile_block a:link,
#profile_block a:visited,
.newsItem a,
.newsItem a:link,
.newsItem a:visited {
    color: #f1f5f9 !important;
    font-weight: 500 !important;
}

/* 2. 修复鼠标悬停时的颜色 */
#sidebar a:hover,
.sidebar a:hover,
.profile-block a:hover,
#profile_block a:hover,
.newsItem a:hover {
    color: #00d4ff !important;
}

/* 3. 修复随笔档案文章标题 */
.catListPostArchive a,
.catListPostArchive a:link,
.catListPostArchive a:visited {
    color: #f1f5f9 !important;
}

.catListPostArchive a:hover {
    color: #00d4ff !important;
}


.catListBlogRank a:hover {
    color: #00d4ff !important;
}

/* 5. 修复普通文字（园龄、粉丝数字等） */
#profile_block,
.profile-block,
.catListPostArchive li,
.catListBlogRank li,
.newsItem li {
    color: #cbd5e1 !important;
}

/* 6. 修复搜索框和按钮 */
.input_my_zzk {
    background: rgba(20, 20, 35, 0.8) !important;
    border: 1px solid rgba(0, 212, 255, 0.3) !important;
    color: #e2e8f0 !important;
}

.btn_my_zzk {
    background: linear-gradient(135deg, #00d4ff, #7c3aed) !important;
    color: #fff !important;
}

/* 7. 修复日历链接 */
#blog-calendar a {
    color: #f1f5f9 !important;
}

#sidebar a,
.sidebar a,
div[id*="side"] a,
div[class*="side"] a {
    color: #f1f5f9 !important;
    font-weight: 500 !important;
}

#sidebar a:hover,
.sidebar a:hover {
    color: #00d4ff !important;
}

#blogTitle {
    margin-bottom: 25px !important;  /* 标题下方增加间距 */
}

#navigator {
    margin-top: 5px !important;      /* 导航栏上方增加间距 */
    margin-bottom: 30px !important;  /* 导航栏下方增加间距 */
}

/* ========== 修复导航栏边框和背景 ========== */

/* ========== 导航栏（增强版） ========== */
#navigator {
    background: #141e2b !important;
    border: 1px solid rgba(0, 212, 255, 0.35) !important;
    border-radius: 60px !important;
    padding: 0 25px !important;
    margin-top: 5px !important;
    margin-bottom: 30px !important;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.15) !important;
    animation: glowPulse 3s infinite !important;
    height: 48px !important;
    line-height: 48px !important;
    border-top: none !important;
    border-bottom: none !important;
    box-sizing: border-box !important;
}
#navigator:before,
#navigator:after{
    display: none !important;
    content: none !important;
}

#navList li {
    float: left !important;
    margin: 0 4px !important;
}

#navList li a {
    color: var(--text-dim) !important;
    font-weight: 500 !important;
    padding: 10px 18px !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    font-size: 14px !important;
    letter-spacing: 1px !important;
    line-height: 1 !important;
    border-radius: 10px !important;
}
#navList li a:hover {
    color: var(--primary) !important;
    background: rgba(0, 212, 255, 0.1) !important;
    text-shadow: 0 0 8px rgba(0, 212, 255, 0.5) !important;
}

#navList li a::before {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 0.3s ease;
}
#navList li a:hover::before,
#navList li a.active::before {
    width: 65%;
}

/* 右侧统计保持靠右对齐 */
#blogStats{
    float: right !important;
    line-height: 48px !important;
    padding-right: 5px;
    font-size: 13px;
}

/* ========== 文章正文区域（文章详情页可见性修复） ========== */
#cnblogs_post_body,
.postBody,
.entrylistPostSummary,
.postCon {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    overflow: visible !important;
    color: #e2e8f0 !important;
    background: transparent !important;
    font-size: 15px !important;
    line-height: 1.8 !important;
}

/* 防止父容器把内容裁掉 */
.day,
.entrylistItem {
    overflow: visible !important;
}

/* 查看全文按钮 */
#readmore,
.readmore,
a.readmore {
    display: inline-block !important;
}

/* 展开全文后卡片保持可见 */
.day, .entrylistItem {
    overflow: visible !important;
    box-shadow: 0 8px 25px -10px rgba(0,0,0,0.4) !important;
}

/* 文章正文容器 - 不加模糊不透明，保持清爽 */
#cnblogs_post_body {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    padding: 10px 0 0 0 !important;
}

/* 仅保留卡片本身基础阴影 */
.day:hover, .entrylistItem:hover {
    box-shadow: 0 12px 30px -12px rgba(0,0,0,0.5) !important;
}

/* ========== 文章详情页全局可读性增强 ========== */
/* 确保主内容区域文字清晰 */
#mainContent, #main {
    color: #e2e8f0 !important;
}

/* 文章内的段落文字 */
#cnblogs_post_body p,
#cnblogs_post_body div,
#cnblogs_post_body span,
#cnblogs_post_body li,
#cnblogs_post_body td,
#cnblogs_post_body th,
.postBody p,
.postBody div,
.postBody span,
.postBody li {
    color: #e2e8f0 !important;
}

/* 文章内的链接 */
#cnblogs_post_body a,
.postBody a {
    color: #00d4ff !important;
}

/* 文章内的标题 */
#cnblogs_post_body h1,
#cnblogs_post_body h2,
#cnblogs_post_body h3,
#cnblogs_post_body h4,
#cnblogs_post_body h5,
#cnblogs_post_body h6,
.postBody h1, .postBody h2, .postBody h3,
.postBody h4, .postBody h5, .postBody h6 {
    color: #f1f5f9 !important;
    border-bottom-color: rgba(0, 212, 255, 0.3) !important;
}

/* 文章内图片不透明度 */
#cnblogs_post_body img,
.postBody img {
    opacity: 1 !important;
}

/* 确保代码高亮区域文字可见 */
#cnblogs_post_body pre,
#cnblogs_post_body code,
.postBody pre,
.postBody code {
    color: #e2e8f0 !important;
}