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

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background-color: #fff5f8;
    color: #444444;
    line-height: 1.6;
}

/* 容器样式 */
.w_1200 {
    width: 1200px;
    margin: 0 auto;
    box-sizing: border-box;
}

/* 主内容区域布局 */
.main-content {
    width: 1200px;
    margin:20px auto 20px auto;
    display: flex;
    gap: 20px;
}

/* 文章列表区域 - 880px宽度 */
.article-list-container {
    flex: 0 0 860px;
    width: 860px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

/* 侧边栏区域 - 320px宽度 */
.sidebar {
    flex: 0 0 320px;
    width: 320px;
    margin-left: 0px;
    position: sticky;
    top: 20px;
    align-self: flex-start;
}

/* 合集头部样式 */
.collection-header {
    padding: 20px 0;
    color: white;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
}


.collection-header-inner {
    display: flex;
    position: relative;
    align-items:center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}


.collection-header-inner:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transform: translateY(-5px);
  -webkit-transition: all 0.3s;
  -moz-transition: all 0.3s;
  -ms-transition: all 0.3s;
  -o-transition: all 0.3s;
  transition: all 0.3s;
}


.collection-cover {
    width: 268px;
    height: 200px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    margin-right: 30px;
    flex-shrink: 0;
    background-color: #444444;
    border: 5px solid rgba(255, 255, 255, 0.2);
}

.collection-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.collection-cover:hover img {
    transform: scale(1.05);
}

.collection-info {
    flex: 1;
    color: #444444;
}
.collection-btn{
    flex: 0 0 180px;
}

.collection-title {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: var(--theme-color);
    text-shadow: none;
    letter-spacing: -0.5px;
}

.collection-meta {
    font-size: 14px;
    margin-bottom: 15px;
    display: flex;
    gap: 20px;
    color: #666;
}

.collection-meta span {
    background: url(../img/uptime.png) no-repeat;
        padding-left: 26px;
}
.collection-meta span.date{
    background-position: -3px -5px;
}
.collection-meta span.num{
    background-position: 2px -27px;

}
.collection-meta b{
    font-weight:600;
    color: #fd737d;
    padding:0px 2px;
    
}

.collection-desc {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
    max-width: 700px;
    color: #666;
    opacity: 1;
}

/* 按钮样式 */
.btn-download {
    display: inline-block;
    background: linear-gradient(135deg, var(--theme-color) 0%, var(--theme-color) 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 24px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(169,204,255, 0.3);
    border: none;
    cursor: pointer;
    border: 2px solid var(--theme-color);
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(169,204,255,, 0.4);
    border-color: var(--theme-color);
    color: #fff;    
}

/* 分类导航 */
.category-nav {
    width: 1200px;
    margin: 30px auto 20px auto;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 20px;
}

.category-nav h3 {
    margin: 0 0 20px 0;
    font-size: 20px;
    color: var(--theme-color);
    font-weight: 600;
}

.category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.category-item {
    padding: 10px 24px;
    background: #f0f5ff;
    border-radius: 30px;
    color: var(--theme-color);
    font-size: 15px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    font-weight: 500;
}

.category-item:hover {
    background: var(--theme-color);
    color: white;
    border-color: var(--theme-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 109, 255, 0.3);
}

.category-item.active {
    background: var(--theme-color);
    color: white;
    border-color: var(--theme-color);
    box-shadow: 0 4px 12px rgba(0, 109, 255, 0.3);
}

.category-item .count {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    margin-left: 6px;
}

/* 文章列表区域 */
#article-list {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

/* 子合集区域 */
.sub-collection-section {
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
}

.sub-collection-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}


.sub-collection-cover {
    float: left;
    margin-right: 20px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.sub-collection-cover img {
    width: 118px;
    height: auto;
    transition: transform 0.3s ease;
}

.sub-collection-cover:hover img {
    transform: scale(1.05);
}

.sub-collection-info {
    overflow: hidden;
}

.sub-collection-title {
    font-size: 24px;
    color: var(--theme-color);
    margin-bottom: 10px;
    font-weight: 600;
}

.sub-collection-desc {
    color: #666;
    line-height: 1.6;
}

/* 文章列表样式 */
.collection-articles {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
}

.sub-collection-articles {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
}

.collection-article-item {
    background: #fafafa;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    padding: 15px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    width: calc(50% - 10px); 
}

.collection-article-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    background: white;
}

.collection-article-item:hover .article-link{
   color: var(--theme-color);
}

.collection-article-item img{
    flex: 0 0 90px;
    width: 90px;
    height: 90px;
    margin-right: 20px;
    float: left;
    border-radius: 10px;
}

.article-link {
    font-size: 19px;
    font-weight: 500;
    margin: 0px 0 10px 0;
    line-height: 1.2;
    color: #444444;
    display: block;
    transition: color 0.3s ease;
}
.article-jianjie{
    flex:1;
}
.article-jianjie p{
    width: 100%;
    display: flex;
    gap: 10px;
}

.article-jianjie p span.article-date{
    flex:0 0 60%;
}
.article-jianjie p span.article-views{
    flex:1;
}
.article-excerpt em{
    width: 40px;
    font-size: 13px;
    font-style: normal;
    margin-right: 5px;
    height: 19px;
    float: left;
    color: #458aff;
    line-height: 19px;
    background: url(../img/bg-blues.png) no-repeat;
    padding-left: 5px;
}

.btn-down {
    flex: 0 0 90px;
    width: 90px;
    padding: 5px 15px;
    background: var(--theme-color2);
    color: #fff;
    border-radius: 8px;
}
.btn-down:hover {
  color: #fff;
  background: var(--theme-color);
}

