/* 大屏 DIY 简化版样式：单击即编辑，无快捷键、无底部开关 */

/* 右上角极小的入口，只用于改整个舞台背景；不在底部菜单里 */
.lx-diy-chip {
  position: fixed; right: 14px; top: 14px; z-index: 99996;
  padding: 5px 11px; border-radius: 16px;
  background: rgba(12, 20, 32, .72); border: 1px solid rgba(255, 255, 255, .18);
  color: #dbe7f5; font: 12px/1.2 "Microsoft YaHei", sans-serif;
  cursor: pointer; opacity: .38; transition: opacity .2s, background .2s;
  box-shadow: 0 3px 14px rgba(0, 0, 0, .3);
}
.lx-diy-chip:hover, .lx-diy-chip.is-on { opacity: 1; background: rgba(47, 128, 237, .85); border-color: #7cb6ff; }

/* 只用 hover 提示；不再整屏虚线，不影响正常观看 */
body.lx-diy-live .lx-diy-editable { cursor: move; }
/* 位置与缩放走 CSS 变量 + !important，避免被 app.js 的二维码纠偏等 inline transform 覆盖 */
html body.lx-diy-live [data-role=stage] .lx-diy-editable.lx-diy-styled {
  transform: var(--lx-diy-transform) !important;
  transform-origin: var(--lx-diy-origin) !important;
}
/* 舞台背景同样用 CSS 变量 + !important，避免被 app.js 切版块时写回系统背景覆盖 */
html body.lx-diy-live [data-role=stage] [data-role=bg].lx-diy-bg-image {
  background-image: var(--lx-diy-bg-image) !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}
html body.lx-diy-live [data-role=stage] [data-role=bg].lx-diy-bg-color {
  background-color: var(--lx-diy-bg-color) !important;
}
body.lx-diy-live .lx-diy-editable:hover {
  outline: 1px dashed rgba(86, 204, 242, .75);
  outline-offset: 2px;
}
body.lx-diy-live .lx-diy-editable.lx-diy-selected {
  outline: 2px solid #ffd166;
  outline-offset: 3px;
  z-index: 99990 !important;
}
body.lx-diy-dragging, body.lx-diy-dragging * { user-select: none !important; }

/* 黄色四角手柄：拖拽缩放 */
.lx-diy-handle {
  position: fixed; width: 15px; height: 15px; margin: -8px 0 0 -8px; z-index: 99997;
  background: #ffd166; border: 2px solid #fff; border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .45); cursor: nwse-resize;
}
.lx-diy-handle--ne, .lx-diy-handle--sw { cursor: nesw-resize; }

/* 属性面板：单击元素后自动出现，点“完成”收起 */
.lx-diy-panel {
  position: fixed; right: 0; top: 0; width: 310px; height: 100vh; z-index: 99999;
  background: rgba(14, 21, 33, .97); backdrop-filter: blur(14px); color: #e8eef7;
  box-shadow: -10px 0 46px rgba(0, 0, 0, .55); transform: translateX(105%);
  transition: transform .24s ease; display: flex; flex-direction: column;
  font-family: "Microsoft YaHei", sans-serif;
}
.lx-diy-panel.is-on { transform: translateX(0); }
.lx-diy-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 16px 12px; border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.lx-diy-head b { font-size: 15px; letter-spacing: .5px; }
.lx-diy-head button {
  border: 0; border-radius: 6px; padding: 6px 14px; cursor: pointer;
  background: linear-gradient(135deg, #2f80ed, #56ccf2); color: #fff;
  font-size: 13px; font-weight: 700;
}
.lx-diy-head button:hover { filter: brightness(1.08); }
.lx-diy-body { flex: 1; overflow-y: auto; padding: 14px 16px 32px; }

.lx-diy-tip {
  font-size: 12px; line-height: 1.8; color: #a9bbd2;
  background: rgba(47, 128, 237, .12); border-left: 3px solid #2f80ed;
  padding: 9px 11px; border-radius: 0 5px 5px 0; margin-bottom: 12px;
}
.lx-diy-tip.big { text-align: left; margin-top: 4px; }
.lx-diy-selname { font-size: 12px; color: #8ea0b8; margin: 4px 0 10px; }
.lx-diy-selname b { color: #56ccf2; font-weight: 600; }
.lx-diy-divider {
  font-size: 12px; color: #94a6bd; margin: 20px 0 10px; padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, .09);
}

.lx-diy-btnrow { display: flex; gap: 8px; margin: 10px 0 12px; }
.lx-diy-btnrow button {
  flex: 1; min-width: 0; padding: 9px 6px; border: 0; border-radius: 6px;
  background: linear-gradient(135deg, #2f80ed, #7b5cf0); color: #fff;
  font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.lx-diy-btnrow button:hover { filter: brightness(1.1); }
.lx-diy-btnrow .lx-diy-btn--ghost {
  background: transparent; border: 1px solid rgba(255, 255, 255, .18); color: #ffb1b1;
}
.lx-diy-btnrow .lx-diy-btn--ghost:hover { background: rgba(255, 90, 90, .12); border-color: #ff9f9f; }
/* 面板顶部的一键恢复：显眼、就近可用 */
.lx-diy-btnrow--restore { margin: 0 0 14px; }
.lx-diy-btnrow--restore button {
  padding: 11px 6px; font-size: 13px;
  background: linear-gradient(135deg, #ff8a5b, #ff5e62);
}
.lx-diy-btnrow--restore .lx-diy-btn--ghost {
  background: transparent; border: 1px solid rgba(255, 255, 255, .24); color: #ffc7c7;
}

.lx-diy-preview {
  display: block; width: 100%; max-height: 96px; object-fit: cover;
  border-radius: 6px; margin: 4px 0 12px; border: 1px solid rgba(255, 255, 255, .14);
}

.lx-diy-f { margin-bottom: 12px; }
.lx-diy-f label {
  display: flex; justify-content: space-between; font-size: 12px;
  color: #b8c6d8; margin-bottom: 6px;
}
.lx-diy-f label em { color: #ffd166; font-style: normal; }
.lx-diy-f input[type=range] { width: 100%; accent-color: #2f80ed; }
.lx-diy-f input[type=text], .lx-diy-f input[type=color] {
  width: 100%; height: 32px; border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 5px; background: rgba(255, 255, 255, .06); color: #fff;
  padding: 0 8px; font-size: 13px; box-sizing: border-box;
}
.lx-diy-f input[type=color] { padding: 2px; cursor: pointer; }
.lx-diy-f--color { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lx-diy-f--color label { margin: 0; flex: 0 0 auto; }
.lx-diy-f--color input[type=color] { width: 92px; }

.lx-diy-note {
  font-size: 11px; line-height: 1.7; color: #a9bbd2;
  background: rgba(255, 209, 102, .1); border-left: 2px solid #ffd166;
  padding: 8px 10px; margin: 8px 0 12px; border-radius: 0 4px 4px 0;
}
.lx-diy-more { margin-top: 6px; border-top: 1px solid rgba(255, 255, 255, .07); padding-top: 10px; }
.lx-diy-more summary { cursor: pointer; font-size: 12px; color: #8ea0b8; margin-bottom: 10px; outline: none; }
.lx-diy-more summary:hover { color: #56ccf2; }
