/* 爆款复刻页：左边是上传 / 分析 / 脚本，底部固定生成栏；右边是作品示例、我的作品、教学示例 */
.rp-entry { display: flex; align-items: center; gap: 14px; margin: 0 0 22px; padding: 16px 20px; border-radius: 14px; text-decoration: none; color: var(--text);
  background: linear-gradient(110deg, rgba(167, 139, 250, .16), rgba(45, 212, 191, .1)); border: 1px solid var(--line2); transition: .15s; }
.rp-entry:hover { border-color: var(--accent); transform: translateY(-1px); }
.rp-entry-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: rgba(167, 139, 250, .2); color: #a78bfa; }
.rp-entry-t { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.rp-entry-t b { font-size: 16px; }
.rp-entry-t em { font-style: normal; color: var(--dim); font-size: 13px; }
.rp-entry-go { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); font-weight: 600; white-space: nowrap; }

.rp { height: 100%; display: flex; flex-direction: column; min-height: 560px; }
.rp-top { display: flex; align-items: center; gap: 14px; padding: 14px 24px 10px; flex-wrap: wrap; }
.rp-back { display: inline-flex; align-items: center; gap: 4px; color: var(--dim); text-decoration: none; font-size: 13px; }
.rp-back:hover { color: var(--accent); }
.rp-top h1 { margin: 0; font-size: 20px; }
.rp-sub { color: var(--mute); font-size: 13px; }
.rp-tm { margin-left: auto; }
.rp-chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line2);
  background: var(--panel); color: var(--dim); font-size: 12px; max-width: 280px; }
.rp-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-chip:hover { color: var(--text); border-color: var(--accent); }