.btn-info{
    display: flex;
    align-items: center;
    justify-items: baseline;
}
.btn-info span {
  flex: 1;
  color: #979797;
  line-height: 24px;
}

.btn-info b {
    font-size: 24px;
    color: #fd737d;
}

.article-date ,.article-views{
    margin: 0px 0px 10px 0px;
    font-size: 13px;
    color: #999;
}
.article-date font ,.article-views font{
    color: #565656;
}

.article-excerpt {
    width: 100%;
    color: #515151;
    font-size: 14px;
    line-height: 1.6;
    margin: 15px 0px 0px 0px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
    font-size: 14px;
    font-weight: 500;
}

.pagination a:hover {
    background: var(--theme-color);
    color: white;
    border-color: var(--theme-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 109, 255, 0.3);
}

.pagination .current {
    background: var(--theme-color);
    color: white;
    border-color: var(--theme-color);
}

/* 侧边栏组件 */
.sidebar-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.sidebar-section h3 {
    font-size: 18px;
    color: var(--theme-color);
    margin-bottom: 20px;
    font-weight: 600;
    position: relative;
    padding-bottom: 10px;
}

.sidebar-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--theme-color);
}

/* 相关合集 */
.related-collections {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.related-collections h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: var(--theme-color);
    font-weight: 600;
    position: relative;
    padding-bottom: 10px;
}

.related-collections h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--theme-color);
}

.related-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.related-item {
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
}

.related-item:hover {
    transform: translateY(-3px);
}

.related-cover {
    width: 100%;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 8px;
    background-color: #f0f0f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.related-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-item:hover .related-cover img {
    transform: scale(1.05);
}

.related-title {
    font-size: 14px;
    color: #444444;
    font-weight: 500;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 40px;
}

/* 热门/最新文章列表 */
.popular-articles, .latest-articles {
    list-style: none;
    padding: 0;
    margin: 0;
}

.popular-articles li, .latest-articles li {
    margin-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.popular-articles li:last-child, .latest-articles li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.popular-articles a, .latest-articles a {
    text-decoration: none;
    color: #444444;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.5;
}

.popular-articles a:hover, .latest-articles a:hover {
    color: var(--theme-color);
}

.popular-articles .article-meta, .latest-articles .article-meta {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

/* 无文章提示 */
.no-articles, .no-collections {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    color: #999;
    font-size: 16px;
}

.no-articles svg, .no-collections svg {
    margin-bottom: 20px;
    opacity: 0.5;
}

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

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

.collection-article-item:nth-child(2) {
    animation-delay: 0.1s;
}

.collection-article-item:nth-child(3) {
    animation-delay: 0.2s;
}

.collection-article-item:nth-child(4) {
    animation-delay: 0.3s;
}

/* 响应式设计 - PC端 */
@media (min-width: 1025px) {
    .sidebar-mobile-toggle {
        display: none;
    }
}

/* 响应式设计 - 平板端 (768px - 1024px) */
@media (max-width: 1024px) {
    .w_1200 {
        width: 100%;
    }
    
    .main-content {
        flex-direction: column;
    }
    
    .article-list-container,
    .sidebar {
        flex: 1;
        width: 100%;
    }
    
    .sidebar {
        position: static;
        margin-top: 30px;
    }
    
    .related-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .collection-title {
        font-size: 36px;
    }
    
    .collection-cover {
        width: 180px;
        height: 180px;
    }
    
    /* 平板端调整为2列布局 */
    .collection-article-item {
        width: calc(50% - 10px); /* 2列布局，考虑间距 */
    }
}

/* 响应式设计 - 手机端 (小于768px) */
@media (max-width: 768px) {
    .collection-header {
        padding: 30px 0;
    }
    
    .collection-header-inner {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }
    
    .collection-cover {
        margin: 0 auto 20px auto;
        width: 120px;
        height: 120px;
    }
    
    .collection-title {
        font-size: 24px;
    }
    
    .collection-desc {
        max-width: 100%;
        font-size: 14px;
    }
    
    .collection-meta {
        font-size: 14px;
    }
    
    .category-nav {
        padding: 20px;
    }
    
    .category-list {
        gap: 8px;
    }
    
    .category-item {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    #article-list {
        padding: 20px;
    }
    
    .sub-collection-section {
        margin-bottom: 30px;
        padding-bottom: 30px;
    }
    
    .sub-collection-cover {
        float: none;
        margin: 0 auto 15px auto;
        max-width: 120px;
    }
    
    .sub-collection-info {
        text-align: center;
    }
    
    .sub-collection-title {
        font-size: 20px;
    }
    
    .collection-article-item {
        flex-direction: column;
        text-align: center;
        padding: 15px;
        width: 100%; /* 手机端调整为1列布局 */
    }
    
    .collection-article-item img {
        float: none;
        margin: 0 auto 10px auto;
    }
    
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .sidebar-section {
        padding: 20px;
    }
    
    .pagination {
        margin-top: 30px;
    }
    
    .pagination a {
        width: 35px;
        height: 35px;
        font-size: 13px;
    }
}

/* 响应式设计 - 小手机端 (小于480px) */
@media (max-width: 480px) {
    .w_1200 {
        padding: 0 15px;
    }
    
    .collection-title {
        font-size: 22px;
    }
    
    .collection-cover {
        width: 100px;
        height: 100px;
    }
    
    .btn-download {
        padding: 12px 24px;
        font-size: 16px;
    }
    
    .category-nav h3,
    .sidebar-section h3 {
        font-size: 16px;
    }
    
    /* 小手机端保持1列布局 */
    .collection-article-item {
        width: 100%;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
    
    .related-cover {
        height: 120px;
    }
    
    .sub-collection-title {
        font-size: 18px;
    }
}