:root {
    --primary: #1980FA;
    --primary-hover: #0e6ed4;
    --primary-light: #EDF5FF;
    --accent: #ffadd2;
    --accent-light: #ffdeed;
    --bg: #f5f6f8;
    --surface: #FFFFFF;
    --text: rgba(0, 0, 0, 0.85);
    --text-secondary: rgba(0, 0, 0, 0.55);
    --text-muted: rgba(0, 0, 0, 0.35);
    --border: #EBEBEB;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
}

.top-bar {
    max-width: 1440px;
    margin: 0 auto;
    padding: 24px 24px 0;
}

.page-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.page-title .icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--primary), #6366f1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    color: #fff;
    flex-shrink: 0;
}

.info-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.count {
    font-size: 14px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.count strong {
    color: var(--text);
    font-weight: 700;
}

.search-box {
    flex: 1;
    max-width: 360px;
    min-width: 200px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 7px 14px;
    transition: border-color .2s, box-shadow .2s;
}

.search-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(25, 128, 250, 0.1);
}

.search-box input {
    background: none;
    border: none;
    outline: none;
    color: var(--text);
    font-size: 13px;
    width: 100%;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-box .icon {
    color: var(--text-muted);
    font-size: 14px;
    flex-shrink: 0;
}

.filter-row {
    max-width: 1440px;
    margin: 0 auto;
    padding: 14px 24px 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 13px;
    white-space: nowrap;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all .2s;
}

.filter-tab:hover {
    color: var(--primary);
    border-color: var(--primary);
}

.filter-tab.active {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}

.sort-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 36px 8px 14px;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    outline: none;
    transition: all .25s ease;
    margin-left: auto;
    min-width: 130px;
    line-height: 1.5;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.sort-select:hover {
    border-color: var(--primary-light, #b3d4ff);
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.sort-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(64, 128, 255, 0.12);
}

.sort-select option {
    padding: 6px 10px;
    font-size: 13px;
}

/* 自定义下拉框 */
.custom-select {
    position: relative;
    margin-left: auto;
    min-width: 130px;
    user-select: none;
    z-index: 20;
}

.custom-select .select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    background: #fff;
    border: 1px solid #e2e6ed;
    border-radius: 10px;
    padding: 8px 14px;
    cursor: pointer;
    transition: all .25s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    font-size: 13px;
    color: #333;
    line-height: 1.5;
}

.custom-select .select-trigger:hover {
    border-color: #4080ff;
    box-shadow: 0 2px 8px rgba(64,128,255,0.10);
}

.custom-select.open .select-trigger {
    border-color: #4080ff;
    box-shadow: 0 0 0 3px rgba(64,128,255,0.12);
}

.custom-select .select-arrow {
    display: flex;
    align-items: center;
    color: #999;
    transition: transform .25s ease;
    flex-shrink: 0;
}

.custom-select.open .select-arrow {
    transform: rotate(180deg);
}

.custom-select .select-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #eaecf0;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.10);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: all .22s ease;
    padding: 4px;
    overflow: hidden;
}

.custom-select.open .select-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.custom-select .select-option {
    padding: 9px 14px;
    font-size: 13px;
    color: #555;
    cursor: pointer;
    border-radius: 8px;
    transition: all .18s ease;
    line-height: 1.5;
}

.custom-select .select-option:hover {
    background: #f5f7fa;
    color: #333;
}

.custom-select .select-option.active {
    background: #eef3ff;
    color: #4080ff;
    font-weight: 500;
}

/* 加载更多 */
.loading-more {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 30px 0 40px;
    color: #999;
    font-size: 14px;
}

.loading-more .spinner {
    width: 20px;
    height: 20px;
    border: 2.5px solid #e2e6ed;
    border-top-color: #4080ff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 骨架屏占位符 */
@keyframes smoothShimmer {
    0% { background-position: -400% 0; }
    100% { background-position: 400% 0; }
}

.skeleton-grid {
    column-count: 4;
    column-gap: 16px;
    padding: 16px 0;
}

.skeleton-card {
    break-inside: avoid;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
    background: #e9ecef;
}

.skeleton-img {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #e9ecef 0%, #f0f2f4 35%, #f5f6f8 50%, #f0f2f4 65%, #e9ecef 100%);
    background-size: 400% 100%;
    animation: smoothShimmer 8s ease-in-out infinite;
}

.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 24px 40px;
}

#message-wrapper .asset-grid {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

#message-wrapper .grid-col {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.card {
    break-inside: avoid;
    /*margin-bottom: 16px;*/
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all .25s;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.card:hover {
    border-color: #d0d5dd;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.card img {
    width: 100%;
    display: block;
    transition: transform .3s;
}

