/* ============================================================
   俏皮浅色主题（默认）——柔和渐变 / 圆角 / 彩色点缀 / 轻微弹跳
   在 style-light.css 之后加载，仅作用于 .theme-light
   ============================================================ */

/* ---- 背景：柔和 aurora 渐变 ---- */
.theme-light body {
  background:
    radial-gradient(900px 620px at 8% -8%, rgba(255, 190, 235, 0.55) 0%, transparent 55%),
    radial-gradient(820px 600px at 100% 2%, rgba(185, 227, 255, 0.6) 0%, transparent 55%),
    radial-gradient(900px 700px at 45% 110%, rgba(196, 255, 222, 0.55) 0%, transparent 60%),
    linear-gradient(160deg, #fdf9ff 0%, #f3f8ff 55%, #f2fff9 100%);
}
.theme-light body::before {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: -1;
  background:
    radial-gradient(420px 380px at 20% 20%, rgba(255, 168, 222, 0.35), transparent 62%),
    radial-gradient(460px 420px at 80% 12%, rgba(150, 205, 255, 0.4), transparent 60%),
    radial-gradient(520px 460px at 55% 90%, rgba(150, 245, 190, 0.35), transparent 62%);
  filter: blur(10px);
  animation: aurora-drift 16s ease-in-out infinite alternate;
  pointer-events: none;
}

/* ---- 整体布局：圆角浮窗 ---- */
.theme-light #app { gap: 8px; padding: 10px 12px 12px; }
.theme-light .ide-menubar {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(180, 170, 220, 0.25);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(150, 140, 210, 0.08);
  color: #5b5680;
}
.theme-light .ide-menubar .menu-item {
  color: #5b5680;
  border-radius: 999px;
  transition: background 0.15s, color 0.15s, transform 0.15s;
}
.theme-light .ide-menubar .menu-item:hover {
  background: #ffe3f5;
  color: #d13a9c;
  transform: translateY(-1px);
}
.theme-light .ide-menubar .menu-item:nth-child(2):hover { background: #e3f0ff; color: #2f7cd6; }
.theme-light .ide-menubar .menu-item:nth-child(3):hover { background: #e4fbee; color: #2f9e63; }
.theme-light .ide-menubar .menu-item:nth-child(4):hover { background: #fff1d6; color: #c07a1e; }
.theme-light .menubar-title { color: #9a94bb; }

.theme-light .topbar {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(180, 170, 220, 0.28);
  border-radius: 16px;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 26px rgba(150, 140, 210, 0.12);
  padding: 9px 14px;
}
.theme-light .brand-logo {
  background: linear-gradient(135deg, #ff9ed8 0%, #9a8bff 52%, #5ad8c0 100%);
  color: #fff;
  border-radius: 13px;
  box-shadow: 0 6px 16px rgba(154, 139, 255, 0.35);
  font-weight: 900;
}
.theme-light .brand-name { color: #2c2846; letter-spacing: 0.2px; }
.theme-light .brand-sub { color: #958fb3; }
.theme-light .topbar .field-label { color: #8b86a8; }
.theme-light .input {
  border-radius: 10px;
  border-color: #e2def2;
  background: #ffffff;
  color: #2c2846;
}
.theme-light .input:focus { border-color: #9a8bff; box-shadow: 0 0 0 3px rgba(154, 139, 255, 0.16); }

.theme-light .btn {
  border-radius: 999px;
  border: 1px solid #e2def2;
  background: #ffffff;
  color: #4b4768;
  transition: transform 0.12s, background 0.15s, box-shadow 0.15s;
}
.theme-light .btn:hover {
  background: #f7f4ff;
  border-color: #cfc7f2;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(154, 139, 255, 0.16);
}
.theme-light .btn.primary {
  background: linear-gradient(135deg, #ff9ed8 0%, #9a8bff 55%, #66d9c0 100%);
  border: none;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(154, 139, 255, 0.35);
}
.theme-light .btn.primary:hover { filter: brightness(1.04); box-shadow: 0 10px 22px rgba(154, 139, 255, 0.45); }
.theme-light .btn.danger-ghost { border-color: #ffd0d0; color: #d15b5b; }
.theme-light .btn.danger-ghost:hover { background: #fff0f0; }

/* ---- 左右面板：白色圆角浮窗 ---- */
.theme-light .main { background: transparent; gap: 10px; }
.theme-light .palette,
.theme-light .inspector {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(180, 170, 220, 0.25);
  border-radius: 16px;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(150, 140, 210, 0.10);
  overflow: hidden;
}
.theme-light .palette-head,
.theme-light .inspector-head {
  background: transparent;
  border-bottom: 1px dashed rgba(180, 170, 220, 0.35);
  color: #4b4768;
  padding: 12px 14px 9px;
}
.theme-light .palette-search {
  border-radius: 10px;
  background: #fbfaff;
  border-color: #e6e2f5;
}
.theme-light .palette-search:focus { border-color: #9a8bff; box-shadow: 0 0 0 3px rgba(154, 139, 255, 0.12); }
.theme-light .palette-group-title {
  color: #8b86a8;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.theme-light .palette-group-title::before {
  content: "✦";
  font-size: 10px;
  color: #b9aef0;
  background: none;
  border-radius: 0;
}
.theme-light .tile {
  border-radius: 12px;
  border: 1px solid #ece9f8;
  background: linear-gradient(180deg, #ffffff 0%, #faf9ff 100%);
  transition: transform 0.14s cubic-bezier(.2,.9,.3,1.2), box-shadow 0.15s, border-color 0.15s;
}
.theme-light .tile:nth-child(2n) { background: linear-gradient(180deg, #ffffff 0%, #f6fbff 100%); }
.theme-light .tile:nth-child(3n) { background: linear-gradient(180deg, #ffffff 0%, #f6fff9 100%); }
.theme-light .tile:hover {
  border-color: #d5cdf5;
  transform: translateY(-2px) rotate(-0.6deg);
  box-shadow: 0 6px 16px rgba(154, 139, 255, 0.18);
  background: #ffffff;
}
.theme-light .tile-name { color: #33304f; }
.theme-light .tile-short { color: #a29dc0; }
.theme-light .tile-link {
  background: linear-gradient(180deg, #f2fff9 0%, #e9fff5 100%);
  border-color: #c8efdc;
}
.theme-light .tile-link:hover { background: #e2fff1; border-color: #8fd9b8; }
.theme-light .tile-link.skip {
  background: linear-gradient(180deg, #fff9f1 0%, #fff2e2 100%);
  border-color: #f7d9b6;
}
.theme-light .tile-link.skip:hover { background: #fff0dd; border-color: #efb877; }
.theme-light .palette-tip {
  background: transparent;
  border-top: 1px dashed rgba(180, 170, 220, 0.35);
  color: #9a94bb;
  padding: 10px 14px 12px;
}

/* ---- 编辑器标签 ---- */
.theme-light .editor-tabs {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(180, 170, 220, 0.22);
  border-bottom: none;
  border-radius: 14px 14px 0 0;
  height: 32px;
}
.theme-light .editor-tab { color: #8b86a8; border-right: 1px solid #eae6f8; }
.theme-light .editor-tab.active {
  background: #ffffff;
  color: #4b4768;
  border-radius: 10px 10px 0 0;
}
.theme-light .editor-tab.active::before {
  background: linear-gradient(90deg, #ff9ed8, #9a8bff);
  height: 3px;
  border-radius: 3px 3px 0 0;
}
.theme-light .editor-tab .file-dot { background: #7fd6a8; box-shadow: 0 0 0 3px rgba(127, 214, 168, 0.2); }
.theme-light .editor-tab.python .file-dot { background: #ffb86b; box-shadow: 0 0 0 3px rgba(255, 184, 107, 0.22); }
.theme-light .editor-tabs .tab-hint { color: #a9a3c8; }

/* ---- 画布：白色 + 彩色点点 ---- */
.theme-light .canvas {
  background-color: #ffffff;
  background-image: radial-gradient(rgba(154, 139, 255, 0.18) 1.2px, transparent 1.2px);
  background-size: 22px 22px;
  border: 1px solid rgba(180, 170, 220, 0.22);
  border-radius: 0 0 18px 18px;
  box-shadow: 0 14px 36px rgba(150, 140, 210, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.theme-light .canvas::after {
  background: radial-gradient(340px 340px at var(--mx, 50%) var(--my, 50%), rgba(255, 158, 216, 0.06), transparent 70%);
}
.theme-light .canvas-title { color: #c5bfe0; }

/* ---- 节点卡片：糖果色 ---- */
.theme-light .node {
  background: linear-gradient(180deg, #ffffff 0%, #fbf9ff 100%);
  border: 1.5px solid #ece8f9;
  border-radius: 14px;
  box-shadow: 0 2px 6px rgba(150, 140, 210, 0.10), 0 8px 20px rgba(150, 140, 210, 0.05);
  transition: transform 0.16s cubic-bezier(.2,1.1,.4,1.2), box-shadow 0.18s, border-color 0.15s;
}
.theme-light .node::before {
  width: 6px;
  border-radius: 6px 0 0 6px;
  opacity: 1;
  box-shadow: 2px 0 8px rgba(150, 140, 210, 0.15);
}
.theme-light .node:hover {
  transform: translateY(-2px) rotate(-0.3deg);
  border-color: #d8cff8;
  box-shadow: 0 10px 24px rgba(154, 139, 255, 0.18);
}
.theme-light .node.selected {
  border-color: #9a8bff;
  box-shadow: 0 0 0 3px rgba(154, 139, 255, 0.22), 0 10px 24px rgba(154, 139, 255, 0.2);
  animation: node-wiggle 2.6s ease-in-out infinite;
}
@keyframes node-wiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-0.4deg); }
  75% { transform: rotate(0.4deg); }
}
.theme-light .node-title { color: #2c2846; font-family: "JetBrains Mono", "Cascadia Code", Consolas, monospace; }
.theme-light .node-type { color: #b0aacb; }
.theme-light .node-summary { color: #6f6a8f; }
.theme-light .node-shape {
  background: #f7f3ff;
  border: 1px solid #ebe4ff;
  color: #8a5bd6;
  border-radius: 8px;
}
.theme-light .node.has-error { border-color: #ffb4b4; }

/* ---- 块：糖果色渐变 ---- */
.theme-light .node.block {
  border: 1.5px solid rgba(120, 110, 200, 0.28);
  border-radius: 18px;
  box-shadow: 0 8px 22px rgba(150, 140, 210, 0.18), inset 0 2px 0 rgba(255, 255, 255, 0.7);
}
.theme-light .node.block::after {
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  inset: 3px;
  border-radius: 14px;
}
.theme-light .node.block.circle::after { border-radius: 50%; inset: 4px; }
.theme-light .node.block .block-name {
  color: #241f3d;
  font-family: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
  font-weight: 800;
  letter-spacing: 0.2px;
}
.theme-light .node.block .block-meta { color: #4f4a6e; opacity: 0.85; }
.theme-light .node.block:hover {
  transform: translateY(-2px) rotate(0.4deg);
  box-shadow: 0 14px 30px rgba(150, 140, 210, 0.26), inset 0 2px 0 rgba(255, 255, 255, 0.7);
}

/* ---- 端口 / 连线 ---- */
.theme-light .port {
  background: #ffffff;
  border: 2px solid #c7bff0;
  box-shadow: 0 1px 3px rgba(150, 140, 210, 0.2);
}
.theme-light .port:hover {
  border-color: #ff8fd0;
  box-shadow: 0 0 0 4px rgba(255, 158, 216, 0.22);
}
.theme-light .edge-path { stroke: #a8a2c8; stroke-width: 2; stroke-linecap: round; }
.theme-light .edge-path.edge-skip {
  stroke: #ff9f5a;
  stroke-width: 2.6;
}
.theme-light .edge-path.edge-selected {
  stroke: #9a8bff !important;
  stroke-width: 3;
}
.theme-light .edge-plus { fill: #f08a2c; font-size: 13px; }
.theme-light .edge-g:hover .edge-path:not(.edge-skip) { stroke: #9a8bff; stroke-width: 2.6; }
.theme-light .edge-g:hover .edge-path.edge-skip { stroke: #ffb066; stroke-width: 3; }
.theme-light .edge-temp { stroke: #9a8bff; stroke-width: 2.4; }
.theme-light #arrow path { fill: #a8a2c8; }
.theme-light #arrow-skip path { fill: #ff9f5a; }
.theme-light .marquee {
  border: 2px dashed #9a8bff;
  background: rgba(154, 139, 255, 0.08);
  border-radius: 10px;
}

/* ---- 属性面板 ---- */
.theme-light .insp-title { color: #2c2846; }
.theme-light .insp-sub { color: #8b86a8; }
.theme-light .insp-shape {
  background: #f7f3ff;
  border: 1px solid #ebe4ff;
  color: #8a5bd6;
  border-radius: 8px;
}
.theme-light .insp-section-title { color: #a9a3c8; }
.theme-light .field-row { border-radius: 10px; }
.theme-light .field-row:hover { background: #faf8ff; }
.theme-light .field-row label { color: #55507a; }
.theme-light .field-row input[type="number"],
.theme-light .field-row input[type="text"],
.theme-light .field-row select {
  background: #ffffff;
  border: 1px solid #e6e2f5;
  border-radius: 9px;
  color: #2c2846;
  height: 28px;
}
.theme-light .field-row input:focus { border-color: #9a8bff; box-shadow: 0 0 0 3px rgba(154, 139, 255, 0.12); }
.theme-light .switch { background: #ece8f8; border-color: #e0daf2; border-radius: 999px; }
.theme-light .switch::after { background: #b9b3d6; }
.theme-light .switch.on { background: #d8f7e7; border-color: #8fd9b8; }
.theme-light .switch.on::after { background: #3fbf85; }
.theme-light .insp-error { background: #fff2f2; border: 1px solid #ffd3d3; color: #c04a4a; border-radius: 10px; }

/* ---- 状态栏 ---- */
.theme-light .statusbar {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(180, 170, 220, 0.25);
  border-radius: 12px;
  color: #7b7599;
  padding: 0 12px;
  height: 32px;
}
.theme-light .chip {
  background: #f7f3ff;
  border: 1px solid #ece4ff;
  border-radius: 999px;
  color: #6f68a0;
  height: 20px;
}
.theme-light .status-config .chip:nth-child(1) { background: #e9fbf1; border-color: #cdeede; color: #3c8f68; }
.theme-light .status-config .chip:nth-child(1) .dot { background: #3fbf85; box-shadow: 0 0 6px rgba(63, 191, 133, 0.8); }
.theme-light .status-config .chip:nth-child(2) { background: #f2edff; border-color: #e2d8ff; color: #7a5ec7; }
.theme-light .status-config .chip:nth-child(3) { background: #fff6e8; border-color: #ffe6c4; color: #b57a22; }
.theme-light .status-config .chip:nth-child(4) { background: #eaf4ff; border-color: #d4e8ff; color: #3574b8; }
.theme-light .status-config .chip:nth-child(5) { background: #ffeef7; border-color: #ffd9ee; color: #c04a95; }
.theme-light #zoomText { color: #7b7599; }
.theme-light .icon-btn {
  background: #ffffff;
  border: 1px solid #e6e2f5;
  border-radius: 9px;
  color: #55507a;
}
.theme-light .icon-btn:hover { background: #f7f3ff; border-color: #d5cdf5; }
.theme-light .ide-status-item { color: #a9a3c8; }

/* ---- 弹窗 ---- */
.theme-light .modal-mask { background: rgba(60, 50, 100, 0.30); backdrop-filter: blur(4px); }
.theme-light .modal {
  background: #ffffff;
  border: 1px solid #ece8f9;
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(90, 70, 160, 0.25);
}
.theme-light .modal-head {
  background: transparent;
  border-bottom: 1px dashed rgba(180, 170, 220, 0.35);
  color: #2c2846;
  font-weight: 700;
}
.theme-light .modal-foot {
  background: #fbf9ff;
  border-top: 1px dashed rgba(180, 170, 220, 0.35);
  border-radius: 0 0 20px 20px;
}
.theme-light .modal-field > label { color: #8b86a8; }
.theme-light .code-view {
  background: #fbfaff;
  border: 1px solid #ece8f9;
  border-radius: 12px;
  color: #3a3556;
}
.theme-light .shape-option { border-radius: 14px; border-color: #ece8f9; background: #fbfaff; }
.theme-light .shape-option.active {
  background: #f2edff;
  border-color: #c9b8ff;
  color: #6a4bbf;
}
.theme-light .shape-option .shape-preview { border-color: #b9b3d6; }

/* ---- 滚动条 ---- */
.theme-light ::-webkit-scrollbar-thumb { background: #e3ddf5; border-radius: 999px; }
.theme-light ::-webkit-scrollbar-thumb:hover { background: #d0c7f0; }
