/* ==========================================================
   逗猫剧场 · 推广任务页 · 深色影院风 v1
   与 promo.css 完全独立，HTML 结构不变，仅换视觉
   回退方式：把 xstg.html 的 link 改回 promo.css 即可
   ========================================================== */

:root{
  --bg:#070a10;
  --ink:#eef2f9;
  --sub:#9aa7ba;
  --dim:#76839a;
  --stroke:rgba(255,255,255,.085);
  --stroke-strong:rgba(255,255,255,.16);
  --card-a:rgba(255,255,255,.062);
  --card-b:rgba(255,255,255,.028);
  --brand-1:#7b5cff;
  --brand-2:#3d8bff;
  --brand-soft:rgba(123,92,255,.16);
  --warn:#ff9b93;
  --ok:#4fd6a1;
}

*{box-sizing:border-box}

/* 修：.save-image 上的 display:flex 会盖掉 hidden 属性，
   导致「点击全屏查看并截图保存」在没生成图时就露出来 */
[hidden]{display:none!important}

html{background:var(--bg)}

body{
  margin:0;
  min-height:100vh;
  color:var(--ink);
  background:
    radial-gradient(85% 48% at 50% -6%, rgba(123,92,255,.30), transparent 62%),
    radial-gradient(70% 40% at 100% 6%, rgba(61,139,255,.16), transparent 60%),
    radial-gradient(60% 36% at 0% 40%, rgba(123,92,255,.10), transparent 62%),
    var(--bg);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",Arial,sans-serif;
  line-height:1.65;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}

.promo-shell{
  width:min(560px,100%);
  margin:0 auto;
  padding:34px 16px 44px;
  background:transparent;
  box-shadow:none;
  min-height:100vh;
}

/* ---------- 标题 ---------- */
.page-title{
  margin:0 0 20px;
  padding:0;
  text-align:center;
  font-size:22px;
  font-weight:800;
  letter-spacing:.6px;
  color:#fff;
  background:none;
  border:0;
  box-shadow:none;
  text-shadow:0 2px 20px rgba(123,92,255,.45);
}
.page-title::after{
  content:"";
  display:block;
  width:46px;
  height:3px;
  margin:13px auto 0;
  border-radius:99px;
  background:linear-gradient(90deg,var(--brand-1),var(--brand-2));
  box-shadow:0 0 14px rgba(123,92,255,.7);
}

/* ---------- 卡片通用 ---------- */
.intro-card,.step-card,.upload-card{
  position:relative;
  margin:0 0 14px;
  padding:18px;
  background:linear-gradient(180deg,var(--card-a),var(--card-b));
  border:1px solid var(--stroke);
  border-radius:18px;
  box-shadow:0 14px 34px rgba(0,0,0,.38), inset 0 1px 0 rgba(255,255,255,.055);
  -webkit-backdrop-filter:blur(10px);
  backdrop-filter:blur(10px);
}

/* ---------- 第一屏 ---------- */
.intro-card{padding-bottom:16px}

.intro-card h2{
  display:flex;
  align-items:center;
  gap:9px;
  margin:0 0 12px;
  color:#fff;
  font-size:16px;
  font-weight:700;
  letter-spacing:.2px;
}

.intro-icon{
  display:grid;
  place-items:center;
  width:26px;
  height:26px;
  border-radius:9px;
  background:linear-gradient(135deg,var(--brand-1),var(--brand-2));
  color:#fff;
  font-size:13px;
  box-shadow:0 5px 16px rgba(110,90,255,.45);
}

.intro-card>p{
  margin:0 0 15px;
  color:var(--sub);
  font-size:13px;
  font-weight:400;
  line-height:1.78;
}

/* 内联 color:#e53935 也压掉，深底上换亮红 */
.intro-card>p .intro-highlight,
.intro-card .intro-highlight{
  color:#ff7d73 !important;
  font-weight:700;
}

.intro-benefit-highlight{
  color:#a9c6ff;
  font-weight:650;
}

/* ---------- 今日热播 ---------- */
.hot-panel{
  margin:6px 0 0;
  padding-top:15px;
  border-top:1px solid rgba(255,255,255,.07);
}

.hot-head{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:10px;
  margin:0 0 10px;
}
.hot-head h3{
  margin:0;
  color:#e9eefb;
  font-size:15px;
  font-weight:700;
  letter-spacing:.2px;
}
.hot-head span{color:var(--dim);font-size:12px}

