@charset "utf-8";
/* CSS Document */

/* ========== 全局样式重置 ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Microsoft Yahei", Arial, sans-serif;
}

body {
  background-color: #f5f5f7;
  color: #333;
  font-size: 14px;
  overflow: hidden;
}

/* 图标字体兼容 */
i {
  font-style: normal;
  font-family: "Font Awesome 4.7.0";
}

/* ========== 顶部导航栏 ========== */
.header {
  height: 60px;
  background-color: #fff;
  border-bottom: 1px solid #e5e5e5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  position: relative;
  z-index: 100;
}

.tool-title {
  font-size: 18px;
  font-weight: 600;
  color: #e6162d;
  margin-right: 20px;
}

.header-left,
.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-btn {
  height: 36px;
  padding: 0 12px;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  background-color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}

.header-btn:hover:not(:disabled) {
  border-color: #e6162d;
  color: #e6162d;
}

.header-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.primary-btn {
  background-color: #e6162d;
  color: #fff;
  border-color: #e6162d;
}

.primary-btn:hover {
  background-color: #d01026;
  color: #FFFF00 !important;
}

.success-btn {
  background-color: #00b42a;
  color: #fff;
  border-color: #00b42a;
}

.success-btn:hover {
  background-color: #00a025;
  color: #FFFF00 !important;
}

/* ========== 快捷键提示 ========== */
.shortcut-wrap {
  position: relative;
}

.shortcut-tooltip {
  position: absolute;
  top: 45px;
  left: 0;
  width: 300px;
  background-color: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  padding: 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: none;
  z-index: 999;
}

.shortcut-wrap:hover .shortcut-tooltip {
  display: block;
}

.shortcut-tooltip ul {
  list-style: none;
}

