/* 基础样式重置和全局设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* 容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    text-decoration: none;
    display: inline-block;
}

.logo img {
    max-width: 100%;
    height: auto;
    max-height: 50px;
    display: block;
}

.logo:hover {
    color: #007bff;
}

/* 导航菜单样式 */
.nav-menu {
    display: flex;
    list-style: none;
}

.nav-menu li {
    margin-left: 30px;
    position: relative;
}

.nav-menu a {
    color: #333;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: color 0.3s ease;
    display: block;
    padding: 10px 0;
}

/* 下拉菜单样式 */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    list-style: none;
    padding: 8px 0;
    margin: 0;
    min-width: 150px;
    display: none;
    z-index: 1000;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    margin: 0;
}

/* 面包屑导航样式 */
.breadcrumb {
    background-color: #fff;
    padding: 8px 0;
    font-size: 14px;
    color: #666;
    border-bottom: 1px solid #eaeaea;
    margin-bottom: 20px;
}

.breadcrumb a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: #0056b3;
    text-decoration: underline;
}

.dropdown-menu a {
    padding: 8px 20px;
    font-size: 14px;
    color: #333;
    text-decoration: none;
    white-space: nowrap;
}

/* 文章元信息样式 */
.article-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin: 15px 0;
}

.download-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 8px 12px;
    background-color: #fff;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.download-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-color: #007bff;
}

.download-item span {
    font-size: 14px;
    color: #333;
}

.download-item i {
    color: #007bff;
    margin-right: 5px;
}

.copy-btn {
    margin-left: auto;
    padding: 6px 16px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
}

.copy-btn:active {
    transform: translateY(0);
}

.copy-btn.copied {
    background-color: #28a745;
}

/* 下载地址样式 */
.download-item span:first-child {
    flex: 1;
    word-break: break-all;
}

.download-item span:nth-child(2) {
    font-weight: 500;
    color: #666;
    white-space: nowrap;
}

.dropdown-menu a:hover {
    background-color: #f8f9fa;
    color: #007bff;
}

.nav-menu a:hover {
    color: #007bff;
}

/* 移动端菜单按钮 */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #333;
}

/* 主要内容样式 */
.main-content {
    padding: 40px 0;
}

.content-wrapper {
    display: flex;
    gap: 40px;
}

.main-column {
    flex: 1;
    min-width: 0;
}

.sidebar {
    width: 300px;
    flex-shrink: 0;
}

/* 文章列表样式 */
.post-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.post-item {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: row;
    max-height: 180px;
}

.post-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

/* 缩略图容器样式 */
.post-thumbnail-container {
    flex-shrink: 0;
    width: 200px;
    height: 180px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
}

/* 文章缩略图样式 */
.post-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-item:hover .post-thumbnail {
    transform: scale(1.05);
}

.post-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.post-category {
    display: inline-block;
    padding: 4px 12px;
    background-color: #007bff;
    color: #fff;
    font-size: 12px;
    border-radius: 4px;
    text-decoration: none;
    flex-shrink: 0;
    margin-right: 10px;
}

.post-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.3;
}

.post-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-title a:hover {
    color: #007bff;
}

.post-excerpt {
    color: #666;
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-info {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: #999;
    margin-top: auto;
    flex-wrap: wrap;
    gap: 10px;
}

.post-date {
    margin-right: 10px;
}

/* 侧边栏样式 */
.sidebar-section {
    background-color: #fff;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sidebar-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

/* 搜索框样式 */
.search-form {
    display: flex;
}

.search-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 14px;
}

.search-button {
    padding: 10px 20px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.search-button:hover {
    background-color: #0056b3;
}

/* 分类列表样式 */
.category-list {
    list-style: none;
}

.category-list li {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.category-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.category-list a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.category-list a:hover {
    color: #007bff;
}

.category-count {
    font-size: 12px;
    color: #999;
    background-color: #f0f0f0;
    padding: 2px 8px;
    border-radius: 10px;
}

/* 热门文章样式 */
.popular-posts {
    list-style: none;
    padding: 0;
    margin: 0;
}

.popular-posts li {
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.popular-posts li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.popular-post-thumbnail {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
    display: block;
}

.popular-post-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.popular-post-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 5px;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.popular-post-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.popular-post-title a:hover {
    color: #007bff;
}

.popular-post-excerpt {
    font-size: 12px;
    color: #666;
    line-height: 1.3;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* 友情链接区域样式 */
.friendship-links {
    background-color: #f8f9fa;
    padding: 15px 0;
    margin-top: 30px;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    text-align: center;
    margin-bottom: 15px;
    padding-bottom: 8px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background-color: #007bff;
}

.friendship-links-content {
    display: flex;
    justify-content: center;
    gap: 15px;
    overflow-x: auto;
    padding: 5px 0;
    white-space: nowrap;
}

.friend-link {
    display: inline-block;
    color: #999;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 12px;
}

.friend-link:hover {
    color: #007bff;
    text-decoration: underline;
}

/* 页脚样式 */
footer {
    background-color: #333;
    color: #fff;
    padding: 40px 0;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-column h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #555;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease, transform 0.2s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: #fff;
    transform: translateX(3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    margin-top: 30px;
    border-top: 1px solid #555;
    color: #999;
    font-size: 12px;
}

.beian-link {
    color: #999;
    text-decoration: none;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .content-wrapper {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        flex-direction: column;
        background-color: #fff;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
        padding: 20px 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        margin: 15px 0;
    }
    
    /* 移动端下拉菜单样式 */
    .dropdown-menu {
        position: static;
        box-shadow: none;
        padding-left: 20px;
        display: none;
    }
    
    .dropdown.active .dropdown-menu {
        display: block;
    }
    
    .dropdown-menu li {
        margin: 10px 0;
    }
    
    .post-list {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* 回到顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #007bff;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    font-size: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: #0056b3;
}

/* 标签云样式 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.tag {
    display: inline-block;
    padding: 6px 14px;
    background-color: #f8f9fa;
    color: #495057;
    text-decoration: none;
    border-radius: 16px;
    font-size: 14px;
    transition: all 0.3s ease;
    word-wrap: break-word;
    white-space: normal;
    line-height: 1.3;
    max-width: 100%;
}

/* 移除标签前的小点 */
.tag::before {
    content: none;
}

.tag:hover {
    background-color: #007bff;
    color: #fff;
    transform: translateY(-1px);
}

.tag:hover::before {
    color: #fff;
}

/* 响应式标签云调整 */
/* 已改为flex布局，无需额外断点设置 */

/* 侧边栏备注样式 */
.sidebar-note {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

/* 侧边栏按钮样式 */
.sidebar-button {
    display: inline-block;
    padding: 8px 16px;
    background-color: #007bff;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.sidebar-button:hover {
    background-color: #0056b3;
    color: #fff;
}

/* 阅读全文链接样式 */
.read-more {
    float: right;
    color: #007bff;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 2px 8px;
    border-radius: 3px;
}

.read-more:hover {
    color: #0056b3;
    background-color: #f8f9fa;
    transform: translateY(-1px);
}