/* ==========================================
   博客园现代化定制主题 - CSS代码
   ========================================== */

/* CSS变量定义 - 主题色彩系统 */
:root {
    --primary-color: #2c3e50;
    --accent-color: #3498db;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --border-color: #e1e8ed;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    background: url('https://images.unsplash.com/photo-1588594276800-2de0522b3b73?q=80&w=2670&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D') center center / cover no-repeat fixed;
    color: var(--text-primary);
    line-height: 1.8;
    font-size: 16px;
}

/* 主容器优化 */
#home {
    max-width: 1200px;
    margin: 40px auto;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 顶部导航栏美化 */
#header {
    background: 
        linear-gradient(135deg, rgba(44, 62, 80, 0.85), rgba(52, 73, 94, 0.85)),
        url('https://images.unsplash.com/photo-1588594276800-2de0522b3b73?q=80&w=2670&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D') center center / cover no-repeat;
    padding: 30px 40px;
    border: none;
    position: relative;
    overflow: hidden;
}

#header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120"><path d="M0,0 Q300,80 600,40 T1200,60 L1200,0 Z" fill="rgba(255,255,255,0.1)"/></svg>') no-repeat bottom;
    background-size: cover;
    opacity: 0.3;
}

#blogTitle {
    position: relative;
    z-index: 1;
}

#blogTitle h1 {
    font-size: 2.5em;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    margin: 0 0 10px 0;
    letter-spacing: -0.5px;
}

#blogTitle h2 {
    font-size: 1.1em;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
    margin: 0;
    letter-spacing: 0.5px;
}

/* 导航菜单美化 */
#navigator {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 0;
    margin: 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

#navList {
    display: flex;
    justify-content: center;
    gap: 5px;
    padding: 0;
    margin: 0;
    list-style: none;
}

#navList li {
    margin: 0;
}

#navList a {
    display: block;
    padding: 16px 24px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all var(--transition-fast);
    position: relative;
}

#navList a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transform: translateX(-50%);
    transition: width var(--transition-medium);
}

#navList a:hover {
    color: #667eea;
}

#navList a:hover::after {
    width: 60%;
}

/* 主体内容区域 */
#main {
    padding: 40px;
    background: var(--bg-primary);
}

#mainContent {
    min-height: 600px;
}

/* 文章列表优化 */
.day {
    background: var(--bg-primary);
    margin-bottom: 30px;
    padding: 0;
    border: none;
}

.dayTitle {
    display: none; /* 隐藏日期标题，使界面更简洁 */
}

.postTitle {
    font-size: 1.8em;
    font-weight: 700;
    margin: 0 0 15px 0;
    padding: 0;
    background: none;
}

.postTitle a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
    background: linear-gradient(to right, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.postTitle a:hover {
    opacity: 0.8;
}

.postCon {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 30px;
    background: var(--bg-primary);
    transition: all var(--transition-medium);
    box-shadow: var(--shadow-sm);
}

.postCon:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.postDesc {
    padding: 20px 0 0 0;
    color: var(--text-secondary);
    font-size: 0.9em;
    border-top: 1px solid var(--border-color);
    margin-top: 20px;
}

.postDesc a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.postDesc a:hover {
    color: #667eea;
}

/* 文章详情页优化 */
#cnblogs_post_body {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-primary);
}

#cnblogs_post_body h1,
#cnblogs_post_body h2,
#cnblogs_post_body h3,
#cnblogs_post_body h4,
#cnblogs_post_body h5,
#cnblogs_post_body h6 {
    margin: 1.5em 0 0.8em 0;
    font-weight: 700;
    color: var(--text-primary);
    position: relative;
    padding-left: 20px;
}

#cnblogs_post_body h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 2px;
}

#cnblogs_post_body p {
    margin: 1em 0;
}

#cnblogs_post_body a {
    color: #667eea;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all var(--transition-fast);
}

#cnblogs_post_body a:hover {
    border-bottom-color: #667eea;
}

#cnblogs_post_body img {
    max-width: 100%;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    margin: 20px 0;
    display: block;
}

#cnblogs_post_body blockquote {
    margin: 1.5em 0;
    padding: 20px 25px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    border-left: 4px solid #667eea;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
}

#cnblogs_post_body code {
    background: var(--bg-secondary);
    padding: 3px 8px;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
    color: #e74c3c;
}

#cnblogs_post_body pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 20px;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    margin: 1.5em 0;
    box-shadow: var(--shadow-sm);
}

#cnblogs_post_body pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* 侧边栏优化 */
.newsItem,
.catListEssay,
.catListLink,
.catListTag,
.catListPostArchive,
.catListImageCategory,
.catListArticleArchive,
.catListView,
.catListFeedback {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-md);
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-medium);
}

.newsItem:hover,
.catListEssay:hover,
.catListLink:hover,
.catListTag:hover,
.catListPostArchive:hover,
.catListImageCategory:hover,
.catListArticleArchive:hover,
.catListView:hover,
.catListFeedback:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.catListTitle,
h3.catListTitle {
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.2em;
    font-weight: 700;
    margin: 0 0 15px 0;
    padding: 0;
    border: none;
}

#sidebar_search input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: all var(--transition-fast);
}

#sidebar_search input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 评论区优化 */
.feedback_area_title {
    font-size: 1.5em;
    font-weight: 700;
    margin: 40px 0 20px 0;
    padding: 15px 0;
    border-bottom: 2px solid var(--border-color);
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.feedbackListSubtitle {
    background: var(--bg-secondary);
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
}

.feedbackCon {
    padding: 20px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
}

/* 页脚优化 */
#footer {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: rgba(255, 255, 255, 0.9);
    padding: 30px 40px;
    text-align: center;
    margin-top: 40px;
}

#footer a {
    color: #ffffff;
    text-decoration: none;
    transition: opacity var(--transition-fast);
}

#footer a:hover {
    opacity: 0.8;
}

/* 分页按钮美化 */
#nav_next_page a,
.pager a {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #ffffff;
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all var(--transition-medium);
    box-shadow: var(--shadow-sm);
}

#nav_next_page a:hover,
.pager a:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* 返回顶部按钮 */
#back-to-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-medium);
    z-index: 999;
}

#back-to-top.show {
    opacity: 1;
    visibility: visible;
}

#back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* 响应式设计 */
@media (max-width: 768px) {
    #home {
        margin: 20px;
        border-radius: var(--radius-md);
    }
    
    #header {
        padding: 20px;
    }
    
    #blogTitle h1 {
        font-size: 1.8em;
    }
    
    #main {
        padding: 20px;
    }
    
    #navList {
        flex-wrap: wrap;
    }
    
    #navList a {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .postCon {
        padding: 20px;
    }
    
    #back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

/* 加载动画 */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 选中文本样式 */
::selection {
    background: rgba(102, 126, 234, 0.3);
    color: var(--text-primary);
}

::-moz-selection {
    background: rgba(102, 126, 234, 0.3);
    color: var(--text-primary);
}