/* ============================================
   Matrix Publisher · 全局样式
   ============================================ */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- Tab 按钮 ---------- */
.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgb(100 116 139); /* slate-500 */
  border: none;
  background: transparent;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.tab-btn:hover {
  color: rgb(15 23 42); /* slate-900 */
}
.tab-btn.tab-active {
  color: rgb(37 99 235); /* blue-600 */
  border-bottom-color: rgb(37 99 235);
}

/* ---------- 滚动条 ---------- */
*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
*::-webkit-scrollbar-track {
  background: transparent;
}
*::-webkit-scrollbar-thumb {
  background: rgb(203 213 225); /* slate-300 */
  border-radius: 4px;
}
*::-webkit-scrollbar-thumb:hover {
  background: rgb(148 163 184); /* slate-400 */
}
aside ::-webkit-scrollbar-thumb {
  background: rgb(51 65 85); /* slate-700 */
}
aside ::-webkit-scrollbar-thumb:hover {
  background: rgb(71 85 105); /* slate-600 */
}

/* ---------- 卡片基础 ---------- */
.card {
  background: white;
  border: 1px solid rgb(226 232 240); /* slate-200 */
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

/* ---------- 绿色流动线动画 ---------- */
@keyframes flow-dash {
  to { stroke-dashoffset: -40; }
}
.flow-line {
  stroke-dasharray: 8 6;
  animation: flow-dash 1.2s linear infinite;
}
.flow-line-slow {
  stroke-dasharray: 6 8;
  animation: flow-dash 2s linear infinite;
}

/* 流动粒子 */
@keyframes flow-particle {
  0% { offset-distance: 0%; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { offset-distance: 100%; opacity: 0; }
}

/* SVG 容器 */
.svg-flow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

/* ---------- 按钮 ---------- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: white;
  background: rgb(37 99 235);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.2);
}
.btn-primary:hover { background: rgb(29 78 216); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled {
  background: rgb(148 163 184);
  cursor: not-allowed;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgb(71 85 105);
  background: transparent;
  border: 1px solid rgb(226 232 240);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-ghost:hover {
  background: rgb(248 250 252);
  color: rgb(15 23 42);
}

/* ---------- 输入框 ---------- */
.input-base {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  background: white;
  border: 1px solid rgb(226 232 240);
  border-radius: 8px;
  outline: none;
  transition: all 0.15s ease;
}
.input-base:focus {
  border-color: rgb(147 197 253);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ---------- 状态徽章 ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 999px;
}
.badge-green {
  color: rgb(6 95 70);
  background: rgb(209 250 229);
}
.badge-blue {
  color: rgb(30 64 175);
  background: rgb(219 234 254);
}
.badge-gray {
  color: rgb(71 85 105);
  background: rgb(241 245 249);
}

/* ---------- 文件夹树 ---------- */
.tree-node {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.5rem;
  font-size: 0.8125rem;
  color: rgb(71 85 105);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.1s ease;
  user-select: none;
}
.tree-node:hover {
  background: rgb(241 245 249);
  color: rgb(15 23 42);
}
.tree-node.selected {
  background: rgb(239 246 255);
  color: rgb(29 78 216);
  font-weight: 500;
}
.tree-children {
  margin-left: 0.875rem;
  padding-left: 0.625rem;
  border-left: 1px dashed rgb(226 232 240);
}
.tree-children.collapsed {
  display: none;
}
.tree-toggle {
  width: 12px;
  height: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgb(148 163 184);
  transition: transform 0.15s ease;
}
.tree-toggle.open {
  transform: rotate(90deg);
}
.tree-leaf {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.5rem;
  font-size: 0.8125rem;
  color: rgb(71 85 105);
  border-radius: 6px;
  cursor: pointer;
}
.tree-leaf:hover { background: rgb(241 245 249); }

/* ---------- 平台图标色块 ---------- */
.platform-douyin  { background: linear-gradient(135deg, #25F4EE 0%, #FE2C55 100%); }
.platform-kuaishou{ background: linear-gradient(135deg, #FF6A00 0%, #FFAD00 100%); }
.platform-xhs     { background: linear-gradient(135deg, #FF2442 0%, #FFB199 100%); }
.platform-shipinhao { background: linear-gradient(135deg, #07C160 0%, #5DDB8C 100%); }

/* ---------- 抖音发布预览 ---------- */
.douyin-preview {
  background: #000;
  border-radius: 12px;
  aspect-ratio: 9/16;
  max-height: 360px;
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}
.douyin-preview::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.4) 100%);
  pointer-events: none;
}

/* ---------- 标签 chip ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: rgb(29 78 216);
  background: rgb(239 246 255);
  border: 1px solid rgb(191 219 254);
  border-radius: 999px;
}
.chip button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
  color: rgb(147 197 253);
  background: transparent;
  border: none;
  cursor: pointer;
}
.chip button:hover { color: rgb(29 78 216); }

/* ---------- 通用动画 ---------- */
@keyframes fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in {
  animation: fade-in 0.25s ease-out;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}
.pulse-dot {
  animation: pulse-dot 1.6s ease-in-out infinite;
}

/* ============================================
   Polish 工具包 — 克制炫酷
   ============================================ */

/* 全局平滑 */
* {
  -webkit-tap-highlight-color: transparent;
}

/* 关键按钮 glow */
.btn-primary {
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.2);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-primary:hover {
  background: rgb(29 78 216);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3),
              0 0 24px rgba(37, 99, 235, 0.2);
  transform: translateY(-1px);
}
.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.2);
}

/* 卡片悬停浮起（统一 .card 的 hover 行为） */
.card {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.2s ease,
              border-color 0.2s ease;
}
.card.hoverable:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px -8px rgba(15, 23, 42, 0.1),
              0 4px 8px -2px rgba(15, 23, 42, 0.05);
  border-color: rgb(203 213 225);
}

/* 绿色流动线发光 */
.flow-line {
  filter: drop-shadow(0 0 3px rgba(16, 185, 129, 0.5))
          drop-shadow(0 0 6px rgba(16, 185, 129, 0.3));
}

/* 局部装饰光晕（克制版） */
.ambient-glow {
  position: absolute;
  pointer-events: none;
  border-radius: 999px;
  filter: blur(70px);
  z-index: 0;
  animation: ambient-drift 12s ease-in-out infinite;
}
.ambient-glow-blue {
  background: radial-gradient(circle, rgba(59, 130, 246, 0.25) 0%, transparent 70%);
  width: 360px;
  height: 360px;
  top: -100px;
  right: -80px;
}
.ambient-glow-emerald {
  background: radial-gradient(circle, rgba(16, 185, 129, 0.2) 0%, transparent 70%);
  width: 300px;
  height: 300px;
  bottom: -120px;
  left: -80px;
  animation-delay: -6s;
}
.ambient-glow-pink {
  background: radial-gradient(circle, rgba(236, 72, 153, 0.15) 0%, transparent 70%);
  width: 280px;
  height: 280px;
  top: 40%;
  right: 20%;
  animation-delay: -3s;
}
@keyframes ambient-drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(20px, -15px) scale(1.05); }
  66%      { transform: translate(-15px, 20px) scale(0.95); }
}

/* 缩略图 hover + 渐变遮罩 */
.thumb-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
}
.thumb-wrap > * {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.thumb-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.45) 100%);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}
.thumb-wrap:hover::after { opacity: 1; }
.thumb-wrap:hover > * { transform: scale(1.06); }