.rp-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(420px, 560px) minmax(0, 1fr); gap: 16px; padding: 0 24px 18px; }
.rp-left, .rp-right { min-height: 0; display: flex; flex-direction: column; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); overflow: hidden; }
.rp-scroll { flex: 1; overflow: auto; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.rp-card { border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); padding: 14px; }
.rp-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.rp-h b { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.rp-h b i { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; font-style: normal; font-size: 12px; background: var(--accent); color: #062420; }
.rp-h p { margin: 4px 0 0; color: var(--mute); font-size: 12px; }
.rp-h .btn em, .rp-go em { font-style: normal; font-weight: 400; opacity: .8; font-size: 11px; margin-left: 2px; }
.rp-h .btn { flex: none; }

/* ① 参考视频 */
.rp-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 22px 12px; border-radius: 12px; border: 1.5px dashed var(--line2);
  color: var(--dim); text-align: center; cursor: pointer; transition: .15s; }
.rp-drop:hover, .rp-drop.over { border-color: var(--accent); background: rgba(45, 212, 191, .05); }
.rp-drop b { color: var(--text); }
.rp-drop span { font-size: 12px; color: var(--mute); }
.rp-drop-btns { display: flex; gap: 8px; margin-top: 6px; }
.rp-tips { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); font-size: 12px; }
.rp-tips ul { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 4px 18px; margin: 8px 0; padding-left: 16px; color: var(--dim); }
.rp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rp-chips span { padding: 2px 9px; border-radius: 20px; background: var(--panel2); color: var(--dim); border: 1px solid var(--line); }
.rp-vcard { display: flex; gap: 12px; padding: 10px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); }
.rp-vcard video { width: 150px; max-height: 220px; border-radius: 8px; background: #000; flex: none; }
.rp-vinfo { min-width: 0; display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--dim); }
.rp-vinfo b { color: var(--text); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-vact { display: flex; gap: 8px; margin-top: auto; }
.rp-warn { color: #fbbf24; font-size: 12px; }
.rp-busy { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 14px; border-radius: 10px; background: rgba(45, 212, 191, .07); border: 1px solid rgba(45, 212, 191, .25); }
.rp-busy.flat { margin: 0 0 8px; }
.rp-busy b { font-size: 13px; }
.rp-busy p { margin: 3px 0 0; color: var(--dim); font-size: 12px; }
.rp-result { margin-top: 12px; padding: 12px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); }
.rp-result-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.rp-result-h > span { display: flex; align-items: center; gap: 6px; color: #34d399; }
.rp-result-h em { font-style: normal; color: var(--mute); font-size: 12px; }
.rp-preview { max-height: 132px; overflow: hidden; white-space: pre-wrap; font-size: 12px; line-height: 1.6; color: var(--dim);
  -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.rp-mdesc { margin: 0 0 10px; color: var(--dim); font-size: 13px; }
.rp-mta { min-height: 52vh; resize: vertical; line-height: 1.65; font-size: 13px; }
.rp-modal .modal-foot { align-items: center; }
.rp-modal .rp-count { margin-right: auto; position: static; }
.rp-confirm p { margin: 4px 0 8px; color: var(--dim); line-height: 1.6; }
.rp-confirm b { color: var(--text); }

/* ② 素材分析 */
.rp-up { margin-bottom: 12px; }
.rp-up-h { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; font-size: 13px; }
.rp-up-h span { color: var(--mute); font-size: 12px; }
.rp-thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.rp-thumb, .rp-add { position: relative; width: 74px; height: 74px; border-radius: 9px; overflow: hidden; flex: none; }
.rp-thumb { border: 1px solid var(--line); background: var(--panel); }
.rp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.rp-thumb span { position: absolute; left: 0; right: 0; bottom: 0; padding: 2px 0; text-align: center; font-size: 11px; color: #fff; background: rgba(0, 0, 0, .55); }
.rp-thumb button { position: absolute; top: 3px; right: 3px; display: grid; place-items: center; width: 18px; height: 18px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .6); color: #fff; }
.rp-add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 1.5px dashed var(--line2); background: transparent; color: var(--mute); font-size: 11px; }
.rp-add:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.rp-wait { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 10px; background: var(--panel); border: 1px dashed var(--line2); color: var(--mute); }
.rp-wait b { color: var(--dim); font-size: 13px; }
.rp-wait p { margin: 3px 0 0; font-size: 12px; }
.rp-desc { resize: vertical; font-size: 12px; line-height: 1.6; }
.rp-goods { margin-top: 12px; padding: 12px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); }
.rp-goods-h { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.rp-goods-h em { font-style: normal; font-size: 11px; padding: 1px 7px; border-radius: 6px; color: #34d399; background: rgba(52, 211, 153, .14); }
.rp-goods-h span { color: var(--mute); font-size: 12px; }
.rp-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.rp-row2 label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--dim); }
.rp-list { margin-top: 10px; }
.rp-list-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; font-size: 12px; }
.rp-list-h button { display: inline-flex; align-items: center; gap: 3px; border: 0; background: none; color: var(--accent); font-size: 12px; }
.rp-item { display: flex; gap: 6px; margin-bottom: 6px; }
.rp-item .input { padding: 6px 9px; font-size: 13px; }

/* ③ 补充说明 */
.rp-note { position: relative; border-radius: 10px; background: var(--panel); border: 1px solid var(--line2); padding: 8px 10px 22px; }
.rp-note:focus-within { border-color: var(--accent); }
.rp-note-h { display: flex; align-items: center; justify-content: space-between; color: var(--mute); font-size: 12px; margin-bottom: 4px; }
.rp-ta { width: 100%; min-height: 180px; resize: vertical; border: 0; outline: 0; background: transparent; line-height: 1.65; font-size: 13px; }
.rp-count { position: absolute; right: 10px; bottom: 6px; color: var(--mute); font-size: 11px; }
.rp-mention { position: fixed; z-index: 1200; width: 240px; max-height: 280px; overflow: auto; padding: 5px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line2); box-shadow: var(--shadow); }
.rp-mention-t { padding: 5px 8px; color: var(--mute); font-size: 11px; }
.rp-mention button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; border: 0; border-radius: 7px; background: none; text-align: left; font-size: 13px; }
.rp-mention button:hover { background: var(--panel2); }
.rp-mention img, .rp-mv { width: 28px; height: 28px; border-radius: 6px; object-fit: cover; flex: none; }
.rp-mv { display: grid; place-items: center; background: rgba(167, 139, 250, .2); color: #a78bfa; }
.rp-mention span { color: var(--mute); font-size: 12px; }

/* 底部生成栏 */
.rp-bar { position: relative; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 14px; border-top: 1px solid var(--line); background: var(--panel); }
.rp-sel { display: inline-flex; align-items: center; gap: 7px; height: 42px; padding: 0 10px; border-radius: 9px; border: 1px solid var(--line2); background: var(--bg2); text-align: left; max-width: 190px; }
.rp-sel:hover { border-color: var(--accent); }
.rp-sel span { display: flex; flex-direction: column; min-width: 0; font-size: 12px; overflow: hidden; }
.rp-sel span em { font-style: normal; color: var(--mute); font-size: 11px; }
.rp-sel span, .rp-sel span em { white-space: nowrap; text-overflow: ellipsis; }
.rp-go { margin-left: auto; height: 42px; padding: 0 18px; }
.rp-go:disabled { background: var(--panel2); border-color: var(--line2); color: var(--mute); opacity: 1; }
.rp-why { width: 100%; color: var(--mute); font-size: 12px; text-align: right; }
.rp-pop { position: fixed; z-index: 950; width: 300px; padding: 12px 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line2); box-shadow: var(--shadow); }
.rp-pop-t { display: flex; justify-content: space-between; margin: 10px 0 8px; font-size: 13px; color: var(--dim); }
.rp-pop-t:first-child { margin-top: 0; }
.rp-pop-t b { color: var(--accent); font-weight: 600; }
.rp-ratios { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.rp-ratios button, .rp-res button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 8px 0; border-radius: 8px;
  border: 1px solid var(--line2); background: var(--bg2); font-size: 12px; }
