/* 遮罩层 */
.pattern-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    animation: fadeIn 0.3s ease forwards;
}

/* 弹窗主体 */
.pattern-modal {
    background: #ffffff;
    width: 90%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 10px 35px rgba(0,0,0,0.25);
    animation: scaleIn 0.35s ease forwards;
    position: relative;
}

/* 标题 */
.pattern-modal h3 {
    margin-top: 0;
    font-size: 20px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 20px;
}

/* 上传列表容器 */
.pattern-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

/* 每个上传项 */
.pattern-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* 上传框 */
.pattern-file {
    width: 100%;
    padding: 10px;
    border: 2px dashed #ccc;
    border-radius: 10px;
    transition: 0.3s;
    box-sizing: border-box;
}

.pattern-file:hover {
    border-color: #666;
}

/* 预览缩略图容器 */
.pattern-preview {
    display: flex;
    justify-content: center;
}

.pattern-preview img {
    max-width: 120px;
    max-height: 120px;
    border-radius: 8px;
    border: 1px solid #ddd;
    object-fit: cover;
}

/* 按钮 */
#pattern-upload-submit {
    width: 100%;
    background: #0071a1;
    color: #fff;
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    transition: 0.25s;
}

#pattern-upload-submit:hover {
    background: #005f85;
    transform: translateY(-2px);
}

/* 关闭按钮 */
.pattern-close {
    position: absolute;
    right: 12px;
    top: 12px;
    font-size: 20px;
    cursor: pointer;
    color: #666;
    transition: 0.2s;
}

.pattern-close:hover {
    color: #000;
}

/* 动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from { transform: scale(0.85); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