.shortcut-tooltip li {
  margin: 8px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.shortcut-tooltip li span {
  color: #e6162d;
  font-weight: 600;
}

.shortcut-tooltip input {
  width: 60px;
  padding: 4px 8px;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
}

/* ========== 下拉菜单 ========== */
.dropdown-wrap {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 35px;
  right: 0;
  width: 120px;
  background-color: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: none;
  z-index: 999;
}

.dropdown-wrap:hover .dropdown-menu {
  display: block;
}

.dropdown-menu a {
  display: block;
  padding: 8px 12px;
  text-decoration: none;
  color: #333;
  transition: all 0.2s ease;
  cursor: pointer;
}

.dropdown-menu a:hover {
  background-color: #f5f5f7;
  color: #e6162d;
}

/* ========== 弹窗样式 ========== */
.modal {
  position: fixed;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  backdrop-filter: blur(2px);
}

.modal-content {
  max-width: 1920px;
  border-radius: 8px;
  padding: 20px;
  position: relative;
  background: #fff;
}

/* 代码弹窗统一样式 */
.code-modal-content {
  width: 800px;
  max-width: 90vw;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.small-modal {
  width: 350px;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #999;
  transition: all 0.2s ease;
}

.modal-close:hover {
  color: #e6162d;
}

.modal-tabs {
  display: flex;
  margin-bottom: 20px;
  border-bottom: 1px solid #e5e5e5;
}

.modal-header {
  padding: 10px;
  border-bottom: 1px solid #e8e8e8;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f5f5f5;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.modal-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: bold;
  color: #333;
}


.close-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #999;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.3s;
}

.close-btn:hover {
  color: #333;
  background: #e8e8e8;
}

.modal-body {
  padding: 20px;
  flex: 1;
  overflow: auto;
  min-height: 300px;
  max-height: 50vh;
}

.modal-desc {
  margin-bottom: 15px;
  color: #666;
  font-size: 14px;
  line-height: 1.5;
}

.code-textarea {
  width: 100%;
  height: 300px;
  min-height: 250px;
  max-height: 40vh;
  padding: 12px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 14px;
  resize: vertical;
  background: #f9f9f9;
  transition: border-color 0.3s;
}

.code-textarea:focus {
  outline: none;
  border-color: #1890ff;
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.modal-footer {
  padding: 20px;
  border-top: 1px solid #e8e8e8;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: #f5f5f5;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}

/* 按钮样式 */
.btn {
  padding: 8px 16px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  background: #fff;
  color: #333;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s;
  font-weight: 400;
}

.btn:hover {
  border-color: #1890ff;
  color: #1890ff;
}

.btn.primary {
  background: #1890ff;
  border-color: #1890ff;
  color: #fff;
}

.btn.primary:hover {
  background: #40a9ff;
  border-color: #40a9ff;
  color: #fff;
}

.btn:active {
  transform: translateY(1px);
}

/* 提示信息样式 */
.text-center {
  text-align: center;
}

.tab-item {
  padding: 8px 15px;
  cursor: pointer;
  margin-bottom: -1px;
  transition: all 0.2s ease;
}

.tab-item.active {
  border-bottom: 2px solid #e6162d;
  color: #e6162d;
  font-weight: 600;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.form-item {
  margin-bottom: 15px;
}

.form-label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
}

.form-input {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: #e6162d;
  box-shadow: 0 0 0 2px rgba(230, 22, 45, 0.1);
}

.modal-btn {
  width: 100%;
  height: 40px;
  background-color: #e6162d;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s ease;
}

.modal-btn:hover {
  background-color: #d01026;
}

.cancel-btn {
  background-color: #999;
}

.cancel-btn:hover {
  background-color: #888;
}

.modal-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 15px;
  text-align: center;
}

.modal-btn-group {
  display: flex;
  gap: 10px;
}

/* ========== 主体容器 ========== */
.main-container {
  display: flex;
  height: calc(100vh - 60px);
}

/* ========== 左侧侧边栏 ========== */
.left-sidebar {
  width: 260px;
  background-color: #fff;
  border-right: 1px solid #e5e5e5;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.sidebar-menu {
  border-bottom: 1px solid #e5e5e5;
}

.menu-item {
  height: 48px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.menu-item.active {
  background-color: #fef0f0;
  color: #e6162d;
  border-left: 3px solid #e6162d;
}

.menu-item:hover:not(.active) {
  background-color: #f5f5f7;
}

.sidebar-panel {
  padding: 15px;
  overflow-y: auto;
  flex: 1;
  display: none;
}

.sidebar-panel.active {
  display: block;
}

/* ========== 面板头部（标题+收缩按钮） ========== */
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  color: #333;
  padding-bottom: 8px;
  border-bottom: 1px solid #e5e5e5;
}

.panel-title {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.collapse-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #999;
  font-size: 12px;
  transition: all 0.2s ease;
  padding: 4px;
}

.collapse-btn:hover {
  color: #e6162d;
}

.panel-content {
  margin-bottom: 20px;
  transition: all 0.2s ease;
}

.panel-content.collapsed {
  height: 0;
  overflow: hidden;
  margin-bottom: 0;
}

/* ========== 模块列表 ========== */
.module-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.module-item {
  height: 80px;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  background-color: #fff;
}

.module-item:hover {
  border-color: #e6162d;
  background-color: #fef0f0;
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.module-item i {
  font-size: 24px;
  color: #666;
}

.module-item:hover i {
  color: #e6162d;
}

/* ========== 对齐工具栏 ========== */
.align-toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.align-btn {
  width: 36px;
  height: 36px;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  background-color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.align-btn:hover {
  border-color: #e6162d;
  color: #e6162d;
}

/* ========== 图层面板 ========== */
.layer-panel {
  margin-top: 10px;
  max-height: 300px;
  overflow-y: auto;
}

.layer-item {
  padding: 8px 10px;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: move;
  transition: all 0.2s ease;
  background-color: #fff;
}

.layer-item.dragging {
  opacity: 0.5;
}

.layer-item.drag-over {
  border-color: #e6162d;
  background-color: #fef0f0;
}

.layer-item.active {
  background-color: #fef0f0;
  border-color: #e6162d;
}

.layer-name {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
}

.layer-name i {
  width: 20px;
  color: #666;
}

.layer-actions {
  display: flex;
  gap: 4px;
}

.layer-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: none;
  cursor: pointer;
  color: #666;
  border-radius: 4px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.layer-btn:hover {
  background-color: #f5f5f7;
  color: #e6162d;
}

/* ========== 在线客服 ========== */
.online-service {
  height:90px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-top: 1px solid #e5e5e5;
  cursor: pointer;
  color: #ff0000;
  transition: all 0.2s ease;
  margin-top: auto;
  line-height:30px;
  font-size:16px;
  padding:0px 10px;
  font-weight:bold;
}

.online-service:hover {
  color: #e6162d;
}

/* ========== 特效案例面板 ========== */
.case-categories {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.category-btn {
  padding: 5px 15px;
  border: 1px solid #e5e5e5;
  border-radius: 20px;
  background-color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.category-btn.active {
  background-color: #e6162d;
  color: #fff;
  border-color: #e6162d;
}

.case-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.case-item {
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.2s ease;
  cursor: pointer;
}

.case-item:hover {
  border-color: #e6162d;
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.case-item img {
  width: 100%;
  height: 80px;
  object-fit: cover;
  display: block;
}

.case-name {
  padding: 8px;
  text-align: center;
  font-size: 12px;
}

/* ========== 页面列表面板 ========== */
.my-page-list,
.system-page-list {
  margin-top: 10px;
}

.my-page-item,
.system-page-item {
  padding: 10px 12px;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  background-color: #fff;
}

.my-page-item:hover,
.system-page-item:hover {
  border-color: #e6162d;
  background-color: #fef0f0;
}

/* ========== 中间编辑区 ========== */
.edit-area {
  flex: 1;
  padding: 20px;
  background-color: #EFF2F7;
  overflow: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.module-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  justify-content: flex-start;
}

/* ========== 模块样式 ========== */
.edit-module {
  position: relative;
  width: 1125px;
  min-height: auto;
  transform-origin: top center;
  margin: 0 !important;
  box-sizing: border-box;
}

.module-editor {
  width: 100%;
  min-height: 1000px;
  margin: 0 auto;
  background-color: #fff;
  border: none;
  /* 移除边框 */
  box-sizing: border-box;
  position: relative;
  z-index: 1;
  overflow: auto;
  /* 允许操作图标显示在组件上方 */
  padding-top: 20px;
  margin-top: 20px;
  overflow: hidden;
  /* 确保模块编辑器不可编辑 */
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  /* 确保没有光标 */
  cursor: default;
}

.edit-module.active .module-editor {
  border-color: #e6162d;
  cursor: default;
}

/* 添加模块标尺层样式 */
.module-ruler {
  height: 30px;
  width: 1125px;
  /* 默认宽度，会在JS中动态调整 */
  background-image: url(images/bc.png);
  background-repeat: repeat-x;
  background-position: left top;
  position: relative;
  margin-bottom: -30px;
  z-index: 10;
}

/* 模块标题标签 */
.module-label {
  position: absolute;
  left: -40px;
  top: 15%;
  transform: translateY(-50%);
  width: 30px;
  height: 60px;
  background-color: #666;
  color: #fff;
  font-size: 12px;
  writing-mode: vertical-rl;
  text-align: center;
  line-height: 30px;
  border-radius: 15px;
  z-index: 2;
}

/* 选中模块的标题背景颜色 */
.edit-module.active .module-label {
  background-color: #e6162d;
}

/* 模块操作按钮 */
.module-actions {
  position: absolute;
  right: -40px;
  top: 20px;
  display: none;
  flex-direction: column;
  gap: 8px;
  z-index: 2;
}

.edit-module.active .module-actions {
  display: flex;
}

.module-action-btn {
  width: 32px;
  height: 32px;
  border: 1px solid #e5e5e5;
  border-radius: 50%;
  background-color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  font-size: 14px;
  transition: all 0.2s;
  transform: none !important;
}

.module-action-btn:hover {
  border-color: #e6162d;
  color: #e6162d;
  background: #fef0f0;
}

/* 添加模块按钮 */
.add-module-btn {
  margin-top: 10px !important;
  margin-bottom: 20px !important;
  padding: 10px 28px;
  border: 1px dashed #ccc;
  border-radius: 30px;
  background: #fff;
  color: #666;
  cursor: pointer;
  font-size: 14px;
  transform: none !important;
  align-self: center;
  transition: all 0.2s ease;
}

.add-module-btn:hover {
  border-color: #e6162d;
  color: #e6162d;
  background: #fef0f0;
}

/* ========== 组件样式 ========== */
.component {
  position: absolute;
  cursor: move;
  user-select: none;
  box-sizing: border-box;
  border: 2px solid transparent;
  transition: border-color 0.1s ease;
  z-index: 10;
}

/* 子编辑器中的组件不显示边框 */
#subEditModule .component {
  border: none !important;
}

.component.selected {
  border-color: #e6162d;
  box-shadow: 0 0 0 2px rgba(230, 22, 45, 0.2);
  z-index: 20;
}

/* 调整手柄 */
.resize-handle {
  position: absolute;
  background-color: #e6162d;
  border: 1px solid #fff;
  border-radius: 50%;
  z-index: 10;
  display: none;
  width: 8px;
  height: 8px;
}

.component-text .resize-handle {
  z-index: 20;
}

.component.selected .resize-handle {
  display: block;
}

.resize-handle-nw {
  top: -4px;
  left: -4px;
  cursor: nw-resize;
}

.resize-handle-n {
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  cursor: n-resize;
}

.resize-handle-ne {
  top: -4px;
  right: -4px;
  cursor: ne-resize;
}

.resize-handle-e {
  right: -4px;
  top: 50%;
  transform: translateY(-50%);
  cursor: e-resize;
}

.resize-handle-se {
  bottom: -4px;
  right: -4px;
  cursor: se-resize;
}

.resize-handle-s {
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  cursor: s-resize;
}

.resize-handle-sw {
  bottom: -4px;
  left: -4px;
  cursor: sw-resize;
}

.resize-handle-w {
  left: -4px;
  top: 50%;
  transform: translateY(-50%);
  cursor: w-resize;
}

/* 热区组件 */
.component-hotzone {
  background-color: rgba(230, 22, 45, 0.08);
  border: 2px dashed #e6162d;
  cursor: pointer;
}

/* 热区组件选中样式 */
.component-hotzone.selected {
  border: 2px dashed #e6162d !important;
}

/* 图片组件 */
.component-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

/* 文字组件 */
.component-text {
  background-color: #ffffff;
  border: 1px solid #e5e5e5;
}

/* 动画效果 */
@keyframes marquee {
  0% { transform: translateX(100%); opacity: 0; }
  5% { opacity: 1; }
  95% { opacity: 1; }
  100% { transform: translateX(-100%); opacity: 0; }
}

/* 热区动画效果 - xiaoguo1-15 */
@keyframes xiaoguo1 { /* 右侧进入 */
  0% { transform: translateX(100%); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}

@keyframes xiaoguo2 { /* 底部进入 */
  0% { transform: translateY(100%); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

@keyframes xiaoguo3 { /* 左侧进入 */
  0% { transform: translateX(-100%); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}

@keyframes xiaoguo4 { /* 上方进入 */
  0% { transform: translateY(-100%); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

@keyframes xiaoguo5 { /* 淡入效果 */
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes xiaoguo6 { /* 收缩放大 */
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes xiaoguo7 { /* 旋转进入 */
  0% { transform: rotate(-180deg) scale(0); opacity: 0; }
  100% { transform: rotate(0) scale(1); opacity: 1; }
}

@keyframes xiaoguo8 { /* 水平翻转 */
  0% { transform: scaleX(0); opacity: 0; }
  50% { transform: scaleX(1.1); }
  100% { transform: scaleX(1); opacity: 1; }
}

@keyframes xiaoguo9 { /* 垂直翻转 */
  0% { transform: scaleY(0); opacity: 0; }
  50% { transform: scaleY(1.1); }
  100% { transform: scaleY(1); opacity: 1; }
}

@keyframes xiaoguo10 { /* 跑马灯 */
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

@keyframes xiaoguo11 { /* 左右晃动 */
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

@keyframes xiaoguo12 { /* 上下晃动 */
  0%, 100% { transform: translateY(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateY(-5px); }
  20%, 40%, 60%, 80% { transform: translateY(5px); }
}

@keyframes xiaoguo13 { /* 收缩效果 */
  0% { transform: scale(1.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes xiaoguo14 { /* 左右平移 */
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(10px); }
}

@keyframes xiaoguo15-left { /* 左右拼合 - 左半部分 */
  0% { transform: translateX(-100%); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}

@keyframes xiaoguo15-right { /* 左右拼合 - 右半部分 */
  0% { transform: translateX(100%); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}

@keyframes typewriter {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blink-caret {
  from, to { border-color: transparent; }
  50% { border-color: currentColor; }
}

@keyframes marquee-horizontal {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes marquee-vertical {
  0% { transform: translateY(0); }
  100% { transform: translateY(-50%); }
}

@keyframes scroll-up {
  0% { transform: translateY(0); }
  100% { transform: translateY(-100%); }
}



/* 视频组件 */
.component-video {
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 弹窗组件 */
.component-modal .modal-preview {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  border-radius: 12px;
}

/* 倒计时组件 */
.component-countdown {
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.countdown-digits {
  font-size: 20px;
  font-family: monospace;
}

.countdown-label {
  margin-top: 5px;
}

/* 轮播组件 */
.component-carousel .carousel-container {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.component-carousel .carousel-slides {
  display: flex;
  transition: transform 0.5s ease;
  height: 100%;
}

.component-carousel .carousel-slide {
  min-width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}

.component-carousel .carousel-dots {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.component-carousel .carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
}

.component-carousel .carousel-dot.active {
  background: #fff;
}

/* 切换标签组件 */
.component-tag-carousel {
  border-radius: 0px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes scrollTags {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* ========== 右侧属性面板 ========== */
.right-sidebar {
  width: 320px;
  background-color: #fff;
  border-left: 1px solid #e5e5e5;
  overflow-y: auto;
  scrollbar-width: thin;
}

.right-sidebar::-webkit-scrollbar {
  width: 6px;
}

.right-sidebar::-webkit-scrollbar-thumb {
  background-color: #e5e5e5;
  border-radius: 3px;
}

.sidebar-preview-btn-wrap {
  padding: 15px;
  border-bottom: 1px solid #e5e5e5;
}

.sidebar-preview-btn {
  width: 100%;
  padding: 10px 15px;
  background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(24, 144, 255, 0.3);
}

.sidebar-preview-btn:hover {
  background: linear-gradient(135deg, #40a9ff 0%, #1890ff 100%);
  box-shadow: 0 4px 12px rgba(24, 144, 255, 0.4);
  transform: translateY(-1px);
}

.sidebar-preview-btn:active {
  transform: translateY(0);
}

.prop-panel {
  padding: 15px;
  display: none;
}

.prop-panel.active {
  display: block;
}

/* 属性分组 */
.prop-group {
  margin-bottom: 16px;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  overflow: hidden;
}

.prop-group-title {
  background-color: #f5f5f7;
  padding: 10px 12px;
  font-weight: 600;
  font-size: 13px;
  border-bottom: 1px solid #e5e5e5;
}

.prop-group-content {
  padding: 12px;
}

.prop-row {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.prop-row:last-child {
  margin-bottom: 0;
}

.prop-item {
  margin-bottom: 12px;
}

.prop-item:last-child {
  margin-bottom: 0;
}

.prop-item.half {
  flex: 1;
  margin-bottom: 0;
}

.prop-label {
  width: 80px;
  font-weight: 500;
}

.prop-label-small {
  font-size: 12px;
  color: #666;
  margin-bottom: 6px;
  display: block;
}

.prop-input-wrap {
  flex: 1;
  position: relative;
}

.prop-input {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.2s ease;
}

.button-group {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.text-align-btn,
.text-decoration-btn,
.text-style-btn {
  width: 36px;
  height: 36px;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  background-color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.text-align-btn:hover,
.text-decoration-btn:hover,
.text-style-btn:hover {
  border-color: #e6162d;
  color: #e6162d;
}

.text-align-btn.active,
.text-decoration-btn.active,
.text-style-btn.active {
  background-color: #e6162d;
  border-color: #e6162d;
  color: #fff;
}

.bold-btn i {
  font-weight: bold;
}

.prop-input:focus {
  outline: none;
  border-color: #e6162d;
  box-shadow: 0 0 0 2px rgba(230, 22, 45, 0.1);
}

.prop-unit {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
}

.relative {
  position: relative;
}

.color-input {
  padding-right: 40px;
}

.color-picker {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  cursor: pointer;
  background: none;
}

.upload-btn {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: none;
  background: none;
  cursor: pointer;
  color: #666;
  transition: color 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.upload-btn:hover {
  color: #e6162d;
}

.prop-radio-group {
  display: flex;
  gap: 15px;
}

.radio-item {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.prop-slider-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.prop-slider {
  flex: 1;
  height: 4px;
  background-color: #e5e5e5;
  border-radius: 2px;
  outline: none;
  -webkit-appearance: none;
}

.prop-slider::-webkit-slider-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: #e6162d;
  cursor: pointer;
  -webkit-appearance: none;
}

.prop-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: #e6162d;
  cursor: pointer;
  border: none;
}

.prop-slider::-moz-range-track {
  height: 4px;
  background-color: #e5e5e5;
  border-radius: 2px;
}

.slider-value {
  width: 45px;
  text-align: center;
  color: #666;
  font-size: 12px;
}

.switch-wrap {
  flex: 1;
}

.switch {
  width: 44px;
  height: 22px;
  background-color: #e5e5e5;
  border-radius: 11px;
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
}

.switch::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  background-color: #fff;
  border-radius: 50%;
  top: 2px;
  left: 2px;
  transition: all 0.2s ease;
}

.switch.active {
  background-color: #e6162d;
}

.switch.active::after {
  left: 24px;
}

.prop-select {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  font-size: 14px;
  background-color: #fff;
  transition: border-color 0.2s ease;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='6'%3E%3Cpath fill='%23666' d='M0 0l6 6 6-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px;
}

.prop-select:focus {
  outline: none;
  border-color: #e6162d;
  box-shadow: 0 0 0 2px rgba(230, 22, 45, 0.1);
}

.prop-btn {
  width: 100%;
  height: 40px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  margin-bottom: 10px;
  transition: all 0.2s ease;
}

.warning-btn {
  background-color: #ff7d00;
  color: #fff;
}

.warning-btn:hover {
  background-color: #e66e00;
}

.danger-btn {
  background-color: #ff4d4f;
  color: #fff;
}

.danger-btn:hover {
  background-color: #f5222d;
}

.component-color-input {
  width: 100%;
  height: 36px;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  cursor: pointer;
}

/* ========== 帮助面板 ========== */
.help-content {
  padding: 15px;
  text-align: left;
  color: #666;
  font-size: 13px;
  line-height: 1.8;
}

.help-content .help-section {
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e5e5e5;
}

.help-content .help-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.help-content .help-section h4 {
  color: #e6162d;
  font-size: 14px;
  margin-bottom: 8px;
  font-weight: 600;
}

.help-content .help-section p {
  margin: 4px 0;
  color: #666;
}

/* ========== 动画 ========== */
@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.component-add-transition {
  animation: fadeInScale 0.2s ease;
}

/* 组件操作图标样式 */
.component-action-icons {
  position: absolute;
  top: -20px;
  left: 0;
  display: flex;
  gap: 2px;
  z-index: 1000;
  pointer-events: auto;
}

.component-action-icon {
  width: 20px;
  height: 20px;
  background: #e6162d;
  color: #fff;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
}

.image-preview-tooltip {
  position: fixed;
  z-index: 9999;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  padding: 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  max-width: 200px;
  max-height: 250px;
}

.image-preview-tooltip img {
  display: block;
  max-width: 200px;
  max-height: 200px;
}

/* 子编辑器样式 */
#subEditorContent .sidebar {
  width: 250px;
  background: #f5f5f5;
  padding: 20px;
  border-right: 1px solid #e8e8e8;
  overflow-y: auto;
}

#subEditorContent .main-content {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}

#subEditorContent .right-sidebar {
  width: 300px;
  background: #f5f5f5;
  border-left: 1px solid #e8e8e8;
  overflow-y: auto;
}

#subEditorContent .sidebar-section {
  margin-bottom: 30px;
}

#subEditorContent .sidebar-section h3 {
  margin: 0 0 15px 0;
  font-size: 14px;
  font-weight: bold;
  color: #333;
}

#subEditorContent .sidebar-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#subEditorContent .sidebar-section li {
  padding: 10px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.3s;
  margin-bottom: 5px;
}

#subEditorContent .sidebar-section li:hover {
  background: #e8e8e8;
  color: #1890ff;
}

#subEditorContent .align-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

#subEditorContent .align-btn {
  width: 40px;
  height: 40px;
  border: 1px solid #d9d9d9;
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

#subEditorContent .align-btn:hover {
  border-color: #1890ff;
  color: #1890ff;
}

#subEditorContent .image-library {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

#subEditorContent .image-item {
  width: 100%;
  height: 80px;
  background: #e8e8e8;
  border-radius: 4px;
  cursor: pointer;
  background-size: cover;
  background-position: center;
  transition: all 0.3s;
}

#subEditorContent .image-item:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

#subEditorContent .prop-panel {
  padding: 20px;
  border-bottom: 1px solid #e8e8e8;
}

#subEditorContent .panel-title {
  font-size: 14px;
  font-weight: bold;
  color: #333;
  margin-bottom: 15px;
}

#subEditorContent .prop-group {
  margin-bottom: 20px;
}

#subEditorContent .prop-group-title {
  font-size: 12px;
  color: #666;
  margin-bottom: 10px;
}

#subEditorContent .prop-item {
  margin-bottom: 15px;
}

#subEditorContent .prop-label {
  display: block;
  font-size: 12px;
  color: #666;
  margin-bottom: 5px;
}

#subEditorContent .prop-input {
  width: 100%;
  padding: 8px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  font-size: 12px;
}

#subEditorContent .prop-slider {
  width: 100%;
  margin: 10px 0;
}

#subEditorContent .prop-value {
  font-size: 12px;
  color: #666;
}

#subEditorContent .prop-btn {
  width: 100%;
  padding: 10px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.3s;
  margin-bottom: 10px;
}

#subEditorContent .prop-btn:hover {
  border-color: #1890ff;
  color: #1890ff;
}

#subEditorContent .prop-btn.primary-btn {
  background: #1890ff;
  border-color: #1890ff;
  color: #fff;
}

#subEditorContent .prop-btn.primary-btn:hover {
  background: #40a9ff;
  border-color: #40a9ff;
}

#subEditorContent .prop-btn.warning-btn {
  background: #faad14;
  border-color: #faad14;
  color: #fff;
}

#subEditorContent .prop-btn.warning-btn:hover {
  background: #ffc53d;
  border-color: #ffc53d;
}

#subEditorContent .layer-list {
  max-height: 300px;
  overflow-y: auto;
}

#subEditorContent .layer-item {
  padding: 10px;
  border-bottom: 1px solid #e8e8e8;
  cursor: pointer;
  transition: all 0.3s;
}

#subEditorContent .layer-item:hover {
  background: #e8e8e8;
}

#subEditorContent .layer-item.active {
  background: #e6f7ff;
  border-left: 3px solid #1890ff;
}

#subEditorContent .layer-name {
  font-size: 12px;
  color: #333;
}

#subEditorContent .layer-visibility-icon {
  margin-right: 10px;
  cursor: pointer;
}

/* 子编辑器标尺样式 */
#subEditArea {
    position: relative;
    overflow: auto;
}

#subEditArea::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 20px;
    background-color: #e0e0e0;
    border-bottom: 1px solid #ccc;
    z-index: 10;
}

#subEditArea::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 20px;
    background-color: #e0e0e0;
    border-right: 1px solid #ccc;
    z-index: 10;
}

#subEditArea > .module {
    margin-top: 20px;
    margin-left: 20px;
}

.auto-scroll-container {
  display: flex;
  align-items: flex-start;
  height: 100%;
  transition: transform 0.5s ease;
}

.auto-scroll-item {
  flex-shrink: 0;
}

.auto-scroll-progress {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

.auto-scroll-progress-bar {
  height: 100%;
  transition: width 0.3s ease;
}
