.face-swap-page{
  --fs-purple:#7251f5;
  --fs-purple-dark:#5d3ee8;
  --fs-green:#c9f45b;
  --fs-text:#161823;
  --fs-muted:#707486;
  --fs-line:#e8e9ef;
  --fs-bg:#f7f7fb;
  padding:54px 0 82px;
  background:
    radial-gradient(circle at 50% 0%,rgba(114,81,245,.09),transparent 32%),
    #fafafc;
}

.face-swap-wrap{
  width:min(1120px,calc(100% - 30px));
  margin:auto;
}

.fs-hero{
  max-width:790px;
  margin:0 auto 30px;
  text-align:center;
}

.fs-eyebrow{
  display:inline-flex;
  align-items:center;
  gap:7px;
  padding:7px 12px;
  border:1px solid #e6e0ff;
  border-radius:999px;
  background:#f5f2ff;
  color:#6447dd;
  font-size:12px;
  font-weight:900;
  margin-bottom:15px;
}

.fs-hero h1{
  margin:0;
  font-size:clamp(36px,5vw,62px);
  letter-spacing:-1.8px;
  line-height:1.05;
  color:var(--fs-text);
}

.fs-hero p{
  max-width:670px;
  margin:17px auto 0;
  color:var(--fs-muted);
  font-size:17px;
  line-height:1.8;
}

.fs-shell{
  border:1px solid rgba(225,225,235,.9);
  border-radius:30px;
  background:rgba(255,255,255,.96);
  box-shadow:
    0 30px 80px rgba(28,22,58,.10),
    0 2px 6px rgba(20,20,40,.03);
  overflow:hidden;
}

.fs-toolbar{
  min-height:67px;
  padding:14px 20px;
  border-bottom:1px solid var(--fs-line);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}

.fs-account{
  display:flex;
  align-items:center;
  gap:9px;
  min-width:0;
}

.fs-status-dot{
  width:9px;
  height:9px;
  border-radius:50%;
  background:#24c875;
  box-shadow:0 0 0 5px rgba(36,200,117,.11);
  flex:0 0 auto;
}

#faceSwapAccountStatus{
  font-size:13px;
  font-weight:850;
  color:#303342;
}

.face-swap-login{
  border:1px solid #ddd7ff;
  background:#f5f2ff;
  color:#5e42d7;
  font-weight:850;
  padding:9px 13px;
  border-radius:11px;
  cursor:pointer;
}

