/* ======================================================================
 *  zip-compressor.css · 在线 ZIP 打包与解压
 *  视觉：档案柜冷灰 + 琥珀标签 + 等宽目录字；面板像一台「打包机」
 *  作用域：.tsk.zip（前缀 zip-）
 * ====================================================================== */

.tsk.zip {
    --tsk-bg: #eff2f6;
    --tsk-bg-2: #e5eaf1;
    --tsk-card: #ffffff;
    --tsk-card-2: #f4f7fb;
    --tsk-ink: #1a2332;
    --tsk-sub: #526074;
    --tsk-faint: #8794a6;
    --tsk-line: #dde4ee;
    --tsk-line-2: #e9eff6;
    --tsk-brand: #3d6b99;
    --tsk-brand-2: #27496d;
    --tsk-brand-soft: #e8f0f8;
    --tsk-brand-ink: #2b5579;
    --tsk-accent: #c47a12;
    --tsk-ok: #2c7a52;
    --tsk-ok-soft: #e6f4ec;
    --tsk-warn: #a56910;
    --tsk-warn-soft: #fdf1de;
    --tsk-bad: #c13b3b;
    --tsk-bad-soft: #fbeaea;
    --tsk-info: #26788a;
    --tsk-info-soft: #e3f3f6;
    --tsk-shadow-sm: 0 1px 2px rgba(26, 35, 50, .05), 0 6px 16px rgba(26, 35, 50, .06);
    --tsk-shadow: 0 2px 6px rgba(26, 35, 50, .08), 0 18px 42px rgba(26, 35, 50, .1);
    --tsk-shadow-lg: 0 6px 16px rgba(26, 35, 50, .1), 0 30px 70px rgba(26, 35, 50, .18);
    --tsk-r: 14px;
    --tsk-r-sm: 8px;
    background:
        linear-gradient(180deg, #f2f5f9 0%, #eaefF5 48%, #eff2f6 100%);
}

:root[data-theme="dark"] .tsk.zip {
    --tsk-bg: #0e131a;
    --tsk-bg-2: #131a24;
    --tsk-card: #18202b;
    --tsk-card-2: #1e2734;
    --tsk-ink: #e9eef6;
    --tsk-sub: #a4b1c3;
    --tsk-faint: #78869a;
    --tsk-line: #273242;
    --tsk-line-2: #202a38;
    --tsk-brand: #6aa3d8;
    --tsk-brand-2: #4a83b8;
    --tsk-brand-soft: rgba(106, 163, 216, .14);
    --tsk-brand-ink: #92c0e8;
    --tsk-accent: #e8a53a;
    --tsk-ok: #55c78a;
    --tsk-ok-soft: rgba(85, 199, 138, .14);
    --tsk-warn: #e8b563;
    --tsk-warn-soft: rgba(232, 181, 99, .14);
    --tsk-bad: #ef8080;
    --tsk-bad-soft: rgba(239, 128, 128, .14);
    --tsk-info: #59c0d2;
    --tsk-info-soft: rgba(89, 192, 210, .14);
    --tsk-shadow-sm: 0 1px 2px rgba(0, 0, 0, .5), 0 6px 16px rgba(0, 0, 0, .3);
    --tsk-shadow: 0 2px 6px rgba(0, 0, 0, .55), 0 18px 42px rgba(0, 0, 0, .4);
    --tsk-shadow-lg: 0 6px 16px rgba(0, 0, 0, .6), 0 30px 70px rgba(0, 0, 0, .5);
    background: #0e131a;
}

/* ---------- 1. 首屏等高栅格 ---------- */
.zip-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 394px;
    gap: 30px;
    padding: 30px 0 24px;
    align-items: stretch;
}
.zip-hero-l {
    display: flex;
    flex-direction: column;
}
.zip-hero-l > .tsk-hs {
    flex: 1 1 auto;
}
@media (max-width: 900px) {
    .zip-hero {
        grid-template-columns: 1fr;
    }
}
.zip-hero-r {
    min-width: 0;
}

