/* AI 文生图：复用 ai-3d 墨金基调，补充作品区布局 */
.t2i-page .home-content.t2i-content {
    padding-right: 34px;
    gap: 14px;
    justify-content: flex-start;
}

.t2i-title {
    padding: 28px 24px 8px;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.5px;
}

.t2i-right {
    flex: 1;
    min-width: 0;
    height: calc(100vh - 60px);
    overflow: auto;
    padding: 0 8px 24px 4px;
}

/* 对齐 3d-web：素材上方为「我的创作」banner，记录进「任务列表」页查看 */
.t2i-banner {
    width: 100%;
    padding-top: 16.8%;
    margin-bottom: 20px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    background: #0a0a0a url("/public/images/ai-3d/text2img/banner/work-bg.png") no-repeat center center / 100% 100%;
    border: 1px solid rgba(212, 175, 105, 0.18);
    transition: border-color .25s ease, transform .25s ease;
}
.t2i-banner:hover {
    border-color: rgba(212, 175, 105, 0.42);
    transform: translateY(-1px);
}
.t2i-banner-left {
    position: absolute;
    inset: 0 auto 0 0;
    width: 56%;
    padding-left: 4.2%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.t2i-banner-title {
    width: fit-content;
    font-size: clamp(22px, 2.1vw, 36px);
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1.2;
    background: linear-gradient(90deg, #f8e7b0 0%, #d4af69 48%, #b8893a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}
.t2i-banner-desc {
    font-weight: 350;
    font-size: clamp(12px, 0.9vw, 15px);
    color: #ffffff;
    line-height: 1.5;
    padding-top: 2.2%;
    opacity: .92;
}
.t2i-banner-go {
    width: 72px;
    height: 32px;
    margin-top: 3.2%;
    border-radius: 10px;
    background: rgba(20, 20, 20, 0.88);
    border: 1px solid rgba(212, 175, 105, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.t2i-banner-go span {
    width: 8px;
    height: 8px;
    border-right: 2px solid #f0d78c;
    border-top: 2px solid #f0d78c;
    transform: rotate(45deg);
    margin-left: -2px;
}
.t2i-banner:hover .t2i-banner-go {
    transform: translateX(4px);
    border-color: rgba(240, 215, 140, 0.75);
    background: rgba(30, 26, 16, 0.95);
}

.t2i-work-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.t2i-card {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    background: #121212;
    border: 1px solid rgba(255,255,255,.08);
    min-height: 220px;
}
.t2i-card-media {
    aspect-ratio: 1;
    background: #0a0a0a;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.t2i-card-media img.result {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.t2i-card-media .loading {
    width: 64px;
    height: 64px;
}
.t2i-card-fail {
    color: #aaa;
    font-size: 12px;
    text-align: center;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.t2i-card-fail img { width: 36px; }

.t2i-card-body {
    padding: 10px 12px 12px;
}
.t2i-card-prompt {
    font-size: 12px;
    color: #cfcfcf;
    line-height: 1.5;
    height: 36px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.t2i-card-meta {
    margin-top: 8px;
    font-size: 11px;
    color: #777;
    display: flex;
    justify-content: space-between;
}
.t2i-card-actions {
    position: absolute;
    right: 10px;
    top: 10px;
    display: none;
    gap: 6px;
}
.t2i-card:hover .t2i-card-actions { display: flex; }
.t2i-act {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: rgba(0,0,0,.55);
    border: 1px solid rgba(212,175,105,.25);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.t2i-act img { width: 16px; height: 16px; }
.t2i-act:hover { background: rgba(30,30,30,.85); }

.t2i-style-select {
    width: 220px !important;
    padding: 10px !important;
}
.t2i-style-select .select-list {
    width: 100% !important;
    height: auto !important;
    max-height: 280px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.t2i-style-select .style-item {
    flex-direction: column;
    margin: 0;
    padding: 6px;
    text-align: center;
}
.t2i-style-select .style-item img {
    width: 56px;
    height: 56px;
    border-radius: 8px;
}
.t2i-style-select .style-item span {
    padding: 6px 0 0;
    font-size: 11px;
}

.t2i-size-select {
    width: 220px !important;
}
.t2i-size-select .select-list-rate {
    width: 100% !important;
    height: auto !important;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.t2i-size-select .style-item {
    flex-direction: column;
    margin: 0;
    padding: 8px 4px;
}
.t2i-size-select .style-item img {
    width: 40px;
    height: 40px;
    background: transparent;
}
.t2i-size-select .style-item span {
    padding: 4px 0 0;
    text-align: center;
}

.t2i-preview {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0,0,0,.86);
    display: flex;
    align-items: center;
    justify-content: center;
}
.t2i-preview-inner {
    position: relative;
    max-width: min(92vw, 960px);
    max-height: 90vh;
}
.t2i-preview-inner img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 12px;
    display: block;
    margin: 0 auto;
}
.t2i-preview-close,
.t2i-preview-download {
    position: absolute;
    top: -42px;
    height: 32px;
    padding: 0 14px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 13px;
    text-decoration: none;
    display: flex;
    align-items: center;
}
.t2i-preview-close {
    right: 0;
    background: #262626;
    color: #d4af69;
}
.t2i-preview-download {
    right: 72px;
    background: linear-gradient(135deg, #d4af69, #f0d78c);
    color: #181818;
    font-weight: 600;
}

@media (max-width: 960px) {
    .t2i-page .home-content.t2i-content {
        flex-direction: column;
        height: auto;
        overflow: auto;
        padding: 12px;
    }
    .t2i-page .left-border {
        width: 100%;
        height: auto;
        min-height: 0;
    }
    .t2i-right {
        height: auto;
        min-height: 50vh;
        padding-top: 8px;
    }
    .t2i-banner {
        padding-top: 0;
        min-height: 120px;
        background-size: cover;
        background-position: right center;
    }
    .t2i-banner-left {
        width: 78%;
        padding: 16px 14px;
        position: relative;
    }
    .t2i-banner-title { font-size: 22px; }
    .t2i-banner-desc { padding-top: 8px; font-size: 13px; }
    .t2i-banner-go { margin-top: 12px; }
}

/* ===== 创意社区 ===== */
.t2i-community {
    margin-top: 8px;
    padding-bottom: 48px;
}

.t2i-tabs {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-bottom: 18px;
}

.t2i-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 16px;
    color: #767676;
    cursor: pointer;
    user-select: none;
    padding-bottom: 8px;
    position: relative;
}
.t2i-tab img {
    width: 20px;
    height: 20px;
    display: none;
}
.t2i-tab .off { display: block; }
.t2i-tab.active {
    color: #fff;
    font-weight: 600;
}
.t2i-tab.active .off { display: none; }
.t2i-tab.active .on { display: block; }
.t2i-tab.active::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 22px;
    height: 3px;
    border-radius: 8px;
    background: linear-gradient(90deg, #f0d78c 0%, #d4af69 100%);
}

/* 对齐 3d-web 创意社区：默认 5 列瀑布流，单卡更小 */
.t2i-masonry {
    column-count: 5;
    column-gap: 18px;
}
@media (max-width: 1400px) {
    .t2i-masonry { column-count: 4; }
}
@media (max-width: 1100px) {
    .t2i-masonry { column-count: 3; }
}
@media (max-width: 720px) {
    .t2i-masonry { column-count: 2; column-gap: 12px; }
}

/* 结构对齐 3d-web communityItem：悬浮展开更多信息 */
.t2i-citem {
    break-inside: avoid;
    margin-bottom: 18px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
}
.t2i-citem-media {
    position: relative;
    width: 100%;
    height: 0;
    background: #111;
    border-radius: 12px;
}
.t2i-citem-media img.cover {
    position: absolute;
    top: 0; bottom: 0; left: 0; right: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.t2i-citem-user {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    display: flex;
    align-items: center;
    padding: 0 12px 8px;
}
.t2i-citem-user .avatar {
    display: block;
    width: 24px; height: 24px; border-radius: 50%;
    object-fit: cover; background: #303030;
}
.t2i-citem-user .nickname {
    flex: 1; margin-left: 7px;
    font-size: 12px; color: #fff; font-weight: 500;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.t2i-citem-user .likes {
    display: flex; align-items: center;
    font-size: 12px; font-weight: 700; color: #fff;
}
.t2i-citem-user .likes img {
    display: block; width: 12px; height: 12px;
}
.t2i-citem-user .likes span { margin-left: 4px; }

.t2i-citem-more {
    height: 0;
    overflow: hidden;
    transition: all .3s ease;
}
.t2i-citem:hover .t2i-citem-more {
    display: block;
    height: 83px;
}
.t2i-citem:hover .t2i-citem-user .likes {
    display: none;
}

.t2i-citem-desc {
    margin: 0 auto 16px;
    padding: 0 12px;
    font-weight: 400;
    font-size: 12px; color: #fff; line-height: 16px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.t2i-citem-btns {
    display: flex;
    align-items: center;
    padding: 0 12px 19px;
}
.t2i-citem-btns .same {
    flex: 1;
    margin-right: 8px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    border-radius: 7px;
    font-weight: 400;
    font-size: 12px;
    color: #3d2e0e;
    background: linear-gradient(135deg, #d4af69 0%, #f0d78c 100%);
    cursor: pointer;
}
.t2i-citem-btns .like-btn {
    width: 40%;
    max-width: 84px;
    flex-shrink: 0;
    height: 32px;
    padding: 0 15px;
    border-radius: 7px;
    background: #111;
    border: 1px solid rgba(118, 118, 118, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 500;
    font-size: 12px;
    cursor: pointer;
}
.t2i-citem-btns .like-btn img {
    margin-right: 6px;
    height: 50%;
    width: auto;
    display: block;
}

.t2i-community-empty {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #8a8a8a;
    font-size: 13px;
}
.t2i-community-empty img { width: 72px; opacity: .85; }