.hot-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:8px;
}

.hot-item{
  margin:0;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.08);
  border-radius:10px;
  background:rgba(255,255,255,.04);
}
.hot-item img{
  display:block;
  width:100%;
  aspect-ratio:2/3;
  object-fit:cover;
}
.hot-item figcaption{
  padding:6px 3px;
  color:#c8d3e4;
  font-size:12px;
  font-weight:600;
  text-align:center;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* ---------- 步骤卡 ---------- */
.step-card{padding:17px}

.step-heading{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:13px;
}
.step-heading>span{
  display:grid;
  place-items:center;
  width:26px;
  height:26px;
  border-radius:9px;
  background:linear-gradient(135deg,var(--brand-1),var(--brand-2));
  color:#fff;
  font-size:13px;
  font-weight:800;
  box-shadow:0 5px 16px rgba(110,90,255,.45);
}
.step-heading h2{
  margin:0;
  color:#fff;
  font-size:16px;
  font-weight:700;
  letter-spacing:.2px;
}

.soft-line{display:none}

.step-tip{
  margin:0 0 10px;
  color:var(--sub);
  font-size:13px;
  font-weight:400;
  line-height:1.7;
}

/* HTML 里这两段是内联色（#168fe0 蓝 / #159d62 绿），深底上偏暗，按属性提亮 */
.step-tip span[style*="#168fe0"]{color:#79b6ff!important}
.step-tip span[style*="#159d62"]{color:#63d6a3!important}

/* 「一定要在全屏下截屏」→ 警示胶囊 */
.step-tip+.step-tip{
  display:block;
  width:-moz-fit-content;
  width:fit-content;
  margin:0 auto 14px;
  padding:7px 12px;
  border:1px solid rgba(255,107,107,.30);
  border-radius:9px;
  background:rgba(255,107,107,.12);
  color:var(--warn);
  font-size:13px;
  font-weight:700;
}

.poster{
  position:relative;
  height:clamp(260px,44vh,420px);
  margin:0;
  overflow:hidden;
  border:1px solid var(--stroke);
  border-radius:12px;
  background:#0b0f18;
}
.poster-blur{
  position:absolute;
  inset:-14%;
  width:128%;
  height:128%;
  object-fit:cover;
  filter:blur(42px) saturate(.7) brightness(.38);
  pointer-events:none;
}
.poster::after{
  content:'';
  position:absolute;
  inset:0;
  background:linear-gradient(90deg,rgba(7,10,16,.82) 0%,rgba(7,10,16,.18) 26%,rgba(7,10,16,.18) 74%,rgba(7,10,16,.82) 100%);
  pointer-events:none;
  z-index:1;
}
.poster #poster-img{
  position:relative;
  z-index:2;
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
  filter:drop-shadow(0 12px 28px rgba(0,0,0,.62));
}
/* 取消「全屏查看」按钮后，图右下角给个可点暗示 */
.poster::before{
  content:'点击放大';
  position:absolute;
  right:9px;
  bottom:9px;
  z-index:3;
  padding:4px 9px;
  border:1px solid rgba(255,255,255,.20);
  border-radius:20px;
  background:rgba(8,10,18,.66);
  color:#d9e2f2;
  font-size:11px;
  line-height:1.4;
  letter-spacing:.3px;
  pointer-events:none;
}

/* ---------- 按钮 ---------- */
.save-image,.submit-upload,.dialog-action{
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  height:46px;
  border:0;
  border-radius:12px;
  background:linear-gradient(135deg,var(--brand-1),var(--brand-2));
  color:#fff;
  font-family:inherit;
  font-size:15px;
  font-weight:700;
  letter-spacing:.3px;
  text-decoration:none;
  cursor:pointer;
  box-shadow:0 10px 26px rgba(88,86,255,.34), inset 0 1px 0 rgba(255,255,255,.24);
  transition:transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.save-image{margin-top:14px}

.save-image:hover,.submit-upload:not(:disabled):hover,.dialog-action:hover{
  filter:brightness(1.09);
  transform:translateY(-1px);
  box-shadow:0 14px 32px rgba(88,86,255,.44), inset 0 1px 0 rgba(255,255,255,.28);
}
.save-image:active,.submit-upload:not(:disabled):active,.dialog-action:active{
  transform:translateY(0) scale(.99);
}

/* 次要按钮：全屏查看 */
#open-poster{
  background:rgba(255,255,255,.075);
  border:1px solid var(--stroke-strong);
  color:#e3e9f5;
  box-shadow:none;
}
#open-poster:hover{
  background:rgba(255,255,255,.12);
  filter:none;
  box-shadow:none;
}

/* ---------- 第二步：跳转图标 ---------- */
.keyword-panel{
  padding:2px 0 0;
  background:transparent;
}
.keyword-instruction{
  margin:0 0 14px;
  color:var(--sub);
  font-size:13px;
  font-weight:400;
  line-height:1.7;
}

.keyword-grid{
  display:flex;
  flex-wrap:wrap;
  gap:14px;
  justify-content:center;
}

.keyword-button{
  display:grid;
  place-items:center;
  width:56px;
  height:56px;
  padding:0;
  border:0;
  border-radius:16px;
  background:#fff;
  cursor:pointer;
  box-shadow:0 8px 20px rgba(0,0,0,.42), 0 0 0 1px rgba(255,255,255,.10);
  transition:transform .16s ease, box-shadow .16s ease;
  overflow:hidden;
}
.keyword-button img{
  display:block;
  width:100%;
  height:100%;
  border-radius:16px;
}
.keyword-button:hover{
  transform:translateY(-3px);
  box-shadow:0 14px 30px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.18);
}
.keyword-button:active{transform:translateY(-1px) scale(.97)}