/* ---------- 2. 首屏细节 ---------- */
.zip .tsk-kicker {
    background: #e8f0f8;
    color: #2b5579;
}
.zip .tsk-h1 b {
    color: #2b5579;
    font-family: var(--tsk-num);
    letter-spacing: -.02em;
}
.zip .tsk-chips span {
    background: rgba(255, 255, 255, .88);
    border-color: #dbe3ee;
}

.zip-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 16px;
    max-width: 560px;
}
.zip-facts div {
    background: rgba(255, 255, 255, .8);
    border: 1px solid #dde4ee;
    border-radius: 8px;
    padding: 9px 11px;
}
.zip-facts b {
    display: block;
    font: 800 12px/1.4 var(--tsk-num);
    color: #2b5579;
    letter-spacing: .04em;
}
.zip-facts span {
    display: block;
    margin-top: 1px;
    font-size: 10.5px;
    color: var(--tsk-faint);
    font-weight: 600;
}

/* ---------- 3. 打包控制台 ---------- */
.zip-console {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--tsk-card);
    border: 1px solid var(--tsk-line);
    border-radius: 16px;
    box-shadow: var(--tsk-shadow);
    overflow: hidden;
}
.zip-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--tsk-card-2);
    border-bottom: 1px solid var(--tsk-line);
    padding: 4px;
    gap: 4px;
}
.zip-tab {
    border: 0;
    background: transparent;
    color: var(--tsk-sub);
    border-radius: 7px;
    padding: 10px 0;
    font: 800 13px/1.3 var(--tsk-font);
    cursor: pointer;
    transition: .16s;
    position: relative;
}
.zip-tab:hover {
    color: #2b5579;
}
.zip-tab.on {
    background: var(--tsk-card);
    color: #2b5579;
    box-shadow: 0 1px 4px rgba(26, 35, 50, .1);
}
:root[data-theme="dark"] .zip-tab.on {
    color: var(--tsk-brand-ink);
}

.zip-pane {
    padding: 16px 20px 18px;
    display: flex;
    flex-direction: column;
    gap: 13px;
    flex: 1 1 auto;
}
.zip-pane[hidden] {
    display: none;
}

