        :root {
            --bg-main: #ffffff;
            --bg-editor: #ffffff;
            --text-main: #333333;
            --border-color: #ddd;
            --editor-text: #333333;
        }

        [data-theme="dark"] {
            --bg-main: #1a1a1a;
            --bg-editor: #2d2d2d;
            --text-main: #ffffff;
            --border-color: #444;
            --editor-text: #ffffff;
        }
        
        body {
            margin: 0;
            padding: 0;
            background-color: var(--bg-main);
            color: var(--text-main);
            transition: background-color 0.3s, color 0.3s;
            font-family: system-ui, -apple-system, sans-serif;
        }

        .container {
            max-width: 1400px;
            margin: 0 auto;
            padding: 20px;
            box-sizing: border-box;
        }

        .editor-container {
            display: grid;
            gap: 20px;
            margin-top: 20px;
            transition: all 0.3s ease;
            height: calc(100vh - 180px);
            min-height: 500px;
            position: relative;
        }

        .editor-container.horizontal {
            grid-template-columns: minmax(200px, 1fr) 8px minmax(200px, 1fr);
            gap: 0;
        }

        .editor-wrapper, .preview-wrapper {
            display: flex;
            flex-direction: column;
            height: 100%;
            background: var(--bg-editor);
            border: 1px solid var(--border-color);
            border-radius: 4px;
            overflow: hidden;
        }

        .resizer {
            background: var(--border-color);
            position: relative;
            transition: background 0.2s;
            z-index: 1;
        }

        .resizer:hover {
            background: #007bff;
        }

        .horizontal .resizer {
            cursor: col-resize;
            width: 8px;
        }

        .CodeMirror {
            height: 100% !important;
            font-family: 'Fira Code', monospace !important;
            font-size: 14px;
            line-height: 1.5;
        }

        #preview {
            height: 100%;
            padding: 20px;
            background: var(--bg-editor);
            border: none;
            overflow-y: auto;
            color: var(--text-main);
            box-sizing: border-box;
        }

        #preview.editable {
            outline: 2px dashed #007bff;
            cursor: text;
        }

        .panel-title {
            font-size: 16px;
            font-weight: bold;
            margin-bottom: 10px;
            color: var(--text-main);
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px 15px;
            background: rgba(0,0,0,0.1);
        }

        .button {
            background: #007bff;
            color: white;
            border: none;
            padding: 8px 16px;
            border-radius: 4px;
            cursor: pointer;
            font-size: 14px;
            margin-right: 10px;
            margin-bottom: 10px;
            display: inline-flex;
            align-items: center;
            gap: 5px;
            transition: background-color 0.2s;
        }

        .button:hover {
            background: #0056b3;
        }

        .button svg {
            width: 16px;
            height: 16px;
            fill: currentColor;
        }

        .fullscreen-active .container {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: var(--bg-main);
            z-index: 99;
            padding: 20px;
            margin: 0;
        }