/* Chip 弹性反馈 */
.chip {
  transition: all 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.chip:active { transform: scale(0.94); }

/* 输入框 focus 增强 */
.input-base {
  transition: all 0.2s ease;
}
.input-base:hover { border-color: rgb(203 213 225); }
.input-base:focus {
  border-color: rgb(96 165 250);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

/* 平台 logo 立体感 */
.platform-logo {
  position: relative;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3),
              inset 0 -1px 0 rgba(0, 0, 0, 0.1),
              0 2px 4px rgba(0, 0, 0, 0.08);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.platform-logo:hover {
  transform: translateY(-2px) rotate(-2deg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4),
              0 8px 16px rgba(0, 0, 0, 0.15);
}

/* Tab 切换 slide-in */
@keyframes tabSlideIn {
  from { opacity: 0; transform: translateX(12px); }
  to   { opacity: 1; transform: translateX(0); }
}
.tab-content-enter {
  animation: tabSlideIn 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes tabSlideInLeft {
  from { opacity: 0; transform: translateX(-12px); }
  to   { opacity: 1; transform: translateX(0); }
}
.tab-content-enter-left {
  animation: tabSlideInLeft 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Skeleton 屏 */
.skeleton {
  background: linear-gradient(90deg,
    rgb(241 245 249) 0%,
    rgb(226 232 240) 50%,
    rgb(241 245 249) 100%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
  border-radius: 6px;
}
@keyframes skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* 选中项左 border 高亮 */
.nav-active {
  position: relative;
}
.nav-active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: rgb(37 99 235);
  border-radius: 0 2px 2px 0;
}

/* 数字滚动容器（保留原始文字做 fallback） */
.count-up {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum';
}

/* 抖音预览 hover 微动 */
.douyin-preview {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.3s ease;
}
.douyin-preview:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 32px -4px rgba(0, 0, 0, 0.3);
}

/* 视频卡 hover 增强 */
.video-card {
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.video-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px -8px rgba(15, 23, 42, 0.12),
              0 4px 8px -2px rgba(15, 23, 42, 0.05);
}

/* ============================================
   白色 Sidebar（v2 重构版）
   ============================================ */
.sidebar-light {
  background: white;
  border-right: 1px solid rgb(226 232 240);
  color: rgb(71 85 105);
}
.sidebar-light .sidebar-brand {
  border-bottom: 1px solid rgb(241 245 249);
}
.sidebar-light .sidebar-section {
  color: rgb(148 163 184);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0 0.75rem 0.5rem;
}
.sidebar-light .sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-size: 0.875rem;
  color: rgb(71 85 105);
  transition: all 0.15s ease;
  cursor: pointer;
}
.sidebar-light .sidebar-item:hover {
  background: rgb(241 245 249);
  color: rgb(15 23 42);
}
.sidebar-light .sidebar-item.active {
  background: rgb(239 246 255);
  color: rgb(29 78 216);
  font-weight: 500;
}
.sidebar-light .sidebar-history-item {
  display: block;
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  color: rgb(100 116 139);
  border-radius: 6px;
  transition: all 0.12s ease;
}
.sidebar-light .sidebar-history-item:hover {
  background: rgb(241 245 249);
  color: rgb(15 23 42);
}
.sidebar-light .sidebar-history-item.current {
  color: rgb(15 23 42);
  background: rgb(248 250 252);
}
.sidebar-light .sidebar-user-area {
  border-top: 1px solid rgb(241 245 249);
}

/* ============================================
   新发布页：横向平铺文件夹
   ============================================ */
.folder-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 12px;
  padding: 16px;
}
.folder-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 8px;
  border-radius: 12px;
  background: white;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}
