:root {
    --primary-color: #4A6CF7;
    --secondary-color: #1E293B;
    --text-color: #333647;
    --light-text: #64748B;
    --white: #FFFFFF;
    --light-bg: #F8FAFC;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --radius-md: 12px;
    --transition: all 0.4s ease;
}

/* 页面容器 */
.pictures-page {
    width: 100%;
    min-height: calc(100vh - 80px);
    background-color: var(--light-bg);
    padding: 40px 0;
}

/* 内容容器（统一） */
.content-container {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 16px;
}

/* 项目列表模块 - 使用与首页相同的网格布局 */
.projects-section {
    width: 100%;
}

/* 项目网格布局 - 与首页推荐项目卡片一致 */
.projects-grid {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0 !important;
    justify-content: space-between;
    min-height: 400px;
    position: relative;
}

/* 添加伪元素来修复最后一行布局 */
.projects-grid::after {
    content: '';
    flex: auto;
    width: 24.5%;
    height: 0;
    visibility: hidden;
}

/* 项目卡片项 - 固定高度+4列布局 */
.projects-grid .isotope-item {
    width: 24.5% !important;
    margin: 0 0 20px 0 !important;
    padding: 0 !important;
    position: relative !important;
    height: 360px !important;
    max-height: 360px !important;
    min-height: 360px !important;
    overflow: hidden !important;
    float: none !important;
    flex-shrink: 0;
    box-sizing: border-box;
}

/* 项目卡片 - 整卡跳转+高度继承 */
.item-post {
    background-color: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100% !important;
    max-height: 100% !important;
    display: flex;
    flex-direction: column;
    margin: 0 8px 20px 8px !important;
    position: relative;
    cursor: pointer;
    overflow: hidden !important;
}

.item-post:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

/* 整卡跳转链接覆盖 */
.item-post a.card-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    text-decoration: none;
}

/* 图片容器 - 固定高度，不占flex */
.pic-item {
    position: relative;
    width: 100%;
    height: 200px !important;
    overflow: hidden;
    flex: 0 0 auto !important;
}

.picno {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.item-post:hover .picno {
    transform: scale(1.08);
}

/* 半透明遮罩 */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.1);
}

/* 4D标识 + 热度显示 - 左上角 */
.meta-info {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: rgba(0,0,0,0.6);
    padding: 6px 12px;
    border-radius: 16px;
    color: var(--white);
    font-size: 13px;
}

.imdb {
    display: flex;
    align-items: center;
    gap: 4px;
}

.value {
    color: #FFD700;
    font-weight: 600;
}

/* 热度数字样式 */
.hot-count {
    color: var(--white);
    font-weight: 500;
}

/* 项目信息 - 固定高度，flex垂直分布，无多余间距 */
.text-item {
    padding: 16px;
    flex: 0 0 160px !important;
    max-height: 160px !important;
    min-height: 160px !important;
    display: flex;
    flex-direction: column;
    gap: 8px !important;
    overflow: hidden !important;
    box-sizing: border-box;
}

/* 标题 - 无底部外边距，仅行内溢出，与其他页面完全一致 */
.title {
    font-size: 16px;
    font-weight: 600;
    color: var(--secondary-color);
    margin: 0 !important;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 0 0 auto;
}

.title a {
    text-decoration: none;
    color: inherit;
}

/* 作者信息区域 - 无顶部外边距，仅自身行高，核心对齐点 */
.title .author-info {
    display: flex;
    align-items: center;
    margin: 0 !important;
    margin-top: 10px !important;
    padding: 0 !important;
    order: 1;
    flex: 0 0 auto;
}

/* 作者头像 - 严格限定尺寸+强制圆形+防止变形 */
.title .author-avatar {
    width: 28px !important;
    height: 28px !important;
    max-width: 28px !important;
    max-height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    object-position: center !important;
    border: 2px solid var(--light-bg) !important;
    flex-shrink: 0 !important;
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
}

.title .author-name {
    font-size: 13px;
    color: var(--light-text);
    margin-left: 8px;
    text-decoration: none;
    transition: color 0.3s ease;
    line-height: 1;
    margin: 0 0 0 8px !important;
}

.title .author-name:hover {
    color: var(--primary-color);
}

