/* styles.css */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}

h1 {
    color: #333;
    text-align: center;
    padding: 20px;
}

.gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
}

.image-item {
    margin: 15px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    width: 200px;
    box-shadow: 0 2px 5px rgba(0,0,0,.1);
    transition: transform .2s;
}

.image-item:hover {
    transform: scale(1.05);
}

.image-item img {
    max-width: 100%;
    height: auto;
    display: block;
}

.error-messages {
    color: red;
    text-align: center;
    margin-bottom: 20px;
}

form {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 基础输入框样式 */
input[type="text"],
input[type="file"],
input[type="submit"] {
    padding: 10px;
    margin: 5px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

/* 当输入框获得焦点时的样式 */
input[type="text"]:focus,
input[type="file"]:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 8px rgba(52, 152, 219, 0.6);
}

/* 文件选择按钮的特殊样式 */
input[type="file"] {
    background-color: #ecf0f1;
    color: #2c3e50;
}

/* 提交按钮的样式 */
input[type="submit"] {
    background-color: #3498db;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

/* 提交按钮悬停状态 */
input[type="submit"]:hover {
    background-color: #2980b9;
}

/* 在小屏幕设备上的输入框宽度调整 */
@media (max-width: 600px) {
    input[type="text"],
    input[type="file"],
    input[type="submit"] {
        width: 100%;
    }
}

/* 覆盖层样式 */
        .overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0,0,0,0.75);
            z-index: 1000;
            display: none;
            justify-content: center;
            align-items: center;
        }

        .overlay img {
            max-height: 90vh;
            max-width: 90vw;
            border-radius: 4px;
            cursor: pointer;
        }

        .error {
            color: red;
            margin-top: 10px;
            text-align: center;
        }