/* 简约纯色风格样式表 */

:root {
    /* 颜色变量 */
    --bg-color: #f5f7fa;
    --card-bg: #ffffff;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --primary-color: #1EA2B5;
    --primary-hover: #1c7684;
    --border-color: #dcdcdc;
    --input-bg: #ffffff;
    --input-focus-border: #1c7684;
    --error-color: #e74c3c;
    --success-color: #27ae60;
    --file-area-bg: #f8f9fa;
    --file-area-hover-bg: #ecf0f1;
    
    /* 尺寸变量 */
    --radius: 4px;
    --spacing-sm: 10px;
    --spacing-md: 20px;
    --spacing-lg: 30px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* 容器样式 */
.container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.form-wrapper {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 40px;
}

/* 标题样式 */
.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.form-title {
    text-align: left;
    color: var(--text-primary);
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.form-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}

/* 表单组样式 */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
}

.required {
    color: var(--error-color);
    margin-left: 4px;
}

.form-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 14px;
    color: var(--text-primary);
    background: var(--input-bg);
    transition: border-color 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--input-focus-border);
}

.form-input.error {
    border-color: var(--error-color);
}

/* 文件上传区域样式 */
.file-upload-area {
    border: 1px dashed var(--border-color);
    border-radius: var(--radius);
    padding: 30px;
    text-align: center;
    cursor: pointer;
    background: var(--file-area-bg);
    transition: background-color 0.2s ease, border-color 0.2s ease;
    position: relative;
}

.file-upload-area:hover {
    background: var(--file-area-hover-bg);
    border-color: var(--primary-color);
}

.file-upload-area.dragover {
    background: var(--file-area-hover-bg);
    border-color: var(--primary-color);
    border-style: solid;
}

.file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-icon {
    font-size: 32px;
    margin-bottom: 10px;
    color: var(--text-secondary);
    filter: grayscale(100%);
}

.upload-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.upload-hint {
    font-size: 12px;
    color: var(--text-secondary);
}

/* 文件信息样式 */
.file-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    background: var(--file-area-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin-top: 10px;
}

.file-info.error {
    border-color: var(--error-color);
    background: #fff5f5;
}

.file-name {
    font-size: 14px;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    margin-right: 10px;
}

.file-remove {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    line-height: 1;
    transition: color 0.2s ease;
}

.file-remove:hover {
    color: var(--error-color);
}

/* 错误消息样式 */
.error-message {
    display: block;
    color: var(--error-color);
    font-size: 12px;
    margin-top: 5px;
    min-height: 18px;
}

/* 提交按钮样式 */
.submit-btn {
    width: 100%;
    padding: 12px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.submit-btn:hover {
    background-color: var(--primary-hover);
}

.submit-btn:disabled,
.submit-btn.disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

/* 进度条样式 */
.progress-container {
    margin-top: 20px;
}

.progress-bar {
    height: 6px;
    background-color: var(--file-area-bg);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 5px;
}

.progress-fill {
    height: 100%;
    background-color: var(--primary-color);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    text-align: right;
    font-size: 12px;
    color: var(--text-secondary);
}

.progress-status {
    text-align: left;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 5px;
}

/* 结果显示样式 */
.result-container {
    margin-top: 30px;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.result-success, .result-error {
    text-align: center;
}

.result-icon {
    font-size: 40px;
    margin-bottom: 15px;
    filter: grayscale(100%);
}

.result-title {
    font-size: 18px;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.result-content {
    text-align: left;
    background: var(--file-area-bg);
    padding: 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 14px;
}

.result-content h4 {
    margin-bottom: 10px;
    color: var(--text-primary);
    font-size: 15px;
}

.result-content p {
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.result-content strong {
    color: var(--text-primary);
}

.file-link {
    color: var(--primary-color);
    text-decoration: none;
}

.file-link:hover {
    text-decoration: underline;
}

.reset-btn {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 20px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.reset-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* 响应式调整 */
@media (max-width: 480px) {
    .form-wrapper {
        padding: 20px;
    }
    
    .container {
        padding: 0;
    }
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background-color: var(--card-bg);
    margin: auto;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from {opacity: 0; transform: translateY(-20px);}
    to {opacity: 1; transform: translateY(0);}
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.close-btn {
    color: var(--text-secondary);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close-btn:hover,
.close-btn:focus {
    color: var(--text-primary);
    text-decoration: none;
}

.modal-body {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    text-align: right;
}

.info-group {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.info-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.info-group h4 {
    margin-bottom: 10px;
    color: var(--text-primary);
    font-size: 15px;
}

.info-group p {
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 14px;
}

.info-group strong {
    color: var(--text-primary);
}

.error-detail {
    color: var(--error-color);
    text-align: center;
    margin: 10px 0;
}

