        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        :root {
            --primary: #3b82f6;
            --primary-dark: #2563eb;
            --primary-light: #60a5fa;
            --accent: #8b5cf6;
            --success: #10b981;
            --danger: #ef4444;
            --bg: #f0f4ff;
            --card-bg: rgba(255, 255, 255, 0.85);
            --text-main: #0f172a;
            --text-sub: #475569;
            --text-mute: #94a3b8;
            --border: #e2e8f0;
            --border-light: #f1f5f9;
        }

        body {
            background: linear-gradient(135deg, #eef2ff 0%, #f0f9ff 50%, #faf5ff 100%);
            font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
            padding: 24px;
            display: flex;
            justify-content: center;
            align-items: flex-start;
            min-height: 100vh;
            position: relative;
            overflow-x: hidden;
        }

        /* 背景装饰光斑 */
        body::before,
        body::after {
            content: '';
            position: fixed;
            border-radius: 50%;
            filter: blur(80px);
            opacity: 0.4;
            z-index: 0;
            pointer-events: none;
        }
        body::before {
            width: 400px;
            height: 400px;
            background: #a5b4fc;
            top: -100px;
            left: -100px;
        }
        body::after {
            width: 500px;
            height: 500px;
            background: #c4b5fd;
            bottom: -150px;
            right: -150px;
        }

        .container {
            max-width: 1300px;
            width: 100%;
            background: var(--card-bg);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border-radius: 24px;
            box-shadow:
                0 30px 60px -15px rgba(59, 130, 246, 0.12),
                0 10px 25px -10px rgba(0, 0, 0, 0.06),
                0 0 0 1px rgba(255, 255, 255, 0.8) inset;
            padding: 28px 32px;
            display: flex;
            flex-direction: column;
            gap: 18px;
            position: relative;
            z-index: 1;
        }

        h1 {
            font-size: 2rem;
            font-weight: 700;
            background: linear-gradient(135deg, #1e40af 0%, #7c3aed 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 2px;
            letter-spacing: -0.5px;
        }
        h1 small {
            font-size: 0.9rem;
            font-weight: 500;
            color: var(--text-sub);
            margin-left: 10px;
            -webkit-text-fill-color: var(--text-sub);
        }

        .home-link {
            text-decoration: none;
            color: var(--primary);
            font-weight: 500;
            font-size: 0.9rem;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            margin-bottom: 4px;
            width: fit-content;
            padding: 6px 12px;
            border-radius: 10px;
            transition: all 0.2s ease;
        }
        .home-link:hover {
            background: rgba(59, 130, 246, 0.08);
            color: var(--primary-dark);
            transform: translateX(-2px);
        }

        .editor-wrap {
            display: flex;
            border: 1px solid var(--border);
            border-radius: 16px;
            overflow: hidden;
            background: #ffffff;
            box-shadow:
                0 4px 12px rgba(15, 23, 42, 0.04),
                inset 0 1px 2px rgba(255, 255, 255, 0.8);
            transition: all 0.25s ease;
            min-height: 340px;
            max-height: 520px;
        }
        .editor-wrap:focus-within {
            box-shadow:
                0 0 0 4px rgba(59, 130, 246, 0.12),
                0 8px 24px rgba(59, 130, 246, 0.1);
            border-color: var(--primary-light);
        }

        .line-gutter {
            background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
            color: var(--text-mute);
            text-align: right;
            padding: 14px 12px 14px 16px;
            user-select: none;
            overflow: hidden;
            white-space: pre;
            border-right: 1px solid var(--border-light);
            min-width: 52px;
            font-family: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
            font-size: 13.5px;
            line-height: 1.7;
            letter-spacing: 0.2px;
        }
        .line-gutter .err-line {
            background: #fef2f2;
            color: #dc2626;
            font-weight: 700;
            display: inline-block;
            width: 100%;
            border-radius: 4px;
            padding: 0 4px;
            margin: 0 -4px;
        }

        #json-input {
            flex: 1;
            border: none;
            outline: none;
            resize: none;
            padding: 14px 18px;
            font-family: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
            font-size: 13.5px;
            line-height: 1.7;
            white-space: pre;
            overflow: auto;
            tab-size: 2;
            background: #ffffff;
            color: var(--text-main);
            caret-color: var(--primary);
        }
        #json-input::placeholder {
            color: #cbd5e1;
        }

        .toolbar {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 10px;
            margin: 4px 0;
        }

        button {
            background: #ffffff;
            border: 1px solid #e2e8f0;
            padding: 9px 18px;
            border-radius: 12px;
            font-weight: 500;
            font-size: 0.88rem;
            color: var(--text-main);
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 7px;
            transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
            letter-spacing: 0.1px;
            white-space: nowrap;
            position: relative;
            overflow: hidden;
        }
        button:hover {
            background: #f8fafc;
            border-color: #cbd5e1;
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
        }
        button:active {
            transform: translateY(0);
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
        }

        button.primary {
            background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
            border: none;
            color: white;
            font-weight: 600;
            box-shadow:
                0 4px 14px rgba(59, 130, 246, 0.35),
                0 2px 4px rgba(139, 92, 246, 0.2);
        }
        button.primary:hover {
            background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
            box-shadow:
                0 6px 20px rgba(59, 130, 246, 0.4),
                0 3px 8px rgba(139, 92, 246, 0.25);
            transform: translateY(-1.5px);
        }
        button.primary:active {
            transform: translateY(0);
        }

        .message {
            font-size: 0.9rem;
            font-weight: 500;
            margin: 2px 0;
            min-height: 24px;
            padding: 8px 14px;
            border-radius: 10px;
            display: none;
        }
        .success-msg {
            color: #047857;
            background: #ecfdf5;
            border: 1px solid #a7f3d0;
        }
        .error-msg {
            color: #b91c1c;
            background: #fef2f2;
            border: 1px solid #fecaca;
        }

        .tree-container {
            background: #ffffff;
            border: 1px solid var(--border);
            border-radius: 16px;
            padding: 16px 20px;
            margin: 6px 0;
            max-height: 480px;
            overflow: auto;
            font-family: 'JetBrains Mono', monospace;
            font-size: 13.5px;
            display: none;
            box-shadow:
                inset 0 2px 6px rgba(0, 0, 0, 0.03),
                0 2px 8px rgba(0, 0, 0, 0.02);
            line-height: 1.8;
        }

        .tree-item {
            margin-left: 1.4rem;
            border-left: 1px dashed #e2e8f0;
            padding-left: 1rem;
        }
        .tree-key {
            color: #7c3aed;
            font-weight: 600;
            cursor: pointer;
        }
        .tree-value {
            color: var(--text-main);
            margin-left: 6px;
        }
        .tree-value:has(+ .tree-item) {
            color: var(--text-sub);
        }
        .tree-toggle {
            cursor: pointer;
            user-select: none;
            margin-right: 6px;
            color: var(--text-mute);
            font-weight: bold;
            font-size: 10px;
            transition: transform 0.15s ease;
            display: inline-block;
        }

        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
            gap: 12px;
            margin: 6px 0;
            display: none;
        }
        .stat-item {
            background: white;
            border: 1px solid var(--border);
            border-radius: 12px;
            padding: 14px 16px;
            display: flex;
            flex-direction: column;
            gap: 6px;
            transition: all 0.2s ease;
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
        }
        .stat-item:hover {
            border-color: var(--primary-light);
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(59, 130, 246, 0.08);
        }
        .stat-label {
            color: var(--text-sub);
            font-weight: 500;
            font-size: 0.82rem;
        }
        .stat-value {
            font-weight: 700;
            color: var(--text-main);
            font-size: 1.3rem;
            background: linear-gradient(135deg, #1e40af 0%, #7c3aed 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        /* 滚动条美化 */
        #json-input::-webkit-scrollbar,
        .tree-container::-webkit-scrollbar {
            width: 8px;
            height: 8px;
        }
        #json-input::-webkit-scrollbar-track,
        .tree-container::-webkit-scrollbar-track {
            background: #f8fafc;
        }
        #json-input::-webkit-scrollbar-thumb,
        .tree-container::-webkit-scrollbar-thumb {
            background: #cbd5e1;
            border-radius: 4px;
        }
        #json-input::-webkit-scrollbar-thumb:hover,
        .tree-container::-webkit-scrollbar-thumb:hover {
            background: #94a3b8;
        }

        /* 响应式 */
        @media (max-width: 768px) {
            body {
                padding: 12px;
            }
            .container {
                padding: 20px;
                border-radius: 18px;
            }
            h1 {
                font-size: 1.5rem;
                flex-wrap: wrap;
            }
            h1 small {
                margin-left: 0;
                width: 100%;
            }
            button {
                padding: 8px 14px;
                font-size: 0.82rem;
            }
            .toolbar {
                gap: 8px;
            }
        }