
/* ===== 暗黑模式适配（body.night）===== */
.night .img-compress-wrap { background:#1a1d24 !important; border-color:#3a3f48 !important; color:#e6e8eb !important; box-shadow:0 4px 20px rgba(0,0,0,0.4) !important; }
.night .img-compress-title { color:#e6e8eb !important; }
.night .preview-card, .night .upload-info-panel { background:#222630 !important; border-color:#3a3f48 !important; }
.night .upload-box { border-color:#3a3f48 !important; }
.night #clearAll { background:#222630 !important; color:#e6e8eb !important; border-color:#3a3f48 !important; }
.night .img-compress-desc, .night .upload-box-tip, .night .size-col .size-label, .night .ratio-col .ratio-label, .night .upload-info-panel .info-icon, .night .upload-info-panel .info-text-group .info-top, .night .feature-desc { color:#9aa2ad !important; }
.night .img-row label, .night .ratio-title-out { color:#e6e8eb !important; }
.night .img-compress-wrap input[type=text], .night .img-compress-wrap input[type=number], .night .img-compress-wrap select { background:#1a1d24 !important; color:#e6e8eb !important; border-color:#3a3f48 !important; }
.night .upload-box { background:#1a1d24 !important; }
.night .upload-box-icon { color:#9aa2ad !important; }
.night .upload-info-panel .info-text-group .info-big { color:#e6e8eb !important; }
.night .upload-info-panel .info-text-group .info-dim { color:#9aa2ad !important; }


.img-compress-wrap{width:100%;padding:28px;background:#ffffff;border-radius:16px;box-shadow:0 4px 20px rgba(0,0,0,0.08);box-sizing:border-box;}
.img-compress-title{font-size:22px;font-weight:600;color:#222;margin-bottom:8px;display:flex;align-items:center;gap:10px;}
.img-compress-desc{font-size:15px;color:#666;line-height:1.6;margin-bottom:24px;}
/* 会员等级提醒框 */
.limit-tip{
    margin:14px 0 6px;
    padding:13px 18px 13px;
    background:linear-gradient(135deg,#fffaf0,#fffdf7);
    border:1px solid #f1e2c2;
    border-left:4px solid #f0b429;
    border-radius:10px;
    box-shadow:0 2px 8px rgba(240,180,41,.08);
}
.limit-tip-title{font-size:15px;font-weight:700;color:#9a6b1f;margin-bottom:8px;letter-spacing:.5px;}
.limit-tip-rows{display:flex;flex-wrap:wrap;gap:7px 22px;font-size:13.5px;color:#7a6a4e;}
.limit-tip-row{display:inline-flex;align-items:center;gap:5px;line-height:1.7;}
.limit-tip-row::before{content:'';width:6px;height:6px;border-radius:50%;background:#e8c987;flex:none;}
.limit-tip-row em{font-style:normal;font-weight:700;color:#c07c00;}
.night .limit-tip{background:linear-gradient(135deg,#2d271f,#332c22);border-color:#4a3f2d;border-left-color:#b8860b;box-shadow:none;}
.night .limit-tip-title{color:#e0b34c;}
.night .limit-tip-row{color:#b8a37e;}
.night .limit-tip-row::before{background:#8a7446;}
.night .limit-tip-row em{color:#f0c060;}
.img-row{margin-bottom:20px;}
.img-row label{display:block;margin-bottom:8px;font-weight:500;color:#333;font-size:15px;}
.img-row input,.img-row select{width:100%;max-width:320px;padding:10px 12px;border:1px solid #dcdfe6;border-radius:8px;font-size:14px;outline:none;transition:border 0.2s;box-sizing:border-box;}
.img-row input[type=range]{padding:0;height:6px;accent-color:#409eff;cursor:pointer;max-width:320px;}
.img-row input:focus,.img-row select:focus{border-color:#409eff;}
.btn-group{display:flex;gap:12px;margin-top:8px;}
.btn-group button{padding:11px 22px;border-radius:8px;border:none;font-size:15px;cursor:pointer;transition:0.2s;}
#startCompress{background:#409eff;color:#fff;}
#startCompress:disabled{background:#a0cfff;cursor:not-allowed;}
#clearAll{background:#f5f7fa;color:#333;border:1px solid #dcdfe6;}
#clearAll:hover{background:#eceef1;}
.info-text{font-size:13px;color:#777;margin-top:6px;line-height:1.5;}
.tip-png-transparent{display:none;font-size:13px;color:#777;margin-top:6px;line-height:1.5;}
#progressWrap{display:none;margin-top:14px;}
.progress-info{display:flex;align-items:baseline;gap:10px;margin-bottom:6px;}
.progress-pct{font-size:22px;font-weight:700;color:#409eff;font-variant-numeric:tabular-nums;line-height:1;}
.progress-name{font-size:13px;color:#999;}
.progress-track{height:10px;background:#f0f2f5;border-radius:6px;overflow:hidden;position:relative;}
.progress-fill{height:100%;width:0%;border-radius:6px;position:relative;transition:width .25s ease;
    background:linear-gradient(90deg,#409eff,#36cfc9);
    box-shadow:0 0 10px rgba(64,158,255,.5);}
.progress-fill::after{content:'';position:absolute;top:0;left:-40%;height:100%;width:40%;
    background:linear-gradient(90deg,transparent,rgba(255,255,255,.5),transparent);
    animation:progFlow 1.2s linear infinite;}
@keyframes progFlow{0%{left:-40%}100%{left:140%}}
.night .progress-pct{color:#5aa9ff;}
.night .progress-name{color:#8a93a1;}
.night .progress-track{background:#2a2f38;}
.night .progress-fill{background:linear-gradient(90deg,#3d8bff,#2fb9c0);box-shadow:0 0 10px rgba(61,139,255,.4);}
.night .progress-fill::after{background:linear-gradient(90deg,transparent,rgba(255,255,255,.22),transparent);}
#previewBox{margin-top:24px;display:none;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:14px;}
.preview-card{border:1px solid #ebeef5;border-radius:10px;padding:12px;background:#fdfdfd;}
.preview-card .file-name{font-weight:500;color:#222;margin-bottom:8px;font-size:13px;word-break:break-all;}
.preview-card .fmt-badge{display:inline-block;margin-left:6px;padding:1px 8px;border-radius:10px;background:#e8f4ff;color:#409eff;font-size:12px;vertical-align:1px;}
.size-row{display:flex;gap:16px;align-items:flex-start;justify-content:space-between;margin-bottom:16px;}
.size-col{flex:1;text-align:center;}
.size-col .size-label{font-size:14px;color:#666;margin-bottom:4px;}
.size-col .size-num{font-size:28px;font-weight:bold;color:#222;}
.size-col .size-dim{font-size:14px;color:#777;margin-top:4px;}
.ratio-col{flex:0 0 110px;text-align:center;}
.ratio-col .ratio-label{font-size:14px;color:#666;margin-bottom:4px;}
.ratio-col .ratio-num{font-size:28px;font-weight:bold;color:#00b42a;}
.preview-card img{width:100%;max-height:180px;object-fit:contain;border-radius:6px;background:#f6f6f6;}
.preview-card .download-link{display:inline-block;margin-top:10px;padding:6px 12px;background:#409eff;color:#fff;border-radius:6px;text-decoration:none;font-size:13px;}
.size-negative .ratio-num{color:#f53f3f;}
.upload-box{
    border:1px dashed #dcdfe6;
    border-radius:10px;
    padding:20px;
    text-align:center;
    cursor:pointer;
    transition:border-color 0.2s;
    background:#fff;
}
.upload-box:hover{
    border-color:#409eff;
}
.upload-box-icon{
    font-size:42px;
    color:#999;
    margin-bottom:8px;
}
.upload-box-tip{
    font-size:15px;
    color:#666;
}
.upload-box-sub{
    font-size:12px;
    color:#999;
    margin-top:6px;
}
#downloadAllZip{background:#f0f7ff;color:#409eff;border:1px solid #b3d8ff;}
#downloadAllZip:hover{background:#e0efff;}
.upload-file-item{
    margin-top:12px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    border:1px solid #ebeef5;
    border-radius:8px;
    padding:12px 16px;
    background:#fdfdfd;
}
/* 上传列表超5张折叠：隐藏项 + 展开按钮 */
.upload-file-item.collapsed{display:none;}
.file-list-toggle{
    margin-top:12px;
    text-align:center;
    padding:9px 0;
    cursor:pointer;
    color:#409eff;
    font-size:13px;
    user-select:none;
    background:#f7f9fc;
    border:1px dashed #c6e2ff;
    border-radius:8px;
}
.file-list-toggle:hover{background:#eef4fb;}
.upload-file-info{
    flex:1;
    min-width:0;
    padding:0 12px;
}
.upload-file-name{
    font-size:14px;
    color:#222;
    font-weight:500;
    word-break:break-all;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.upload-file-meta{
    font-size:12px;color:#777;
    margin-top:4px;
    word-break:break-all;
}
/* 一体式列表：缩略图 + 下载按钮 */
.file-thumb{
    width:52px;
    height:52px;
    flex-shrink:0;
    border-radius:8px;
    overflow:hidden;
    background:#f2f3f5;
    display:flex;
    align-items:center;
    justify-content:center;
    border:1px solid #ebeef5;
}
.file-thumb img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}
.file-thumb-ph{
    font-size:20px;
    color:#c0c4cc;
}
.file-dl-btn{
    flex-shrink:0;
    margin-right:6px;
    padding:6px 12px;
    border-radius:8px;
    border:1px solid #b3d8ff;
    background:#f0f7ff;
    color:#409eff;
    font-size:12px;
    cursor:pointer;
    transition:0.2s;
}
.file-dl-btn:hover:not(:disabled){
    background:#e0efff;
}
.file-dl-btn:disabled{
    border-color:#e4e7ed;
    background:#f5f7fa;
    color:#c0c4cc;
    cursor:not-allowed;
}
.file-single-btn{
    flex-shrink:0;
    margin-right:8px;
    padding:6px 12px;
    border-radius:8px;
    border:1px solid #409eff;
    background:#409eff;
    color:#fff;
    font-size:12px;
    cursor:pointer;
    transition:0.2s;
}
.file-single-btn:hover:not(:disabled){
    background:#337ecc;
}
.file-single-btn:disabled{
    border-color:#e4e7ed;
    background:#f5f7fa;
    color:#c0c4cc;
    cursor:not-allowed;
}
.upload-file-close{
    width:32px;
    height:32px;
    border-radius:50%;
    border:none;
    background:transparent;
    font-size:20px;
    color:#888;
    cursor:pointer;
    display:flex;
    align-items:center;
    justify-content:center;
    flex-shrink:0;
}
.upload-file-close:hover{
    background:#f0f0f0;
    color:#f53f3f;
}
.qfile-status{
    flex-shrink:0;
    font-size:12px;
    color:#909399;
    background:#f2f3f5;
    border-radius:10px;
    padding:2px 10px;
    margin-right:8px;
}
.qfile-status.run{
    color:#409eff;
    background:#ecf5ff;
}
.qfile-status.ok{
    color:#00b42a;
    background:#e8f8ee;
}
.qfile-status.big{
    color:#e6a23c;
    background:#fdf6ec;
}
#fileInput{
    display:none;
}
.upload-info-panel{
    display:none;
    border:1px solid #ebeef5;
    border-radius:12px;
    padding:10px;
    margin-bottom:20px;
    background:#fdfdfd;
}
@media (max-width:768px) {
    .upload-info-panel .info-row-top{
        display:flex;
        flex-wrap:wrap;
        gap:16px;
        margin-bottom:16px;
    }
    .upload-info-panel .info-col{
        flex:1 1 calc(50% - 10px);
    }
    .ratio-wrap{
        width:100%;
        text-align:center;
        margin-top:12px;
    }
    .ratio-title-out{
        font-size:14px;
        color:#333;
        margin-bottom:6px;
        text-align:left;
    }
    .upload-info-panel .ratio-block{
        width:100%;
        color:#fff;
        padding:5px;
        border-radius:8px;
        text-align:center;
    }
}
@media (min-width:769px) {
    .upload-info-panel .info-row-top{
        display:flex;
        gap:24px;
        align-items:flex-end;
    }
    .upload-info-panel .info-col{
        flex:1;
    }
    .ratio-wrap{
        flex:0 0 140px;
        text-align:center;
    }
    .ratio-title-out{
        font-size:14px;
        color:#333;
        margin-bottom:6px;
        text-align:center;
    }
    .upload-info-panel .ratio-block{
        width:100%;
        color:#fff;
        padding:8px 10px;
        border-radius:8px;
        text-align:center;
    }
}
.upload-info-panel .info-icon{
    font-size:32px;
    line-height:1;
    color:#666;
    float:left;
    margin-right:12px;
    margin-top:15px;
}
.upload-info-panel .info-text-group{
    overflow:hidden;
}
.upload-info-panel .info-text-group .info-top{
    font-size:14px;
    color:#666;
    margin-bottom:2px;
}
.upload-info-panel .info-text-group .info-big{
    font-size:24px;
    font-weight:bold;
    color:#111;
    line-height:1;
}
.upload-info-panel .info-text-group .info-dim{
    font-size:14px;
    color:#888;
    margin-top:4px;
}
.ratio-block .ratio-value{
    font-size:22px;
    font-weight:bold;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:6px;
}
.ratio-block.ratio-gray{
    background:#667285;
}
.ratio-block.ratio-green{
    background:#00b42a;
}
.ratio-block.ratio-red{
    background:#f53f3f;
}
@media(max-width:768px){
    .img-compress-wrap{padding:18px;}
}
.feature-wrap{
    margin-top:32px;
    display:grid;
    grid-template-columns:repeat(3, 1fr);
    gap:24px;
}
.feature-item{}
.feature-icon{
    font-size:36px;
    margin-bottom:10px;
}
.feature-title{
    font-size:20px;
    font-weight:bold;
    color:#111;
    margin-bottom:8px;
}
.feature-desc{
    font-size:14px;
    color:#666;
    line-height:1.6;
}
@media(max-width:768px){
    .feature-wrap{grid-template-columns:1fr;}
    .feature-title{font-size:18px;}
    .feature-desc{font-size:13px;}
}