/* 拖入区 */
.zip-drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 22px 16px;
    border: 1.5px dashed #b7c6d8;
    border-radius: 11px;
    background:
        repeating-linear-gradient(-45deg, rgba(61, 107, 153, .04) 0 10px, transparent 10px 20px),
        var(--tsk-card-2);
    cursor: pointer;
    text-align: center;
    transition: border-color .16s, background .16s, transform .16s;
}
.zip-drop:hover,
.zip-drop.over {
    border-color: #3d6b99;
    background: #eaf2fa;
    transform: translateY(-1px);
}
:root[data-theme="dark"] .zip-drop:hover,
:root[data-theme="dark"] .zip-drop.over {
    background: #1f2c3c;
}
.zip-drop.is-unzip {
    border-color: #dcc18a;
    background:
        repeating-linear-gradient(-45deg, rgba(196, 122, 18, .05) 0 10px, transparent 10px 20px),
        #fdf7ea;
}
:root[data-theme="dark"] .zip-drop.is-unzip {
    border-color: #6b5426;
    background: #241f16;
}
.zip-drop-ic {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: linear-gradient(135deg, #3d6b99, #27496d);
    color: #fff;
    font: 800 16px/1 var(--tsk-num);
    box-shadow: 0 8px 18px rgba(39, 73, 109, .26);
}
.zip-drop.is-unzip .zip-drop-ic {
    background: linear-gradient(135deg, #d69a2a, #a56910);
    box-shadow: 0 8px 18px rgba(165, 105, 16, .24);
    font-size: 21px;
}
.zip-drop b {
    font-size: 13px;
    color: var(--tsk-ink);
    font-weight: 750;
}
.zip-drop small {
    font-size: 10.5px;
    color: var(--tsk-faint);
    line-height: 1.6;
}

/* 文件队列 */
.zip-queue {
    max-height: 176px;
    overflow-y: auto;
    border: 1px solid var(--tsk-line);
    border-radius: 9px;
    background: var(--tsk-card-2);
    padding: 6px;
}
.zip-empty {
    margin: 8px;
    font-size: 11.5px;
    color: var(--tsk-faint);
    line-height: 1.6;
    text-align: center;
}
.zip-queue-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 9px;
    border-radius: 6px;
    background: var(--tsk-card);
    border: 1px solid var(--tsk-line-2);
    margin-bottom: 5px;
}
.zip-queue-item:last-child {
    margin-bottom: 0;
}
.zip-queue-item > i {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 5px;
    background: #e8f0f8;
    color: #2b5579;
    font: 800 9.5px/1 var(--tsk-num);
    font-style: normal;
    letter-spacing: .02em;
    text-transform: uppercase;
}
:root[data-theme="dark"] .zip-queue-item > i {
    background: rgba(106, 163, 216, .16);
    color: var(--tsk-brand-ink);
}
.zip-queue-item > div {
    flex: 1 1 auto;
    min-width: 0;
}
.zip-queue-item b {
    display: block;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--tsk-ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.zip-queue-item span {
    display: block;
    font: 600 10px/1.5 var(--tsk-num);
    color: var(--tsk-faint);
}
.zip-queue-item button {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: var(--tsk-faint);
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
}
.zip-queue-item button:hover {
    background: var(--tsk-bad-soft);
    color: var(--tsk-bad);
}

/* 统计 + 表单 */
.zip-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
}
.zip-meta div {
    background: var(--tsk-card-2);
    border: 1px solid var(--tsk-line);
    border-radius: 8px;
    padding: 8px 11px;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}
.zip-meta span {
    font-size: 10.5px;
    color: var(--tsk-faint);
    font-weight: 600;
}
.zip-meta b {
    font: 800 13.5px/1.4 var(--tsk-num);
    color: var(--tsk-ink);
    font-variant-numeric: tabular-nums;
}

.zip-row2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.zip-field {
    display: block;
    min-width: 0;
}
.zip-field > label {
    display: block;
    margin-bottom: 6px;
    font-size: 11.5px;
    font-weight: 800;
    color: var(--tsk-sub);
}
.zip-input,
.zip-select {
    width: 100%;
    border: 1.5px solid var(--tsk-line);
    border-radius: 8px;
    background: var(--tsk-card-2);
    color: var(--tsk-ink);
    font: 500 13px/1.7 var(--tsk-font);
    padding: 8px 10px;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.zip-select {
    font-size: 11.5px;
    padding: 8px 8px;
}
.zip-input:focus,
.zip-select:focus {
    border-color: #3d6b99;
    box-shadow: 0 0 0 3px rgba(61, 107, 153, .14);
    background: var(--tsk-card);
}

/* 进度条 */
.zip-prog {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.zip-prog-bar {
    height: 8px;
    border-radius: 99px;
    background: var(--tsk-line-2);
    overflow: hidden;
    position: relative;
}
.zip-prog-bar i {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 99px;
    background: repeating-linear-gradient(
        45deg,
        #3d6b99 0 8px,
        #4d7fae 8px 16px
    );
    background-size: 22px 22px;
    transition: width .2s ease;
    animation: zip-stripe 1s linear infinite;
}
@keyframes zip-stripe {
    from { background-position: 0 0; }
    to { background-position: 22px 0; }
}
.zip-prog span {
    font: 600 11px/1.5 var(--tsk-num);
    color: var(--tsk-faint);
}

.zip-err {
    border: 1px solid rgba(193, 59, 59, .32);
    background: var(--tsk-bad-soft);
    color: var(--tsk-bad);
    border-radius: 8px;
    padding: 8px 11px;
    font-size: 11.5px;
    line-height: 1.65;
    font-weight: 700;
}

.zip-acts {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: auto;
}
.zip-acts .tsk-btn-main {
    flex: 1 1 auto;
}
.zip-ghost {
    flex: 0 0 auto;
    padding: 10px 13px;
}
.zip-acts .tsk-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
    box-shadow: none;
}
.zip-foot {
    font-size: 10.5px;
    color: var(--tsk-faint);
    line-height: 1.6;
    text-align: center;
}

/* 解压元信息 */
.zip-unmeta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 12px;
    border-radius: 9px;
    background: var(--tsk-card-2);
    border: 1px solid var(--tsk-line);
}
.zip-unmeta > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}
.zip-unmeta span {
    font-size: 10.5px;
    color: var(--tsk-faint);
    font-weight: 600;
}
.zip-unmeta b {
    font: 700 11.5px/1.5 var(--tsk-num);
    color: var(--tsk-ink);
    text-align: right;
    word-break: break-all;
}