/* 确保作品标题在前，作者信息在后 */
.title > a:first-child {
    order: 0;
    margin: 0 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 移除旧的作者名样式 */
.title a span {
    display: none;
}

/* 标签样式 - 与首页/video页面完全一致的间距，核心修正！ */
.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding-top: 8px !important;
    border-top: 1px solid var(--light-bg);
    margin-top: 12px !important;
    order: 2;
    max-height: 60px !important;
    overflow: hidden !important;
    flex: 0 0 auto;
}

.tag-item {
    padding: 4px 10px;
    background-color: rgba(74, 108, 247, 0.1);
    color: var(--primary-color);
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    margin: 0 !important;
}

.tag-empty {
    color: var(--light-text);
    font-size: 12px;
    font-style: italic;
    margin: 0 !important;
}

/* 无数据样式 */
.no-data-wrap {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.no-data-text {
    font-size: 16px;
    color: var(--secondary-color);
    margin: 0;
    font-weight: 500;
}

.no-data-desc {
    font-size: 14px;
    color: var(--light-text);
    margin-top: 8px;
}

.no-data-text.error {
    color: #EF4444;
}

/* 响应式适配 - 全断点对齐其他页面间距+同步卡片高度 */
/* 1200px以下：3列 */
@media (max-width: 1200px) {
    .projects-grid .isotope-item {
        width: 32.5% !important;
        height: 340px !important;
        max-height: 340px !important;
        min-height: 340px !important;
    }
    .pic-item {
        height: 200px !important;
    }
    .text-item {
        flex: 0 0 140px !important;
        max-height: 140px !important;
        min-height: 140px !important;
        gap: 6px !important;
    }
    .projects-grid::after {
        width: 32.5%;
    }
    .project-tags {
        padding-top: 6px !important;
    }
}

/* 992px以下：2列 */
@media (max-width: 992px) {
    .projects-grid .isotope-item {
        width: 49% !important;
        height: 340px !important;
        max-height: 340px !important;
        min-height: 340px !important;
    }
    .pic-item {
        height: 200px !important;
    }
    .text-item {
        flex: 0 0 140px !important;
        max-height: 140px !important;
        min-height: 140px !important;
        gap: 6px !important;
    }
    .projects-grid::after {
        width: 49%;
    }
    .item-post {
        margin: 0 6px 20px 6px !important;
    }
    .project-tags {
        padding-top: 6px !important;
    }
}

/* 768px以下：2列，平板端 */
@media (max-width: 768px) {
    .pictures-page {
        padding: 30px 0;
    }
    .projects-grid .isotope-item {
        width: 49% !important;
        height: 320px !important;
        max-height: 320px !important;
        min-height: 320px !important;
    }
    .pic-item {
        height: 180px !important;
    }
    .text-item {
        flex: 0 0 140px !important;
        max-height: 140px !important;
        min-height: 140px !important;
        padding: 14px;
        gap: 6px !important;
    }
    .projects-grid::after {
        width: 49%;
    }
    .item-post {
        margin: 0 4px 16px 4px !important;
    }
    .title .author-avatar {
        width: 24px !important;
        height: 24px !important;
        max-width: 24px !important;
        max-height: 24px !important;
        min-width: 24px !important;
        min-height: 24px !important;
    }
    .title .author-name {
        font-size: 12px;
        margin-left: 6px !important;
    }
    .title {
        font-size: 15px;
    }
    .no-data-text {
        font-size: 14px;
    }
    .no-data-desc {
        font-size: 13px;
    }
    .project-tags {
        padding-top: 6px !important;
        gap: 5px;
    }
    .tag-item {
        padding: 3px 9px !important;
        font-size: 11px;
    }
}

/* 576px以下：手机端 */
@media (max-width: 576px) {
    .pictures-page {
        padding: 24px 0;
    }
    .content-container {
        padding: 0 12px;
    }
    .projects-grid .isotope-item {
        width: 49% !important;
        height: 280px !important;
        max-height: 280px !important;
        min-height: 280px !important;
    }
    .pic-item {
        height: 140px !important;
    }
    .text-item {
        flex: 0 0 140px !important;
        max-height: 140px !important;
        min-height: 140px !important;
        padding: 12px;
        gap: 5px !important;
    }
    .projects-grid::after {
        width: 49%;
    }
    .item-post {
        margin: 0 2px 12px 2px !important;
    }
    .title {
        font-size: 14px;
    }
    .title .author-avatar {
        width: 22px !important;
        height: 22px !important;
        max-width: 22px !important;
        max-height: 22px !important;
        min-width: 22px !important;
        min-height: 22px !important;
    }
    .title .author-name {
        font-size: 11px;
        margin-left: 6px !important;
    }
    .meta-info {
        top: 8px;
        left: 8px;
        padding: 4px 8px;
        font-size: 11px;
    }
    .project-tags {
        padding-top: 5px !important;
        gap: 4px;
    }
    .tag-item {
        padding: 3px 8px !important;
        font-size: 11px;
    }
}

/* 480px以下：小屏手机 */
@media (max-width: 480px) {
    .projects-grid .isotope-item {
        width: 49% !important;
        height: 260px !important;
        max-height: 260px !important;
        min-height: 260px !important;
    }
    .pic-item {
        height: 130px !important;
    }
    .text-item {
        flex: 0 0 130px !important;
        max-height: 130px !important;
        min-height: 130px !important;
        padding: 10px;
        gap: 4px !important;
    }
    .projects-grid::after {
        width: 49%;
    }
    .item-post {
        margin: 0 1px 10px 1px !important;
    }
    .title {
        font-size: 13px;
    }
    .title .author-avatar {
        width: 20px !important;
        height: 20px !important;
        max-width: 20px !important;
        max-height: 20px !important;
        min-width: 20px !important;
        min-height: 20px !important;
    }
    .title .author-name {
        font-size: 10px;
        margin-left: 4px !important;
    }
    .meta-info {
        top: 6px;
        left: 6px;
        padding: 3px 6px;
        font-size: 10px;
    }
    .project-tags {
        padding-top: 4px !important;
        gap: 4px;
    }
    .tag-item {
        padding: 2px 6px !important;
        font-size: 10px;
    }
}

/* 360px以下：超小屏 */
@media (max-width: 360px) {
    .projects-grid .isotope-item {
        width: 49% !important;
        height: 240px !important;
        max-height: 240px !important;
        min-height: 240px !important;
    }
    .pic-item {
        height: 110px !important;
    }
    .text-item {
        flex: 0 0 130px !important;
        max-height: 130px !important;
        min-height: 130px !important;
        padding: 8px;
        gap: 4px !important;
    }
    .projects-grid::after {
        width: 49%;
    }
    .item-post {
        margin: 0 1px 8px 1px !important;
    }
    .title {
        font-size: 12px;
    }
    .title .author-avatar {
        width: 18px !important;
        height: 18px !important;
        max-width: 18px !important;
        max-height: 18px !important;
        min-width: 18px !important;
        min-height: 18px !important;
    }
    .title .author-name {
        font-size: 9px;
        margin-left: 4px !important;
    }
    .meta-info {
        top: 5px;
        left: 5px;
        padding: 2px 5px;
        font-size: 9px;
    }
    .project-tags {
        padding-top: 4px !important;
        gap: 3px;
    }
    .tag-item {
        padding: 2px 5px !important;
        font-size: 9px;
    }
}

/* 280px以下：单列 */
@media (max-width: 280px) {
    .projects-grid .isotope-item {
        width: 100% !important;
        height: 250px !important;
        max-height: 250px !important;
        min-height: 250px !important;
    }
    .pic-item {
        height: 140px !important;
    }
    .text-item {
        flex: 0 0 110px !important;
        max-height: 110px !important;
        min-height: 110px !important;
        padding: 12px;
        gap: 6px !important;
    }
    .projects-grid::after {
        width: 100%;
    }
    .item-post {
        margin: 0 0 10px 0 !important;
    }
    .title {
        font-size: 14px;
    }
    .title .author-avatar {
        width: 24px !important;
        height: 24px !important;
        max-width: 24px !important;
        max-height: 24px !important;
        min-width: 24px !important;
        min-height: 24px !important;
    }
    .title .author-name {
        font-size: 12px;
        margin-left: 6px !important;
    }
    .meta-info {
        top: 8px;
        left: 8px;
        padding: 4px 8px;
        font-size: 11px;
    }
    .project-tags {
        padding-top: 6px !important;
    }
    .content-container {
        padding: 0 8px;
    }
}