/* ============================================
   前端界面优化补丁
   添加更精致的视觉效果和交互体验
   ============================================ */

/* 1. 添加平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 2. 优化导航栏阴影效果 */
.navbar {
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
}

/* 3. 文章卡片悬停效果增强 */
.article-item {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.article-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, #667eea, #764ba2);
    transform: scaleY(0);
    transition: transform 0.4s ease;
}

.article-item:hover::before {
    transform: scaleY(1);
}

.article-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

/* 4. 搜索框动画 */
.search-box input {
    transition: all 0.3s ease;
}

.search-box input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

.search-box button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: all 0.3s ease;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.search-box button:hover {
    transform: translateX(2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* 5. 标签云美化 */
.tag-item {
    display: inline-block;
    padding: 6px 14px;
    margin: 4px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 20px;
    color: #555;
    font-size: 13px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.tag-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* 6. 热门文章列表优化 */
.hot-list li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 12px;
}

.hot-list li::before {
    content: '🔥';
    position: absolute;
    left: 0;
    font-size: 14px;
}

.hot-list li:nth-child(1)::before {
    content: '🥇';
}

.hot-list li:nth-child(2)::before {
    content: '🥈';
}

.hot-list li:nth-child(3)::before {
    content: '🥉';
}

/* 7. 按钮加载动画 */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

button:active {
    animation: pulse 0.3s ease;
}

/* 8. 分页美化 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.pagination button {
    padding: 10px 20px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination button:hover:not(:disabled) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination .page-info {
    display: flex;
    align-items: center;
    padding: 0 15px;
    color: #666;
    font-weight: 500;
}

/* 9. 个人卡片优化 */
.profile-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    border: 1px solid rgba(102, 126, 234, 0.2);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.avatar {
    border: 3px solid rgba(102, 126, 234, 0.2);
    transition: transform 0.3s ease;
}

.avatar:hover {
    transform: rotate(360deg);
}

/* 10. 社交链接图标化 */
.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #555;
    font-size: 16px;
    transition: all 0.3s ease;
    margin: 0 5px;
}

.social-links a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* 11. 文章摘要渐变遮罩 */
.article-excerpt {
    position: relative;
    background: linear-gradient(to bottom, #fff 0%, #fafbfc 100%);
}

/* 12. 分类徽章样式 */
.article-category a {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
}

.article-category a:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* 13. 阅读量统计图标 */
.article-views::before {
    content: '👁 ';
}

.article-date::before {
    content: '📅 ';
}

/* 14. 归档时间轴美化 */
.archive-timeline {
    position: relative;
    padding-left: 30px;
}

.archive-timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, #667eea, #764ba2);
}

.archive-item {
    position: relative;
    margin-bottom: 20px;
}

.archive-item::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
}

/* 15. 评论区域美化 */
.comment-item {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
}

.comment-item:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.comment-avatar {
    border-radius: 50%;
    width: 50px;
    height: 50px;
    border: 2px solid #eee;
}

/* 16. 代码块美化 */
pre {
    border-radius: 8px;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.05);
}

/* 17. 响应式优化 */
@media (max-width: 768px) {
    .nav-menu {
        gap: 15px;
        font-size: 14px;
    }
    
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .article-item:hover {
        transform: none;
    }
    
    .tag-item {
        font-size: 12px;
        padding: 4px 10px;
    }
}

/* 18. 加载动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.article-item {
    animation: fadeInUp 0.6s ease forwards;
}

/* 19. 空状态美化 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

/* 20. Footer 美化 */
.footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: rgba(255, 255, 255, 0.8);
    padding: 30px 20px;
    margin-top: 50px;
}

.footer a {
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.footer a:hover {
    color: white;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}