.card:hover img {
    transform: scale(1.03);
}

.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, transparent 55%);
    opacity: 0;
    transition: opacity .25s;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 12px;
}

.card:hover .card-overlay {
    opacity: 1;
}

.card-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.card-btn {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    border: none;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    backdrop-filter: blur(4px);
    transition: all .2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-btn .iconfont {
    font-size: 12px;
}

.card-btn:hover {
    background: rgba(255, 255, 255, 0.35);
}

.card-btn.download {
    background: var(--primary);
}

.card-btn.download:hover {
    background: var(--primary-hover);
}

.card-model {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 6px;
    background: rgba(0, 0, 0, 0.25);
    padding: 3px 10px;
    border-radius: 4px;
    align-self: flex-start;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 300;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}

.lightbox.open {
    display: flex;
}

.lightbox img {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.25);
}

.empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.empty .iconfont {
    font-size: 50px;
    color: #ccc;
}

#message-wrapper-scroll {
    overflow-y: auto;
    overflow-x: hidden;
    background-color: #f5f6f8;
}

.empty .icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.yh-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    background: var(--text);
    color: #fff;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-size: 14px;
    opacity: 0;
    transition: opacity .3s;
    pointer-events: none;
    box-shadow: var(--shadow-md);
}

.yh-toast.show {
    opacity: 1 !important;
}

