/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 基础样式 */
body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
.header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
    font-size: 24px;
    font-weight: bold;
}

.logo img {
    width: 40px;
    height: 40px;
    margin-right: 10px;
    border-radius: 8px;
}

/* 导航菜单 */
.nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    margin: 0 20px;
}

.nav-link {
    text-decoration: none;
    color: #666;
    font-weight: 500;
    padding: 10px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: #007bff;
    background-color: #f8f9fa;
}

/* 搜索框 */
.search-box {
    position: relative;
}

.search-form {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border-radius: 25px;
    padding: 5px;
    border: 2px solid #e9ecef;
    transition: border-color 0.3s ease;
}

.search-form:focus-within {
    border-color: #007bff;
}

.search-input {
    border: none;
    background: transparent;
    padding: 8px 15px;
    font-size: 14px;
    outline: none;
    width: 300px;
}

.search-btn {
    background: #007bff;
    border: none;
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-btn:hover {
    background: #0056b3;
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    display: none;
    z-index: 1000;
}

/* 主要内容区域 */
.main {
    padding: 30px 0;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
}

/* 文章列表 */
.article-list {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.section-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 25px;
    color: #333;
    position: relative;
    padding-bottom: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(45deg, #007bff, #0056b3);
    border-radius: 2px;
}

.article-item {
    padding: 25px 0;
    border-bottom: 1px solid #eee;
    transition: transform 0.3s ease;
}

.article-item:last-child {
    border-bottom: none;
}

.article-item:hover {
    transform: translateY(-2px);
}

.article-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
}

.article-title a {
    text-decoration: none;
    color: #333;
    transition: color 0.3s ease;
}

.article-title a:hover {
    color: #007bff;
}

.article-meta {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
}

.meta-item {
    margin-right: 20px;
    display: flex;
    align-items: center;
}

.meta-item i {
    margin-right: 5px;
}

.meta-item a {
    color: #666;
    text-decoration: none;
}

.meta-item a:hover {
    color: #007bff;
}

.article-excerpt {
    color: #666;
    line-height: 1.8;
    margin-bottom: 15px;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-link {
    display: inline-block;
    padding: 4px 12px;
    background: #f8f9fa;
    color: #666;
    text-decoration: none;
    border-radius: 15px;
    font-size: 12px;
    transition: all 0.3s ease;
}

.tag-link:hover {
    background: #007bff;
    color: white;
}

/* 分页导航 */
.pagination-container {
    margin-top: 40px;
    text-align: center;
}

.pagination {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 15px;
    color: #666;
    text-decoration: none;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 44px;
    justify-content: center;
}

.pagination-link:hover {
    color: #007bff;
    border-color: #007bff;
    background: #f8f9ff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,123,255,0.15);
}

.pagination-current {
    background: linear-gradient(45deg, #007bff, #0056b3);
    color: white;
    border-color: #007bff;
    font-weight: 600;
}

.pagination-first,
.pagination-last {
    font-size: 13px;
    padding: 10px 12px;
}

.pagination-prev,
.pagination-next {
    font-size: 13px;
    padding: 10px 12px;
}

.pagination-ellipsis {
    padding: 10px 5px;
    color: #999;
    font-weight: bold;
}

.pagination-info {
    color: #666;
    font-size: 14px;
    margin-top: 10px;
}

/* 响应式分页 */
@media (max-width: 768px) {
    .pagination {
        gap: 4px;
    }
    
    .pagination-link {
        padding: 8px 12px;
        font-size: 13px;
        min-width: 36px;
    }
    
    .pagination-first,
    .pagination-last,
    .pagination-prev,
    .pagination-next {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    .pagination-first span,
    .pagination-last span {
        display: none;
    }
    
    .pagination-info {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .pagination {
        gap: 2px;
    }
    
    .pagination-link {
        padding: 6px 10px;
        font-size: 12px;
        min-width: 32px;
    }
    
    .pagination-first,
    .pagination-last {
        display: none;
    }
}

/* 侧边栏 */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.widget {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.widget-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
    position: relative;
    padding-bottom: 10px;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: #007bff;
    border-radius: 1px;
}

/* 标签云 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    display: inline-block;
    padding: 6px 12px;
    background: #f8f9fa;
    color: #666;
    text-decoration: none;
    border-radius: 15px;
    font-size: 13px;
    transition: all 0.3s ease;
}

.tag:hover {
    background: #007bff;
    color: white;
    transform: translateY(-1px);
}

/* 分类列表 */
.category-list {
    list-style: none;
}

.category-item {
    margin-bottom: 10px;
}

.category-link {
    display: block;
    padding: 10px 15px;
    color: #666;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.category-link:hover {
    background: #f8f9fa;
    color: #007bff;
    transform: translateX(5px);
}

/* 广告位 */
.ad-widget,
.article-ad,
.home-bottom-ad,
.footer-ad {
    text-align: center;
    border-radius: 8px;
    overflow: hidden;
}

.ad-widget img,
.article-ad img,
.home-bottom-ad img,
.footer-ad img {
    width: 100%;
    height: auto;
    transition: transform 0.3s ease;
}

.ad-widget img:hover,
.article-ad img:hover,
.home-bottom-ad img:hover,
.footer-ad img:hover {
    transform: scale(1.05);
}

/* 底部 */
.footer {
    background: #333;
    color: #ccc;
    padding: 30px 0;
    margin-top: 50px;
}

.footer-content {
    text-align: center;
}

.footer-info p {
    margin-bottom: 5px;
}

.footer-ad {
    margin-top: 20px;
}

/* 文章详情页 */
.article-detail {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.article-header {
    margin-bottom: 30px;
    text-align: center;
}

.article-detail .article-title {
    font-size: 28px;
    margin-bottom: 20px;
    line-height: 1.4;
}

.article-content {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    margin: 20px 0 15px 0;
    font-weight: 600;
}

.article-content p {
    margin-bottom: 15px;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 15px 0;
}

.article-content blockquote {
    background: #f8f9fa;
    border-left: 4px solid #007bff;
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
}

.article-content code {
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}

.article-content pre {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 15px 0;
}

/* 相关文章 */
.related-articles,
.random-articles {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.related-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.related-item {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.related-item:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.related-item h4 {
    font-size: 16px;
    margin-bottom: 8px;
}

.related-item h4 a {
    color: #333;
    text-decoration: none;
}

.related-item h4 a:hover {
    color: #007bff;
}

.related-item .excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

/* 搜索页面 */
.search-results {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.search-info {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.search-result-item {
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-title {
    font-size: 18px;
    margin-bottom: 8px;
}

.search-result-title a {
    color: #333;
    text-decoration: none;
}

.search-result-title a:hover {
    color: #007bff;
}

.search-result-excerpt {
    color: #666;
    margin-bottom: 8px;
}

.search-result-meta {
    font-size: 14px;
    color: #999;
}

mark {
    background: #fff3cd;
    padding: 1px 3px;
    border-radius: 2px;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
    gap: 10px;
}

.pagination a,
.pagination span {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-decoration: none;
    color: #666;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.pagination .current {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-list {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav-item {
        margin: 5px 10px;
    }
    
    .search-input {
        width: 250px;
    }
    
    .main-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .article-list,
    .widget {
        padding: 20px;
    }
    
    .article-detail {
        padding: 25px;
    }
    
    .related-list {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 20px;
    }
    
    .article-title {
        font-size: 18px;
    }
    
    .article-detail .article-title {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .search-input {
        width: 200px;
    }
    
    .article-list,
    .widget {
        padding: 15px;
    }
    
    .article-detail {
        padding: 20px;
    }
    
    .meta-item {
        margin-right: 15px;
        font-size: 13px;
    }
    
    .load-more-btn {
        padding: 10px 25px;
        font-size: 14px;
    }
}

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

.article-item {
    animation: fadeIn 0.6s ease-out;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

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

::-moz-selection {
    background: #007bff;
    color: white;
}

/* 相关内容和推荐文章样式优化 */
.related-content,
.interest-content {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 50px 0;
    margin-top: 40px;
    position: relative;
    overflow: hidden;
}

.related-content::before,
.interest-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #007bff, #0056b3, #007bff);
    background-size: 200% 100%;
    animation: gradientMove 3s ease-in-out infinite;
}

@keyframes gradientMove {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.related-content h3,
.interest-content h3 {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 40px;
    text-align: center;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.related-content h3::after,
.interest-content h3::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(45deg, #007bff, #0056b3);
    border-radius: 2px;
    box-shadow: 0 2px 4px rgba(0,123,255,0.3);
}

.related-articles,
.interest-articles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
    padding: 0 20px;
}

.related-item,
.interest-item {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid #e9ecef;
    position: relative;
    overflow: hidden;
}

.related-item::before,
.interest-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #007bff, #0056b3);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.related-item:hover,
.interest-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0,123,255,0.15);
    border-color: #007bff;
}

.related-item:hover::before,
.interest-item:hover::before {
    transform: scaleX(1);
}

.related-item h4,
.interest-item h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.related-item h4 a,
.interest-item h4 a {
    color: #2c3e50;
    text-decoration: none;
    display: block;
    transition: all 0.3s ease;
}

.related-item:hover h4 a,
.interest-item:hover h4 a {
    color: #007bff;
    text-shadow: 0 1px 2px rgba(0,123,255,0.1);
}

.related-excerpt,
.interest-excerpt {
    font-size: 14px;
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.related-item:hover .related-excerpt,
.interest-item:hover .interest-excerpt {
    color: #495057;
}

.related-date,
.interest-date {
    font-size: 12px;
    color: #adb5bd;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.related-date::before,
.interest-date::before {
    content: '📅';
    font-size: 10px;
}

/* 加载动画 */
.related-articles.loading,
.interest-articles.loading {
    opacity: 0.6;
    pointer-events: none;
}

.related-articles.loading::after,
.interest-articles.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* 空状态样式 */
.related-articles:empty::after,
.interest-articles:empty::after {
    content: '暂无相关内容';
    display: block;
    text-align: center;
    color: #6c757d;
    font-size: 16px;
    padding: 40px;
    background: white;
    border-radius: 10px;
    border: 2px dashed #dee2e6;
}

/* 响应式优化 */
@media (max-width: 768px) {
    .related-content,
    .interest-content {
        padding: 30px 0;
    }
    
    .related-content h3,
    .interest-content h3 {
        font-size: 22px;
        margin-bottom: 25px;
    }
    
    .related-articles,
    .interest-articles {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 15px;
    }
    
    .related-item,
    .interest-item {
        padding: 20px;
    }
    
    .related-item h4,
    .interest-item h4 {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .related-content,
    .interest-content {
        padding: 25px 0;
        margin-top: 30px;
    }
    
    .related-content h3,
    .interest-content h3 {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .related-item,
    .interest-item {
        padding: 15px;
        border-radius: 10px;
    }
    
    .related-item h4,
    .interest-item h4 {
        font-size: 15px;
        margin-bottom: 8px;
    }
    
    .related-excerpt,
    .interest-excerpt {
        font-size: 13px;
        margin-bottom: 10px;
        -webkit-line-clamp: 2;
    }
}

/* 搜索建议样式 */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    display: none;
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
}

.search-suggestions.show {
    display: block;
}

.suggestion-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover,
.suggestion-item.active {
    background-color: #f8f9fa;
}

.suggestion-item:hover {
    color: #007bff;
}

/* 面包屑导航样式 */
.breadcrumb {
    background: #f8f9fa;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.breadcrumb a {
    color: #007bff;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb .separator {
    margin: 0 8px;
    color: #666;
}

.breadcrumb .current {
    color: #333;
    font-weight: 500;
}

/* 文章操作按钮样式 */
.article-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.article-actions .btn {
    padding: 10px 20px;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-decoration: none;
    color: #666;
    font-size: 14px;
    transition: all 0.3s ease;
    cursor: pointer;
    background: white;
}

.article-actions .btn:hover {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.article-actions .btn-secondary {
    background: #6c757d;
    color: white;
    border-color: #6c757d;
}

.article-actions .btn-secondary:hover {
    background: #5a6268;
    border-color: #545b62;
}

.article-actions .btn-outline {
    background: transparent;
    color: #007bff;
    border-color: #007bff;
}

.article-actions .btn-outline:hover {
    background: #007bff;
    color: white;
}

/* 标签页面样式 */
.tag-header {
    background: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.tag-title {
    font-size: 28px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.tag-title i {
    color: #007bff;
    margin-right: 10px;
}

.tag-description {
    color: #666;
    font-size: 16px;
    margin-bottom: 20px;
}

.related-tags {
    margin-top: 20px;
}

.related-tags h4 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

/* 加载动画 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    color: #666;
}

.loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

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

/* 响应式增强 */
@media (max-width: 768px) {
    .related-articles,
    .interest-articles {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .related-content,
    .interest-content {
        padding: 30px 0;
    }
    
    .related-content h3,
    .interest-content h3 {
        font-size: 20px;
    }
    
    .article-actions {
        flex-direction: column;
    }
    
    .article-actions .btn {
        text-align: center;
    }
    
    .tag-header {
        padding: 20px;
    }
    
    .tag-title {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .related-item,
    .interest-item {
        padding: 15px;
    }
    
    .breadcrumb {
        padding: 10px 15px;
        font-size: 13px;
    }
    
    .breadcrumb .separator {
        margin: 0 5px;
    }
}

/* 侧边栏随机推荐列表优化样式 */
.widget .article-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget .article-list li {
    margin-bottom: 15px;
    padding: 0;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.widget .article-list li:last-child {
    margin-bottom: 0;
}

.widget .article-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(45deg, #007bff, #0056b3);
    border-radius: 2px;
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.widget .article-list li:hover::before {
    transform: scaleY(1);
}

.widget .article-list li a {
    display: block;
    padding: 15px 20px 15px 15px;
    background: #f8f9fa;
    border-radius: 10px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.widget .article-list li a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.widget .article-list li:hover a {
    background: white;
    transform: translateX(8px);
    box-shadow: 0 8px 25px rgba(0,123,255,0.15);
}

.widget .article-list li:hover a::before {
    left: 100%;
}

.widget .article-list li h4 {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 8px 0;
    line-height: 1.4;
    color: #333;
    transition: color 0.3s ease;
}

.widget .article-list li:hover h4 {
    color: #007bff;
}

.widget .article-list li time {
    font-size: 12px;
    color: #999;
    display: flex;
    align-items: center;
    font-weight: 500;
}

.widget .article-list li time::before {
    content: '📅';
    margin-right: 6px;
    font-size: 11px;
}

.widget .article-list li:hover time {
    color: #666;
}

/* 随机推荐widget标题优化 */
.widget.random-widget .widget-title {
    background: linear-gradient(135deg, #007bff, #0056b3);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
    position: relative;
}

.widget.random-widget .widget-title::after {
    background: linear-gradient(45deg, #007bff, #0056b3);
    width: 40px;
    height: 3px;
}

.widget.random-widget .widget-title::before {
    content: '🎲';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    animation: rotate 3s linear infinite;
}

@keyframes rotate {
    from { transform: translateY(-50%) rotate(0deg); }
    to { transform: translateY(-50%) rotate(360deg); }
}

/* 底部推荐区域样式优化 */
.interest-content {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 50px 0;
    margin-top: 40px;
    position: relative;
    overflow: hidden;
}

.interest-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #007bff, #0056b3, #007bff);
    background-size: 200% 100%;
    animation: gradientMove 3s ease-in-out infinite;
}

.interest-content h3 {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 40px;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.interest-content h3::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(45deg, #007bff, #0056b3);
    border-radius: 2px;
}

.interest-articles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.interest-item {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0,123,255,0.1);
}

.interest-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #007bff, #0056b3);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.interest-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0,123,255,0.2);
    border-color: rgba(0,123,255,0.3);
}

.interest-item:hover::before {
    transform: scaleX(1);
}

.interest-item h4 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 15px 0;
    line-height: 1.4;
    color: #333;
}

.interest-item h4 a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
    display: block;
}

.interest-item:hover h4 a {
    color: #007bff;
}

.interest-excerpt {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.interest-item:hover .interest-excerpt {
    color: #555;
}

.interest-date {
    font-size: 12px;
    color: #999;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    position: relative;
}

.interest-date::before {
    content: '⏰';
    margin-right: 8px;
    font-size: 11px;
}

/* 加载状态和空状态 */
.interest-articles.loading {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.interest-articles.loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.interest-articles:empty::after {
    content: '暂无推荐内容';
    display: block;
    text-align: center;
    color: #999;
    font-size: 16px;
    padding: 60px 20px;
    border: 2px dashed #ddd;
    border-radius: 10px;
    background: #f8f9fa;
}

/* 响应式优化 */
@media (max-width: 768px) {
    .interest-content {
        padding: 30px 0;
    }

    .interest-content h3 {
        font-size: 24px;
        margin-bottom: 25px;
    }

    .interest-articles {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .interest-item {
        padding: 20px;
    }

    .interest-item h4 {
        font-size: 16px;
    }

    .widget .article-list li a {
        padding: 12px 15px 12px 12px;
    }

    .widget .article-list li:hover a {
        transform: translateX(5px);
    }
}

@media (max-width: 480px) {
    .interest-content {
        padding: 25px 0;
    }

    .interest-content h3 {
        font-size: 20px;
        letter-spacing: 1px;
    }

    .interest-item {
        padding: 18px;
        border-radius: 12px;
    }

    .interest-item h4 {
        font-size: 15px;
    }

    .interest-excerpt {
        font-size: 13px;
        -webkit-line-clamp: 2;
    }

    .widget .article-list li h4 {
        font-size: 14px;
    }

    .widget .article-list li a {
        padding: 10px 12px 10px 10px;
    }
}

/* ===== 全面响应式样式优化 ===== */

/* 基础响应式网格系统 */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col {
    flex: 1;
    padding: 0 15px;
}

.col-1 { flex: 0 0 8.333333%; }
.col-2 { flex: 0 0 16.666667%; }
.col-3 { flex: 0 0 25%; }
.col-4 { flex: 0 0 33.333333%; }
.col-6 { flex: 0 0 50%; }
.col-8 { flex: 0 0 66.666667%; }
.col-9 { flex: 0 0 75%; }
.col-12 { flex: 0 0 100%; }

/* 文章网格布局 - 默认3列显示9篇文章 */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 30px 0;
}

.article-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.15);
}

.article-card .card-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.article-card .card-content {
    padding: 20px;
}

.article-card .card-title {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 10px;
    color: #2c3e50;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card .card-title:hover {
    color: #007bff;
}

.article-card .card-excerpt {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card .card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #999;
}

.article-card .card-category {
    background: linear-gradient(45deg, #007bff, #0056b3);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 500;
}

/* 分页组件响应式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 40px 0;
    gap: 10px;
}

.pagination a,
.pagination span {
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    min-width: 44px;
    text-align: center;
}

.pagination a:hover {
    background: #007bff;
    color: white;
    border-color: #007bff;
    transform: translateY(-2px);
}

.pagination .current {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

/* 搜索框响应式 */
.search-container {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
}

.search-input {
    width: 100%;
    padding: 15px 50px 15px 20px;
    border: 2px solid #e1e5e9;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

.search-button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: #007bff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-button:hover {
    background: #0056b3;
    transform: translateY(-50%) scale(1.1);
}

/* 标签云响应式 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.tag-item {
    display: inline-block;
    padding: 8px 16px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 20px;
    text-decoration: none;
    color: #495057;
    font-size: 14px;
    transition: all 0.3s ease;
}

.tag-item:hover {
    background: #007bff;
    color: white;
    border-color: #007bff;
    transform: translateY(-2px);
}

/* ===== 平板设备响应式 (768px - 1024px) ===== */
@media (max-width: 1024px) {
    .container {
        max-width: 95%;
        padding: 0 20px;
    }
    
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .col-3, .col-4 {
        flex: 0 0 50%;
    }
    
    .col-6 {
        flex: 0 0 100%;
    }
    
    .header-nav {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .article-card .card-image {
        height: 180px;
    }
    
    .pagination {
        gap: 8px;
    }
    
    .pagination a,
    .pagination span {
        padding: 10px 14px;
        min-width: 40px;
    }
}

/* ===== 手机设备响应式 (最大768px) ===== */
@media (max-width: 768px) {
    .container {
        max-width: 100%;
        padding: 0 15px;
    }
    
    /* 文章网格改为单列 */
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin: 20px 0;
    }
    
    .article-card {
        margin-bottom: 0;
    }
    
    .article-card .card-image {
        height: 200px;
    }
    
    .article-card .card-content {
        padding: 15px;
    }
    
    .article-card .card-title {
        font-size: 16px;
    }
    
    .article-card .card-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    /* 所有列都变成全宽 */
    .col,
    .col-1, .col-2, .col-3, .col-4, .col-6, .col-8, .col-9, .col-12 {
        flex: 0 0 100%;
        margin-bottom: 20px;
    }
    
    .row {
        margin: 0 -10px;
    }
    
    .col {
        padding: 0 10px;
    }
    
    /* 导航菜单 */
    .header {
        padding: 15px 0;
    }
    
    .header-nav {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 10px;
    }
    
    .nav-menu a {
        padding: 12px 20px;
        border-radius: 8px;
        background: #f8f9fa;
        margin: 0;
    }
    
    /* 搜索框 */
    .search-container {
        max-width: 100%;
    }
    
    .search-input {
        padding: 12px 45px 12px 15px;
        font-size: 16px; /* 防止iOS缩放 */
    }
    
    .search-button {
        width: 35px;
        height: 35px;
    }
    
    /* 分页 */
    .pagination {
        gap: 5px;
        margin: 30px 0;
    }
    
    .pagination a,
    .pagination span {
        padding: 8px 12px;
        min-width: 36px;
        font-size: 14px;
    }
    
    /* 标签云 */
    .tag-cloud {
        gap: 8px;
    }
    
    .tag-item {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    /* 侧边栏 */
    .sidebar {
        margin-top: 30px;
    }
    
    .widget {
        margin-bottom: 25px;
    }
    
    .widget-title {
        font-size: 18px;
        margin-bottom: 15px;
    }
    
    /* 文章内容 */
    .article-content {
        padding: 20px 0;
    }
    
    .article-content h1 {
        font-size: 24px;
        line-height: 1.3;
    }
    
    .article-content h2 {
        font-size: 20px;
    }
    
    .article-content h3 {
        font-size: 18px;
    }
    
    .article-content p {
        font-size: 16px;
        line-height: 1.7;
        margin-bottom: 20px;
    }
    
    .article-content img {
        max-width: 100%;
        height: auto;
        border-radius: 8px;
    }
    
    /* 底部推荐内容 */
    .interest-content,
    .related-content {
        padding: 30px 0;
    }
    
    .interest-content h3,
    .related-content h3 {
        font-size: 20px;
        margin-bottom: 20px;
    }
}

/* ===== 小屏手机响应式 (最大480px) ===== */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .articles-grid {
        gap: 15px;
        margin: 15px 0;
    }
    
    .article-card .card-content {
        padding: 12px;
    }
    
    .article-card .card-title {
        font-size: 15px;
        line-height: 1.3;
    }
    
    .article-card .card-excerpt {
        font-size: 13px;
        -webkit-line-clamp: 2;
    }
    
    .article-card .card-image {
        height: 160px;
    }
    
    /* 搜索框 */
    .search-input {
        padding: 10px 40px 10px 12px;
        font-size: 16px;
    }
    
    .search-button {
        width: 32px;
        height: 32px;
        right: 4px;
    }
    
    /* 分页 */
    .pagination a,
    .pagination span {
        padding: 6px 10px;
        min-width: 32px;
        font-size: 13px;
    }
    
    /* 标签 */
    .tag-item {
        padding: 4px 8px;
        font-size: 12px;
    }
    
    /* 文章内容 */
    .article-content h1 {
        font-size: 20px;
    }
    
    .article-content h2 {
        font-size: 18px;
    }
    
    .article-content h3 {
        font-size: 16px;
    }
    
    .article-content p {
        font-size: 15px;
        line-height: 1.6;
        margin-bottom: 15px;
    }
    
    /* 导航菜单紧凑模式 */
    .nav-menu a {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    /* Widget优化 */
    .widget-title {
        font-size: 16px;
        margin-bottom: 12px;
    }
    
    .random-widget .article-list li a {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .random-widget .article-list li a h4 {
        font-size: 14px;
        line-height: 1.3;
    }
    
    .random-widget .article-list li a time {
        font-size: 11px;
    }
}

/* ===== 触摸设备优化 ===== */
@media (hover: none) and (pointer: coarse) {
    .article-card:hover {
        transform: none;
    }
    
    .article-card:active {
        transform: scale(0.98);
    }
    
    .pagination a:hover {
        transform: none;
    }
    
    .pagination a:active {
        transform: scale(0.95);
    }
    
    .tag-item:hover {
        transform: none;
    }
    
    .tag-item:active {
        transform: scale(0.95);
    }
    
    .search-button:hover {
        transform: translateY(-50%);
    }
    
    .search-button:active {
        transform: translateY(-50%) scale(0.9);
    }
}

/* ===== 高分辨率屏幕优化 ===== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .article-card {
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    }
    
    .article-card:hover {
        box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    }
    
    .search-input {
        border-width: 1px;
    }
    
    .tag-item {
        border-width: 1px;
    }
}

/* ===== 无障碍访问优化 ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .article-card:hover {
        transform: none;
    }
    
    .pagination a:hover {
        transform: none;
    }
    
    .tag-item:hover {
        transform: none;
    }
}

/* ===== 打印样式 ===== */
@media print {
    .header,
    .footer,
    .sidebar,
    .pagination,
    .search-container,
    .nav-menu {
        display: none !important;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .article-card {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }
    
    .article-content {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    .article-content h1,
    .article-content h2,
    .article-content h3 {
        break-after: avoid;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
} 