/* 基本页面样式 */
body {
    font-family: "Arial", sans-serif;
    background-color: #f0f8ff;
    margin: 0;
    padding: 20px;
    color: #333;
}

h1 {
    text-align: center;
    color: #2e8b57;
    margin-bottom: 30px;
}

/* 上传区域 */
.upload-section {
    border: 2px dashed #2e8b57;
    padding: 20px;
    text-align: center;
    margin-bottom: 30px;
    border-radius: 10px;
    background-color: #e6f2e6;
    transition: background-color 0.3s;
}

.upload-section.dragover {
    background-color: #cce6cc;
}

/* 按钮样式 */
.upload-section input[type="submit"] {
    padding: 10px 20px;
    background-color: #2e8b57;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.upload-section input[type="submit"]:hover {
    background-color: #246b45;
}

/* 消息提示 */
.messages p {
    font-size: 16px;
    margin: 5px 0;
}

.highlight {
    color: #2e8b57;
    font-weight: bold;
}

/* 图片展示区 */
.results {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.results .image-block {
    border: 2px solid #2e8b57;
    padding: 5px;
    border-radius: 5px;
    background: #e6f2e6;
}
.results img {
    max-width: 250px;   /* 最大宽度250px */
    max-height: 250px;  /* 最大高度250px */
    border: 2px solid #2e8b57;
    border-radius: 5px;
    object-fit: contain; /* 保持原图比例 */
}


/* 响应式布局 */
@media screen and (max-width: 768px) {
    .results img {
        max-width: 90%;  /* 手机屏幕自适应 */
        height: auto;
    }
    .preview-container img {
        max-width: 70px;
        max-height: 70px;
    }
}


.preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.preview-container img {
    max-width: 100px;   /* 最大宽度100px，可根据需要调整 */
    max-height: 100px;  /* 最大高度100px */
    border: 2px solid #2e8b57;
    border-radius: 5px;
    object-fit: cover;   /* 保持比例，填充缩略图框 */
}