* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #f5f7fa;
    padding: 24px;
    font-family: Microsoft YaHei, sans-serif;
}

.container {
    max-width: 900px;
    margin: 60px auto;
    padding: 30px;
    max-height: 90vh;
    overflow-y: auto;
    background-color: #fff;
}

.file-item {
    padding: 14px 18px;
    background: #fff;
    margin: 10px 0;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.file-item:hover {
    background: #eef5ff;
}

.modal-mask {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    z-index: 999;
    overflow: auto;
}

.modal-box {
    width: 92%;
    max-width: 1200px;
    margin: 40px auto;
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
}

.head {
    height: 30px;
    text-align: center;
    font-size: 22px;
    margin-bottom: 10px;
    /* background-color: #fff; */
}

.head button {
    float: right;
    width: 30px;
    height: 100%;
    font-size: 22px;
    color: rgba(0, 0, 0, 0.1);
    background-color: #fff;
    border: none;
}

.head button:hover {
    color: rgba(0, 0, 0, 1);
    cursor: pointer;
}

#preview-content {
    max-height: 70vh;
    min-height: 400px;
    /* background-color: #e9e8e8; */
}

canvas {
    max-width: 100%;
    display: block;
    /* margin:6px auto; */
}

.box {
    /* overflow: hidden; */
    overflow-y: auto;
    overflow-x: auto;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top-color: #409eff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

#preview-content {
    padding: 20px;
    min-height: 200px;
    cursor: zoom-in;
    transition: transform 0.3s ease;
    transform-origin: center center;
    transform-origin: 0 0;
    /* 以左上角为放大基点 */
    width: max-content;
    /* 内容宽度不自动收缩 */
}

/* 放大状态 */
#preview-content.zoom-active {
    transform: scale(1.3);
    cursor: zoom-out;
}