/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 基础样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

.container {
    max-width: 100%;
    margin: 0 auto;
}

/* 头部样式 */
.header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 24px;
    margin-bottom: 8px;
    font-weight: 600;
}

.header p {
    font-size: 14px;
    opacity: 0.9;
}

/* 卡片样式 */
.card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* 上传区域样式 */
.upload-area {
    border: 2px dashed #667eea;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    background: #f8f9ff;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.upload-area.active {
    border-color: #4CAF50;
    background: #f0fff0;
}

.upload-icon {
    font-size: 48px;
    color: #667eea;
    margin-bottom: 15px;
}

.upload-text {
    font-size: 16px;
    color: #333;
    margin-bottom: 15px;
}

.file-input {
    display: none;
}

/* 按钮样式 */
.upload-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease;
    display: inline-block;
}

.upload-btn:active {
    transform: scale(0.95);
}

.upload-btn.small {
    padding: 8px 16px;
    font-size: 12px;
}

/* 图片列表样式 */
.image-list {
    display: grid;
    gap: 15px;
}

.image-item {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.image-info {
    flex: 1;
}

.image-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 5px;
    word-break: break-all;
}

.image-meta {
    font-size: 12px;
    color: #666;
}

.image-remark {
    font-size: 13px;
    color: #888;
    margin-top: 5px;
    font-style: italic;
}

/* 下载按钮样式 */
.download-btn {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.download-btn:hover {
    background: #45a049;
}

/* 消息提示样式 */
.message {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    text-align: center;
    font-size: 14px;
}

.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 加载状态样式 */
.loading {
    display: none;
    text-align: center;
    padding: 20px;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    color: #666;
    padding: 40px;
}

/* 头部操作栏样式 */
.header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.header-actions h3 {
    color: #333;
    margin: 0;
}

/* 备注相关样式 */
.remark-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    margin: 10px 0;
    resize: vertical;
    min-height: 60px;
    font-family: inherit;
}

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

.upload-section {
    margin-bottom: 20px;
}

.selected-files {
    margin: 15px 0;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 8px;
}

.file-icon {
    font-size: 20px;
    margin-right: 10px;
    color: #667eea;
}

.file-info {
    flex: 1;
}

.file-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.file-size {
    font-size: 12px;
    color: #666;
}

.upload-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.upload-submit-btn {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    flex: 1;
}

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

.cancel-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
}

.remark-label {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
    display: block;
}

.remark-count {
    font-size: 12px;
    color: #666;
    text-align: right;
    margin-top: 5px;
}

/* 响应式设计 */
@media (max-width: 480px) {
    body {
        padding: 15px;
    }
    
    .card {
        padding: 15px;
    }
    
    .upload-area {
        padding: 30px 15px;
    }
    
    .upload-btn {
        padding: 12px 24px;
        font-size: 15px;
    }
    
    .image-item {
        padding: 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .download-btn {
        align-self: flex-end;
    }
    
    .upload-actions {
        flex-direction: column;
    }
    
    .cancel-btn, .upload-submit-btn {
        width: 100%;
    }
}

@media (max-width: 320px) {
    .header h1 {
        font-size: 20px;
    }
    
    .header p {
        font-size: 12px;
    }
    
    .upload-text {
        font-size: 14px;
    }
}

/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {
    .card {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .image-item {
        background: #4a5568;
    }
    
    .image-name {
        color: #e2e8f0;
    }
    
    .image-meta {
        color: #a0aec0;
    }
    
    .upload-text {
        color: #e2e8f0;
    }
    
    .upload-area {
        background: #4a5568;
        border-color: #667eea;
    }
    
    .remark-input {
        background: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }
    
    .file-item {
        background: #4a5568;
    }
    
    .file-name {
        color: #e2e8f0;
    }
}