
        * { margin: 0; padding: 0; box-sizing: border-box; }
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
            background: #f5f5f5; min-height: 100vh; padding: 10px;
        }
        .container {
            max-width: 1200px; margin: 0 auto; background: white;
            border-radius: 8px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }
        .header {
            background: white; padding: 16px 24px; text-align: center; border-bottom: 1px solid #e8e8e8;
        }
        .header h1 { font-size: 22px; font-weight: 500; color: #333; }
        .section {
            padding: 14px 24px; border-bottom: 1px solid #e8e8e8;
        }
        .section:last-child { border-bottom: none; }
        .section-title { font-size: 15px; font-weight: 500; color: #333; margin-bottom: 10px; }
        .result-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            margin-bottom: 10px;
        }
        .result-header .section-title { margin-bottom: 0; }
        .export-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 7px;
            min-height: 34px;
            border: 1px solid #1d4ed8;
            background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
            color: #fff;
            border-radius: 6px;
            padding: 7px 15px;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            white-space: nowrap;
            box-shadow: 0 8px 18px rgba(37, 99, 235, .22), inset 0 1px 0 rgba(255,255,255,.18);
            transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
        }
        .export-btn:hover {
            background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
            box-shadow: 0 10px 22px rgba(37, 99, 235, .28), inset 0 1px 0 rgba(255,255,255,.16);
            transform: translateY(-1px);
        }
        .export-btn:active {
            transform: translateY(0);
            box-shadow: 0 5px 12px rgba(37, 99, 235, .2), inset 0 1px 2px rgba(0,0,0,.12);
        }
        .export-btn:disabled {
            background: #e5e7eb;
            border-color: #e5e7eb;
            color: #9ca3af;
            cursor: not-allowed;
            box-shadow: none;
            transform: none;
        }
        .export-icon {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 18px;
            height: 18px;
            border-radius: 999px;
            background: rgba(255,255,255,.2);
            font-size: 13px;
            line-height: 1;
            font-weight: 700;
        }
        .export-btn:disabled .export-icon {
            background: rgba(156,163,175,.18);
        }
        
        /* 优化配置区域布局 */
        .config-section {
            background: linear-gradient(180deg, #fbfdff 0%, #ffffff 100%);
        }
        .config-title {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            color: #0f172a;
            font-size: 14px;
            font-weight: 700;
            letter-spacing: .02em;
            margin-bottom: 10px;
        }
        .config-title::before {
            content: "";
            width: 8px;
            height: 8px;
            border-radius: 999px;
            background: #2563eb;
            box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
        }
        .config-main-row {
            display: flex;
            gap: 12px;
            align-items: flex-start;
            flex-wrap: wrap;
        }
        
        .api-config {
            flex: 1;
            min-width: 300px;
            display: flex;
            gap: 10px;
            align-items: center;
            flex-wrap: wrap;
        }
        
        .detail-config {
            flex: 0 0 auto;
            min-width: 250px;
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
        
        .config-item { 
            display: flex; 
            flex-direction: row;
            align-items: center;
            gap: 8px;
            background: #fff;
            border: 1px solid #e2e8f0;
            border-radius: 999px;
            padding: 5px 6px 5px 12px;
            box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
        }
        
        .config-item label { 
            font-size: 12px; 
            color: #64748b;
            font-weight: 700;
            white-space: nowrap;
        }
        
        .config-item select, .config-item input {
            padding: 6px 28px 6px 10px;
            border: 0;
            border-left: 1px solid #e2e8f0;
            border-radius: 0 999px 999px 0;
            font-size: 13px;
            min-width: 150px;
            color: #0f172a;
            background: #f8fafc;
            outline: none;
        }
        .config-item select:focus, .config-item input:focus {
            box-shadow: inset 0 0 0 1px #93c5fd;
            background: #fff;
        }
        
        .config-item input { 
            min-width: 200px; 
        }
        
        .detail-level-group {
            display: flex; 
            gap: 12px; 
            align-items: center;
            flex-wrap: wrap;
        }
        
        .detail-level-group input[type="radio"] {
            min-width: auto; 
            margin: 0 4px 0 0;
        }
        
        .detail-level-group label {
            font-size: 14px; 
            color: #333; 
            margin-bottom: 0; 
            cursor: pointer;
            display: flex; 
            align-items: center; 
            gap: 4px;
            white-space: nowrap;
        }
        

        
        .test-btn {
            background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
            color: white; 
            border: none; 
            padding: 8px 15px;
            border-radius: 999px;
            cursor: pointer; 
            font-size: 13px;
            font-weight: 700;
            margin-left: 2px;
            white-space: nowrap;
            box-shadow: 0 8px 18px rgba(15, 23, 42, .16);
            transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
        }
        
        .test-btn:hover { 
            background: linear-gradient(180deg, #1e293b 0%, #334155 100%);
            transform: translateY(-1px);
            box-shadow: 0 10px 22px rgba(15, 23, 42, .2);
        }
        
        .status { 
            margin-left: 0;
            font-size: 12px;
            font-weight: 700;
            white-space: nowrap;
            padding: 6px 10px;
            border-radius: 999px;
            background: #f8fafc;
            border: 1px solid #e2e8f0;
        }
        
        .status.connected { 
            color: #52c41a; 
        }
        
        .status.disconnected { 
            color: #ff4d4f; 
        }
        
        .upload-area {
            border: 2px dashed #d9d9d9; border-radius: 6px; padding: 22px; text-align: center;
            background: #fafafa; transition: all 0.3s; cursor: pointer;
        }
        .upload-area:hover { border-color: #1890ff; background: #f0f8ff; }
        .upload-area.dragover { border-color: #1890ff; background: #e6f7ff; }
        .upload-text { color: #666; margin-bottom: 8px; }
        .upload-hint { color: #999; font-size: 12px; }
        .file-input { display: none; }
        .file-list { margin-top: 10px; }
        .file-item {
            display: flex; justify-content: space-between; align-items: center;
            padding: 8px 10px; background: #f9f9f9; border-radius: 4px; margin-bottom: 6px;
        }
        .file-info { display: flex; align-items: center; gap: 8px; }
        .file-name { font-weight: 500; color: #333; }
        .file-size { color: #999; font-size: 12px; }
        .remove-btn {
            background: #ff4d4f; color: white; border: none; padding: 4px 8px;
            border-radius: 4px; cursor: pointer; font-size: 12px;
        }
        .action-btn {
            background: #52c41a; color: white; border: none; padding: 9px 18px;
            border-radius: 4px; cursor: pointer; font-size: 14px; margin-top: 10px;
        }
        .action-btn:hover { background: #73d13d; }
        .action-btn:disabled { background: #d9d9d9; cursor: not-allowed; }
        .result-area {
            background: #fafafa; border: 1px solid #e8e8e8; border-radius: 4px; padding: 12px;
            min-height: 280px; white-space: pre-wrap; line-height: 1.6; color: #333;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', sans-serif; overflow-x: auto;
        }
        .loading { text-align: center; padding: 12px; color: #666; }
        .loading-spinner {
            width: 20px; height: 20px; border: 2px solid #f3f3f3; border-top: 2px solid #1890ff;
            border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 8px;
        }
        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }
        .result-area table { width: 100%; border-collapse: collapse; margin: 10px 0 0 0; font-size: 14px; background-color: white; table-layout: fixed; }
        .result-area .table-gap { height: 56px; }
        .result-area .overview-detail-gap { height: 120px; }
        .result-area .detail-table-gap { height: 64px; }
        .result-area table caption {
            caption-side: top;
            background: #f1f1f1;
            border: 1px solid #ddd;
            border-bottom: 0;
            padding: 8px 12px;
            color: #111;
            font-weight: 700;
            text-align: center;
            line-height: 1.35;
            white-space: normal;
        }
        .result-area th, .result-area td {
            border: 1px solid #ddd; padding: 8px 12px; text-align: left; vertical-align: top;
            word-wrap: break-word; line-height: 1.4;
        }
        .result-area th { background-color: #f8f9fa; font-weight: 600; color: #333; text-align: center; white-space: nowrap; }
        .result-area tr:nth-child(even) { background-color: #f9f9f9; }
        .result-area td { white-space: normal; }
        
        /* 调整简易表格第一列（序号列）宽度 */
        .result-area table th:first-child,
        .result-area table td:first-child { 
            width: 130px; 
            min-width: 130px;
            text-align: right;
        }
        
        /* 调整详细表格第一列（字段名列）宽度 */
        .result-area .detailed-table th:first-child,
        .result-area .detailed-table td:first-child { 
            width: 130px; 
            min-width: 130px;
            background-color: #e8f4fd; 
            font-weight: 600;
            text-align: right;
            white-space: nowrap;
        }
        
        .result-area .detailed-table td { min-height: 40px; line-height: 1.4; }
        .result-area .overview-table th:nth-child(1),
        .result-area .overview-table td:nth-child(1) { width: 80px; min-width: 80px; text-align: center; }
        .result-area .overview-table th:nth-child(2),
        .result-area .overview-table td:nth-child(2) { width: 38%; }
        .result-area .overview-table th:nth-child(3),
        .result-area .overview-table td:nth-child(3) { width: 16%; text-align: center; }
        .result-area .overview-table th:nth-child(4),
        .result-area .overview-table td:nth-child(4) { width: 26%; }
        .result-area .overview-table th:nth-child(5),
        .result-area .overview-table td:nth-child(5) { width: 16%; text-align: center; }
        .result-area h3 { 
            font-size: 16px; font-weight: 600; margin: 20px 0 10px 0; color: #333;
            border-bottom: 2px solid #1890ff; padding-bottom: 5px; clear: both;
        }
        .result-area h3:first-child { margin-top: 0; }
        .result-area table + h3 { margin-top: 30px; }
        .toggle-btn {
            background: #1890ff; color: white; border: none; padding: 8px 16px;
            border-radius: 4px; cursor: pointer; font-size: 14px; margin: 10px 0;
        }
        .toggle-btn:hover { background: #40a9ff; }
        
        /* 响应式设计 */
        @media (max-width: 1024px) {
            .config-main-row {
                flex-direction: column;
                gap: 16px;
            }
            
            .api-config {
                min-width: auto;
            }
            
            .detail-config {
                min-width: auto;
            }
        }
        
        @media (max-width: 768px) {
            .api-config {
                flex-direction: column;
                align-items: stretch;
                gap: 12px;
            }
            
            .config-item, 
            .config-item select, 
            .config-item input { 
                width: 100%; 
                min-width: auto; 
            }
            .config-item {
                justify-content: space-between;
            }
            .config-item select {
                width: auto;
                flex: 1;
            }
            
            .detail-level-group { 
                justify-content: flex-start; 
                flex-wrap: wrap; 
            }
            
            /* 移动端适配表格第一列宽度 */
            .result-area table th:first-child,
            .result-area table td:first-child { 
                width: 130px; 
                min-width: 130px;
                text-align: right;
            }
            
            /* 移动端详细表格第一列宽度保持更大 */
            .result-area .detailed-table th:first-child,
            .result-area .detailed-table td:first-child { 
                width: 130px; 
                min-width: 130px;
                text-align: right;
            }
        }

/* TXT 预览样式 */
.preview-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    margin-bottom: 10px;
    overflow: hidden;
}
.preview-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #f1f5f9;
    font-size: 13px;
}
.preview-filename {
    font-weight: 600;
    color: #1e293b;
    font-family: ui-monospace, monospace;
}
.preview-size {
    color: #94a3b8;
    font-size: 11px;
}
.preview-download {
    margin-left: auto;
    color: #3b82f6;
    text-decoration: none;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid #3b82f6;
}
.preview-download:hover {
    background: #3b82f6;
    color: #fff;
}
.preview-text {
    display: none;
}