.fs-price-line{
  display:flex;
  align-items:center;
  gap:7px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.fs-pill{
  border-radius:999px;
  padding:7px 11px;
  font-size:11px;
  font-weight:850;
  white-space:nowrap;
}

.fs-pill-free{
  background:#efffd8;
  color:#3f6d00;
}

.fs-pill-paid{
  background:#f3f0ff;
  color:#6044d4;
}

.fs-editor{
  padding:25px;
}

.fs-upload-grid{
  display:grid;
  grid-template-columns:1fr 62px 1fr;
  gap:13px;
  align-items:center;
}

.fs-image-card{
  position:relative;
  min-width:0;
}

.fs-image-label{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}

.fs-image-label strong{
  font-size:14px;
  color:#252735;
}

.fs-step{
  display:inline-flex;
  width:26px;
  height:26px;
  align-items:center;
  justify-content:center;
  border-radius:9px;
  background:#f1efff;
  color:#6548dd;
  font-size:12px;
  font-weight:900;
}

.face-swap-upload{
  position:relative;
  display:block;
  height:390px;
  border:1.5px dashed #d9d8e3;
  border-radius:22px;
  background:
    linear-gradient(145deg,#fafafe,#f6f6fa);
  overflow:hidden;
  cursor:pointer;
  transition:
    border-color .2s ease,
    transform .2s ease,
    box-shadow .2s ease;
}

.face-swap-upload:hover{
  border-color:#9f8af9;
  transform:translateY(-2px);
  box-shadow:0 16px 36px rgba(72,53,145,.08);
}

.face-swap-upload input{
  display:none;
}

.face-swap-preview{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
}

.face-swap-preview img{
  display:none;
  width:100%;
  height:100%;
  object-fit:contain;
  background:#f5f5f8;
}

.face-swap-placeholder{
  max-width:260px;
  padding:22px;
  text-align:center;
  color:#6f7280;
}

.fs-upload-icon{
  width:66px;
  height:66px;
  margin:0 auto 16px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:20px;
  background:#ede9ff;
  color:#6649dd;
  font-size:30px;
  box-shadow:inset 0 0 0 1px #ded6ff;
}

.face-swap-placeholder b{
  display:block;
  color:#262835;
  font-size:15px;
  margin-bottom:6px;
}

.face-swap-placeholder small{
  font-size:12px;
  line-height:1.6;
}

.fs-swap-center{
  display:flex;
  align-items:center;
  justify-content:center;
}

.fs-swap-icon{
  width:50px;
  height:50px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:16px;
  background:#171826;
  color:#fff;
  font-size:23px;
  box-shadow:0 12px 28px rgba(20,20,35,.18);
}

.fs-bottom{
  margin-top:20px;
  padding-top:20px;
  border-top:1px solid var(--fs-line);
}

.face-swap-consent{
  display:flex;
  align-items:flex-start;
  gap:9px;
  padding:0;
  margin:0 0 16px;
  background:none;
  color:#747786;
  font-size:12px;
  line-height:1.65;
}

.face-swap-consent input{
  margin-top:3px;
  accent-color:var(--fs-purple);
}

.face-swap-generate{
  width:100%;
  min-height:58px;
  border:0;
  border-radius:17px;
  background:
    linear-gradient(135deg,var(--fs-purple),var(--fs-purple-dark));
  color:#fff;
  font-size:16px;
  font-weight:950;
  cursor:pointer;
  box-shadow:0 15px 30px rgba(114,81,245,.23);
  transition:transform .2s ease,box-shadow .2s ease;
}

.face-swap-generate:hover:not(:disabled){
  transform:translateY(-2px);
  box-shadow:0 20px 38px rgba(114,81,245,.3);
}

.face-swap-generate:disabled{
  opacity:.55;
  cursor:not-allowed;
}

.face-swap-processing{
  display:none;
  align-items:center;
  justify-content:center;
  gap:10px;
  margin-top:15px;
  color:#5940ca;
  font-size:13px;
  font-weight:850;
}

.face-swap-processing.show{
  display:flex;
}

.face-swap-spinner{
  width:19px;
  height:19px;
  border:3px solid #e1dcfa;
  border-top-color:#7251f5;
  border-radius:50%;
  animation:fsSpin .75s linear infinite;
}

@keyframes fsSpin{
  to{transform:rotate(360deg)}
}

.face-swap-message{
  display:none;
  margin-top:14px;
  padding:12px 14px;
  border-radius:12px;
  font-size:13px;
  text-align:center;
}

.face-swap-message.show{display:block}
.face-swap-message.error{
  background:#fff0f0;
  color:#a83232;
}
.face-swap-message.info{
  background:#f3f0ff;
  color:#5a40c7;
}

.face-swap-result{
  display:none;
  margin-top:30px;
  padding-top:28px;
  border-top:1px solid var(--fs-line);
}

.face-swap-result.show{
  display:block;
}

.fs-result-head{
  display:flex;
  align-items:end;
  justify-content:space-between;
  gap:15px;
  margin-bottom:16px;
}

.fs-result-head h2{
  margin:0;
  font-size:22px;
  color:#20222e;
}

.fs-result-head p{
  margin:4px 0 0;
  color:#777b89;
  font-size:12px;
}

.fs-result-badge{
  padding:7px 10px;
  border-radius:999px;
  background:#efffd8;
  color:#426b0a;
  font-size:11px;
  font-weight:900;
}

.fs-compare{
  position:relative;
  max-width:820px;
  margin:auto;
  aspect-ratio:4/3;
  border-radius:22px;
  overflow:hidden;
  background:#ececf1;
  box-shadow:inset 0 0 0 1px #e2e2e8;
}

.fs-compare-before,
.fs-compare-after{
  position:absolute;
  inset:0;
}

.fs-compare-before img,
.fs-compare-after img{
  width:100%;
  height:100%;
  object-fit:contain;
  background:#f1f1f4;
}

.fs-compare-after{
  clip-path:inset(0 0 0 50%);
}

.fs-compare-line{
  position:absolute;
  top:0;
  bottom:0;
  left:50%;
  width:2px;
  background:#fff;
  box-shadow:0 0 0 1px rgba(0,0,0,.12);
  transform:translateX(-1px);
  pointer-events:none;
}

.fs-compare-handle{
  position:absolute;
  left:50%;
  top:50%;
  width:46px;
  height:46px;
  transform:translate(-50%,-50%);
  display:flex;
  align-items:center;
  justify-content:center;
  border:4px solid #fff;
  border-radius:50%;
  background:#7251f5;
  color:#fff;
  font-weight:900;
  box-shadow:0 6px 20px rgba(0,0,0,.2);
  pointer-events:none;
}

.fs-compare input{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  opacity:0;
  cursor:ew-resize;
  z-index:5;
}

.fs-compare-tag{
  position:absolute;
  top:13px;
  z-index:4;
  padding:6px 9px;
  border-radius:9px;
  background:rgba(20,20,30,.72);
  color:#fff;
  font-size:10px;
  font-weight:900;
  backdrop-filter:blur(6px);
}

.fs-tag-before{left:13px}
.fs-tag-after{right:13px}

.face-swap-actions{
  display:flex;
  justify-content:center;
  gap:10px;
  margin-top:17px;
  flex-wrap:wrap;
}

.face-swap-download,
.face-swap-again{
  min-height:44px;
  padding:0 17px;
  border-radius:12px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:13px;
  font-weight:900;
  text-decoration:none;
}

.face-swap-download{
  background:#171826;
  color:#fff;
}

.face-swap-again{
  border:1px solid #dddde6;
  background:#fff;
  color:#323440;
  cursor:pointer;
}

@media(max-width:800px){
  .face-swap-page{
    padding:30px 0 58px;
  }

  .fs-hero h1{
    font-size:38px;
    letter-spacing:-1px;
  }

  .fs-toolbar{
    align-items:flex-start;
    flex-direction:column;
  }

  .fs-price-line{
    justify-content:flex-start;
  }

  .fs-editor{
    padding:15px;
  }

  .fs-upload-grid{
    grid-template-columns:1fr;
  }

  .fs-swap-center{
    height:44px;
  }

  .fs-swap-icon{
    width:42px;
    height:42px;
    transform:rotate(90deg);
  }

  .face-swap-upload{
    height:310px;
  }

  .fs-result-head{
    align-items:flex-start;
    flex-direction:column;
  }
}

/* ===== FACE SWAP SEO CONTENT ===== */

.fs-seo-content{
  background:#fff;
  border-top:1px solid rgba(15,23,42,.07);
  padding:72px 20px 84px;
}

.fs-seo-inner{
  width:min(1100px,100%);
  margin:0 auto;
}

.fs-seo-intro{
  max-width:850px;
  margin:0 auto 60px;
  text-align:center;
}

.fs-seo-kicker{
  display:inline-flex;
  margin-bottom:14px;
  padding:7px 13px;
  border-radius:999px;
  background:#f2efff;
  color:#6547df;
  font-size:12px;
  font-weight:800;
  letter-spacing:.05em;
}

.fs-seo-content h2{
  color:#111827;
  font-size:clamp(24px,3vw,34px);
  line-height:1.35;
  margin:0 0 16px;
}

.fs-seo-content h3{
  color:#172033;
  font-size:18px;
  margin:0 0 9px;
}

.fs-seo-content p{
  color:#5f6878;
  font-size:16px;
  line-height:1.95;
  margin:0 0 14px;
}

.fs-seo-section{
  margin-top:64px;
}

.fs-steps,
.fs-feature-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:16px;
  margin-top:26px;
}

.fs-steps article,
.fs-feature-grid article{
  background:#fafafe;
  border:1px solid #e8e8f2;
  border-radius:20px;
  padding:24px;
}

.fs-steps article > span{
  display:flex;
  width:38px;
  height:38px;
  align-items:center;
  justify-content:center;
  border-radius:12px;
  background:#704df3;
  color:#fff;
  font-weight:900;
  margin-bottom:18px;
}

.fs-seo-split{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:20px;
}

.fs-seo-split > div{
  padding:28px;
  border-radius:22px;
  border:1px solid #e7e7ef;
  background:#fbfbfd;
}

.fs-related-links{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:14px;
  margin-top:24px;
}

.fs-related-links a{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:15px;
  padding:18px 20px;
  border:1px solid #e3e3ee;
  border-radius:16px;
  background:#fff;
  color:#29213e;
  text-decoration:none;
  font-weight:800;
  transition:.2s ease;
}

.fs-related-links a:hover{
  transform:translateY(-2px);
  border-color:#7656f4;
  box-shadow:0 10px 28px rgba(73,52,148,.08);
}

.fs-faq{
  max-width:900px;
  margin-left:auto;
  margin-right:auto;
}

.fs-faq details{
  border:1px solid #e5e5ee;
  background:#fff;
  border-radius:16px;
  margin:12px 0;
  overflow:hidden;
}

.fs-faq summary{
  cursor:pointer;
  list-style:none;
  padding:20px 22px;
  color:#172033;
  font-size:16px;
  font-weight:800;
}

.fs-faq summary::-webkit-details-marker{
  display:none;
}

.fs-faq details p{
  padding:0 22px 20px;
  margin:0;
}

@media(max-width:900px){
  .fs-steps,
  .fs-feature-grid{
    grid-template-columns:repeat(2,1fr);
  }

  .fs-related-links{
    grid-template-columns:1fr;
  }
}

@media(max-width:640px){
  .fs-seo-content{
    padding:48px 16px 60px;
  }

  .fs-seo-intro{
    text-align:start;
    margin-bottom:40px;
  }

  .fs-seo-section{
    margin-top:44px;
  }

  .fs-steps,
  .fs-feature-grid,
  .fs-seo-split{
    grid-template-columns:1fr;
  }

  .fs-steps article,
  .fs-feature-grid article,
  .fs-seo-split > div{
    padding:20px;
  }
}



/* ===== FACE SWAP PAYMENT ===== */

.face-swap-buy{
    width:100%;
    min-height:64px;
    margin-top:13px;
    padding:10px 18px;
    border:1px solid #dcd4ff;
    border-radius:17px;
    background:
      linear-gradient(135deg,#f6f3ff,#eee9ff);
    color:#4d34bd;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    flex-wrap:wrap;
    text-decoration:none;
    box-shadow:0 10px 24px rgba(90,64,190,.08);
    transition:
      transform .2s ease,
      box-shadow .2s ease,
      border-color .2s ease;
}

.face-swap-buy[hidden]{
    display:none !important;
}

.face-swap-buy:hover{
    transform:translateY(-2px);
    border-color:#9f8af9;
    box-shadow:0 15px 30px rgba(90,64,190,.14);
}

.face-swap-buy > span{
    font-size:20px;
}

.face-swap-buy strong{
    font-size:15px;
    font-weight:900;
}

.face-swap-buy small{
    width:100%;
    color:#77718e;
    font-size:11px;
    text-align:center;
}

.face-swap-payment-success{
    margin-top:12px;
    padding:12px 14px;
    border-radius:12px;
    background:#efffdc;
    color:#3f6d00;
    text-align:center;
    font-size:13px;
    font-weight:800;
}



/* NUJIZ FACE SWAP PRO RESULT V2 */

/* Result card */
.face-swap-result{
  display:none;
  margin:32px auto 0;
  padding:28px;
  max-width:860px;
  background:#fff;
  border:1px solid #e8e8f1;
  border-radius:24px;
  box-shadow:
    0 20px 55px rgba(15,23,42,.08),
    0 2px 8px rgba(15,23,42,.03);
  overflow:hidden;
}

.face-swap-result.show{
  display:block;
}

/* Header */
.fs-result-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  margin:0 0 22px;
  padding:0;
}

.fs-result-head > div{
  min-width:0;
}

.fs-result-head h2{
  margin:0 0 6px;
  font-size:22px;
  line-height:1.35;
  font-weight:800;
  color:#111827;
}

.fs-result-head p{
  margin:0;
  font-size:13px;
  line-height:1.7;
  color:#6b7280;
}

/* Smaller clean success badge */
.fs-result-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  padding:7px 11px;
  border-radius:999px;
  background:#f0fdf4;
  border:1px solid #dcfce7;
  color:#15803d;
  font-size:11px;
  font-weight:800;
  white-space:nowrap;
}

