/* ==========================================================================
   词根提取全流程演示舞台 —— 首页右侧与 showcase 演示页共用同一套。
   设计尺寸 1037 × 660，内部全部写死 px，整体 transform:scale() 等比缩放，
   所以任何宽度下版式都不会乱。类名统一 stg- 前缀，不与页面其它样式冲突。
   ========================================================================== */
/* 容器不再裁切：外框的圆角由 stg-box 自己完成，wrap 裁切会把四角切出直角残影。
   幕飞出画面的部分由 .stg-screen 的 overflow:hidden 兜住，不会溢出到页面上。 */
.stg-wrap{ position:relative; width:100%; overflow:visible; }
/* 舞台自己锁定盒模型：不依赖页面是否有全局 border-box。
   否则 padding+border 会撑到 1067×690，超出 wrap 被裁掉，右下角就露出直角残留。 */
.stg-wrap, .stg-wrap *, .stg-wrap *::before, .stg-wrap *::after{ box-sizing:border-box; }
.stg-box{
  width:1037px; height:660px;
  transform-origin:top left; padding:12px;
  /* 半透明玻璃质感：不用 backdrop-filter（它会在圆角外侧留下方块残影），
     改用半透明渐变 + 淡蓝细边 + 顶部高光来表现玻璃 */
  background:linear-gradient(152deg,rgba(255,255,255,.60),rgba(233,242,255,.36));
  border:1px solid rgba(96,158,255,.55);          /* 淡蓝色细线 */
  border-radius:32px;                             /* 与内层深色屏圆角贴近，四角不留宽白扇形 */
  box-shadow:0 20px 44px rgba(16,58,128,.14),     /* 阴影收敛：原来 90px 的大晕染看着像角外残影 */
             inset 0 1px 0 rgba(255,255,255,.85);
  backface-visibility:hidden;                     /* 缩放时圆角抗锯齿更干净 */
}
.stg-screen{
  position:relative; width:100%; height:100%;
  padding:18px 22px; background:#0b0d12;
  border-radius:24px; overflow:hidden;
}
.stg-topbar{ display:flex; align-items:center; gap:14px; height:28px; }
.stg-dot{ width:7px; height:7px; border-radius:50%; background:#2ecc71; box-shadow:0 0 10px rgba(46,204,113,.9); animation:stgBreathe 1.6s ease-in-out infinite; }
@keyframes stgBreathe{ 50%{ opacity:.3; } }
.stg-title{ font-size:16.5px; font-weight:600; color:#eef3fb; }
.stg-step{ margin-left:auto; font-size:12.5px; letter-spacing:.12em; color:#7b8494; }
/* 顶部旁白说明行已删：用 margin 补回原来那 31px，四幕内容位置保持不变 */
.stg-area{ position:relative; margin-top:41px; height:calc(100% - 74px); }

/* 每一幕独立成层。幕与幕之间用不同的「出 / 入」动作衔接，不留上一幕的痕迹 */
.stg-scene{ position:absolute; inset:0; opacity:0; visibility:hidden; transition:opacity .42s cubic-bezier(.22,.8,.28,1); }
.stg-scene.is-on{ opacity:1; visibility:visible; }
/* 走转场时接管：关掉淡入淡出，用整幕位移动画 */
.stg-scene.is-fx{
  transition:none; opacity:1; visibility:visible; z-index:2;
  animation-duration:.66s;
  animation-timing-function:cubic-bezier(.48,.03,.26,1);
  animation-fill-mode:both;
  will-change:transform,opacity;
}
.stg-scene.is-top{ z-index:3; }

/* ---- 出场动作（七各不相同） ---- */
@keyframes stgOutZoom  { to{ opacity:0; transform:scale(1.14); } }                                             /* s7→s1：往里推进，放大淡出 */
@keyframes stgOutShrink{ to{ opacity:0; transform:scale(.84); } }                                             /* s1→s2：整幕缩小后退 */
@keyframes stgOutLeft  { to{ opacity:0; transform:translateX(-104%); } }                                      /* s2→s3：不缩放，直接往左划走 */
@keyframes stgOutDiag  { to{ opacity:0; transform:translate(-44%,-18%) rotate(-2.5deg); } }                   /* s3→s4：斜着划出左上 */
@keyframes stgOutFall  { to{ opacity:0; transform:translateY(62%); } }                                        /* s4→s5：往下坠落 */

/* ---- 入场动作 ---- */
@keyframes stgInZoom   { from{ opacity:0; transform:scale(.86); } to{ opacity:1; transform:none; } }                               /* s1：由小放大 */
@keyframes stgInLeft   { from{ opacity:0; transform:translateX(64%); } to{ opacity:1; transform:none; } }                         /* s2：从右往左划出 */
@keyframes stgInPush   { from{ opacity:0; transform:translateX(104%); } to{ opacity:1; transform:none; } }                       /* s3：紧跟着从右侧推入 */
@keyframes stgInDiag   { from{ opacity:0; transform:translate(48%,22%) rotate(2.5deg); } to{ opacity:1; transform:none; } }      /* s4：斜着划入 */
@keyframes stgInRise   { from{ opacity:0; transform:translateY(56%); } to{ opacity:1; transform:none; } }                        /* s5：从下方升起 */

.stg-card{ padding:18px 20px; border-radius:18px; background:rgba(255,255,255,.05); border:1px solid rgba(255,255,255,.1); }
@keyframes stgRowIn{ to{ opacity:1; transform:none; } }
@keyframes stgBlink{ 50%{ opacity:0; } }

/* ---------------- 第 1 幕：加载词根文件 ---------------- */
.stg-load{ position:absolute; left:0; top:34px; width:366px; }
.stg-load .l-row{ display:flex; align-items:center; gap:14px; }
.stg-load .l-ico{
  width:52px; height:52px; border-radius:15px; flex:none;
  display:flex; align-items:center; justify-content:center;
  background:#1a6dff; color:#fff;
}
.stg-load .l-ico svg{ width:26px; height:26px; }
.stg-load b{ display:block; font-size:19px; color:#fff; }
.stg-load small{ font-size:12.5px; color:#7b8494; letter-spacing:.02em; }
.stg-bar{ margin-top:20px; height:8px; border-radius:999px; background:rgba(255,255,255,.1); overflow:hidden; }
.stg-bar i{ display:block; width:0; height:100%; border-radius:999px; background:linear-gradient(90deg,#4ea1ff,#1a6dff); }
.stg-status{ margin-top:12px; font-size:13px; color:#8a93a6; }
.stg-total{ margin-top:16px; padding-top:14px; border-top:1px dashed rgba(255,255,255,.12); font-size:13.5px; color:#9fb0cd; }
.stg-total b{ display:block; font-size:22px; color:#fff; line-height:1.4; }

.stg-files{ position:absolute; left:392px; top:16px; width:551px; }
.stg-file{
  display:flex; align-items:center; gap:12px;
  height:52px; margin-bottom:10px; padding:0 18px;
  border-radius:999px; background:#15181e; border:1px solid #232833;
  color:#767f8d; font-size:15px;
  opacity:0; transform:translateY(14px);
}
.stg-file svg{ width:18px; height:18px; flex:none; }
.stg-file em{ margin-left:auto; font-style:normal; font-size:12.5px; color:#4ea1ff; }
.stg-file .ok{
  margin-left:auto; display:flex; width:20px; height:20px; border-radius:50%;
  background:rgba(46,204,113,.14); color:#2ecc71;
  align-items:center; justify-content:center; font-size:12px;
}
.stg-files.is-run .stg-file{ animation:stgRowIn .5s cubic-bezier(.22,.8,.28,1) forwards; }

/* ---------------- 第 2 / 3 幕：整篇文字分割 + 词根入库 ---------------- */
.stg-doc{
  position:absolute; left:0; top:0; width:500px; height:400px;
  padding:22px 22px; border-radius:14px;
  background:#fff; box-shadow:0 24px 60px rgba(0,0,0,.5);
  color:#2a3550; font-size:14.5px; line-height:2.05;
  transition:color .6s cubic-bezier(.22,.8,.28,1);
}
/* 扫描线单独一层裁剪，文档本体不能 overflow:hidden，否则词根飞不出去 */
.stg-clip{ position:absolute; left:0; top:0; width:500px; height:400px; border-radius:14px; overflow:hidden; pointer-events:none; z-index:6; }
.stg-clip .scanline{
  position:absolute; left:0; right:0; top:0; height:80px; opacity:0;
  background:linear-gradient(rgba(26,109,255,0),rgba(26,109,255,.30),rgba(26,109,255,0));
}
.stg-clip.is-scan .scanline{ opacity:1; animation:stgScanDown 1.6s linear; }
@keyframes stgScanDown{ from{ transform:translateY(-84px); } to{ transform:translateY(400px); } }

.stg-doc h5{ margin:0 0 10px; font-size:16.5px; text-align:center; color:#131c2e; }
.stg-doc p{ margin:0 0 3px; text-indent:2em; }
.stg-doc.is-split{ color:#a4b0c4; }
.stg-doc .seg{ border-radius:5px; padding:1px 3px; transition:color .4s var(--ease, cubic-bezier(.22,.8,.28,1)), background .4s cubic-bezier(.22,.8,.28,1), box-shadow .4s cubic-bezier(.22,.8,.28,1); }
/* 词被抽走后，原位留一个浅色空位，视觉上不重复 */
.stg-doc.is-split .seg.is-out{ color:transparent; background:#e7eefb; box-shadow:inset 0 0 0 1px #d5e3ff; }

.stg-rack{ position:absolute; left:524px; top:0; width:421px; }
.stg-rack-title{ display:block; font-size:13px; color:#8b95a8; letter-spacing:.04em; }
.stg-rack-title b{ color:#dbe6ff; font-weight:600; }
.stg-chips{ position:relative; margin-top:10px; height:228px; }
.stg-chip{
  position:absolute; left:0; top:0; width:132px; height:46px;
  display:flex; align-items:center; justify-content:center;
  border-radius:11px; opacity:0;
  background:linear-gradient(135deg,#eef4ff,#dbe8ff);
  box-shadow:0 0 0 1px #c9dcff, 0 8px 18px rgba(26,109,255,.16);
  color:#0b47c4; font-size:13.5px; font-weight:600;
  white-space:nowrap; overflow:hidden;
}
.stg-chips.is-settled .stg-chip{ opacity:1; }

.stg-store{
  position:absolute; left:524px; top:290px; width:421px; height:180px;
  padding:18px 20px; border-radius:20px;
  background:linear-gradient(160deg,rgba(26,109,255,.18),rgba(26,109,255,.03));
  border:1px solid rgba(90,150,255,.38);
  opacity:0; transform:translateY(10px);
  transition:opacity .5s cubic-bezier(.22,.8,.28,1), transform .5s cubic-bezier(.22,.8,.28,1), box-shadow .4s cubic-bezier(.22,.8,.28,1);
}
.stg-store.is-on{ opacity:1; transform:none; }
.stg-store.pulse{ box-shadow:0 0 0 3px rgba(26,109,255,.22), 0 22px 50px rgba(26,109,255,.25); }
.stg-store .s-row{ display:flex; align-items:center; gap:12px; }
.stg-store .s-ico{
  width:44px; height:44px; border-radius:13px; flex:none;
  display:flex; align-items:center; justify-content:center;
  background:#1a6dff; color:#fff;
}
.stg-store .s-ico svg{ width:22px; height:22px; }
.stg-store b{ display:block; font-size:17px; color:#fff; }
.stg-store small{ font-size:12px; color:#93a3bf; }
.stg-store .s-count{ margin-top:14px; font-size:15px; color:#dbe6ff; }
.stg-store .s-count b{ display:inline; font-size:30px; color:#fff; }

/* ---------------- 第 4 幕：打字优先出自定义词根 ---------------- */
.stg-type{ position:absolute; left:0; top:20px; width:660px; }
.stg-t-label{ font-size:12.5px; color:#6f7889; letter-spacing:.1em; }
.stg-t-input{
  margin-top:12px; padding:16px 18px; border-radius:14px;
  background:rgba(255,255,255,.05); border:1px solid rgba(255,255,255,.1);
  font-size:19px; color:#fff; min-height:60px;
}
.stg-t-input .done{ color:#fff; }
.stg-t-input .code{ color:#4ea1ff; }
.stg-t-input .cur{ display:inline-block; width:2px; height:22px; background:#1a6dff; vertical-align:-3px; animation:stgBlink 1.05s steps(1) infinite; }
.stg-candwin{
  position:absolute; left:0; top:126px; width:460px;
  padding:12px 14px; border-radius:16px;
  background:#fff; box-shadow:0 26px 60px rgba(0,0,0,.55);
  opacity:0; transform:translateY(10px) scale(.97);
  transition:opacity .3s cubic-bezier(.22,.8,.28,1), transform .3s cubic-bezier(.22,.8,.28,1);
}
.stg-candwin.is-on{ opacity:1; transform:none; }
.stg-cw-top{ display:flex; align-items:center; gap:8px; padding-bottom:8px; border-bottom:1px solid #e4ecf8; font-size:12px; color:#6b7c96; }
.stg-cw-top .cw-brand{ font-weight:700; color:#0c1a30; font-size:13px; }
.stg-cw-top .cw-mode{ margin-left:auto; padding:.1em .55em; border-radius:999px; background:#f4f8ff; color:#0b47c4; font-size:11.5px; }
.stg-cw-code{ padding:8px 2px 4px; font-size:16.5px; font-weight:600; color:#0b47c4; }
.stg-cand{ display:flex; align-items:center; gap:9px; padding:5px 8px; border-radius:8px; font-size:15.5px; color:#0c1a30; }
.stg-cand i{ font-style:normal; font-size:11px; font-weight:700; color:#6b7c96; }
.stg-cand em{
  padding:.05em .42em; font-style:normal; font-size:10.5px; font-weight:700;
  color:#1a6dff; background:rgba(26,109,255,.11); border-radius:5px;
}
.stg-cand.is-first{ background:linear-gradient(135deg,#eef4ff,#e2edff); color:#0b47c4; font-weight:600; }
.stg-cand.is-first i{ color:#1a6dff; }

/* ---------------- 第 5 / 6 / 7 幕：剪刀 → 框选 → 提取 ---------------- */
.stg-desk{ position:absolute; inset:0; }
.stg-statusbar{
  position:absolute; left:50%; top:0; transform:translateX(-50%);
  display:flex; align-items:center; gap:5px; padding:6px;
  border-radius:999px; background:#141821; border:1px solid #232833;
  transition:border-color .3s, box-shadow .3s;
}
.stg-statusbar.is-snip{ border-color:rgba(26,109,255,.7); box-shadow:0 0 0 3px rgba(26,109,255,.16); }
.stg-sb{
  width:36px; height:36px; border-radius:11px; flex:none;
  display:flex; align-items:center; justify-content:center;
  background:#1d2129; color:#aab3c2; font-size:14.5px;
  transition:background .25s, color .25s, transform .25s;
}
.stg-sb.logo{ background:#1a6dff; color:#fff; font-size:13px; font-weight:700; }
.stg-sb.wide{ width:auto; padding:0 12px; }
.stg-sb.cut{ color:#e9eef8; }
.stg-sb.cut.hot{ background:rgba(26,109,255,.22); color:#fff; transform:scale(1.06); }
.stg-cursor{
  position:absolute; left:0; top:0; width:26px; opacity:0; z-index:9;
  transition:transform .85s cubic-bezier(.3,.9,.2,1), opacity .3s;
}
.stg-cursor.show{ opacity:1; }
.stg-cursor svg{ width:26px; height:26px; display:block; }
.stg-cursor.press svg{ transform:scale(.86); }

.stg-await{
  position:absolute; left:0; top:88px; width:620px; height:356px;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px;
  border-radius:14px; border:1.5px dashed rgba(255,255,255,.18);
}
.stg-await b{ font-size:16px; color:#dbe6ff; }
.stg-await span{ font-size:13px; color:#7b8494; }

.stg-page{
  position:absolute; left:0; top:88px; width:620px; height:356px;
  padding:18px 20px; border-radius:14px; overflow:hidden;
  background:#fff; color:#2a3550; font-size:14.5px; line-height:2.0;
  box-shadow:0 24px 60px rgba(0,0,0,.5);
  opacity:0; transition:opacity .55s cubic-bezier(.22,.8,.28,1);
}
.stg-page.is-on{ opacity:1; }
.stg-page .pm-bar{ display:flex; gap:6px; margin-bottom:10px; align-items:center; }
.stg-page .pm-bar i{ width:9px; height:9px; border-radius:50%; background:#cfd8e6; }
.stg-page .pm-url{ margin-left:8px; font-size:11.5px; color:#97a3b6; }
.stg-page h5{ margin:4px 0 8px; font-size:16px; color:#131c2e; text-align:center; }
.stg-page p{ margin:0 0 2px; text-indent:2em; }
.stg-seltarget{ position:relative; }

.stg-selbox{
  position:absolute; left:0; top:0; width:0; height:0;
  border:1.5px solid #1a6dff; border-radius:3px;
  background:rgba(26,109,255,.10); z-index:8;
}
.stg-selbox .size{
  position:absolute; top:-25px; left:0; padding:2px 7px; border-radius:5px;
  font-size:11.5px; color:#fff; background:rgba(11,71,196,.92); white-space:nowrap;
}
.stg-selbox .h{ position:absolute; width:9px; height:9px; border-radius:2px; background:#fff; border:1.5px solid #1a6dff; }
.stg-selbox .h1{ left:-5px; top:-5px; } .stg-selbox .h2{ right:-5px; top:-5px; }
.stg-selbox .h3{ left:-5px; bottom:-5px; } .stg-selbox .h4{ right:-5px; bottom:-5px; }
.stg-selbox .selclip{ position:absolute; inset:0; overflow:hidden; border-radius:2px; pointer-events:none; }
.stg-selbox .scanline2{
  position:absolute; left:0; right:0; top:0; height:56px; opacity:0;
  background:linear-gradient(rgba(26,109,255,0),rgba(26,109,255,.38),rgba(26,109,255,0));
}
.stg-selbox.is-scan .scanline2{ opacity:1; animation:stgScanDown2 1.1s linear; }
@keyframes stgScanDown2{ from{ transform:translateY(-56px); } to{ transform:translateY(var(--sh,120px)); } }

.stg-ocr{
  position:absolute; left:648px; top:88px; width:297px; height:356px;
  padding:16px 16px 14px; border-radius:14px;
  background:#fff; box-shadow:0 24px 60px rgba(0,0,0,.5);
  opacity:0; transform:translateX(14px);
  transition:opacity .45s cubic-bezier(.22,.8,.28,1), transform .45s cubic-bezier(.22,.8,.28,1);
}
.stg-ocr.is-on{ opacity:1; transform:none; }
.stg-ocr .o-head{ display:flex; align-items:center; gap:8px; padding-bottom:10px; border-bottom:1px solid #e4ecf8; }
.stg-ocr .o-head b{ font-size:14.5px; color:#0c1a30; }
.stg-ocr .o-head span{ margin-left:auto; padding:.15em .5em; border-radius:999px; background:rgba(0,179,164,.1); color:#00897b; font-size:11px; font-weight:700; }
.stg-ocr .o-line{
  margin-top:10px; padding:7px 9px; border-radius:7px;
  font-size:13px; line-height:1.7; color:#0c1a30; background:#f4f8ff;
  opacity:0; transform:translateY(7px);
}
.stg-ocr.is-run .o-line{ animation:stgRowIn .45s cubic-bezier(.22,.8,.28,1) forwards; }
.stg-ocr .o-foot{ margin-top:12px; font-size:11.5px; color:#6b7c96; }
