/* ===== 上传按钮 ===== */
#uploadBtn {
    position: fixed;
    right: 30px;
    bottom: 100px;
    z-index: 900;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border: none;
    border-radius: 30px;
    background: linear-gradient(135deg, #00d9ff, #0099cc);
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 153, 204, 0.45);
    transition: all 0.25s ease;
}

#uploadBtn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(0, 153, 204, 0.6);
}

#uploadBtn:active {
    transform: translateY(0);
}

.up-btn-arrow {
    font-size: 18px;
    line-height: 1;
}

/* ===== 弹窗 ===== */
#uploadModal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.65);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}

#uploadModal.open {
    display: flex;
}

body.up-locked {
    overflow: hidden;
}

.up-panel {
    width: 560px;
    max-width: 100%;
    max-height: 86vh;
    display: flex;
    flex-direction: column;
    padding: 22px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(145deg, #2c2c3e, #1e1e2b);
    color: #fff;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.up-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.up-title {
    font-size: 20px;
    font-weight: 600;
}

.up-close {
    border: none;
    background: transparent;
    color: #aaa;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s ease;
}

.up-close:hover:not(:disabled) {
    color: #fff;
}

.up-close:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.up-tip {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 16px;
}

.up-dir-label {
    display: block;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 12px;
}

.up-dir {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 9px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-family: inherit;
    font-size: 13px;
    outline: none;
}

.up-dir:focus {
    border-color: #00d9ff;
    background: rgba(255, 255, 255, 0.12);
}

.up-drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 22px 16px;
    border: 2px dashed rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
}

.up-drop:hover,
.up-drop.dragging {
    border-color: #00d9ff;
    background: rgba(0, 217, 255, 0.08);
}

.up-drop-title {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
}

.up-drop-hint {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.up-list {
    margin-top: 14px;
    overflow-y: auto;
    max-height: 34vh;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.up-item {
    padding: 10px 2px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.up-item:last-child {
    border-bottom: none;
}

.up-item-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.up-name {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.up-meta {
    flex: 0 0 auto;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.55);
    font-variant-numeric: tabular-nums;
}

.up-status {
    flex: 0 0 auto;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
}

.up-status.uploading {
    color: #00d9ff;
}

.up-status.done {
    color: #7cfc9a;
}

.up-status.error {
    color: #ff8080;
}

.up-link {
    margin-left: 6px;
    color: #00d9ff;
    text-decoration: underline;
}

.up-bar {
    height: 5px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.12);
    overflow: hidden;
}

.up-bar i {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 3px;
    background: linear-gradient(90deg, #00d9ff, #7cfc9a);
    transition: width 0.2s ease;
}

.up-item.failed .up-bar i {
    background: #ff8080;
}

.up-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.up-summary {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.up-summary.has-error {
    color: #ff8080;
}

.up-start {
    padding: 10px 26px;
    border: none;
    border-radius: 22px;
    background: linear-gradient(135deg, #00d9ff, #0099cc);
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.up-start:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 153, 204, 0.45);
}

.up-start:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 640px) {
    #uploadBtn {
        right: 16px;
        bottom: 88px;
        padding: 10px 18px;
        font-size: 14px;
    }

    .up-panel {
        padding: 16px;
        max-height: 90vh;
    }

    .up-list {
        max-height: 30vh;
    }
}
