* {
      box-sizing: border-box;
      scrollbar-width: thin;
      scrollbar-color: #0f3460 #16213e;
    }
    *::-webkit-scrollbar {
      width: 8px;
      height: 8px;
    }
    *::-webkit-scrollbar-track {
      background: #16213e;
      border-radius: 8px;
    }
    *::-webkit-scrollbar-thumb {
      background: #0f3460;
      border-radius: 4px;
      border: 1px solid #1a1a2e;
    }
    *::-webkit-scrollbar-thumb:hover {
      background: #e94560;
    }
    html, body {
      height: 100%;
      overflow: hidden;
    }
    body {
      margin: 0;
      font-family: 'Segoe UI', system-ui, sans-serif;
      background: #1a1a2e;
      color: #eee;
    }
    h1 {
      display: flex;
      align-items: center;
      justify-content: center;
      margin: 0;
    }
    h1 img {
      height: 70px;
      object-fit: contain;
      display: block;
      margin-top: 15px;
    }
    .export-actions {
      position: fixed;
      top: 0.75rem;
      right: 0.75rem;
      z-index: 20;
      display: flex;
      gap: 0.5rem;
    }
    .creator-link {
      position: fixed;
      top: 0.75rem;
      left: 0.75rem;
      z-index: 20;
    }
    .creator-link a {
      display: inline-flex;
      align-items: center;
      gap: 0.4rem;
      padding: 0.45rem 0.8rem;
      font-size: 0.85rem;
      text-decoration: none;
      background: linear-gradient(135deg, #0f3460, #16213e);
      border: 1px solid #e94560;
      color: #eee;
      border-radius: 6px;
      transition: transform 0.15s ease, background 0.15s ease;
    }
    .creator-link a:hover {
      background: linear-gradient(135deg, #16213e, #0f3460);
      transform: translateY(-1px);
    }
    .export-actions button {
      padding: 0.45rem 0.8rem;
      font-size: 0.85rem;
      background: #0f3460;
      border: 1px solid #e94560;
      color: #eee;
      border-radius: 6px;
      cursor: pointer;
    }
    .export-actions button:hover {
      background: #16213e;
    }
    .toolbar {
      display: flex;
      align-items: center;
      gap: 1rem;
      padding: 0;
      flex-wrap: wrap;
    }
    .toolbar button,
    .toolbar label {
      padding: 0.4rem 0.8rem;
      font-size: 0.9rem;
      background: #0f3460;
      border: 1px solid #e94560;
      color: #eee;
      border-radius: 6px;
      cursor: pointer;
    }
    .toolbar button:hover,
    .toolbar label:hover {
      background: #16213e;
    }
    .toolbar input[type="file"],
    #fileInput,
    #outputFileInput,
    #indentSelect {
      display: none;
    }
    .toolbar .indent-wrap {
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }
    .toolbar .indent-wrap label {
      background: none;
      border: none;
      padding: 0;
      color: #888;
      cursor: default;
    }
    .toolbar select {
      padding: 0.4rem 0.8rem;
      font-size: 0.9rem;
      background: #16213e;
      border: 1px solid #0f3460;
      color: #eee;
      border-radius: 6px;
      cursor: pointer;
    }
    .container {
      display: flex;
      gap: 3rem;
      padding: 1rem;
      height: calc(100vh - 5rem);
      position: relative;
    }
    .bridge-controls {
      position: absolute;
      top: 1.5rem;
      left: 50%;
      transform: translateX(-50%);
      z-index: 6;
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
      align-items: center;
      pointer-events: auto;
    }
    .bridge-controls button {
      width: 32px;
      height: 32px;
      padding: 0;
      border: 1px solid #0f3460;
      border-radius: 6px;
      background: #16213e;
      color: #abb2bf;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .bridge-controls button:hover {
      background: #0f3460;
      color: #eee;
    }
    .bridge-controls .indent-btn {
      font-size: 13px;
      font-weight: 600;
    }
    .bridge-controls .mode-btn {
      width: 32px;
      font-size: 8px;
      font-weight: 700;
      letter-spacing: 0;
    }
    .bridge-controls .mode-btn.is-inactive {
      opacity: 0.45;
      border-color: #2b3652;
      color: #76809b;
    }
    .bridge-controls .sync-toggle-btn.is-off {
      opacity: 0.6;
      border-color: #3d4a66;
      color: #7f8aa3;
    }
    .panel {
      flex: 1;
      display: flex;
      flex-direction: column;
      min-width: 0;
    }
    .panel label {
      font-size: 0.85rem;
      color: #888;
      margin-bottom: 0.25rem;
    }
    .editor-wrap {
      --line-number-gutter: 56px;
      flex: 1;
      position: relative;
      display: flex;
      flex-direction: column;
      min-height: 0;
      background: #16213e;
      border: 1px solid #0f3460;
      border-radius: 8px;
      overflow: hidden;
    }
    .editor-wrap::before,
    .editor-wrap::after {
      content: '';
      position: absolute;
      right: 0;
      width: 14px;
      height: 10px;
      background: #16213e;
      z-index: 3;
      pointer-events: none;
    }
    .editor-wrap::before {
      top: 0;
      border-bottom-left-radius: 8px;
    }
    .editor-wrap::after {
      bottom: 0;
      border-top-left-radius: 8px;
    }
    .editor-wrap.indent-1 { --indent-ch: 1; }
    .editor-wrap.indent-2 { --indent-ch: 2; }
    .editor-wrap.indent-4 { --indent-ch: 4; }
    .editor-wrap .guides {
      position: absolute;
      inset: 0;
      pointer-events: none;
      border-radius: 8px;
      overflow: hidden;
      z-index: 3;
    }
    .editor-wrap .guides-inner {
      position: absolute;
      left: 0;
      top: 0;
      font-size: 14px;
      line-height: 1.6;
    }
    .guide-line {
      height: 21px;
      position: relative;
      box-sizing: border-box;
    }
    .guide-segment {
      position: absolute;
      top: 0;
      bottom: 0;
      width: 1px;
      background: rgba(255, 255, 255, 0.12);
    }
    .selection-dots {
      position: absolute;
      inset: 0;
      padding: 1rem 1rem 2.6rem calc(1rem + var(--line-number-gutter));
      font-family: 'Consolas', 'Monaco', monospace;
      font-size: 14px;
      line-height: 1.6;
      white-space: pre;
      overflow-wrap: normal;
      word-break: normal;
      overflow: auto;
      pointer-events: none;
      color: #eee;
      background: transparent;
      border: none;
      border-radius: 0;
      z-index: 2;
    }
    .selection-dots.wrap {
      white-space: pre-wrap;
      overflow-wrap: anywhere;
      word-break: break-all;
    }
    .selection-dots.no-wrap {
      white-space: pre;
      overflow-wrap: normal;
      word-break: normal;
    }
    .selection-dots::before,
    .selection-dots::after {
      content: '';
      position: absolute;
      bottom: 0;
      width: 10px;
      height: 14px;
      background: #16213e;
      z-index: 3;
      pointer-events: none;
    }
    .selection-dots::before {
      left: 0;
      border-top-right-radius: 8px;
    }
    .selection-dots::after {
      right: 0;
      border-top-left-radius: 8px;
    }
    .selection-dots:empty {
      display: none;
    }
    .editor-wrap:focus-within {
      border-color: #e94560;
    }
    .drop-overlay {
      position: absolute;
      inset: 0;
      z-index: 8;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 0.75rem;
      background: rgba(10, 16, 35, 0.78);
      color: #e9eefc;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.15s ease;
    }
    .drop-overlay svg {
      width: 86px;
      height: 86px;
      stroke-width: 1.6;
      color: #f2f6ff;
      filter: drop-shadow(0 0 8px rgba(233, 69, 96, 0.45));
    }
    .drop-overlay-text {
      font-size: 18px;
      font-weight: 600;
      letter-spacing: 0.2px;
      text-align: center;
      color: #f2f6ff;
      text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
    }
    .editor-wrap.drop-target-active,
    .output-wrap.drop-target-active {
      border-color: #e94560;
      box-shadow: 0 0 0 1px rgba(233, 69, 96, 0.45) inset;
    }
    .editor-wrap.drop-target-active .drop-overlay,
    .output-wrap.drop-target-active .drop-overlay {
      opacity: 1;
    }
    .input-editor {
      flex: 1;
      position: relative;
      z-index: 1;
      padding: 1rem 1rem 2.6rem calc(1rem + var(--line-number-gutter));
      font-family: 'Consolas', 'Monaco', monospace;
      font-size: 14px;
      line-height: 1.6;
      background: transparent;
      border: none;
      border-radius: 0;
      color: #eee;
      overflow: auto;
      white-space: pre;
      word-break: normal;
      outline: none;
    }
    .input-editor.wrap {
      white-space: pre-wrap;
      overflow-wrap: anywhere;
      word-break: break-all;
    }
    .input-editor:empty::before {
      content: attr(data-placeholder);
      color: #5c6370;
      pointer-events: none;
    }
    #input * {
      user-select: text;
      -webkit-user-select: text;
    }
    #input::selection {
      background: rgba(233, 69, 96, 0.25);
      color: inherit;
    }
    .editor-wrap.show-selection-overlay #input::selection {
      background: transparent;
      color: transparent;
    }
    .editor-wrap .textarea-bg {
      position: absolute;
      inset: 0;
      border-radius: 8px;
      background: #16213e;
      z-index: 0;
    }
    .input-editor:focus {
      outline: none;
      border-color: #e94560;
    }
    .output {
      flex: 1;
      position: relative;
      z-index: 0;
      padding: 1rem 1rem 2.6rem calc(1rem + var(--line-number-gutter));
      font-family: 'Consolas', 'Monaco', monospace;
      font-size: 14px;
      line-height: 1.6;
      background: transparent;
      border: none;
      border-radius: 0;
      overflow: auto;
      white-space: pre;
      word-break: normal;
      outline: none;
    }
    .output.wrap {
      white-space: pre-wrap;
      word-break: break-all;
    }
    .output:focus {
      outline: none;
    }
    #output::selection {
      background: rgba(233, 69, 96, 0.25);
      color: inherit;
    }
    .output-wrap.show-selection-overlay #output::selection {
      background: transparent;
      color: transparent;
    }
    #output * {
      user-select: text;
      -webkit-user-select: text;
    }
    .output-selection-dots {
      position: absolute;
      inset: 0;
      padding: 1rem 1rem 2.6rem calc(1rem + var(--line-number-gutter));
      font-family: 'Consolas', 'Monaco', monospace;
      font-size: 14px;
      line-height: 1.6;
      white-space: pre;
      word-break: normal;
      overflow: auto;
      pointer-events: none;
      color: #eee;
      background: transparent;
      border: none;
      border-radius: 0;
      z-index: 2;
    }
    .output::-webkit-scrollbar-track {
      background: transparent;
      border-radius: 8px;
    }
    .output-selection-dots::-webkit-scrollbar-track {
      background: transparent;
      border-radius: 8px;
    }
    .output-selection-dots.wrap {
      white-space: pre-wrap;
      word-break: break-all;
    }
    .output-selection-dots:empty {
      display: none;
    }
    .output-wrap:focus-within {
      border-color: #e94560;
    }
    .output-wrap {
      --line-number-gutter: 56px;
      flex: 1;
      position: relative;
      display: flex;
      flex-direction: column;
      min-height: 0;
      background: #16213e;
      border: 1px solid #0f3460;
      border-radius: 8px;
      overflow: hidden;
    }
    .output-wrap::before,
    .output-wrap::after {
      content: '';
      position: absolute;
      right: 0;
      width: 14px;
      height: 10px;
      background: #16213e;
      z-index: 3;
      pointer-events: none;
    }
    .output-wrap::before {
      top: 0;
      border-bottom-left-radius: 8px;
    }
    .output-wrap::after {
      bottom: 0;
      border-top-left-radius: 8px;
    }
    .output::before,
    .output::after {
      content: '';
      position: absolute;
      bottom: 0;
      width: 10px;
      height: 14px;
      background: #16213e;
      z-index: 3;
      pointer-events: none;
    }
    .output::before {
      left: 0;
      border-top-right-radius: 8px;
    }
    .output::after {
      right: 0;
      border-top-left-radius: 8px;
    }
    .output-wrap .copy-btn,
    .output-wrap .format-btn,
    .output-wrap .output-upload-btn {
      position: absolute;
      top: 0.5rem;
      right: 1.75rem;
      z-index: 2;
      width: 32px;
      height: 32px;
      padding: 0;
      border: 1px solid #0f3460;
      border-radius: 6px;
      background: #16213e;
      color: #abb2bf;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .output-wrap .copy-btn:hover,
    .output-wrap .format-btn:hover,
    .output-wrap .output-upload-btn:hover {
      background: #0f3460;
      color: #eee;
    }
    .output-wrap .copy-btn svg,
    .output-wrap .format-btn svg,
    .output-wrap .output-upload-btn svg {
      width: 18px;
      height: 18px;
    }
    .output-wrap .wrap-toggle-btn {
      position: absolute;
      top: 0.5rem;
      right: calc(1.75rem + 40px);
      z-index: 2;
      width: 32px;
      height: 32px;
      padding: 0;
      border: 1px solid #0f3460;
      border-radius: 6px;
      background: #16213e;
      color: #abb2bf;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .output-wrap .wrap-toggle-btn:hover {
      background: #0f3460;
      color: #eee;
    }
    .output-wrap .download-btn {
      position: absolute;
      top: 0.5rem;
      right: calc(1.75rem + 80px);
      z-index: 2;
      width: 32px;
      height: 32px;
      padding: 0;
      border: 1px solid #0f3460;
      border-radius: 6px;
      background: #16213e;
      color: #abb2bf;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .output-wrap .download-btn:hover {
      background: #0f3460;
      color: #eee;
    }
    .output-wrap .indent-btn {
      position: absolute;
      top: 0.5rem;
      right: calc(1.75rem + 120px);
      z-index: 2;
      width: 32px;
      height: 32px;
      padding: 0;
      border: 1px solid #0f3460;
      border-radius: 6px;
      background: #16213e;
      color: #abb2bf;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 13px;
      font-weight: 600;
    }
    .output-wrap .indent-btn:hover {
      background: #0f3460;
      color: #eee;
    }
    .output-wrap .fold-all-btn,
    .output-wrap .expand-all-btn,
    .editor-wrap .fold-all-btn,
    .editor-wrap .expand-all-btn {
      width: 32px;
      height: 32px;
      padding: 0;
      border: 1px solid #0f3460;
      border-radius: 6px;
      background: #16213e;
      color: #abb2bf;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .output-wrap .fold-all-btn:hover,
    .output-wrap .expand-all-btn:hover,
    .editor-wrap .fold-all-btn:hover,
    .editor-wrap .expand-all-btn:hover {
      background: #0f3460;
      color: #eee;
    }
    .output-wrap .fold-all-btn svg,
    .output-wrap .expand-all-btn svg,
    .editor-wrap .fold-all-btn svg,
    .editor-wrap .expand-all-btn svg {
      width: 16px;
      height: 16px;
    }
    .output-wrap .output-actions {
      position: absolute;
      top: 0.5rem;
      right: 1rem;
      z-index: 7;
      display: flex;
      gap: 0.5rem;
      align-items: center;
    }
    .output-wrap .output-actions > button {
      position: static;
      top: auto;
      right: auto;
      left: auto;
      margin: 0;
      flex: 0 0 auto;
    }
    .output-wrap .output-actions button {
      width: 32px;
      height: 32px;
      padding: 0;
      border: 1px solid #0f3460;
      border-radius: 6px;
      background: #16213e;
      color: #abb2bf;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .output-wrap .output-actions button:hover {
      background: #0f3460;
      color: #eee;
    }
    .output-wrap.indent-1 { --indent-ch: 1; }
    .output-wrap.indent-2 { --indent-ch: 2; }
    .output-wrap.indent-4 { --indent-ch: 4; }
    .editor-wrap .input-actions {
      position: absolute;
      top: 0.5rem;
      right: 1rem;
      z-index: 7;
      display: flex;
      gap: 0.5rem;
    }
    .editor-wrap .input-actions button,
    .editor-wrap .input-actions label {
      width: 32px;
      height: 32px;
      padding: 0;
      border: 1px solid #0f3460;
      border-radius: 6px;
      background: #16213e;
      color: #abb2bf;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .editor-wrap .input-actions button:hover,
    .editor-wrap .input-actions label:hover {
      background: #0f3460;
      color: #eee;
    }
    .icon-btn svg {
      width: 18px;
      height: 18px;
    }
    .editor-wrap .input-actions .sync-toggle-btn.is-off {
      opacity: 0.6;
      border-color: #3d4a66;
      color: #7f8aa3;
    }
    .output-wrap .guides {
      position: absolute;
      inset: 0;
      pointer-events: none;
      border-radius: 0;
      overflow: hidden;
      z-index: 3;
    }
    .output-wrap .guides-inner {
      position: absolute;
      left: 0;
      top: 0;
      font-size: 14px;
      line-height: 1.6;
    }
    .cursor-position {
      position: absolute;
      right: 0.75rem;
      bottom: 0.5rem;
      z-index: 6;
      padding: 0.2rem 0.45rem;
      border-radius: 4px;
      background: rgba(10, 16, 35, 0.85);
      color: #8b95a7;
      font-family: 'Consolas', 'Monaco', monospace;
      font-size: 12px;
      line-height: 1.2;
      pointer-events: none;
      user-select: none;
    }
    .line-numbers {
      position: absolute;
      left: 0;
      top: 0;
      bottom: 0;
      width: var(--line-number-gutter);
      z-index: 4;
      pointer-events: auto;
      background: #111a35;
      border-right: 1px solid #0f3460;
      overflow: hidden;
      padding-top: 1rem;
    }
    .line-numbers-inner {
      position: absolute;
      top: 1rem;
      left: 0;
      right: 0;
    }
    .line-number {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 4px;
      padding-right: 10px;
      color: #5c6370;
      font-family: 'Consolas', 'Monaco', monospace;
      font-size: 13px;
      text-align: right;
      user-select: none;
      white-space: nowrap;
      line-height: 1;
      pointer-events: none;
    }
    .editor-wrap .line-number,
    .output-wrap .line-number {
      align-items: flex-start;
    }
    .line-number-label {
      min-width: 22px;
    }
    .line-fold-toggle {
      border: 0;
      background: transparent;
      color: #8b95a7;
      cursor: pointer;
      font: inherit;
      line-height: 1;
      padding: 0;
      margin: 0;
      width: 12px;
      text-align: center;
      pointer-events: auto;
    }
    .line-fold-toggle:hover {
      color: #e6edf7;
    }
    .line-fold-toggle.expanded::before {
      content: "\25BC";
    }
    .line-fold-toggle.collapsed::before {
      content: "\25B2";
    }
    .line-number.active {
      color: #e94560;
      font-weight: 600;
    }
    .output-wrap .guide-line {
      height: 22px;
    }
    .editor-wrap .line-numbers-inner {
      top: calc(1rem + 4px);
    }
    .output-wrap .line-numbers-inner {
      top: calc(1rem + 4px);
    }
    .output.error {
      color: #ff6b6b;
    }
    .key { color: #7eb8da; }
    .string { color: #98c379; }
    .number { color: #d19a66; }
    .boolean { color: #c678dd; }
    .null { color: #5c6370; }
    .bracket { color: #abb2bf; }
    .html-tag-name { color: #e06c75; }
    .html-attr-name { color: #d19a66; }
    .html-attr-value { color: #98c379; }
    .html-attr-eq { color: #abb2bf; }
    .html-bracket { color: #abb2bf; }
    .html-comment { color: #5c6370; }
    .html-doctype { color: #c678dd; }
    .css-selector { color: #e5c07b; }
    .css-at-rule { color: #c678dd; }
    .css-property { color: #61afef; }
    .css-value { color: #98c379; }
    .css-brace { color: #abb2bf; }
    .css-comment { color: #5c6370; }
    .js-keyword { color: #c678dd; }
    .js-string { color: #98c379; }
    .js-number { color: #d19a66; }
    .js-comment { color: #5c6370; }
    .js-punct { color: #abb2bf; }
    .json-fold-anchor {
      display: inline-block;
      width: 0;
      height: 0;
      overflow: hidden;
    }
    .output-preview-pane {
      position: absolute;
      inset: 0;
      z-index: 6;
      display: none;
      background: #0b1022;
      color: #eee;
      border-radius: 8px;
      overflow: hidden;
    }
    .output-preview-pane.is-visible {
      display: flex;
      flex-direction: column;
    }
    .output-preview-toolbar {
      flex: 0 0 auto;
      display: flex;
      align-items: center;
      justify-content: space-between;
      min-height: 48px;
      padding: 0.5rem 0.75rem;
      background: #111a35;
      border-bottom: 1px solid #0f3460;
      font-size: 0.85rem;
      gap: 0.75rem;
    }
    .output-preview-title {
      color: #9fa8c1;
    }
    .output-preview-body {
      flex: 1 1 auto;
      overflow: auto;
      padding: 0.75rem 1rem;
    }
    .output-preview-body.is-html-preview {
      padding: 0;
      background: #ffffff;
    }
    .output-preview-frame {
      width: 100%;
      height: 100%;
      border: 0;
      display: block;
      background: #ffffff;
    }
    .output-preview-body pre {
      margin: 0;
      white-space: pre-wrap;
      word-break: break-word;
      font-family: 'Consolas', 'Monaco', monospace;
      font-size: 14px;
      line-height: 1.6;
    }
    .output-preview-json-kv {
      display: block;
      width: 100%;
      font-family: 'Consolas', 'Monaco', monospace;
      font-size: 14px;
      --preview-key-col-width: 16ch;
    }
    .output-preview-json-row {
      display: flex;
      align-items: stretch;
      border: 1px solid #2a3350;
      border-top: none;
    }
    .output-preview-json-row:first-child {
      border-top: 1px solid #2a3350;
    }
    .output-preview-json-key {
      flex: 0 0 var(--preview-key-col-width);
      width: var(--preview-key-col-width);
      min-width: var(--preview-key-col-width);
      padding: 4px 8px;
      color: #f5f5f5;
      background: #111827;
      font-weight: 500;
      position: relative;
      border-right: 1px solid #2a3350;
      overflow-wrap: anywhere;
    }
    .output-preview-json-key.has-toggle {
      padding-right: 18px;
      cursor: pointer;
    }
    .output-preview-json-key.has-toggle::after {
      content: '\25B8';
      position: absolute;
      right: 6px;
      top: 50%;
      transform: translateY(-50%);
      font-size: 12px;
      color: #9ca3af;
      cursor: pointer;
    }
    .output-preview-json-key.has-toggle.is-expanded::after {
      content: '\25BE';
    }
    .output-preview-json-value {
      flex: 1 1 auto;
      padding: 4px 8px;
      color: #7dd3fc;
      background: #050816;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .output-preview-json-value.is-expanded {
      white-space: pre-wrap;
      word-break: break-word;
    }
