/* 手机号输入框专门样式 */
#phoneNumber {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #fafbfc;
}

#phoneNumber:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    background-color: white;
}

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

/* 日志容器样式 */
.log-container {
    max-width: 100%;
    margin: 20px 0 0 0;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    font-size: 0.9rem;
    position: relative;
    width: 100%;
    display: block;
    float: none;
    clear: both;
}

.log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.log-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #495057;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.8rem;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-small:hover {
    background-color: #5a6268;
}

.log-content {
    max-height: 300px;
    overflow-y: auto;
    padding: 15px 20px;
    background-color: #fafbfc;
    font-family: 'Courier New', Courier, monospace;
    color: #2d3748;
    line-height: 1.5;
}

/* 日志条目样式 */
.log-item {
    margin-bottom: 10px;
    padding: 8px 12px;
    border-radius: 4px;
    word-break: break-all;
}

.log-item.info {
    background-color: #e3f2fd;
    border-left: 4px solid #2196f3;
}

.log-item.success {
    background-color: #e8f5e9;
    border-left: 4px solid #4caf50;
}

.log-item.error {
    background-color: #ffebee;
    border-left: 4px solid #f44336;
}

.log-item.warning {
    background-color: #fff3e0;
    border-left: 4px solid #ff9800;
}

.log-item.debug {
    background-color: #f5f5f5;
    border-left: 4px solid #9e9e9e;
}

/* 日志时间戳 */
.log-timestamp {
    color: #9e9e9e;
    font-size: 0.8rem;
    margin-right: 8px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .log-container {
        margin: 10px;
        font-size: 0.8rem;
    }
    
    .log-content {
        max-height: 200px;
        padding: 10px 15px;
    }
    
    .log-header {
        padding: 10px 15px;
    }
    
    .log-header h3 {
        font-size: 1rem;
    }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    max-width: 500px;
    width: 100%;
    margin: 20px;
    padding: 30px;
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* 页面标题 */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

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

.header p {
    color: #7f8c8d;
    font-size: 0.95rem;
    margin: 0;
}

/* 页面切换 */
.page {
    display: none;
}

.page.active {
    display: block;
}

/* 表单样式 */
.form-section {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #fafbfc;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    background-color: white;
}

/* 图片上传 */
.file-input-container {
    position: relative;
    margin-bottom: 15px;
    /* 确保容器有足够的高度和宽度 */
    min-height: 100px;
    width: 100%;
}

.file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    /* 确保文件输入元素在最上层 */
    z-index: 10;
}

