/* shell/style.css */
/* 移动端友好的统一表单样式 */

/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 页面基础样式 */
body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    max-width: 800px;
    margin: 0 auto;
    padding: 16px;
    line-height: 1.5;
    background: #fff;
    font-size: 14px;
    color: #333;
    min-height: 100vh;
}

/* 标题样式 */
h1 {
    text-align: center;
    margin: 0 0 20px;
    font-size: 18px;
    color: #333;
    font-weight: 600;
}

/* 表单组样式 */
.form-group {
    margin-bottom: 16px;
}

/* 标签样式 */
label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
    font-size: 14px;
    color: #444;
}

.required:after {
    content: " *";
    color: #f44336;
}

/* 输入框样式 */
input[type="file"], 
input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px; /* 防止iOS自动缩放 */
    box-sizing: border-box;
    background-color: white;
}

/* 文件输入框特殊样式 */
input[type="file"] {
    padding: 8px 10px;
}

/* 按钮样式 */
button {
    width: 100%;
    padding: 12px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 8px;
    font-weight: bold;
}

button:hover {
    background: #45a049;
}

/* 错误消息样式 */
.error {
    color: #d32f2f;
    background: #ffebee;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 16px;
    font-size: 14px;
    border: 1px solid #ffcdd2;
}

.error pre {
    background-color: #fff;
    padding: 8px;
    border-radius: 4px;
    margin-top: 8px;
    font-size: 12px;
    overflow: auto;
    max-height: 200px;
}

/* 成功消息样式 */
.success {
    color: #2e7d32;
    background: #e8f5e9;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 16px;
    font-size: 14px;
    border: 1px solid #c8e6c9;
}

/* 说明区域样式 */
.instructions {
    background: #f8f9fa;
    padding: 16px;
    border-left: 4px solid #4CAF50;
    margin-bottom: 20px;
    border-radius: 4px;
}

.instructions h3 {
    color: #2c3e50;
    margin-bottom: 12px;
    font-size: 16px;
}

.instructions ol,
.instructions ul {
    padding-left: 20px;
    margin-bottom: 12px;
}

.instructions li {
    margin-bottom: 6px;
    font-size: 14px;
}

.instructions p {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.instructions strong {
    color: #d32f2f;
}

/* 文件输入区域样式 */
.file-inputs {
    background: #f5f5f5;
    padding: 16px;
    border-radius: 4px;
    margin-bottom: 16px;
}

/* 信息提示样式 */
.info-note {
    background: #e8f4fd;
    padding: 12px;
    border-left: 4px solid #2196F3;
    margin-bottom: 16px;
    font-size: 14px;
    border-radius: 4px;
    line-height: 1.5;
}

/* 移动端优化 */
@media (max-width: 600px) {
    body {
        padding: 12px;
        font-size: 14px;
    }
    
    h1 {
        font-size: 16px;
        margin-bottom: 16px;
    }
    
    input[type="file"], 
    input[type="text"],
    button {
        padding: 12px;
        min-height: 44px; /* 触摸友好 */
    }
    
    .instructions,
    .file-inputs {
        padding: 12px;
    }
    
    .instructions h3 {
        font-size: 15px;
    }
    
    .instructions li,
    .instructions p {
        font-size: 13px;
    }
}

@media (max-width: 400px) {
    body {
        padding: 8px;
        font-size: 13px;
    }
    
    h1 {
        font-size: 15px;
        margin-bottom: 12px;
    }
    
    .instructions,
    .file-inputs {
        padding: 10px;
    }
}

/* 触摸优化 */
input, button {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/* 聚焦状态 */
input[type="file"]:focus,
input[type="text"]:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

/* 文件上传按钮美化 */
input[type="file"]::-webkit-file-upload-button {
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 6px 12px;
    margin-right: 12px;
    cursor: pointer;
    font-family: inherit;
}

input[type="file"]::-webkit-file-upload-button:hover {
    background: #e0e0e0;
}