
/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    background-color: #f5f7fa;
}

.header {
    text-align: center;
    margin: 30px 0 40px;
}

.header h1 {
    color: #333;
    font-size: 2rem;
    margin-bottom: 10px;
}

.header p {
    color: #666;
    font-size: 1rem;
}

.upload-area {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 40px;
}

#fileInput {
    display: none;
}

.custom-file-btn {
    display: inline-block;
    background: #1890ff;
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    margin-right: 15px;
    transition: background 0.3s;
}

.custom-file-btn:hover {
    background: #096dd9;
}

.upload-btn {
    background: #52c41a;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
}

.upload-btn:hover {
    background: #4aa919;
}

.upload-btn:disabled {
    background: #a0e085;
    cursor: not-allowed;
}

.file-info {
    margin: 15px 0;
    color: #666;
    font-size: 0.9rem;
}

.preview-title {
    font-size: 1.2rem;
    color: #333;
    margin: 20px 0 15px;
}

#preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

#preview img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #eee;
    transition: transform 0.2s;
}

#preview img:hover {
    transform: scale(1.05);
}

.upload-info {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    z-index: 100;
}

.footer {
    text-align: center;
    color: #999;
    margin-top: 60px;
    padding: 20px;
    border-top: 1px solid #eee;
}

.footer p {
    margin: 5px 0;
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 1.5rem;
    }

    .upload-area {
        padding: 20px 15px;
    }

    .custom-file-btn, .upload-btn {
        display: block;
        width: 100%;
        text-align: center;
        margin: 0 0 10px 0;
    }

    #preview {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    #preview img {
        height: 100px;
    }
}