.rp-ratios i { display: block; border: 1.5px solid currentColor; border-radius: 3px; opacity: .7; }
.rp-ratios button.on, .rp-res button.on { border-color: var(--accent); color: var(--accent); background: rgba(45, 212, 191, .08); }
.rp-pop input[type=range] { width: 100%; accent-color: var(--accent); }
.rp-range { display: flex; justify-content: space-between; color: var(--mute); font-size: 11px; }
.rp-res { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }

/* 右侧面板 */
.rp-tabs { display: flex; gap: 4px; padding: 10px 12px 0; border-bottom: 1px solid var(--line); }
.rp-tabs button { padding: 8px 14px 10px; border: 0; background: none; color: var(--dim); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.rp-tabs button.on { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }
.rp-panel { flex: 1; overflow: auto; padding: 16px; }
.rp-panel-d { margin: 0 0 12px; color: var(--mute); font-size: 12px; }
.rp-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; min-width: 0; }
.rp-pair > .rp-slot { min-width: 0; }
.rp-slot-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.rp-slot-h > span { display: flex; align-items: center; gap: 4px; }
.rp-slot-v { width: min(100%, calc(62vh * 9 / 16)); aspect-ratio: 9 / 16; max-height: 62vh; margin: 0 auto; border-radius: 12px; overflow: hidden; background: #000; border: 1px solid var(--line); }
.rp-slot-v.wide { width: 100%; aspect-ratio: 16 / 9; max-height: none; }
.rp-slot-v video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.rp-slot-empty { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; border: 0;
  background: var(--bg2); color: var(--mute); font-size: 13px; }
.rp-slot-empty:hover { color: var(--accent); }
.rp-works-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; color: var(--mute); font-size: 12px; }
.rp-link { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; color: var(--accent); font-size: 12px; }
.rp-works { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.rp-work { border-radius: 12px; overflow: hidden; background: var(--bg2); border: 1px solid var(--line); }
.rp-work-v { aspect-ratio: 9 / 16; max-height: 340px; width: 100%; background: #000; display: grid; place-items: center; }
.rp-work-v video { width: 100%; height: 100%; object-fit: contain; }
.rp-work-ph { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--mute); font-size: 12px; }
.rp-work-ph em { font-style: normal; }
.rp-work-i { display: flex; flex-direction: column; gap: 6px; padding: 9px 10px; font-size: 12px; }
.rp-work-i > div { display: flex; align-items: center; gap: 6px; min-width: 0; }
.rp-work-i .wk-st { flex: none; white-space: nowrap; }
.rp-work-m { color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-work-t { color: var(--mute); }
.rp-work-e { margin: 0; color: var(--danger); line-height: 1.5; word-break: break-all; }
.rp-work-i .btn { align-self: flex-start; }
.rp-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 70px 20px; text-align: center; color: var(--mute); }
.rp-empty b { color: var(--dim); }
.rp-empty p { margin: 0; max-width: 300px; font-size: 13px; line-height: 1.6; }

@media (max-width: 1000px) {
  .rp-body { grid-template-columns: 1fr; overflow: auto; }
  .rp-left, .rp-right { min-height: 70vh; }
}

/* 浅色主题 */
#home[data-theme="light"] .rp-h b i { color: #fff; }
#home[data-theme="light"] .rp-chips span, #home[data-theme="light"] .rp-sel, #home[data-theme="light"] .rp-ratios button { background: #fff; }
#home[data-theme="light"] .rp-slot-empty { background: #f1f3f6; }
#home[data-theme="light"] .rp-warn { color: #b45309; }
