body[data-relax-night-theme="default"]{background:#050713!important}
#relaxNightTheme{display:contents}
#relaxNightTheme .relax-night-stars,#relaxNightTheme .relax-night-dust{position:fixed;inset:0;pointer-events:none;overflow:hidden}
#relaxNightTheme .relax-night-stars{z-index:1}
#relaxNightTheme .relax-night-dust{z-index:2}
#relaxNightTheme .generated-star{position:absolute;display:block;border-radius:50%;background:#fff;box-shadow:0 0 7px rgba(255,255,255,.7);animation:starPulse 4s ease-in-out infinite}
@keyframes starPulse{0%,100%{transform:scale(.6);opacity:.15}25%{transform:scale(1.1);opacity:.55}50%{transform:scale(1.5);opacity:.9}75%{transform:scale(1.1);opacity:.55}}
#relaxNightTheme .generated-star.drifting{animation-name:starDrift;animation-timing-function:ease-in-out;animation-iteration-count:1;animation-fill-mode:forwards}
@keyframes starDrift{0%{transform:translate(0,0) scale(.6);opacity:0}10%{opacity:.85}85%{opacity:.5}100%{transform:translate(var(--dx,0px),var(--dy,0px)) scale(1.1);opacity:0}}
#relaxNightTheme .dust-particle{position:absolute;display:block;border-radius:50%;background:rgba(180,195,255,.35);filter:blur(.5px);animation:dustFloat 18s linear infinite}
@keyframes dustFloat{0%{transform:translate3d(0,100px,0);opacity:0}20%{opacity:.6}80%{opacity:.3}100%{transform:translate3d(80px,-500px,0);opacity:0}}

/* NFT-only night-sky occlusion.
   Keep the moving night theme globally unchanged; only real NFT/collection artwork
   surfaces sit above the star/dust layers so transparent media reveals its local floor. */
body[data-relax-night-theme="default"] .nft-artwork-stage,
body[data-relax-night-theme="default"] .nft-media,
body[data-relax-night-theme="default"].relax-market-page .item-media,
body[data-relax-night-theme="default"].relax-market-page .collection-detail-header > img,
body[data-relax-night-theme="default"] #relaxPageIsland .collection-card .collection-media,
body[data-relax-night-theme="default"] #collections .collection .media,
body[data-relax-night-theme="default"].relax-creator-page #relaxPageIsland .preview-box,
body[data-relax-night-theme="default"].relax-launchpad-page .preview,
body[data-relax-night-theme="default"] #relaxSellThumb {
  position:relative;
  z-index:3;
  isolation:isolate;
}

/* These two artwork wrappers were intentionally transparent in the page CSS.
   Give only the NFT preview surface an opaque floor; the surrounding page stays starry. */
body[data-relax-night-theme="default"] #relaxPageIsland .collection-card .collection-media {
  background:#090d1d;
}
body[data-relax-night-theme="default"].relax-creator-page #relaxPageIsland .preview-box {
  background:#0b1020;
}

/* Market is the only NFT surface whose shell forms its own stacking context.
   Release only that boundary so NFT cards can use the same z-index:3 occlusion
   as the rest of the platform. Keep the animated market aurora as an unstacked
   first child; .market-main remains positioned without creating a new context. */
body[data-relax-night-theme="default"].relax-market-page .market-shell {
  isolation:auto;
}
body[data-relax-night-theme="default"].relax-market-page .market-shell::before {
  z-index:auto;
  pointer-events:none;
}
body[data-relax-night-theme="default"].relax-market-page .market-main {
  position:relative;
}
body[data-relax-night-theme="default"].relax-market-page .market-main .item,
body[data-relax-night-theme="default"].relax-market-page .collection-card {
  position:relative;
  z-index:3;
}