/* Comparison area */
.fs-compare{
  position:relative;
  width:min(100%, 620px);
  height:auto;
  aspect-ratio:1 / 1;
  margin:0 auto;
  border-radius:20px;
  overflow:hidden;
  background:
    linear-gradient(135deg,#f8fafc,#f1f5f9);
  border:1px solid #e5e7eb;
  box-shadow:0 8px 28px rgba(15,23,42,.06);
  isolation:isolate;
}

/* Both images occupy exactly the same canvas */
.fs-compare-before,
.fs-compare-after{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  overflow:hidden;
  background:#f8fafc;
}

.fs-compare-before img,
.fs-compare-after img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  display:block;
  object-fit:contain;
  object-position:center;
}

/* After layer controlled by existing JS */
.fs-compare-after{
  z-index:2;
}

/* Divider */
.fs-compare-line{
  position:absolute;
  top:0;
  bottom:0;
  left:50%;
  width:2px;
  background:rgba(255,255,255,.96);
  box-shadow:0 0 0 1px rgba(15,23,42,.08);
  transform:translateX(-50%);
  z-index:5;
  pointer-events:none;
}

/* Slider handle */
.fs-compare-handle{
  position:absolute;
  top:50%;
  left:50%;
  z-index:6;
  width:42px;
  height:42px;
  display:flex;
  align-items:center;
  justify-content:center;
  transform:translate(-50%,-50%);
  border-radius:50%;
  background:#6d42f5;
  color:#fff;
  border:3px solid #fff;
  box-shadow:0 5px 18px rgba(74,46,200,.28);
  font-size:17px;
  font-weight:800;
  pointer-events:none;
}

