/* Hi Doge — refined, page-specific ambient artwork. Decorative only. */
@keyframes hd-atmo-drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(-8px, -10px, 0) scale(1.008); }
  100% { transform: translate3d(5px, -18px, 0) scale(1.015); }
}
@keyframes hd-atmo-glow {
  0%,100% { opacity: .72; }
  50% { opacity: 1; }
}

body.public-page,
body.member-body,
body.admin-page { isolation: isolate; }

/* Public content pages: one large, low-contrast technical illustration plus restrained light fields. */
body.public-page::before {
  content: "";
  position: fixed;
  inset: -2vh -1vw;
  z-index: -1;
  pointer-events: none;
  background-repeat: no-repeat, no-repeat, no-repeat, repeat;
  background-size: min(790px, 68vw) auto, 100% 100%, 100% 100%, 54px 54px;
  background-position: right -5vw top 4vh, center, center, 0 0;
  opacity: .64;
  filter: saturate(.9);
  -webkit-mask-image: radial-gradient(ellipse at 78% 32%, #000 0%, rgba(0,0,0,.9) 38%, rgba(0,0,0,.25) 70%, transparent 88%);
  mask-image: radial-gradient(ellipse at 78% 32%, #000 0%, rgba(0,0,0,.9) 38%, rgba(0,0,0,.25) 70%, transparent 88%);
  animation: none;
  will-change: auto;
}
body.public-page[data-page-key="exchanges"]::before {
  background-image: url("public/backgrounds/pages/exchanges-market.svg"), radial-gradient(ellipse at 78% 25%, rgba(52,178,213,.12), transparent 46%), linear-gradient(135deg, rgba(22,94,126,.045), transparent 58%), linear-gradient(rgba(98,190,220,.035) 1px, transparent 1px);
}
body.public-page[data-page-key="mining"]::before {
  background-image: url("public/backgrounds/pages/mining-rig.svg"), radial-gradient(ellipse at 78% 25%, rgba(208,164,73,.14), transparent 46%), linear-gradient(135deg, rgba(158,111,29,.05), transparent 58%), linear-gradient(rgba(221,180,95,.035) 1px, transparent 1px);
}
body.public-page[data-page-key="invite"]::before {
  background-image: url("public/backgrounds/pages/invite-network.svg"), radial-gradient(ellipse at 78% 25%, rgba(140,117,216,.15), transparent 46%), linear-gradient(135deg, rgba(93,78,155,.05), transparent 58%), linear-gradient(rgba(177,156,237,.035) 1px, transparent 1px);
}
body.public-page[data-page-key="support"]::before {
  background-image: url("public/backgrounds/pages/support-headset.svg"), radial-gradient(ellipse at 78% 25%, rgba(67,166,205,.15), transparent 46%), linear-gradient(135deg, rgba(45,105,149,.05), transparent 58%), linear-gradient(rgba(104,196,225,.035) 1px, transparent 1px);
}
body.public-page[data-page-key="how"]::before {
  background-image: url("public/backgrounds/pages/guide-book.svg"), radial-gradient(ellipse at 78% 25%, rgba(81,164,200,.12), transparent 46%), linear-gradient(135deg, rgba(64,118,151,.045), transparent 58%), linear-gradient(rgba(99,179,212,.03) 1px, transparent 1px);
}
body.public-page[data-page-key="faq"]::before {
  background-image: url("public/backgrounds/pages/faq-questions.svg"), radial-gradient(ellipse at 78% 25%, rgba(205,165,83,.13), transparent 46%), linear-gradient(135deg, rgba(126,94,43,.045), transparent 58%), linear-gradient(rgba(225,194,129,.03) 1px, transparent 1px);
}
body.public-page[data-page-key="global"]::before {
  background-image: url("public/backgrounds/pages/global-globe.svg"), radial-gradient(ellipse at 78% 25%, rgba(65,179,190,.14), transparent 46%), linear-gradient(135deg, rgba(38,112,126,.05), transparent 58%), linear-gradient(rgba(91,198,205,.035) 1px, transparent 1px);
}
body.public-page[data-page-key="create-contract"]::before {
  background-image: url("public/backgrounds/pages/doge-deposit.svg"), radial-gradient(ellipse at 78% 27%, rgba(244,197,66,.2), transparent 48%), linear-gradient(135deg, rgba(158,111,29,.075), transparent 58%), linear-gradient(rgba(221,180,95,.04) 1px, transparent 1px);
  background-size: min(850px, 74vw) auto, 100% 100%, 100% 100%, 54px 54px;
  background-position: right -2vw top 1vh, center, center, 0 0;
  opacity: .7;
  -webkit-mask-image: radial-gradient(ellipse at 78% 36%, #000 0%, rgba(0,0,0,.9) 42%, rgba(0,0,0,.3) 73%, transparent 91%);
  mask-image: radial-gradient(ellipse at 78% 36%, #000 0%, rgba(0,0,0,.9) 42%, rgba(0,0,0,.3) 73%, transparent 91%);
}
body.public-page[data-page-key="contract"]::before {
  background-image: url("public/backgrounds/pages/contract-document.svg"), radial-gradient(ellipse at 78% 25%, rgba(210,171,100,.14), transparent 46%), linear-gradient(135deg, rgba(128,94,46,.05), transparent 58%), linear-gradient(rgba(225,190,123,.03) 1px, transparent 1px);
}
body.public-page[data-page-key="contractCancel"]::before {
  background-image: url("public/backgrounds/pages/contract-cancel.svg"), radial-gradient(ellipse at 78% 25%, rgba(192,102,102,.14), transparent 46%), linear-gradient(135deg, rgba(120,52,52,.05), transparent 58%), linear-gradient(rgba(208,135,135,.03) 1px, transparent 1px);
}

/* Homepage: keep the previous world map with Iran illuminated, without restoring extra wallpaper. */
body.public-page[data-page-key="home"]::before {
  content: none !important;
  display: none !important;
  background: none !important;
  animation: none !important;
}
body.public-page[data-page-key="home"] {
  background: var(--bg, #090909) !important;
}
body.public-page[data-page-key="home"] > .ambient-one,
body.public-page[data-page-key="home"] > .ambient-two {
  display: none !important;
}
body.public-page[data-page-key="home"] #homePage .hero {
  background: transparent !important;
}
/* Keep the hero's extra spotlights disabled; the vector map is the only restored backdrop. */
body.public-page[data-page-key="home"] #homePage .hero::before,
body.public-page[data-page-key="home"] #homePage .hero::after {
  content: none !important;
  display: none !important;
  animation: none !important;
}
body.public-page[data-page-key="home"] #homePage .hd-world-map-stage {
  display: block !important;
}

/* Member account pages: focused artwork lives inside the existing ambient layer. */
body.member-body:not(.member-dashboard-body) .member-ambient {
  isolation: isolate;
  overflow: hidden;
}
body.member-body:not(.member-dashboard-body) .member-ambient::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-repeat: no-repeat, no-repeat, repeat;
  background-size: min(650px, 62vw) auto, 100% 100%, 54px 54px;
  background-position: right -3vw top 4vh, center, 0 0;
  opacity: .56;
  -webkit-mask-image: radial-gradient(ellipse at 80% 31%, #000 0%, rgba(0,0,0,.78) 42%, transparent 82%);
  mask-image: radial-gradient(ellipse at 80% 31%, #000 0%, rgba(0,0,0,.78) 42%, transparent 82%);
  animation: none;
  will-change: auto;
}
body.member-body[data-member-page="exchanges"] .member-ambient::after {
  background-image: url("public/backgrounds/pages/member-exchanges.svg"), radial-gradient(ellipse at 80% 24%, rgba(61,178,211,.12), transparent 45%), linear-gradient(rgba(95,190,220,.03) 1px, transparent 1px);
}
body.member-body[data-member-page="history"] .member-ambient::after {
  background-image: url("public/backgrounds/pages/member-history.svg"), radial-gradient(ellipse at 80% 24%, rgba(82,186,140,.12), transparent 45%), linear-gradient(rgba(104,211,160,.03) 1px, transparent 1px);
}
body.member-body[data-member-page="invite"] .member-ambient::after {
  background-image: url("public/backgrounds/pages/member-invite.svg"), radial-gradient(ellipse at 80% 24%, rgba(153,129,222,.13), transparent 45%), linear-gradient(rgba(176,155,235,.03) 1px, transparent 1px);
}
body.member-body[data-member-page="settings"] .member-ambient::after {
  background-image: url("public/backgrounds/pages/member-settings.svg"), radial-gradient(ellipse at 80% 24%, rgba(153,129,222,.12), transparent 45%), linear-gradient(rgba(176,155,235,.03) 1px, transparent 1px);
}
body.member-body[data-member-page="support"] .member-ambient::after {
  background-image: url("public/backgrounds/pages/member-support.svg"), radial-gradient(ellipse at 80% 24%, rgba(67,166,205,.13), transparent 45%), linear-gradient(rgba(104,196,225,.03) 1px, transparent 1px);
}
body.member-body[data-member-page="verification"] .member-ambient::after {
  background-image: url("public/backgrounds/pages/member-verification.svg"), radial-gradient(ellipse at 80% 24%, rgba(83,187,140,.13), transparent 45%), linear-gradient(rgba(115,216,169,.03) 1px, transparent 1px);
}
body.member-body[data-page-key="auth"] .member-ambient::after {
  background-image: url("public/backgrounds/pages/auth-security.svg"), radial-gradient(ellipse at 80% 24%, rgba(210,171,100,.13), transparent 45%), linear-gradient(rgba(225,190,123,.03) 1px, transparent 1px);
}

/* Dashboard keeps its independently selected loop video; no extra homepage watermark is layered over it. */
body.member-dashboard-body::before { content: none !important; display: none !important; }

/* Admin: subdued control-room motif, kept behind all editor surfaces. */
body.admin-page { position: relative; }
body.admin-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: url("public/backgrounds/pages/admin-control.svg") no-repeat right -3vw top 2vh / min(760px, 64vw) auto,
    radial-gradient(ellipse at 84% 18%, rgba(132,112,207,.10), transparent 47%),
    linear-gradient(rgba(163,146,221,.025) 1px, transparent 1px);
  background-size: min(760px, 64vw) auto, 100% 100%, 58px 58px;
  opacity: .34;
  -webkit-mask-image: radial-gradient(ellipse at 80% 28%, #000 0%, rgba(0,0,0,.7) 44%, transparent 82%);
  mask-image: radial-gradient(ellipse at 80% 28%, #000 0%, rgba(0,0,0,.7) 44%, transparent 82%);
  animation: none;
}

@media (max-width: 760px) {
  body.public-page:not([data-page-key="home"])::before {
    inset: 0;
    background-size: min(520px, 94vw) auto, 100% 100%, 100% 100%, 54px 54px;
    background-position: right -23vw top 7vh, center, center, 0 0;
    opacity: .34;
    -webkit-mask-image: radial-gradient(ellipse at 84% 20%, #000 0%, rgba(0,0,0,.7) 45%, transparent 80%);
    mask-image: radial-gradient(ellipse at 84% 20%, #000 0%, rgba(0,0,0,.7) 45%, transparent 80%);
    animation: none;
  }
  body.member-body:not(.member-dashboard-body) .member-ambient::after {
    background-size: min(500px, 91vw) auto, 100% 100%, 54px 54px;
    background-position: right -24vw top 7vh, center, 0 0;
    opacity: .31;
    animation: none;
  }
  body.admin-page::before {
    background-size: min(520px, 92vw) auto, 100% 100%, 58px 58px;
    background-position: right -24vw top 5vh, center, 0 0;
    opacity: .22;
    animation: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.public-page::before,
  body.member-body:not(.member-dashboard-body) .member-ambient::after,
  body.admin-page::before {
    animation: none !important;
    transform: none !important;
  }
}


/* Stable decorative backgrounds: no drifting/twinkling layers that can look like a flicker. */
body.member-body .member-dots,
body.member-body .member-dots::after,
body.member-body .dashboard-dot-panel::before {
  animation: none !important;
  transform: none !important;
  will-change: auto !important;
}
body.member-body .member-dots::after { opacity: .22; }


/* Dashboard default atmosphere: same restrained, page-specific ambient artwork used by Support and Invite. */
html[data-dashboard-background-mode="atmosphere"] body.member-dashboard-body .member-ambient{
  isolation:isolate;overflow:hidden;background:var(--bg,#090909)!important;
}
html[data-dashboard-background-mode="atmosphere"] body.member-dashboard-body .member-ambient::before{
  content:"";position:absolute;inset:0;z-index:0;pointer-events:none;
  background:radial-gradient(ellipse at 80% 22%,rgba(67,166,205,.13),transparent 47%),linear-gradient(135deg,rgba(45,105,149,.045),transparent 58%),linear-gradient(rgba(104,196,225,.03) 1px,transparent 1px);
  background-size:100% 100%,100% 100%,54px 54px;
}
html[data-dashboard-background-mode="atmosphere"] body.member-dashboard-body .member-ambient::after{
  content:"";position:absolute;inset:0;z-index:1;pointer-events:none;
  background:url("public/backgrounds/pages/member-dashboard.svg") no-repeat right -3vw top 4vh/min(650px,62vw) auto;
  opacity:.56;filter:saturate(.9);
  -webkit-mask-image:radial-gradient(ellipse at 80% 31%,#000 0%,rgba(0,0,0,.78) 42%,transparent 82%);
  mask-image:radial-gradient(ellipse at 80% 31%,#000 0%,rgba(0,0,0,.78) 42%,transparent 82%);
}
html[data-dashboard-background-mode="atmosphere"] body.member-dashboard-body .member-background-video,
html[data-dashboard-background-mode="atmosphere"] body.member-dashboard-body .member-dots{display:none!important}
@media(max-width:760px){html[data-dashboard-background-mode="atmosphere"] body.member-dashboard-body .member-ambient::after{background-position:right -24vw top 7vh;background-size:min(500px,91vw) auto;opacity:.31}}
