        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        body {
            background: #f8f9fa;
            min-height: 100vh;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
            display: flex;
            flex-direction: column;
            overflow-x: hidden;
        }
        .main-container {
            display: flex;
            flex-direction: column;
            width: 99%;
            max-width: 100%;
            margin: 0 auto;
            background: #ffffff;
            border: 1px solid #dee2e6;
            border-radius: 0;
            box-shadow: 0 4px 16px rgba(0,0,0,0.06);
            height: calc(100vh - 60px);
            overflow: hidden;
            position: relative;
            overscroll-behavior: contain;
        }
        /* 防止编辑器滚动影响页面滚动 */
        .editor-content {
            overscroll-behavior: contain;
        }
        .editor-content::-webkit-scrollbar {
            width: 8px;
            height: 8px;
        }
        .editor-content::-webkit-scrollbar-track {
            background: #f1f1f1;
            border-radius: 4px;
        }
        .editor-content::-webkit-scrollbar-thumb {
            background: #c1c1c1;
            border-radius: 4px;
        }
        .editor-content::-webkit-scrollbar-thumb:hover {
            background: #a8a8a8;
        }
        /* 工具说明区域 */
        .tool-info-section {
            margin-top: 20px;
            margin-bottom: 30px;
        }
        
        /* 移动端适配 */
        @media (max-width: 768px) {
            .main-container {
                width: 99%;
                height: calc(100vh - 60px);
                margin: 0 auto;
                border-radius: 0;
            }
            .editor-container {
                flex-direction: column;
            }
            .editor-pane:first-child {
                flex: 0 0 40%;
                border-right: none;
                border-bottom: 1px solid #dee2e6;
            }
            .editor-header {
                flex-wrap: wrap;
                gap: 5px;
                padding: 6px 10px;
                min-height: auto;
            }
            .editor-header .btn-tool {
                padding: 2px 4px;
                font-size: 10px;
            }
            .editor-header .indent-select {
                padding: 1px 3px;
                font-size: 10px;
                height: 16px;
            }
            .line-number-cell {
                width: 35px;
                min-width: 35px;
                max-width: 35px;
                padding: 0 4px;
                font-size: 10px;
            }
            .line-content-cell {
                padding: 0 5px 0 20px;
                font-size: 10px;
            }
            .collapse-btn {
                left: 3px;
                width: 12px;
                height: 12px;
                font-size: 8px;
                line-height: 10px;
            }
        }
        .toolbar {
            background: linear-gradient(to bottom, #ffffff, #f8f9fa);
            padding: 12px 20px;
            display: flex;
            justify-content: center;
            gap: 12px;
            align-items: center;
            border-bottom: 1px solid #dee2e6;
            flex-wrap: wrap;
            border-radius: 12px 12px 0 0;
        }
        .btn-tool {
            background: #0d6efd;
            color: white;
            border: none;
            padding: 8px 18px;
            border-radius: 6px;
            cursor: pointer;
            font-size: 13px;
            font-weight: 500;
            transition: all 0.2s ease;
            box-shadow: 0 2px 4px rgba(13,110,253,0.15);
        }
        .btn-tool:hover {
            background: #0b5ed7;
            transform: translateY(-1px);
            box-shadow: 0 4px 8px rgba(13,110,253,0.25);
        }
        .btn-tool:active {
            transform: translateY(0);
        }
        .btn-tool:disabled {
            background: #adb5bd;
            cursor: not-allowed;
            transform: none;
            opacity: 0.6;
        }
        .btn-tool.success {
            background: #198754;
            box-shadow: 0 2px 4px rgba(25,135,84,0.15);
        }
        .btn-tool.success:hover {
            background: #157347;
            box-shadow: 0 4px 8px rgba(25,135,84,0.25);
        }
        .btn-tool.warning {
            background: #ffc107;
            color: #000;
            box-shadow: 0 2px 4px rgba(255,193,7,0.15);
        }
        .btn-tool.warning:hover {
            background: #ffca2c;
            box-shadow: 0 4px 8px rgba(255,193,7,0.25);
        }
        .btn-tool.danger {
            background: #dc3545;
            box-shadow: 0 2px 4px rgba(220,53,69,0.15);
        }
        /* editor-header 内的小型按钮 */
        .editor-header .btn-tool {
            padding: 2px 6px;
            font-size: 10px;
            border-radius: 3px;
        }
        .editor-header .indent-select {
            padding: 2px 4px;
            font-size: 10px;
            border-radius: 3px;
            height: 18px;
        }
        /* 折叠行隐藏 */
        .output-row.collapsed {
            display: none;
        }
        /* 可编辑值样式 */
        .editable-value {
            display: inline-block;
            min-width: 20px;
            padding: 0 2px;
            border: 1px dashed transparent;
            border-radius: 2px;
            cursor: text;
            transition: all 0.2s ease;
        }
        .editable-value:hover {
            border-color: #0d6efd;
            background: #e7f1ff;
        }
        .editable-value:focus {
            outline: none;
            border-color: #0d6efd;
            background: #ffffff;
            box-shadow: 0 0 0 2px rgba(13,110,253,0.2);
        }
        .editable-value.string {
            color: #0d7377;
        }
        .editable-value.number {
            color: #d84315;
        }
        .editable-value.boolean {
            color: #1565c0;
        }
        /* 暗色主题可编辑值样式 */
        .theme-dark .editable-value.string {
            color: #6a9955 !important;
        }
        .theme-dark .editable-value.number {
            color: #b5cea8 !important;
        }
        .theme-dark .editable-value.boolean {
            color: #569cd6 !important;
        }
        .theme-dark .editable-key {
            color: #ce9178 !important;
        }
        /* 可编辑键样式 */
        .editable-key {
            display: inline-block;
            min-width: 20px;
            padding: 0 2px;
            border: 1px dashed transparent;
            border-radius: 2px;
            cursor: text;
            color: #0d6efd;
            transition: all 0.2s ease;
        }
        .editable-key:hover {
            border-color: #0d6efd;
            background: #e7f1ff;
        }
        .editable-key:focus {
            outline: none;
            border-color: #0d6efd;
            background: #ffffff;
            box-shadow: 0 0 0 2px rgba(13,110,253,0.2);
        }
        /* 编辑提示 */
        .edit-hint {
            position: absolute;
            top: 8px;
            right: 12px;
            font-size: 11px;
            color: #6c757d;
            background: rgba(248, 249, 250, 0.95);
            padding: 3px 8px;
            border-radius: 4px;
            border: 1px solid #dee2e6;
            z-index: 5;
            pointer-events: none;
            opacity: 0.8;
        }
        .edit-hint i {
            margin-right: 3px;
        }
        .btn-tool.danger:hover {
            background: #bb2d3b;
            box-shadow: 0 4px 8px rgba(220,53,69,0.25);
        }
        .btn-tool.secondary {
            background: #6c757d;
            box-shadow: 0 2px 4px rgba(108,117,125,0.15);
        }
        .btn-tool.secondary:hover {
            background: #5c636a;
            box-shadow: 0 4px 8px rgba(108,117,125,0.25);
        }
        .indent-select {
            background: white;
            color: #495057;
            border: 1px solid #ced4da;
            padding: 8px 12px;
            border-radius: 6px;
            font-size: 13px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .indent-select:hover {
            border-color: #0d6efd;
        }
        .indent-select:focus {
            outline: none;
            border-color: #0d6efd;
            box-shadow: 0 0 0 3px rgba(13,110,253,0.1);
        }
        .editor-container {
            flex: 1;
            display: flex;
            overflow: hidden;
            width: 100%;
            position: relative;
        }
        .editor-pane {
            display: flex;
            flex-direction: column;
            overflow: hidden;
            min-width: 100px;
        }
        .editor-pane:first-child {
            flex: 1;
        }
        .editor-pane:last-child {
            flex: 1;
            border-right: none;
        }
        /* 可拖动分隔条 */
        .resize-handle {
            width: 6px;
            background: #dee2e6;
            cursor: col-resize;
            position: relative;
            flex-shrink: 0;
            transition: background 0.2s ease;
            z-index: 10;
        }
        .resize-handle:hover {
            background: #0d6efd;
        }
        .resize-handle.dragging {
            background: #0d6efd;
        }
        .resize-handle::before {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 2px;
            height: 30px;
            background: rgba(255, 255, 255, 0.6);
            border-radius: 1px;
        }
        .resize-handle:hover::before {
            background: rgba(255, 255, 255, 0.9);
        }
        .editor-header {
            background: #f8f9fa;
            color: #212529;
            padding: 8px 16px;
            font-size: 13px;
            font-weight: 600;
            border-bottom: 1px solid #dee2e6;
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 15px;
            flex-wrap: nowrap;
            height: 30px;
        }
        .editor-wrapper {
            display: flex;
            position: relative;
            flex: 1;
            min-height: 0;
        }
        .line-numbers {
            background: #f8f9fa;
            color: #6c757d;
            padding: 10px 0;
            text-align: right;
            user-select: none;
            font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
            font-size: 12px;
            line-height: 1.5;
            border-right: 1px solid #dee2e6;
            white-space: pre;
            overflow-y: hidden;
            overflow-x: hidden;
            width: 50px;
            flex-shrink: 0;
            box-sizing: border-box;
            scrollbar-width: none;
            -ms-overflow-style: none;
        }
        .line-numbers::-webkit-scrollbar {
            display: none;
        }
        .editor-content-wrapper {
            flex: 1;
            position: relative;
            overflow: hidden;
        }
        .editor-content-wrapper.has-error {
            background: #fff5f5;
        }
        .editor-content {
            width: 100%;
            height: 100%;
            background: transparent;
            color: #212529;
            padding: 10px 10px 10px 0px;
            font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
            font-size: 12px;
            line-height: 1.5;
            overflow-y: auto;
            overflow-x: hidden;
            white-space: pre-wrap;
            word-wrap: break-word;
            word-break: break-all;
            border: none;
            outline: none;
            resize: none;
            margin: 0;
            box-sizing: border-box;
        }
        .editor-content::placeholder {
            color: #adb5bd;
        }
        .error-marker-layer {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            pointer-events: none;
            overflow: hidden;
        }
        .error-marker {
            position: absolute;
            display: flex;
            align-items: flex-start;
        }
        .error-cursor {
            width: 2px;
            height: 21px;
            background: #ff0000;
            animation: blink 1s infinite;
        }
        @keyframes blink {
            0%, 50% { opacity: 1; }
            51%, 100% { opacity: 0; }
        }
        .error-tooltip {
            position: absolute;
            left: 4px;
            top: -20px;
            background: #ff4444;
            color: white;
            padding: 2px 6px;
            border-radius: 3px;
            font-size: 11px;
            white-space: nowrap;
            z-index: 10;
        }
        .input-line-numbers {
            display: flex;
            flex-direction: column;
            align-items: flex-end;
            padding: 10px 8px 10px 0;
        }
        .line-number {
            line-height: 1.5;
            font-size: 12px;
            color: #6c757d;
            min-width: 30px;
            text-align: right;
            padding-right: 4px;
        }
        .line-number.error-line {
            background: #ff4444;
            color: #ffffff;
            border-radius: 2px;
            font-weight: bold;
        }
        .info-bar {
            background: #f5f5f5;
            color: #333;
            padding: 5px 15px;
            font-size: 12px;
            border-top: 1px solid #e0e0e0;
            display: flex;
            gap: 20px;
        }
        .info-item {
            display: flex;
            gap: 5px;
        }
        .info-label {
            color: #666;
        }
        .status-valid {
            color: #34a853;
            font-weight: 500;
        }
        .status-invalid {
            color: #ea4335;
            font-weight: 500;
        }
        /* JSON 语法高亮 - 现代配色 */
        .json-key {
            color: #0d6efd;
            font-weight: 600;
        }
        .json-string {
            color: #198754;
        }
        .json-number {
            color: #6f42c1;
        }
        .json-boolean {
            color: #fd7e14;
        }
        .json-null {
            color: #dc3545;
        }
        .json-bracket {
            color: #495057;
            font-weight: 600;
        }
        
        /* 暗色主题 JSON 语法高亮 - 参考 VS Code 配色 */
        .theme-dark .json-key {
            color: #ce9178 !important;
            font-weight: 600;
        }
        .theme-dark .json-string {
            color: #6a9955 !important;
        }
        .theme-dark .json-number {
            color: #b5cea8 !important;
        }
        .theme-dark .json-boolean {
            color: #569cd6 !important;
        }
        .theme-dark .json-null {
            color: #569cd6 !important;
        }
        .theme-dark .json-bracket {
            color: #d4d4d4 !important;
            font-weight: 600;
        }
        /* 错误信息样式 */
        .error-message {
            color: #dc3545;
            padding: 24px;
            line-height: 1.8;
            white-space: pre-wrap;
            word-wrap: break-word;
            background: #f8d7da;
            border-left: 4px solid #dc3545;
            border-radius: 8px;
        }
        .error-title {
            font-size: 16px;
            font-weight: 600;
            margin-bottom: 12px;
            color: #842029;
        }
        .error-detail {
            font-size: 13px;
            color: #58151c;
            margin-top: 12px;
            font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
            background: #fff;
            padding: 12px;
            border-radius: 4px;
            border: 1px solid #f5c6cb;
            overflow-x: auto;
        }
        .success-message {
            color: #198754;
            padding: 24px;
            line-height: 1.8;
            background: #d1e7dd;
            border-left: 4px solid #198754;
            border-radius: 8px;
            font-size: 16px;
            font-weight: 600;
        }
        /* 输出表格样式 */
        .output-table {
            width: 100%;
            border-collapse: collapse;
            font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
            font-size: 12px;
            line-height: 1.5;
        }
        .output-row {
            vertical-align: top;
        }
        /* 可折叠行的样式 */
        .output-row.collapsible {
            cursor: pointer;
        }
        .output-row.collapsible:hover {
            background-color: rgba(13, 110, 253, 0.05);
        }
        .output-row.collapsible:hover .line-number-cell {
            background-color: rgba(13, 110, 253, 0.1);
        }
        .line-number-cell {
            width: 50px;
            min-width: 50px;
            max-width: 50px;
            background: #f8f9fa;
            color: #6c757d;
            text-align: right;
            padding: 0 8px;
            border-right: 1px solid #dee2e6;
            user-select: none;
            white-space: nowrap;
        }
        .line-content-cell {
            padding: 0 10px 0 25px;
            white-space: pre-wrap;
            word-wrap: break-word;
            word-break: break-all;
            position: relative;
        }
        /* 折叠功能样式 */
        .json-line {
            position: relative;
            display: block;
            line-height: 1.5;
            padding-left: 20px; /* 只为折叠按钮留空间 */
            white-space: pre-wrap;
            word-wrap: break-word;
            word-break: break-all;
            font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
            font-size: 12px;
        }
        .collapse-btn {
            position: absolute;
            left: 5px;
            top: 2px;
            width: 14px;
            height: 14px;
            cursor: pointer;
            color: #6c757d;
            user-select: none;
            font-size: 9px;
            line-height: 12px;
            text-align: center;
            border: 1px solid #ced4da;
            background: #ffffff;
            border-radius: 3px;
            z-index: 10;
            transition: all 0.2s ease;
        }
        .collapse-btn:hover {
            color: #0d6efd;
            background: #e7f1ff;
            border-color: #0d6efd;
        }
        .collapsed {
            display: none;
        }
        .ellipsis {
            color: #6c757d;
            font-style: italic;
            font-size: 12px;
        }
        /* 查找功能样式 */
        .search-bar {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 15px;
            background: #f8f9fa;
            border-bottom: 1px solid #dee2e6;
        }
        .search-input {
            flex: 1;
            padding: 3px 10px;
            border: 1px solid #ced4da;
            border-radius: 6px;
            font-size: 12px;
            height: 24px;
            outline: none;
            transition: all 0.2s ease;
        }
        .search-input:focus {
            border-color: #0d6efd;
            box-shadow: 0 0 0 3px rgba(13,110,253,0.1);
        }
        .search-btn {
            padding: 6px 12px;
            background: #0d6efd;
            color: white;
            border: none;
            border-radius: 6px;
            cursor: pointer;
            font-size: 12px;
            font-weight: 500;
            transition: all 0.2s ease;
        }
        .search-btn:hover {
            background: #0b5ed7;
            transform: translateY(-1px);
        }
        .search-btn:disabled {
            background: #adb5bd;
            cursor: not-allowed;
            transform: none;
        }
        .search-count {
            font-size: 12px;
            color: #6c757d;
            white-space: nowrap;
            font-weight: 500;
        }
        /* 查找高亮样式 */
        .search-highlight {
            background-color: #ffd700;
            border-radius: 2px;
            padding: 0 2px;
            box-shadow: 0 0 2px rgba(255, 215, 0, 0.5);
        }
        .search-current {
            background-color: #ff4500 !important;
            color: #fff !important;
            border-radius: 2px;
            padding: 0 2px;
            box-shadow: 0 0 4px rgba(255, 69, 0, 0.6);
        }
        /* 输出区域选中样式 - 用于查找高亮 */
        .editor-content ::selection,
        .output-content ::selection {
            background-color: #ff6b35;
            color: #fff;
        }
        .search-btn {
            background: #0d6efd;
            color: #fff;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            transition: all 0.2s;
        }
        .search-btn:hover:not(:disabled) {
            background: #0b5ed7;
        }
        .search-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }
        .search-input {
            border: 1px solid #dee2e6;
            border-radius: 4px;
            outline: none;
        }
        .search-input:focus {
            border-color: #0d6efd;
            box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.25);
        }
        .search-count {
            color: #6c757d;
            font-size: 12px;
        }
        /* 隐藏页面底部内容 */
        .container {
            display: block;
        }
        footer {
            display: block;
        }
        .collapse-controls {
            float: right;
            display: flex;
            gap: 12px;
        }
        .collapse-control-btn {
            color: #0d6efd;
            cursor: pointer;
            font-size: 12px;
            font-weight: 500;
            transition: all 0.2s ease;
        }
        .collapse-control-btn:hover {
            color: #0b5ed7;
            text-decoration: underline;
        }
        /* 底部状态栏 */
        .status-bar {
            background: #f8f9fa;
            border-top: 1px solid #dee2e6;
            padding: 6px 15px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            font-size: 10px !important;
            color: #495057;
            gap: 15px;
            flex-wrap: wrap;
            min-height: 32px;
        }
        .status-bar-left {
            display: flex;
            align-items: center;
            gap: 15px;
        }
        .status-bar-right {
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .status-item {
            display: flex;
            align-items: center;
            gap: 4px;
            white-space: nowrap;
            font-size: 10px !important;
        }
        .status-item .label {
            color: #6c757d;
            font-size: 10px !important;
        }
        .status-item .value {
            color: #212529;
            font-weight: 500;
            font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
            font-size: 10px !important;
        }
        .status-divider {
            width: 1px;
            height: 16px;
            background: #dee2e6;
        }
        .status-bar .indent-select {
            padding: 2px 6px;
            font-size: 10px !important;
            height: 24px;
            border-radius: 4px;
        }
        .status-bar .btn-tool {
            padding: 2px 8px;
            font-size: 10px !important;
            border-radius: 4px;
        }
        .theme-toggle {
            background: none;
            border: 1px solid #dee2e6;
            border-radius: 4px;
            padding: 2px 8px;
            font-size: 10px !important;
            cursor: pointer;
            color: #495057;
            display: flex;
            align-items: center;
            gap: 4px;
            transition: all 0.2s ease;
        }
        .theme-toggle:hover {
            border-color: #0d6efd;
            color: #0d6efd;
        }

        /* ===== 暗色主题 ===== */
        .main-container.theme-dark {
            background: #1e1e1e;
            border-color: #333;
        }
        .theme-dark .editor-header {
            background: #252526;
            color: #d4d4d4;
            border-bottom-color: #333;
        }
        .theme-dark .editor-header .btn-tool {
            background: #333;
            color: #d4d4d4;
            border-color: #444;
        }
        .theme-dark .editor-header .btn-tool:hover {
            background: #444;
        }
        .theme-dark .editor-header .indent-select,
        .theme-dark .editor-header .search-input {
            background: #333;
            color: #d4d4d4;
            border-color: #444;
        }
        .theme-dark .editor-header .search-btn {
            background: #333;
            color: #d4d4d4;
            border-color: #444;
        }
        .theme-dark .editor-container {
            background: #1e1e1e;
        }
        .theme-dark .editor-pane {
            background: #1e1e1e;
        }
        .theme-dark .editor-wrapper {
            background: #1e1e1e;
        }
        .theme-dark .line-numbers {
            background: #252526;
            color: #858585;
            border-right-color: #333;
        }
        .theme-dark .editor-content {
            background: #1e1e1e;
            color: #d4d4d4;
        }
        .theme-dark .editor-content.textarea,
        .theme-dark textarea.editor-content {
            background: #1e1e1e;
            color: #d4d4d4;
        }
        .theme-dark .output-table .line-number-cell {
            background: #252526;
            color: #858585;
            border-right-color: #333;
        }
        .theme-dark .output-table .line-content-cell {
            color: #d4d4d4;
        }
        .theme-dark .output-row:hover {
            background: #2a2d2e !important;
        }
        .theme-dark .resize-handle {
            background: #333;
        }
        .theme-dark .resize-handle:hover,
        .theme-dark .resize-handle.dragging {
            background: #0d6efd;
        }
        .theme-dark .status-bar {
            background: #252526;
            border-top-color: #333;
            color: #d4d4d4;
        }
        .theme-dark .status-item .label {
            color: #858585;
        }
        .theme-dark .status-item .value {
            color: #d4d4d4;
        }
        .theme-dark .status-divider {
            background: #444;
        }
        .theme-dark .status-bar .indent-select {
            background: #333;
            color: #d4d4d4;
            border-color: #444;
        }
        .theme-dark .status-bar .btn-tool {
            background: #333;
            color: #d4d4d4;
            border-color: #444;
        }
        .theme-dark .status-bar .btn-tool:hover {
            background: #444;
        }
        .theme-dark .theme-toggle {
            color: #d4d4d4;
            border-color: #444;
        }
        .theme-dark .theme-toggle:hover {
            border-color: #0d6efd;
            color: #0d6efd;
        }
        .theme-dark .editor-content-wrapper {
            background: #1e1e1e;
        }
        .theme-dark .editor-content-wrapper.has-error {
            background: #1e1e1e;
        }
        .theme-dark .error-marker-layer {
            background: transparent;
        }
        .theme-dark .editable-value:hover {
            border-color: #0d6efd;
            background: #2a2d2e;
        }
        .theme-dark .editable-value:focus {
            border-color: #0d6efd;
            background: #333;
        }