/* Invisible native range remains functional */
.fs-compare input[type="range"]{
  position:absolute;
  inset:0;
  z-index:10;
  width:100%;
  height:100%;
  margin:0;
  opacity:0;
  cursor:ew-resize;
}

/* Before / After labels */
.fs-compare-tag{
  position:absolute;
  top:14px;
  z-index:7;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:48px;
  height:28px;
  padding:0 10px;
  border-radius:9px;
  background:rgba(17,24,39,.76);
  color:#fff;
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
  font-size:11px;
  font-weight:700;
  pointer-events:none;
}

.fs-tag-before{
  left:14px;
}

.fs-tag-after{
  right:14px;
}

/* Actions */
.fs-result-actions{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  margin-top:20px;
}

.face-swap-download,
.face-swap-again{
  min-height:48px;
  min-width:175px;
  padding:0 20px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:13px;
  font-size:14px;
  font-weight:800;
  text-decoration:none;
  cursor:pointer;
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    background .18s ease;
}

.face-swap-download{
  color:#fff !important;
  background:linear-gradient(135deg,#7047f7,#5c35e8);
  border:1px solid transparent;
  box-shadow:0 8px 20px rgba(99,63,224,.22);
}

.face-swap-download:hover{
  transform:translateY(-1px);
  box-shadow:0 11px 25px rgba(99,63,224,.28);
}

.face-swap-again{
  color:#374151;
  background:#fff;
  border:1px solid #dfe3eb;
  box-shadow:none;
}

.face-swap-again:hover{
  background:#f8fafc;
  transform:translateY(-1px);
}

/* RTL */
html[dir="rtl"] .fs-result-head{
  text-align:right;
}

/* Tablet */
@media (max-width:768px){
  .face-swap-result{
    margin-top:24px;
    padding:20px;
    border-radius:20px;
  }

  .fs-compare{
    width:min(100%, 540px);
  }
}

/* Mobile */
@media (max-width:560px){
  .face-swap-result{
    margin:20px 0 0;
    padding:16px;
    border-radius:18px;
  }

  .fs-result-head{
    align-items:flex-start;
    margin-bottom:16px;
  }

  .fs-result-head h2{
    font-size:19px;
  }

  .fs-result-head p{
    font-size:12px;
  }

  .fs-result-badge{
    padding:6px 9px;
    font-size:10px;
  }

  .fs-compare{
    width:100%;
    border-radius:16px;
  }

  .fs-compare-handle{
    width:38px;
    height:38px;
  }

  .fs-compare-tag{
    top:10px;
    min-width:42px;
    height:25px;
    font-size:10px;
  }

  .fs-tag-before{
    left:10px;
  }

  .fs-tag-after{
    right:10px;
  }

  .fs-result-actions{
    display:grid;
    grid-template-columns:1fr;
    gap:9px;
    margin-top:15px;
  }

  .face-swap-download,
  .face-swap-again{
    width:100%;
    min-width:0;
    min-height:47px;
  }
}


/* NUJIZ FACE SWAP MOBILE SAVE BUTTON */
@media (max-width:850px){

  .face-swap-actions{
    position:relative !important;
    z-index:100 !important;
  }

  #faceSwapDownload{
    position:relative !important;
    z-index:101 !important;
    pointer-events:auto !important;
    touch-action:manipulation !important;
    cursor:pointer !important;
    -webkit-tap-highlight-color:transparent;
  }

}
