.main-content {
    max-width: 950px;
    margin: 0 auto;
    padding: 20px 15px;
    box-sizing: border-box;
}

/* 文章标签容器 */
.article.tag-index {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

/* 模块容器 */
.portlet.light {
    padding: 25px;
}

/* 标题区域 */
.portlet-title {
    border-bottom: 2px solid #f0f3f6;
    margin-bottom: 25px;
    padding-bottom: 15px;
}

.caption-subject {
    display: block;
    font-size: 24px;
    color: #2c3e50;
    margin-bottom: 12px;
    font-weight: 600;
}

.portlet-title p {
    color: #7f8c8d;
    font-size: 14px;
    margin: 8px 0 0;
    line-height: 1.6;
}

/* 标签主体区域 */
.portlet-body {
    padding: 15px 0;
}

/* 标签云容器 */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0 -6px;
    justify-content: flex-start; /* 新增对齐方式 */
}

.tags a {
    /* 原始代码 */
    flex: 0 0 auto; /* 修改这里！把flex-grow设为0 */
    max-width: 220px; /* 新增最大宽度 */
    padding: 8px 18px;
    background: #f8f9fa;
    border-radius: 20px;
    color: #4a5568;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
    margin: 4px;
    white-space: nowrap; /* 防止文字换行 */
    overflow: hidden;
    text-overflow: ellipsis;
}

.tags a:hover {
    background: #ff9ec9;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(66,153,225,0.3);
    border-color: transparent;
}

/* 分页容器 */
.tagjuzhong {
    margin-top: 35px;
    text-align: center;
}

/* 分页样式 */
.tagjuzhong .page-item {
    display: inline-block;
    margin: 0 3px;
}

.tagjuzhong a, 
.tagjuzhong span {
    padding: 8px 16px;
    border-radius: 4px;
    color: #4a5568;
    text-decoration: none;
    transition: all 0.2s ease;
}

.tagjuzhong a {
    background: #edf2f7;
}

.tagjuzhong a:hover {
    background: #ff9ec9;
    color: #fff;
}

.tagjuzhong .active span {
    background: #4299e1;
    color: #fff;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .main-content {
        padding: 15px;
    }
    
    .portlet.light {
        padding: 20px;
    }
    
    .tags a {
        padding: 7px 15px;
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .caption-subject {
        font-size: 20px;
    }
    
    .portlet-title p {
        font-size: 13px;
    }
    
    .tags {
        gap: 8px;
    }
    
    .tags a {
        max-width: calc(50% - 20px); /* 移动端两列时保持等宽 */
        flex: 0 0 calc(50% - 20px);
    }
}

@media (max-width: 576px) {
    .portlet.light {
        padding: 15px;
    }
    
    .tags a {
        max-width: 100%; /* 手机端全宽 */
        flex: 0 0 100%;
    }
    
    .tagjuzhong a, 
    .tagjuzhong span {
        padding: 6px 12px;
        margin: 2px;
    }
}
/*内页*/
/* 总体容器 */
.article.tag-index {
    max-width: 950px;
    margin: 0 auto;
    padding: 20px;
    background: linear-gradient(145deg, #fff5f5 0%, #f0f3ff 100%);
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(255,105,180,0.15);
}

/* 通用卡片样式 */
.portlet.light {
    background: rgba(255,255,255,0.9);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid #ffe6f4;
    position: relative;
    overflow: hidden;
}

/* 顶部内容区 */
.top_list {
    display: flex;
    gap: 25px;
    margin-bottom: 30px;
    position: relative;
}

/* 图片容器 */
.top1_list_img {
    flex: 0 0 40%;
    border-radius: 10px;
    overflow: hidden;
    transform: rotate(-2deg);
    box-shadow: 8px 8px 0 rgba(255,182,193,0.3);
}

.top1_list_img img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.top1_list_img:hover img {
    transform: scale(1.05) rotate(1deg);
}

/* 文字描述区 */
.top1_list_p {
    flex: 1;
    position: relative;
}

.top1_list_p h1 {
    font-family: 'Comic Neue', cursive;
    color: #ff69b4;
    font-size: 2.5em;
    text-shadow: 2px 2px 0 #fff;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.top1_list_p h1:after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #ff69b4 0%, #9370db 100%);
}

.top1_list_p p {
    color: #666;
    font-size: 16px;
    line-height: 1.8;
    background: rgba(255,240,245,0.5);
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #ffb6c1;
    font-family: 'M PLUS Rounded 1c', sans-serif;
}

/* 相关内容标题 */
.caption .caption-subject {
    display: inline-block;
    padding: 8px 20px;
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
    color: white;
    border-radius: 25px;
    font-size: 1.2em;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    box-shadow: 3px 3px 5px rgba(0,0,0,0.1);
}

/* 文章列表 */
.pro-liebiao {
    list-style: none;
    padding: 0;
    /*columns: 2;*/
    column-gap: 30px;
}

.pro-liebiao li {
    margin-bottom: 12px;
    break-inside: avoid;
    padding: 10px;
    border-radius: 6px;
    transition: all 0.2s ease;
    position: relative;
}

.pro-liebiao li:before {
    content: "✦";
    color: #ff69b4;
    margin-right: 8px;
}

.pro-liebiao li:hover {
    background: rgba(255,182,193,0.1);
    transform: translateX(10px);
}

.pro-liebiao a {
    color: #6a5acd;
    text-decoration: none;
    font-family: 'M PLUS Rounded 1c', sans-serif;
}

.pro-liebiao a:hover {
    color: #ff69b4;
    text-decoration: underline wavy;
}

/* 分页样式 */
#pages {
    text-align: center;
    margin-top: 25px;
    padding: 15px 0;
}

#pages a {
    display: inline-block;
    padding: 8px 15px;
    margin: 0 3px;
    background: #fff;
    border: 1px solid #ffd1dc;
    border-radius: 20px;
    color: #ff69b4;
    transition: all 0.3s ease;
}

#pages a:hover {
    background: linear-gradient(45deg, #ff69b4, #ff8e8e);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(255,105,180,0.3);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .top_list {
        flex-direction: column;
    }
    
    .top1_list_img {
        flex: none;
        width: 100%;
        transform: none;
    }
    
    .pro-liebiao {
        columns: 1;
    }
    
    .article.tag-index {
        padding: 10px;
    }
}