.folder-card:hover {
  background: rgb(248 250 252);
  border-color: rgb(226 232 240);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px -4px rgba(15, 23, 42, 0.08);
}
.folder-card.selected {
  background: rgb(239 246 255);
  border-color: rgb(147 197 253);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
.folder-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 2px 4px rgba(0, 0, 0, 0.1);
}
.folder-name {
  font-size: 12px;
  color: rgb(71 85 105);
  text-align: center;
  line-height: 1.3;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.folder-card.selected .folder-name {
  color: rgb(29 78 216);
  font-weight: 500;
}
.folder-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgb(239 68 68);
  color: white;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 999px;
  font-weight: 500;
  min-width: 16px;
  text-align: center;
}

/* 素材库 1+2+5 横向层级：父 / 子 / 文件 卡片 */
.folder-card-parent {
  padding: 18px 12px;
}
.folder-card-parent .folder-icon-lg {
  width: 64px;
  height: 64px;
  font-size: 26px;
}
.folder-card-parent .folder-name {
  font-size: 13px;
  font-weight: 600;
}
.folder-card-sub {
  padding: 10px 6px;
}
.folder-card-sub .folder-icon {
  width: 36px;
  height: 36px;
  font-size: 16px;
}

/* 文件小卡片（叶子层） */
.file-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  background: white;
  border: 1px solid rgb(241 245 249);
  cursor: pointer;
  transition: all 0.15s ease;
}
.file-card:hover {
  border-color: rgb(96 165 250);
  background: rgb(239 246 255);
  transform: translateX(2px);
}
.file-card.selected {
  border-color: rgb(96 165 250);
  background: rgb(239 246 255);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}