.file-label {
    display: block;
    padding: 20px 15px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background-color: #fafafa;
    /* 确保标签有足够的高度 */
    min-height: 100px;
    /* 使用flex布局确保内容居中 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.file-label:hover {
    border-color: #667eea;
    background-color: #f0f4ff;
}

.file-label i {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 10px;
    display: block;
}

.file-info {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #7f8c8d;
}

/* 图片预览 */
.image-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.image-preview {
    position: relative;
    width: 100%;
    max-width: 150px;
    height: 150px;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

@media (max-width: 480px) {
    .image-preview {
        max-width: 100px;
        height: 100px;
    }
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-image {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: rgba(255, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 步骤指示器 */
.step-indicator {
    display: flex;
    justify-content: center;
    margin-bottom: 35px;
    padding-top: 20px;
    position: relative;
}

.step {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f0f0f0;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 15px;
    position: relative;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.step.active {
    background-color: #667eea;
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    transform: scale(1.1);
}

.step::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 2px;
    background-color: #e0e0e0;
    right: -45px;
    top: 50%;
    transform: translateY(-50%);
    transition: all 0.3s ease;
}

.step:last-child::after {
    display: none;
}

.step.active::after {
    background-color: #667eea;
    height: 3px;
    box-shadow: 0 0 8px rgba(102, 126, 234, 0.3);
}

.step:hover {
    background-color: #e8e8e8;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.step.active:hover {
    background-color: #667eea;
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

/* 按钮样式 */
.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

/* 评分准确性选择器样式 */
.accuracy-selector {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.accuracy-option {
    flex: 1;
    position: relative;
    cursor: pointer;
}

.accuracy-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.accuracy-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background-color: #fafbfc;
    transition: all 0.3s ease;
    text-align: center;
    min-height: 120px;
}

.accuracy-option input[type="radio"]:checked + .accuracy-button {
    border-color: #667eea;
    background-color: #f0f4ff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.accuracy-option input[type="radio"]:checked + .accuracy-button .accuracy-icon {
    transform: scale(1.1);
}

.accuracy-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    color: white;
}

.accuracy-icon.correct {
    background-color: #4caf50;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.accuracy-icon.incorrect {
    background-color: #f44336;
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.3);
}

.accuracy-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    transition: all 0.3s ease;
}

.accuracy-option input[type="radio"]:checked + .accuracy-button .accuracy-text {
    color: #667eea;
    font-weight: 700;
}

.btn-primary {
    background-color: #667eea;
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.btn-primary:hover {
    background-color: #5a6fd8;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

.btn-block {
    width: 100%;
    padding: 16px 20px;
    font-size: 1.1rem;
}

.action-buttons {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    padding: 0 20px;
}

.btn-secondary {
    background-color: #f5f7fa;
    color: #606266;
    border: 1px solid #ddd;
}

.btn-secondary:hover {
    background-color: #e4e7ed;
}

.btn-block {
    width: 100%;
}

.btn-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

@media (max-width: 480px) {
    .btn-group {
        flex-direction: column;
    }
}

/* 加载状态 */
.loading {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.loading.active {
    display: flex;
}

.loading-content {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

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

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

/* 结果显示 */
.result-section {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.grading-result {
    width: 100%;
    margin: 0 auto;
    padding: 20px;
    background-color: #fafafa;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.result-title {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 600;
}

.result-content {
    margin: 20px 0;
    padding: 15px;
    background-color: white;
    border-radius: 6px;
    line-height: 1.8;
    color: #333;
    word-wrap: break-word;
}

/* 结构化结果字段样式 */
.result-field {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.result-field:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.result-field-label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.1rem;
    margin-bottom: 10px;
    display: block;
}

.result-field-value {
    color: #555;
    line-height: 1.8;
    font-size: 1rem;
}

.result-field-value pre {
    background-color: #f0f2f5;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    line-height: 1.4;
}

.result-field-value br {
    margin-bottom: 8px;
}

/* 嵌套结果容器样式 */
.result-nested-container {
    margin: 15px 0;
    padding-left: 20px;
    border-left: 2px solid #e0e0e0;
}

/* 数组项样式 */
.result-array-item {
    margin-bottom: 15px;
    padding: 10px;
    background-color: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
}

.array-item-index {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.array-item-value {
    color: #555;
    padding-left: 15px;
}

/* 每个结果项的边框样式 */
.result-item {
    margin-bottom: 20px;
    padding: 15px;
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.result-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
    transform: translateY(-1px);
}

.result-label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.1rem;
    margin-bottom: 10px;
    display: block;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

.result-value {
    color: #555;
    line-height: 1.8;
    font-size: 1rem;
}

.result-value .result-item {
    margin: 10px 0;
    padding: 12px;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.result-basic-info {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f0f4ff;
    border-radius: 6px;
    border-left: 4px solid #667eea;
}

.result-error {
    margin: 20px 0;
    padding: 15px;
    background-color: #fff5f5;
    border-radius: 6px;
    color: #e74c3c;
    border-left: 4px solid #e74c3c;
}



.result-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.result-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.result-label {
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.result-value {
    color: #555;
    line-height: 1.8;
}

.score {
    font-size: 2rem;
    font-weight: bold;
    color: #e74c3c;
    margin-bottom: 10px;
}

.feedback {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin-top: 15px;
    border-left: 4px solid #667eea;
}

/* 错误提示 */
.error-message {
    background-color: #fff5f5;
    color: #e74c3c;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid #e74c3c;
    display: none;
}

.error-message.active {
    display: block;
}

/* 成功提示 */
.success-message {
    background-color: #f0fff4;
    color: #27ae60;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid #27ae60;
    display: none;
}

.success-message.active {
    display: block;
}

/* 吐司提示样式 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    font-size: 0.95rem;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 9999;
    max-width: 300px;
    word-wrap: break-word;
}

.toast.success {
    background-color: #4caf50;
}

.toast.error {
    background-color: #f44336;
}

.toast.warning {
    background-color: #ff9800;
}

.toast.info {
    background-color: #2196f3;
}

.toast.show {
    transform: translateX(0);
}

/* 响应式字体调整 */
@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    .container {
        padding: 10px;
    }
    
    .form-section {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .toast {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 900px;
    }
}

/* 特殊字段展示样式（用于business_type=2） */
.result-special-field {
    margin-bottom: 25px;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.result-special-field:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.result-special-field-label {
    font-weight: 700;
    color: #2c3e50;
    font-size: 1.2rem;
    margin-bottom: 15px;
    display: block;
    border-bottom: 2px solid #667eea;
    padding-bottom: 8px;
}

.result-special-field-value {
    color: #34495e;
    line-height: 1.8;
    font-size: 1rem;
}

/* 错误表格样式 */
.error-table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
    background-color: #fafafa;
}

.error-table th, .error-table td {
    padding: 12px 15px;
    text-align: left;
    border: 1px solid #e0e0e0;
}

.error-table th {
    background-color: #667eea;
    color: white;
    font-weight: 600;
}

.error-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.error-table tr:hover {
    background-color: #e8f0fe;
}

/* 错误内容高亮 */
.error-table td:first-child {
    color: #e74c3c;
    font-style: italic;
}

.error-table td:last-child {
    color: #27ae60;
    font-weight: 500;
}