/* ---------- 4. 打包结果 ---------- */
.zip-result {
    margin-top: 4px;
    background: var(--tsk-card);
    border: 1px solid var(--tsk-line);
    border-radius: 14px;
    box-shadow: var(--tsk-shadow-sm);
    padding: 16px 20px 18px;
}
.zip-result-hd {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--tsk-line);
}
.zip-stat {
    min-width: 86px;
    padding-right: 13px;
    border-right: 1px solid var(--tsk-line-2);
}
.zip-stat b {
    display: block;
    font: 800 18px/1.3 var(--tsk-num);
    color: var(--tsk-ink);
    font-variant-numeric: tabular-nums;
}
.zip-stat span {
    font-size: 10.5px;
    color: var(--tsk-faint);
    font-weight: 600;
}
.zip-stat-main b {
    color: #2b5579;
}
:root[data-theme="dark"] .zip-stat-main b {
    color: var(--tsk-brand-ink);
}
.zip-result-acts {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-left: auto;
}
.zip-result-note {
    margin-top: 11px;
    font-size: 11.5px;
    line-height: 1.7;
    color: var(--tsk-sub);
}

/* ---------- 5. 文件树 ---------- */
.zip-tree-sec {
    margin-top: 16px;
    background: var(--tsk-card);
    border: 1px solid var(--tsk-line);
    border-radius: 14px;
    box-shadow: var(--tsk-shadow-sm);
    overflow: hidden;
}
.zip-tree-hd {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 13px 18px;
    background: var(--tsk-card-2);
    border-bottom: 1px solid var(--tsk-line);
}
.zip-tree-hd b {
    font-size: 13.5px;
    font-weight: 800;
    color: var(--tsk-ink);
}
.zip-tree-hd span {
    margin-left: 9px;
    font-size: 11px;
    color: var(--tsk-faint);
}
.zip-tree-acts {
    display: flex;
    gap: 6px;
}
.zip-tree {
    padding: 8px 10px;
    max-height: 420px;
    overflow: auto;
    background:
        linear-gradient(180deg, rgba(61, 107, 153, .035), transparent 30%),
        var(--tsk-card);
}
.zip-tree-note {
    padding: 10px 18px 12px;
    font-size: 10.5px;
    color: var(--tsk-faint);
    line-height: 1.6;
    border-top: 1px dashed var(--tsk-line-2);
}

.zip-node {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 4px 7px;
    border-radius: 5px;
    font-size: 11.5px;
    line-height: 1.6;
    color: var(--tsk-sub);
}
.zip-node:hover {
    background: var(--tsk-brand-soft);
}
.zip-node.is-dir > b {
    color: var(--tsk-ink);
}
.zip-node > i {
    flex: 0 0 auto;
    width: 22px;
    text-align: center;
    font-style: normal;
    font-size: 12px;
}
.zip-node > b {
    flex: 1 1 auto;
    min-width: 0;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.zip-node > span {
    flex: 0 0 auto;
    font: 600 10px/1.5 var(--tsk-num);
    color: var(--tsk-faint);
    font-variant-numeric: tabular-nums;
}
.zip-node > button {
    flex: 0 0 auto;
    border: 0;
    background: transparent;
    color: #2b5579;
    font: 700 10.5px/1.4 var(--tsk-font);
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
}
.zip-node > button:hover {
    background: #e8f0f8;
}
:root[data-theme="dark"] .zip-node > button {
    color: var(--tsk-brand-ink);
}
:root[data-theme="dark"] .zip-node > button:hover {
    background: rgba(106, 163, 216, .14);
}
.zip-node.is-dir {
    cursor: pointer;
    font-weight: 700;
}
.zip-node > i.zip-tw {
    font: 700 10px/1 var(--tsk-num);
    color: var(--tsk-faint);
}
.zip-tree[data-collapsed="1"] .zip-node[data-depth] {
    display: none;
}

/* ---------- 6. 压缩级别说明 ---------- */
.zip-sec-sub {
    margin-left: auto;
    font-size: 11.5px;
    color: var(--tsk-faint);
    font-weight: 600;
}
.zip-levels {
    border: 1px solid var(--tsk-line);
    border-radius: 12px;
    background: var(--tsk-card);
    overflow: hidden;
    box-shadow: var(--tsk-shadow-sm);
}
.zip-level-row {
    display: grid;
    grid-template-columns: 132px 128px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 11px 16px;
    border-bottom: 1px solid var(--tsk-line-2);
}
.zip-level-row:last-child {
    border-bottom: 0;
}
.zip-level-row:hover {
    background: color-mix(in srgb, var(--tsk-brand-soft) 44%, transparent);
}
.zip-level-name {
    font: 800 11.5px/1.5 var(--tsk-num);
    color: #2b5579;
    letter-spacing: .02em;
}
:root[data-theme="dark"] .zip-level-name {
    color: var(--tsk-brand-ink);
}
.zip-level-effect {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--tsk-ink);
}
.zip-level-note {
    font-size: 11.5px;
    color: var(--tsk-sub);
    line-height: 1.6;
}
@media (max-width: 640px) {
    .zip-level-row {
        grid-template-columns: 1fr;
        gap: 3px;
    }
}

