/* ============================================================
   PyCharm Light（浅色主题）——默认主题
   通过 <html class="theme-light"> 生效；切到深色时移除该类
   ============================================================ */
.theme-light { --canvas-bg: #ffffff; }

.theme-light body {
  background: #eef0f3;
  color: #1f2328;
}

/* ---- 菜单栏 / 工具栏 ---- */
.theme-light .ide-menubar {
  background: #f7f8fa;
  border-color: #d3d7dd;
  color: #2b3138;
}
.theme-light .ide-menubar .menu-item { color: #3c4148; }
.theme-light .ide-menubar .menu-item:hover { background: #e3e7ec; color: #111; }
.theme-light .menubar-title { color: #8a939e; }

.theme-light .topbar {
  background: #f7f8fa;
  border-color: #d3d7dd;
  box-shadow: 0 1px 0 #d3d7dd;
}
.theme-light .brand-name { color: #1f2328; }
.theme-light .brand-sub { color: #7b8794; }
.theme-light .brand-logo {
  background: linear-gradient(135deg, #3574f0 0%, #2a5fc4 100%);
  color: #fff;
}
.theme-light .topbar .field-label { color: #6b7683; }
.theme-light .input,
.theme-light .topbar .input {
  background: #ffffff;
  border-color: #c9ced6;
  color: #1f2328;
}
.theme-light .input:focus,
.theme-light .topbar .input:focus {
  border-color: #3574f0;
  box-shadow: 0 0 0 2px rgba(53, 116, 240, 0.15);
}
.theme-light .topbar .btn,
.theme-light .btn {
  background: #ffffff;
  border-color: #c9ced6;
  color: #2b3138;
}
.theme-light .topbar .btn:hover,
.theme-light .btn:hover { background: #eef1f5; border-color: #b6bdc7; }
.theme-light .btn.primary {
  background: #499c54;
  border-color: #499c54;
  color: #fff;
}
.theme-light .btn.primary:hover { background: #3f8a49; border-color: #3f8a49; }
.theme-light .btn.danger-ghost { background: transparent; border-color: #d9a1a1; color: #b34343; }

/* ---- 左右面板 ---- */
.theme-light .main { background: #d3d7dd; }
.theme-light .palette,
.theme-light .inspector {
  background: #f7f8fa;
  border-color: #d3d7dd;
}
.theme-light .palette-head,
.theme-light .inspector-head {
  background: #eceff3;
  color: #3c4148;
  border-color: #d3d7dd;
}
.theme-light .palette-search {
  background: #ffffff;
  border-color: #c9ced6;
  color: #1f2328;
}
.theme-light .palette-search:focus { border-color: #3574f0; }
.theme-light .palette-group-title { color: #6b7683; }
.theme-light .palette-group-title::before { color: #8a939e; }
.theme-light .tile {
  background: #ffffff;
  border-color: #d3d7dd;
}
.theme-light .tile:hover { background: #eef2f8; border-color: #a9b6c6; }
.theme-light .tile-name { color: #2b3138; }
.theme-light .tile:hover .tile-name { color: #0f1720; }
.theme-light .tile-short { color: #8a939e; }
.theme-light .tile-link { background: #f4fbf5; border-color: #b9d9bd; }
.theme-light .tile-link .tile-short { color: #3f8a49; }
.theme-light .tile-link.skip { background: #fdf6ee; border-color: #e8c9a5; }
.theme-light .tile-link.skip .tile-short { color: #cc7832; }
.theme-light .palette-tip {
  background: #f7f8fa;
  border-color: #d3d7dd;
  color: #7b8794;
}

/* ---- 编辑器标签 ---- */
.theme-light .editor-tabs {
  background: #eceff3;
  border-color: #d3d7dd;
}
.theme-light .editor-tab { color: #6b7683; border-right-color: #d3d7dd; }
.theme-light .editor-tab.active { background: #ffffff; color: #1f2328; }
.theme-light .editor-tab.active::before { background: #3574f0; }
.theme-light .editor-tabs .tab-hint { color: #8a939e; }

/* ---- 画布：浅色编辑器底 ---- */
.theme-light .canvas {
  background-color: #ffffff;
  background-image: radial-gradient(rgba(31, 35, 40, 0.10) 1px, transparent 1px);
  background-size: 24px 24px;
  border-color: #d3d7dd;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.02);
}
.theme-light .canvas::after {
  background: radial-gradient(320px 320px at var(--mx, 50%) var(--my, 50%), rgba(53, 116, 240, 0.05), transparent 70%);
}
.theme-light .canvas-title { color: #aab3bd; }

/* ---- 节点卡片 ---- */
.theme-light .node {
  background: linear-gradient(180deg, #ffffff 0%, #f4f6f9 100%);
  border-color: #d0d6de;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08), 0 4px 12px rgba(16, 24, 40, 0.06);
}
.theme-light .node:hover {
  border-color: #3574f0;
  box-shadow: 0 4px 14px rgba(16, 24, 40, 0.12);
}
.theme-light .node.selected {
  border-color: #3574f0;
  box-shadow: 0 0 0 2px rgba(53, 116, 240, 0.28), 0 4px 14px rgba(16, 24, 40, 0.12);
}
.theme-light .node-title { color: #1f2328; }
.theme-light .node-type { color: #8a939e; }
.theme-light .node-summary { color: #4c5866; }
.theme-light .node-shape {
  background: #f1f3f6;
  border-color: #d9dee5;
  color: #b35c00;
}
.theme-light .node.has-error { border-color: #cf5757; }
.theme-light .node.link-target {
  border-color: #3574f0 !important;
  box-shadow: 0 0 0 2px rgba(53, 116, 240, 0.3) !important;
}

/* ---- 块 ---- */
.theme-light .node.block {
  border-color: rgba(31, 35, 40, 0.20);
  box-shadow: 0 2px 8px rgba(16, 24, 40, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.theme-light .node.block::after { border-color: rgba(255, 255, 255, 0.55); }
.theme-light .node.block .block-name { color: #0f2838; }
.theme-light .node.block .block-meta { color: #3c5568; opacity: 0.9; }

/* ---- 端口 / 连线 ---- */
.theme-light .port {
  background: #ffffff;
  border-color: #8fa2ba;
}
.theme-light .port:hover {
  border-color: #3574f0;
  box-shadow: 0 0 0 3px rgba(53, 116, 240, 0.18);
}
.theme-light .edge-path { stroke: #6d7f92; stroke-width: 1.8; }
.theme-light .edge-path.edge-skip { stroke: #d9822b; stroke-width: 2.3; }
.theme-light .edge-path.edge-selected { stroke: #3574f0 !important; stroke-width: 2.6; }
.theme-light .edge-plus { fill: #b35c00; }
.theme-light .edge-g:hover .edge-path:not(.edge-skip) { stroke: #3574f0; }
.theme-light .edge-g:hover .edge-path.edge-skip { stroke: #e8963c; }
.theme-light .edge-temp { stroke: #3574f0; }
.theme-light #arrow path { fill: #6d7f92; }
.theme-light #arrow-skip path { fill: #d9822b; }
.theme-light .marquee {
  border-color: #3574f0;
  background: rgba(53, 116, 240, 0.08);
}

/* ---- 属性面板 ---- */
.theme-light .insp-title { color: #1f2328; }
.theme-light .insp-sub { color: #6b7683; }
.theme-light .insp-shape { background: #f1f3f6; border-color: #d9dee5; color: #b35c00; }
.theme-light .insp-section-title { color: #8a939e; }
.theme-light .field-row label { color: #3c4148; }
.theme-light .field-row:hover { background: #eef1f5; }
.theme-light .field-row input[type="number"],
.theme-light .field-row input[type="text"],
.theme-light .field-row select {
  background: #ffffff;
  border-color: #c9ced6;
  color: #1f2328;
}
.theme-light .field-row input:focus { border-color: #3574f0; }
.theme-light .switch { background: #dfe3e9; border-color: #c9ced6; }
.theme-light .switch::after { background: #98a2ad; }
.theme-light .switch.on { background: #cdebd2; border-color: #499c54; }
.theme-light .switch.on::after { background: #499c54; }
.theme-light .insp-error { background: #fdeeee; border-color: #e8b4b4; color: #a23b3b; }
.theme-light .inspector-empty, .theme-light .insp-empty { color: #8a939e; }

/* ---- 状态栏 ---- */
.theme-light .statusbar {
  background: #eceff3;
  border-color: #d3d7dd;
  color: #5c6672;
}
.theme-light .chip { color: #5c6672; }
.theme-light .chip .dot { background: #499c54; }
.theme-light #zoomText { color: #5c6672; }
.theme-light .icon-btn {
  background: #ffffff;
  border-color: #c9ced6;
  color: #2b3138;
}
.theme-light .icon-btn:hover { background: #eef1f5; }
.theme-light .ide-status-item { color: #8a939e; }

/* ---- 弹窗 ---- */
.theme-light .modal-mask { background: rgba(30, 34, 40, 0.35); }
.theme-light .modal {
  background: #f7f8fa;
  border-color: #c9ced6;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
}
.theme-light .modal-head { background: #eceff3; color: #1f2328; border-color: #d3d7dd; }
.theme-light .modal-foot { background: #eceff3; border-color: #d3d7dd; }
.theme-light .modal-field > label { color: #6b7683; }
.theme-light .code-view {
  background: #ffffff;
  border-color: #d3d7dd;
  color: #1f2328;
}
.theme-light .shape-option { background: #ffffff; border-color: #c9ced6; color: #3c4148; }
.theme-light .shape-option.active { background: #e7f4e9; border-color: #499c54; color: #256a2e; }

/* ---- 滚动条 ---- */
.theme-light ::-webkit-scrollbar-thumb { background: #c3c9d1; }
.theme-light ::-webkit-scrollbar-thumb:hover { background: #aab2bd; }

/* 去掉画布网格 */
.theme-light .canvas { background-image: none; }