/*图片预览弹窗*/
.mask_box{display:none;position: fixed;top: 0;left: 0;transition: left 0.5s ease;right: 0;bottom: 0;background-color: rgba(0, 0, 0, 0.3);z-index: 999;align-items: center;justify-content: center;}
.mask_box .box{display:none;position: relative;width:460px;background-color: #fff;border-radius: 12px;padding:30px 28px;box-shadow: 10px 20px 15px rgba(0, 0, 0, 0.1)}
.mask_box .box .close::before,
.mask_box .box .close::after {cursor: pointer;content: '';position: absolute;top: -5px !important;right: -20px !important;width: 15px;height: 1px;background-color: #b5b5b5;transform: translate(-50%, -50%);}
.mask_box .box .close::before {transform: translate(-50%, -50%) rotate(45deg);}
.mask_box .box .close::after {transform: translate(-50%, -50%) rotate(-45deg);}
.mask_box .img_preview_box{width: 100% !important;height: 100vh;border-radius: 0;padding:20px 6% !important;}
.mask_box .img_preview_box .content_box{display: grid;grid-template-columns: 50px auto;}
.mask_box .img_preview_box .content_box .close{cursor:pointer;width: 36px;height: 36px;border-radius: 5px;display: flex;justify-content: center;align-items: center;background-color: #E5E7EB90;}
.mask_box .img_preview_box .content_box .close:hover{background-color: #E5E7EB60;}
.mask_box .img_preview_box .content_box .c_right{padding:16px;display: grid;grid-template-columns: 70% 458px;gap: 20px;border-radius: 15px;background-color: #fff;height: calc(100vh - 40px);}
.mask_box .img_preview_box .content_box .c_right .sub_left{display: flex;flex-direction: column;height: 100%;}
.mask_box .img_preview_box .content_box .c_right .sub_left .sub{display: flex;justify-content: center;align-items: center;}
.mask_box .img_preview_box .content_box .c_right .sub_left .sub_top{height:40px;display: flex;justify-content: right;align-items: center;gap: 10px;}
.mask_box .img_preview_box .content_box .c_right .sub_left .sub_top .btn{cursor:pointer;width: 36px;height: 36px;border-radius: 3px;background-color: #E5E7EB90;color:#333;display: flex;justify-content: center;align-items: center;}
.mask_box .img_preview_box .content_box .c_right .sub_left .sub_top .btn:hover{background-color: #E5E7EB60;}
.mask_box .img_preview_box .content_box .c_right .sub_left .img_box{
    flex:auto;padding:30px 0;display: flex;justify-content: center;align-items: center;
    background-image: radial-gradient(circle, #999 1px, transparent 1px);
    background-size: 20px 20px;background-repeat: repeat;
    min-height: 400px;
    max-height: 84vh;
}
.mask_box .img_preview_box .content_box .c_right .sub_left .img_box img{max-width:100%;max-height: 100%;border-radius: 8px;}
.mask_box .img_preview_box .content_box .c_right .sub_left .img_box img:hover{cursor: zoom-in;}
.mask_box .img_preview_box .content_box .c_right .sub_left .switch_box{height: 40px;line-height:40px;display: flex;align-items: center;gap: 5px;}
.mask_box .img_preview_box .content_box .c_right .sub_left .switch_box .slide{cursor: pointer;}
.mask_box .img_preview_box .content_box .c_right .sub_right{position: relative;}
.mask_box .img_preview_box .content_box .c_right .sub_right .sr_top .sub_box{margin-top:10px;border-radius: 6px;padding:12px;background-color: #F3F5F9;}
.mask_box .img_preview_box .content_box .c_right .sub_right .sr_top .img_list_wrapper{display: flex;align-items: center;position: relative;}
.mask_box .img_preview_box .content_box .c_right .sub_right .sr_top .img_list_wrapper .scroll_left,
.mask_box .img_preview_box .content_box .c_right .sub_right .sr_top .img_list_wrapper .scroll_right{cursor: pointer;width: 24px;height: 24px;border-radius: 50%;background-color: rgba(0,0,0,0.5);color: #fff;display: flex;justify-content: center;align-items: center;position: absolute;z-index: 10;top: 50%;transform: translateY(-50%);font-size: 12px;}
.mask_box .img_preview_box .content_box .c_right .sub_right .sr_top .img_list_wrapper .scroll_left{left: 0;}
.mask_box .img_preview_box .content_box .c_right .sub_right .sr_top .img_list_wrapper .scroll_right{right: 0;}
.mask_box .img_preview_box .content_box .c_right .sub_right .sr_top .img_list{display: flex;align-items: center;gap: 2px;overflow-x: auto;overflow-y: hidden;width: 100%;scrollbar-width: none;-ms-overflow-style: none;}
.mask_box .img_preview_box .content_box .c_right .sub_right .sr_top .img_list::-webkit-scrollbar{display: none;}
.mask_box .img_preview_box .content_box .c_right .sub_right .sr_top .img_item{cursor: pointer;border-radius: 3px;flex-shrink: 0;width: 60px;height: 60px;opacity: 0.5;transition: opacity 0.2s;}
.mask_box .img_preview_box .content_box .c_right .sub_right .sr_top .img_item.active{opacity: 1;}
.mask_box .img_preview_box .content_box .c_right .sub_right .sr_top .img_item img{border-radius: 3px;width: 60px;height: 60px;object-fit: cover;display: block;}
.mask_box .img_preview_box .content_box .c_right .sub_right .sr_top .detail_box{margin-top:8px;}
.mask_box .img_preview_box .content_box .c_right .sub_right .sr_top .detail_box .content{margin-top:5px;padding-bottom:10px;display: flex;align-items: center;font-size: 14px;}
.mask_box .img_preview_box .content_box .c_right .sub_right .sr_top .detail_box .prompt_val{max-height: 450px;overflow: auto;color: #333;}
.mask_box .img_preview_box .content_box .c_right .sub_right .info{margin-top:10px;display: grid;grid-template-columns: repeat(4, 1fr);justify-content: center;align-items: center;font-size: 12px;}
.mask_box .img_preview_box .content_box .c_right .sub_right .info .sub{display: flex;justify-content: center;padding:0 5px;border-right: 1px solid #E5E7EB;}
.mask_box .img_preview_box .content_box .c_right .sub_right .info .sub:last-child{border-right:none;}
.mask_box .img_preview_box .content_box .c_right .sub_right .sr_bottom{position: absolute;bottom: 0;left: 0;width: 100%;}
.mask_box .img_preview_box .content_box .c_right .sub_right .sr_bottom .group{margin-top:15px;}
.mask_box .img_preview_box .content_box .c_right .sub_right .sr_bottom .btn_group{margin-top:5px;display: grid;grid-template-columns: repeat(2,1fr);gap: 10px;}
.mask_box .img_preview_box .content_box .c_right .sub_right .sr_bottom .btn{width: 100%;padding:8px 12px;border-radius: 5px;background-color: #F3F5F9;color: #333;cursor: pointer;display: flex;align-items: center;gap: 5px;}
.mask_box .img_preview_box .content_box .c_right .sub_right .sr_bottom .btn:hover{background-color: #edf0f5;}

/* 主体名称标签 */
.subject-name-tag{display:inline-flex;align-items:center;gap:3px;padding:1px 6px 1px 1px;margin:0 2px;border:1px solid #e5e7eb;border-radius:4px;background:#f8f9fa;color:#666;font-size:12px;white-space:nowrap;vertical-align:middle;}
.subject-name-tag .subject-name-img{width:15px;height:15px;border-radius:3px;object-fit:cover;flex-shrink:0;}