/* ---------- 7. 打包前清单 ---------- */
.zip-tips {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(238px, 1fr));
    gap: 11px;
}
.zip-tip {
    display: flex;
    gap: 11px;
    align-items: flex-start;
    background: var(--tsk-card);
    border: 1px solid var(--tsk-line);
    border-left: 3px solid #c47a12;
    border-radius: 9px;
    padding: 12px 14px;
}
.zip-tip > span {
    flex: 0 0 auto;
    font: 800 10.5px/1.5 var(--tsk-num);
    color: #c47a12;
    letter-spacing: .06em;
}
:root[data-theme="dark"] .zip-tip > span {
    color: var(--tsk-accent);
}
.zip-tip b {
    display: block;
    font-size: 12px;
    font-weight: 800;
    color: var(--tsk-ink);
    margin-bottom: 2px;
}
.zip-tip p {
    font-size: 11px;
    line-height: 1.65;
    color: var(--tsk-sub);
}

/* ---------- 8. 场景 ---------- */
.zip-scenes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(224px, 1fr));
    gap: 11px;
}
.zip-scene {
    background: var(--tsk-card);
    border: 1px solid var(--tsk-line);
    border-radius: 9px;
    padding: 13px 15px;
    position: relative;
    overflow: hidden;
}
.zip-scene::after {
    content: "";
    position: absolute;
    right: -14px;
    top: -14px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(196, 122, 18, .16), transparent 70%);
}
.zip-scene b {
    display: block;
    font-size: 12.5px;
    font-weight: 800;
    color: var(--tsk-ink);
    margin-bottom: 3px;
}
.zip-scene p {
    font-size: 11px;
    line-height: 1.7;
    color: var(--tsk-sub);
}

/* ---------- 9. 深色补丁 ---------- */
:root[data-theme="dark"] .zip .tsk-kicker {
    background: rgba(106, 163, 216, .14);
    color: var(--tsk-brand-ink);
}
:root[data-theme="dark"] .zip .tsk-h1 b {
    color: var(--tsk-brand-ink);
}
:root[data-theme="dark"] .zip-facts div {
    background: rgba(24, 32, 43, .8);
    border-color: var(--tsk-line);
}
:root[data-theme="dark"] .zip-facts b {
    color: var(--tsk-brand-ink);
}
:root[data-theme="dark"] .zip-level-row:hover {
    background: rgba(106, 163, 216, .08);
}
@media (max-width: 900px) {
    .zip-console {
        height: auto;
    }
    .zip-pane {
        padding: 14px 16px;
    }
}
@media (max-width: 560px) {
    .zip-row2,
    .zip-meta {
        grid-template-columns: 1fr;
    }
    .zip-facts {
        grid-template-columns: 1fr 1fr;
    }
    .zip-result-acts {
        margin-left: 0;
    }
}
