/* ========== 全局样式 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: white;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
}

/* ========== 输入区域 ========== */
#inputArea {
    margin: 8px;
    line-height: 1.8;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
}

#inputArea label {
    margin-right: 4px;
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

#inputArea input,
#inputArea select,
#inputArea button {
    margin-right: 8px;
    padding: 6px 10px;
    font-size: 14px;
    border-radius: 5px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s;
}

#inputArea input:focus,
#inputArea select:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#inputArea button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    cursor: pointer;
    font-weight: 600;
    padding: 6px 20px;
    transition: transform 0.2s, box-shadow 0.2s;
}

#inputArea button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

#inputArea button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ========== 状态提示 ========== */
#status {
    margin: 4px 15px;
    color: #333;
    font-size: 14px;
    min-height: 1.2em;
    padding: 8px 15px;
    background: #f0f4ff;
    border-radius: 5px;
    display: none;
}

#status:not(:empty) {
    display: block;
}

/* ========== 图库容器 ========== */
#gallery {
    display: flex;
    flex-direction: column;
    width: 100%;
}

#gallery img {
    display: block;
    width: 100%;
    height: auto;
    border: none;
    margin: 0;
    padding: 0;
    vertical-align: bottom;
}

/* ========== 懒加载占位符 ========== */
.image-placeholder {
    display: block;
    width: 100%;
    background-color: #f0f0f0;
    min-height: 200px;
    position: relative;
    overflow: hidden;
}

.image-placeholder::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    100% {
        left: 100%;
    }
}

/* ========== 响应式设计 ========== */
@media (max-width: 768px) {
    #inputArea {
        padding: 10px;
    }
    
    #inputArea input,
    #inputArea select,
    #inputArea button {
        margin-bottom: 8px;
        width: calc(100% - 20px);
    }
    
    #inputArea label {
        display: block;
        margin-bottom: 4px;
    }
}