/* ============================================================ 标题模板系统 v3(按 sketch 重构) - 大卡片网格(图片背景 + 透明 Canvas 叠字 + 始终可见操作按钮) - 编辑器弹窗(左竖屏预览 + 右参数 Tab) ============================================================ */ /* ── 面板容器(模板模式) ── */ .ttv3-panel { display: flex; flex-direction: column; gap: 14px; } .ttv3-header { display: flex; justify-content: space-between; align-items: center; } .ttv3-title { font-size: 15px; font-weight: 600; color: var(--text-primary, #1f2937); } .ttv3-new-btn.ant-btn { background: linear-gradient(135deg, #6c5ce7, #a29bfe); border: none; border-radius: 20px; font-size: 12px; height: 28px; padding: 0 14px; font-weight: 500; box-shadow: 0 2px 8px rgba(108, 92, 231, 0.25); } .ttv3-new-btn.ant-btn:hover { background: linear-gradient(135deg, #5b4cdb, #8c83f5) !important; color: #fff !important; } .ttv3-section-label { font-size: 12px; color: #888; font-weight: 500; margin-bottom: 8px; } .ttv3-section { margin-bottom: 6px; } /* ── 空状态 ── */ .ttv3-empty { background: #f8f8fc; border-radius: 12px; padding: 28px 16px; text-align: center; color: #aaa; } .ttv3-empty-icon { font-size: 28px; margin-bottom: 6px; } .ttv3-empty-text { font-size: 12px; } /* ── 卡片网格:minmax(180px,1fr) 自适应 ── */ .ttv3-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; } /* ── 卡片:3:4 竖版,圆角 14px ── */ .ttv3-card { background: #fff; border-radius: 14px; border: 3px solid #e8e8ed; cursor: pointer; transition: all 0.15s ease; overflow: hidden; padding: 0; font-family: inherit; text-align: left; } .ttv3-card:hover { border-color: #c5c0f0; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1); } .ttv3-card.selected { border-color: #6c5ce7; box-shadow: 0 4px 16px rgba(108, 92, 231, 0.25); } /* ── 卡片预览区(3:4) ── */ .ttv3-preview { width: 100%; aspect-ratio: 3/4; position: relative; overflow: hidden; border-radius: 11px 11px 0 0; } .ttv3-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; } /* 暗色渐变遮罩:顶部15%半透明黑 + 中部透明 + 底部45%黑 */ .ttv3-vignette { position: absolute; inset: 0; background: linear-gradient( 180deg, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.15) 15%, transparent 30%, transparent 55%, rgba(0, 0, 0, 0.6) 100% ); z-index: 1; pointer-events: none; } /* 透明 Canvas 标题填充整个预览区 */ .ttv3-preview .tt-fill-canvas-wrap { position: absolute; inset: 0; z-index: 2; } .ttv3-preview .tt-fill-canvas-wrap canvas { width: 100% !important; height: 100% !important; border-radius: 0; display: block; } /* ── 左上角角标(系统/我的) ── */ .ttv3-badge { position: absolute; top: 8px; left: 8px; font-size: 10px; padding: 2px 8px; border-radius: 8px; font-weight: 500; color: #fff; z-index: 3; backdrop-filter: blur(4px); } .ttv3-badge--sys { background: rgba(108, 92, 231, 0.88); } .ttv3-badge--mine { background: rgba(0, 184, 148, 0.88); } /* ── 右上角勾选圆圈 ── */ .ttv3-check { position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; border-radius: 50%; background: rgba(0, 0, 0, 0.3); border: 2px solid rgba(255, 255, 255, 0.7); z-index: 3; display: flex; align-items: center; justify-content: center; font-size: 12px; color: transparent; transition: all 0.15s; } .ttv3-check.on { background: #6c5ce7; border-color: #fff; color: #fff; } /* ── 卡片底栏(名称 + 操作按钮) ── */ .ttv3-footer { padding: 10px 10px 12px; } .ttv3-name-row { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; color: #1f2937; } .ttv3-emoji { font-size: 14px; flex-shrink: 0; } .ttv3-name { overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; } .ttv3-tag { font-size: 10px; padding: 1px 6px; border-radius: 6px; font-weight: 500; flex-shrink: 0; } .ttv3-tag--sys { background: #f0ecff; color: #6c5ce7; } .ttv3-tag--mine { background: #e6f9f4; color: #00b894; } /* ── 操作按钮:始终可见,等宽排列 ── */ .ttv3-actions { display: flex; gap: 5px; } .ttv3-act { flex: 1; padding: 5px 0; border: 1px solid #e8e8ed; background: #fff; border-radius: 7px; font-size: 11px; cursor: pointer; color: #666; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; gap: 3px; transition: all 0.15s; font-family: inherit; } .ttv3-act:hover:not(:disabled) { background: #f5f5fa; border-color: #d5d3e8; } .ttv3-act--primary { background: #6c5ce7; color: #fff; border-color: #6c5ce7; } .ttv3-act--primary:hover:not(:disabled) { background: #5b4cdb; border-color: #5b4cdb; } .ttv3-act--danger { color: #e74c3c; } .ttv3-act--danger:hover:not(:disabled) { background: #fef2f2; } .ttv3-act:disabled { opacity: 0.35; cursor: not-allowed; } /* ── FillPreview 公共容器 ── */ .tt-fill-canvas-wrap { position: relative; } /* ── params-only(编辑器右侧)去掉多余 margin ── */ .ttv3-params-only { padding: 0; } .ttv3-params-only .ant-tabs { margin: 0; } /* ============================================================ 编辑器 Modal(v3) ============================================================ */ .ttv3-modal .ant-modal-content { border-radius: 16px; overflow: hidden; padding: 0; } .ttv3-modal .ant-modal-header { padding: 16px 20px; margin: 0; border-bottom: 1px solid #f0f0f0; } .ttv3-modal .ant-modal-body { padding: 0; max-height: 75vh; } .ttv3-modal .ant-modal-footer { padding: 14px 20px; margin: 0; border-top: 1px solid #f0f0f0; } /* 编辑器两栏布局 */ .ttv3-editor { display: flex; min-height: 500px; } .ttv3-editor-left { width: 300px; padding: 20px; background: #f8f8fc; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; border-right: 1px solid #f0f0f0; } .ttv3-editor-canvas { width: 200px; aspect-ratio: 9/16; border-radius: 12px; overflow: hidden; position: relative; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12); flex-shrink: 0; } .ttv3-editor-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; } .ttv3-editor-canvas-inner { position: absolute; inset: 0; z-index: 2; } .ttv3-editor-canvas-inner canvas { width: 100% !important; height: 100% !important; border-radius: 0; display: block; } .ttv3-editor-form { width: 100%; display: flex; flex-direction: column; gap: 10px; } .ttv3-form-row { display: flex; align-items: center; gap: 10px; } .ttv3-form-row label { font-size: 12px; font-weight: 600; color: #333; white-space: nowrap; min-width: 44px; } .ttv3-form-row--grow { flex: 1; } .ttv3-form-row--grow .ant-input { flex: 1; } .ttv3-editor-right { flex: 1; padding: 16px 20px; overflow-y: auto; min-width: 0; } /* 侧栏较窄时(380px 侧栏):强制 2 列,卡片稍微紧凑 */ @media (max-width: 540px) { .ttv3-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } .ttv3-act { font-size: 10px; padding: 4px 0; } .ttv3-act .anticon { display: none; } }