.keyword-button.douyin-keyword,
.keyword-button.xhs-keyword{
  width:56px;
  height:56px;
  padding:0;
  border:0;
  border-radius:16px;
  background:#fff;
  box-shadow:0 8px 20px rgba(0,0,0,.42), 0 0 0 1px rgba(255,255,255,.10);
}
.keyword-button.douyin-keyword img,
.keyword-button.xhs-keyword img{
  width:100%;
  height:100%;
  border-radius:16px;
}
.keyword-button.douyin-keyword:hover,
.keyword-button.xhs-keyword:hover{
  background:#fff;
  transform:translateY(-3px);
  box-shadow:0 14px 30px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.2);
}

.keyword-button:focus-visible,
.keyword-button.douyin-keyword:focus-visible,
.keyword-button.xhs-keyword:focus-visible{
  outline:2px solid var(--brand-1);
  outline-offset:3px;
}

.copy-status{
  min-height:0;
  margin:10px 4px 0;
  color:#a9c6ff;
  font-size:13px;
  text-align:center;
  line-height:1.6;
}

/* ---------- 上传卡 ---------- */
.upload-card{padding:18px}

.upload-heading{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  margin-bottom:14px;
}
.upload-heading h2{
  margin:0 0 4px;
  color:#fff;
  font-size:16px;
  font-weight:700;
}
.upload-heading p{
  margin:0;
  color:var(--dim);
  font-size:12px;
}
.upload-count{
  display:flex;
  align-items:baseline;
  color:#a9c6ff;
}
.upload-count strong{font-size:26px;color:#fff}
.upload-count span{font-size:14px;color:var(--dim)}

.dropzone{
  position:relative;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  min-height:132px;
  border:1.5px dashed rgba(255,255,255,.20);
  border-radius:14px;
  background:rgba(255,255,255,.03);
  color:#8b98ac;
  cursor:pointer;
  transition:border-color .18s ease, background .18s ease;
}
.dropzone.drag-over{
  border-color:var(--brand-1);
  background:rgba(123,92,255,.12);
}
.dropzone input{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  opacity:0;
  cursor:pointer;
}
.upload-symbol{
  display:grid;
  place-items:center;
  width:40px;
  height:40px;
  margin-bottom:8px;
  border-radius:50%;
  background:rgba(123,92,255,.18);
  color:#b3a6ff;
  font-size:24px;
  line-height:1;
}
.dropzone strong{color:#dfe6f2;font-size:14px;font-weight:600}
.dropzone em{margin-top:4px;color:#7c8aa0;font-size:12px;font-style:normal}

.upload-rules{
  display:flex;
  justify-content:center;
  flex-wrap:wrap;
  gap:12px;
  margin:13px 0;
  color:#6fbf9a;
  font-size:11px;
  letter-spacing:.2px;
}

.submit-upload{height:47px;margin-top:2px}
.submit-upload:disabled{
  background:rgba(255,255,255,.07);
  color:#5e6a7d;
  box-shadow:none;
  cursor:not-allowed;
}

.preview-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:10px;
  margin-top:12px;
}
.preview-item{
  position:relative;
  aspect-ratio:3/4;
  border:1px solid var(--stroke);
  border-radius:10px;
  overflow:hidden;
  background:#0c1119;
}
.preview-item img{width:100%;height:100%;object-fit:cover}
.preview-remove{
  position:absolute;
  right:5px;
  top:5px;
  width:27px;
  height:27px;
  border:0;
  border-radius:50%;
  background:rgba(8,12,20,.8);
  color:#fff;
  font-size:19px;
  line-height:23px;
  cursor:pointer;
  -webkit-backdrop-filter:blur(4px);
  backdrop-filter:blur(4px);
}

/* ---------- 弹窗 ---------- */
dialog{border:0;padding:0;background:transparent;max-width:none}
dialog::backdrop{
  background:rgba(4,7,12,.72);
  -webkit-backdrop-filter:blur(4px);
  backdrop-filter:blur(4px);
}
.check-dialog,.result-dialog{width:min(450px,calc(100% - 28px))}

.dialog-box{
  position:relative;
  padding:26px;
  text-align:center;
  background:linear-gradient(180deg,#161d2e,#0d121e);
  border:1px solid rgba(255,255,255,.10);
  border-radius:20px;
  box-shadow:0 32px 90px rgba(0,0,0,.7), inset 0 1px 0 rgba(255,255,255,.07);
}
.dialog-box h2{margin:12px 0 7px;color:#fff;font-size:20px;font-weight:700}
.dialog-box>p{margin:0 0 18px;color:#95a2b6;font-size:13px}

.dialog-close{
  position:absolute;
  right:14px;
  top:9px;
  border:0;
  background:none;
  color:#7c8aa0;
  font-size:28px;
  cursor:pointer;
  transition:color .15s ease;
}
.dialog-close:hover{color:#d5deec}

.check-icon{
  width:58px;
  height:58px;
  margin:0 auto;
  border:4px solid rgba(255,255,255,.12);
  border-top-color:var(--brand-1);
  border-radius:50%;
  animation:spin .9s linear infinite;
}
.check-dialog.is-complete .check-icon{
  animation:none;
  border-color:var(--ok);
  position:relative;
  box-shadow:0 0 26px rgba(79,214,161,.35);
}
.check-dialog.is-complete .check-icon:after{
  content:"✓";
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  color:var(--ok);
  font-size:30px;
  font-weight:800;
  line-height:1;
}
.check-dialog.is-fail .check-icon{
  animation:none;
  border-color:#ff6b6b;
  position:relative;
  box-shadow:0 0 26px rgba(255,107,107,.3);
}
.check-dialog.is-fail .check-icon:before,
.check-dialog.is-fail .check-icon:after{
  content:"";
  position:absolute;
  left:50%;
  top:50%;
  width:21px;
  height:4px;
  border-radius:999px;
  background:#ff6b6b;
  transform-origin:center;
}
.check-dialog.is-fail .check-icon:before{transform:translate(-50%,-50%) rotate(45deg)}
.check-dialog.is-fail .check-icon:after{transform:translate(-50%,-50%) rotate(-45deg)}

.check-list{
  list-style:none;
  margin:18px 0;
  padding:0;
  border-top:1px solid rgba(255,255,255,.08);
}
.check-list li{
  display:grid;
  grid-template-columns:20px 1fr auto;
  align-items:center;
  gap:10px;
  padding:12px 2px;
  border-bottom:1px solid rgba(255,255,255,.08);
  text-align:left;
}
.check-list li>span{
  width:13px;
  height:13px;
  border-radius:50%;
  background:rgba(255,255,255,.16);
}
.check-list strong{color:#e6ecf7;font-size:14px}
.check-list em{color:#7c8aa0;font-size:13px;font-style:normal}
.check-list li.is-checking>span{
  border:3px solid rgba(123,92,255,.3);
  border-top-color:var(--brand-1);
  background:transparent;
  animation:spin .7s linear infinite;
}
.check-list li.is-pass>span{background:var(--ok)}
.check-list li.is-pass em{color:var(--ok)}
.check-list li.is-fail>span{background:#ff6b6b}
.check-list li.is-fail em{color:#ff8e86}
.check-list li.is-done>span{background:#6fa8ff}
.check-list li.is-done em{color:#8fb8ff}

.dialog-action[hidden]{display:none}
.result-box img{border-radius:16px}
.result-box .dialog-action{margin-top:18px}

/* ---------- Toast（深底页面里反白更醒目） ---------- */
.toast{
  position:fixed;
  left:50%;
  bottom:38px;
  transform:translate(-50%,20px);
  max-width:min(440px,calc(100% - 30px));
  padding:11px 17px;
  border-radius:11px;
  background:#f3f6fb;
  color:#12182a;
  font-size:14px;
  font-weight:600;
  z-index:3000;
  opacity:0;
  visibility:hidden;
  transition:opacity .2s ease, transform .2s ease, visibility .2s;
  box-shadow:0 12px 34px rgba(0,0,0,.5);
}
.toast.is-visible{opacity:1;visibility:visible;transform:translate(-50%,0)}

/* ---------- 全屏看图 ---------- */
.poster-screen{
  position:fixed;
  inset:0;
  width:100vw;
  height:100vh;
  height:100dvh;
  z-index:4000;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:0;
  background:#04060a;
  touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
}
.poster-screen[hidden]{display:none}
.poster-screen img{
  display:block;
  width:auto;
  height:auto;
  max-width:100vw;
  max-height:100vh;
  max-height:100dvh;
  max-width:100%;
  max-height:100%;
  object-fit:contain;
  touch-action:manipulation;
  -webkit-touch-callout:default;
  user-select:auto;
}
.poster-screen p{
  position:absolute;
  left:0;
  right:0;
  bottom:max(12px,env(safe-area-inset-bottom));
  margin:0;
  color:#fff;
  font-size:14px;
  text-align:center;
  text-shadow:0 1px 4px #000;
}
.poster-screen-close{
  position:absolute;
  right:max(12px,env(safe-area-inset-right));
  top:max(54px,calc(env(safe-area-inset-top) + 8px));
  z-index:60;
  width:44px;
  height:44px;
  border:0;
  border-radius:50%;
  background:rgba(255,255,255,.18);
  color:#fff;
  font-size:28px;
  line-height:1;
  cursor:pointer;
  touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
  -webkit-backdrop-filter:blur(6px);
  backdrop-filter:blur(6px);
}
/* 热区比视觉大一圈，全屏时不容易点偏 */
.poster-screen-close::before{
  content:'';
  position:absolute;
  inset:-16px;
  border-radius:50%;
}

/* ---------- 焦点 ---------- */
:focus-visible{outline:2px solid rgba(123,92,255,.65);outline-offset:2px}

/* ---------- 动画 ---------- */
@keyframes spin{to{transform:rotate(360deg)}}
@keyframes slideFade{from{opacity:.35}to{opacity:1}}

/* ---------- 响应式 ---------- */
@media(max-width:640px){
  .promo-shell{padding:26px 12px 38px}
  .page-title{margin-bottom:16px;font-size:20px}
  .intro-card,.step-card,.upload-card{margin:0 0 12px;padding:15px;border-radius:16px}
  .intro-card{padding-bottom:13px}
  .intro-card>p{font-size:13px;margin-bottom:13px}
  .step-card{padding:15px}
  .hot-grid{gap:6px}
  .hot-head{margin-bottom:8px}
  .hot-head h3{font-size:14px}
  .hot-head span{font-size:11px}
  .hot-item figcaption{padding:5px 2px;font-size:11px}
  .upload-heading{align-items:flex-start}
  .upload-rules{gap:8px}
  .dialog-box{padding:22px 18px}
}

@media(max-width:390px){
  .preview-grid{gap:7px}
  .keyword-grid{gap:12px}
  .keyword-button,.keyword-button.douyin-keyword,.keyword-button.xhs-keyword{width:52px;height:52px;border-radius:15px}
  .keyword-button img,.keyword-button.douyin-keyword img,.keyword-button.xhs-keyword img{border-radius:15px}
}

@media(prefers-reduced-motion:reduce){
  *,*:before,*:after{
    animation-duration:.01ms!important;
    animation-iteration-count:1!important;
    transition-duration:.01ms!important;
  }
}
