/* ===================================
   现代化学术博客样式优化
   ================================== */

/* 全局渐变背景 */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 100%);
}

/* 导航栏优化 */
.navbar-custom {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.navbar-custom .navbar-brand {
    font-weight: 700;
    color: white !important;
    font-size: 24px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.navbar-custom .nav li a {
    color: rgba(255,255,255,0.9) !important;
    font-weight: 500;
    transition: all 0.3s ease;
}

.navbar-custom .nav li a:hover {
    color: white !important;
    background: rgba(255,255,255,0.1) !important;
    transform: translateY(-2px);
}

/* 头部优化 */
.intro-header {
    position: relative;
    background-size: cover;
    background-position: center;
}

.intro-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.7) 0%, rgba(118, 75, 162, 0.7) 100%);
}

.intro-header .site-heading,
.intro-header .post-heading,
.intro-header .page-heading {
    position: relative;
    z-index: 1;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
}

.intro-header .site-heading h1,
.intro-header .page-heading h1 {
    font-size: 60px;
    font-weight: 800;
    margin-bottom: 20px;
    animation: fadeInUp 1s ease;
}

/* 卡片样式优化 */
.post-preview {
    padding: 25px;
    margin-bottom: 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.post-preview:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.2);
    border-left-color: #667eea;
}

.post-preview a {
    text-decoration: none;
    color: inherit;
}

.post-title {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.post-preview:hover .post-title {
    color: #667eea;
}

.post-subtitle {
    font-size: 18px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
}

.post-meta {
    font-size: 14px;
    color: #999;
    margin-top: 15px;
}

.post-content-preview {
    font-size: 16px;
    color: #666;
    line-height: 1.8;
    margin-top: 15px;
}

/* 按钮样式优化 */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 25px;
    padding: 12px 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.4);
}

/* 分页器优化 */
.pager li > a,
.pager li > span {
    background: white;
    border: 2px solid #667eea;
    color: #667eea;
    border-radius: 25px;
    padding: 10px 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.pager li > a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* 侧边栏优化 */
.sidebar-container {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.sidebar-container h5 {
    color: #667eea;
    font-weight: 700;
    margin-bottom: 20px;
    font-size: 18px;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

/* 页脚优化 */
.site-footer {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 0;
    margin-top: 80px;
}

.site-footer a {
    color: white;
    transition: all 0.3s ease;
}

.site-footer a:hover {
    color: #ffd700;
    text-decoration: none;
}

/* 代码块优化 */
pre {
    background: #2d2d2d;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 4px;
    color: #e83e8c;
    font-family: 'Monaco', 'Menlo', monospace;
}

/* 引用块优化 */
blockquote {
    border-left: 4px solid #667eea;
    background: linear-gradient(to right, rgba(102, 126, 234, 0.05) 0%, transparent 100%);
    padding: 20px 25px;
    margin: 25px 0;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #555;
}

blockquote p {
    margin: 0;
    line-height: 1.8;
}

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

.fade-in {
    animation: fadeInUp 0.8s ease;
}

/* 徽章样式 */
.badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 5px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 8px;
}

/* 学术亮点卡片 */
.highlight-item {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border-top: 4px solid #667eea;
}

.highlight-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.2);
}

.highlight-item h4 {
    color: #667eea;
    font-weight: 700;
    margin-bottom: 15px;
    font-size: 20px;
}

/* 项目卡片 */
.project-item {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    border-left: 4px solid #28a745;
    transition: all 0.3s ease;
}

.project-item:hover {
    transform: translateX(5px);
    box-shadow: 0 6px 25px rgba(40, 167, 69, 0.2);
}

.project-item h3 {
    color: #28a745;
    font-weight: 700;
    margin-bottom: 15px;
}

/* 论文项目 */
.publication-item {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    border-left: 4px solid #ffc107;
    transition: all 0.3s ease;
}

.publication-item:hover {
    transform: translateX(5px);
    box-shadow: 0 6px 25px rgba(255, 193, 7, 0.2);
}

.publication-item h3 {
    color: #ffc107;
    font-weight: 700;
    margin-bottom: 15px;
}

/* 响应式优化 */
@media (max-width: 768px) {
    .intro-header .site-heading h1,
    .intro-header .page-heading h1 {
        font-size: 40px;
    }
    
    .post-title {
        font-size: 22px;
    }
    
    .highlight-item,
    .project-item,
    .publication-item {
        padding: 20px;
    }
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 选中文本样式 */
::selection {
    background: #667eea;
    color: white;
}

::-moz-selection {
    background: #667eea;
    color: white;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(102, 126, 234, 0.3);
    border-radius: 50%;
    border-top-color: #667eea;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 工具提示优化 */
.tooltip-inner {
    background: #667eea;
    border-radius: 8px;
    padding: 8px 15px;
}

/* 表格样式优化 */
table {
    width: 100%;
    margin: 25px 0;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

table td {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
}

table tr:hover {
    background: rgba(102, 126, 234, 0.05);
}

/* 图片优化 */
img {
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

img:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 25px rgba(0,0,0,0.15);
}

/* 链接样式 */
a {
    color: #667eea;
    transition: all 0.3s ease;
}

a:hover {
    color: #764ba2;
    text-decoration: none;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}