.file-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 9px;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.file-name {
  font-size: 11px;
  font-weight: 500;
  color: rgb(15 23 42);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.file-meta {
  font-size: 10px;
  color: rgb(100 116 139);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 4px;
}
.file-size {
  font-size: 10px;
  color: rgb(148 163 184);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

/* 文件 → 账号对应徽章（账号行内的 "接收 2 个"） */
.account-receive {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 600;
  color: rgb(6 95 70);
  background: rgb(209 250 229);
  border-radius: 999px;
  flex-shrink: 0;
}

/* 素材库左栏收起/展开 */
.asset-panel {
  display: grid;
  grid-template-columns: 56px 1fr;
  transition: grid-template-columns 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  height: 100%;
  overflow: hidden;
}
.asset-panel.collapsed {
  grid-template-columns: 56px 0px;
}
.asset-panel.collapsed .asset-detail {
  opacity: 0;
  pointer-events: none;
}
.asset-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0;
  gap: 10px;
  background: rgb(248 250 252);
  border-right: 1px solid rgb(241 245 249);
}
.asset-rail .rail-toggle {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border: 1px solid rgb(226 232 240);
  color: rgb(100 116 139);
  cursor: pointer;
  transition: all 0.15s ease;
}
.asset-rail .rail-toggle:hover {
  background: rgb(239 246 255);
  color: rgb(29 78 216);
  border-color: rgb(147 197 253);
}
.asset-rail .rail-divider {
  width: 24px;
  height: 1px;
  background: rgb(226 232 240);
}
.asset-rail .rail-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 40px;
}
.asset-rail .rail-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 12px;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.asset-detail {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: opacity 0.2s ease;
}

/* 流动线高亮（hover 关联时） */
.flow-line.dim { opacity: 0.15; }
.flow-line.hot { stroke-width: 2.5; opacity: 1; filter: drop-shadow(0 0 6px rgba(16, 185, 129, 0.7)); }

/* ============================================
   数字文件夹 1-5 + HTML 流动线层
   ============================================ */

/* 数字文件夹卡片（5 个：1, 2, 3, 4, 5） */
.folder-num {
  position: relative;
  cursor: pointer;
}
.folder-num .num-bg {
  width: 100%;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 28px;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08),
              inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.folder-num:hover .num-bg {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.2),
              inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.folder-num[data-num="1"] .num-bg { background: linear-gradient(135deg, #fda4af 0%, #fb923c 100%); }
.folder-num[data-num="2"] .num-bg { background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%); }
.folder-num[data-num="3"] .num-bg { background: linear-gradient(135deg, #34d399 0%, #10b981 100%); }
.folder-num[data-num="4"] .num-bg { background: linear-gradient(135deg, #22d3ee 0%, #3b82f6 100%); }
.folder-num[data-num="5"] .num-bg { background: linear-gradient(135deg, #a78bfa 0%, #7c3aed 100%); }

/* 流动线层（绝对定位覆盖整个 publish-root） */
.flow-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
}

/* 单条流动线（HTML 元素 · 虚线 + 流动动画） */
.flow-line-html {
  position: absolute;
  height: 2px;
  background-image: linear-gradient(
    to right,
    #10b981 0%,
    #10b981 50%,
    transparent 50%,
    transparent 100%
  );
  background-size: 10px 100%;
  background-repeat: repeat-x;
  background-position: 0 0;
  transform-origin: 0 50%;
  box-shadow: 0 0 4px rgba(16, 185, 129, 0.4);
  transition: opacity 0.2s ease, background-size 0.2s ease, box-shadow 0.2s ease;
  animation: flow-dash 0.6s linear infinite;
}
@keyframes flow-dash {
  to { background-position: -10px 0; }
}
.flow-line-html::after {
  content: '';
  position: absolute;
  right: -2px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 10px solid #10b981;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  filter: drop-shadow(0 0 3px rgba(16, 185, 129, 0.7));
}
.flow-line-html.hot {
  height: 3px;
  background-size: 14px 100%;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.9);
  z-index: 1;
  animation-duration: 0.4s;
}
.flow-line-html.dim {
  opacity: 0.12;
  animation-play-state: paused;
}

/* 流动线编号标签（圆点徽章） */
.flow-line-label {
  position: absolute;
  background: #10b981;
  color: white;
  font-size: 11px;
  font-weight: 700;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.5);
  pointer-events: none;
  font-variant-numeric: tabular-nums;
  border: 2px solid white;
}

/* ============================================
   新发布页：账号单列
   ============================================ */
.account-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
}
.account-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: white;
  border: 1px solid rgb(241 245 249);
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}
.account-row:hover {
  border-color: rgb(203 213 225);
  background: rgb(248 250 252);
  transform: translateX(2px);
}
.account-row.selected {
  border-color: rgb(96 165 250);
  background: rgb(239 246 255);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
.platform-logo-sm {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.06);
}
.account-info {
  flex: 1;
  min-width: 0;
}
.account-name {
  font-size: 13px;
  font-weight: 500;
  color: rgb(15 23 42);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.account-handle {
  font-size: 11px;
  color: rgb(100 116 139);
  margin-top: 1px;
}
.account-fans {
  font-size: 11px;
  color: rgb(100 116 139);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}
.account-fans .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgb(16 185 129);
  display: inline-block;
}

/* ============================================
   抖音同款表单（参考抖音创作者中心设计语言）
   ============================================ */
.douyin-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.douyin-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.douyin-label {
  font-size: 13px;
  font-weight: 600;
  color: rgb(64 67 70);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.douyin-hint {
  font-size: 11px;
  color: rgba(28, 31, 35, 0.55);
  font-weight: 400;
}
.douyin-textarea {
  width: 100%;
  min-height: 96px;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 22px;
  color: rgb(22 24 35);
  background: rgba(46, 50, 56, 0.04);
  border: none;
  border-radius: 6px;
  outline: none;
  resize: vertical;
  transition: background 0.15s ease, box-shadow 0.15s ease;
  font-family: inherit;
}
.douyin-textarea:hover { background: rgba(46, 50, 56, 0.07); }
.douyin-textarea:focus { background: white; box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3); }
.douyin-textarea::placeholder { color: rgba(28, 31, 35, 0.35); }

.douyin-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  color: rgb(22 24 35);
  background: rgb(244 245 245);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.12s ease;
  border: none;
}
.douyin-chip:hover { background: rgb(232 234 235); }
.douyin-chip.active { background: rgb(22 24 35); color: white; }
.douyin-chip.active button { color: rgba(255, 255, 255, 0.6); }
.douyin-chip button {
  width: 12px;
  height: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(22, 24, 35, 0.4);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}
.douyin-chip.add {
  color: rgb(22 24 35);
  background: white;
  border: 1px dashed rgb(203 213 225);
}
.douyin-chip.add:hover {
  background: rgb(248 250 252);
  border-color: rgb(96 165 250);
  color: rgb(29 78 216);
}

.douyin-section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgb(241 245 249) 20%, rgb(241 245 249) 80%, transparent);
  margin: 4px 0;
}

.douyin-switch {
  position: relative;
  display: inline-block;
  width: 32px;
  height: 18px;
  background: rgb(234 234 234);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease;
  flex-shrink: 0;
  border: none;
  padding: 0;
}
.douyin-switch.on { background: rgb(59 130 246); }
.douyin-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}
.douyin-switch.on::after { transform: translateX(14px); }

.douyin-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
  color: rgb(22 24 35);
}
.douyin-action-row .left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.douyin-action-row .right {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgb(100 116 139);
  font-size: 13px;
}
.douyin-action-row .right.clickable { cursor: pointer; }
.douyin-action-row .right.clickable:hover { color: rgb(15 23 42); }

.douyin-cover {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.douyin-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.45) 100%);
  pointer-events: none;
}
.douyin-cover .play-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 1;
}
.douyin-cover .cover-meta {
  position: absolute;
  bottom: 8px;
  left: 12px;
  right: 12px;
  color: white;
  font-size: 12px;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1;
}

