/* MG PRO visual polish v3.1 — replace auth.extra.v3.0.css only.
   Animated starfield is decorative, zero interaction, zero remote requests. */

/* A subtle, slow starfield over the site's original purple gradients. */
body::before,body::after{
  content:"";position:fixed;inset:-12vh -10vw;z-index:0;pointer-events:none;
  border:0;background-repeat:repeat;will-change:transform,opacity;
}
body::before{
  background-image:
    radial-gradient(circle at 8% 15%,#ffffffc4 0 1px,transparent 2px),
    radial-gradient(circle at 35% 72%,#d3a9ffd0 0 1.1px,transparent 2px),
    radial-gradient(circle at 82% 32%,#ffffffb8 0 .9px,transparent 2px),
    radial-gradient(circle at 60% 9%,#a96dffc4 0 1.1px,transparent 2px),
    radial-gradient(circle at 90% 90%,#f7e9ffda 0 .8px,transparent 2px),
    radial-gradient(circle at 16% 85%,#e1bbffc9 0 .8px,transparent 2px);
  background-size:360px 370px;
  opacity:.58;
  animation:mgpro-star-drift 95s linear infinite,mgpro-star-twinkle 13s ease-in-out infinite alternate;
}
body::after{
  background-image:
    radial-gradient(circle at 14% 45%,#f9eaffec 0 1.2px,transparent 2.2px),
    radial-gradient(circle at 75% 11%,#c28effd0 0 1.4px,transparent 2.6px),
    radial-gradient(circle at 42% 86%,#ffffffb8 0 .8px,transparent 2px),
    radial-gradient(circle at 94% 64%,#cf9ffff0 0 1.1px,transparent 2px);
  background-size:520px 470px;
  opacity:.33;
  animation:mgpro-star-drift-reverse 135s linear infinite,mgpro-star-twinkle 19s ease-in-out infinite alternate-reverse;
}
/* Keep stars under the page UI. The sticky header retains its original stacking priority. */
body>main,body>footer{position:relative;z-index:1}
body>.topbar{z-index:20}
body>footer{background-color:rgba(17,7,31,.86)}
@keyframes mgpro-star-drift{to{transform:translate3d(38px,-55px,0)}}
@keyframes mgpro-star-drift-reverse{to{transform:translate3d(-46px,42px,0)}}
@keyframes mgpro-star-twinkle{from{opacity:.32}to{opacity:.68}}

/* Restyle login panel and keep the recovery mode compact. */
#authModal .modal{
  width:min(420px,calc(100vw - 24px));max-height:calc(100dvh - 26px);
  overflow-x:hidden;overflow-y:auto;
  scrollbar-width:thin;scrollbar-color:#9e65db55 transparent;
  box-shadow:0 24px 80px #10032588,0 0 28px #8e3dff16;
}
#authModal .modal::-webkit-scrollbar{width:5px}
#authModal .modal::-webkit-scrollbar-thumb{background:#a467e370;border-radius:8px}
#authModal .modal-head{margin-bottom:8px}
#authModal .modal-head h2{font-size:clamp(19px,2vw,23px)}
#authModal .auth-tabs{margin-bottom:15px}

/* Eye: purple glass icon, smooth blink/open motion, correct side for RTL/LTR. */
.mgpro-password-wrap{position:relative;display:block;width:100%;min-width:0}
.mgpro-password-wrap>input{
  display:block;width:100%;min-height:46px;
  padding-left:54px!important;padding-right:13px!important;
}
html[dir="ltr"] .mgpro-password-wrap>input{
  padding-left:13px!important;padding-right:54px!important;
}
.mgpro-eye{
  position:absolute;left:6px;right:auto;top:50%;transform:translateY(-50%);
  width:37px;height:35px;min-width:37px;padding:0;
  border:1px solid rgba(211,159,255,.43);border-radius:11px;
  background:linear-gradient(145deg,#57218c,#301256);color:#ddb4ff;
  box-shadow:inset 0 1px 0 #ffffff20,0 1px 9px #742cb44d;
  cursor:pointer;display:flex;align-items:center;justify-content:center;
  transition:background .2s ease,box-shadow .2s ease,border-color .2s ease,transform .24s ease;
  z-index:2;
}
html[dir="ltr"] .mgpro-eye{right:6px;left:auto}
.mgpro-eye:hover,.mgpro-eye.is-visible{
  background:linear-gradient(145deg,#8e37e9,#5720a1);
  border-color:#d7a1ff;
  box-shadow:0 0 16px #a34fff83,inset 0 1px 0 #ffffff47;
}
.mgpro-eye:active{transform:translateY(-50%) scale(.92)}
.mgpro-eye:focus-visible{outline:2px solid #e4b5ff;outline-offset:2px}
.mgpro-eye svg{
  display:block;width:21px!important;height:21px!important;max-width:21px!important;max-height:21px!important;
  overflow:visible;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;
  transition:transform .25s ease;
}
.mgpro-eye .mgpro-eye-pupil{stroke-width:1.7;transform-origin:12px 12px;transition:transform .22s ease,opacity .22s ease}
.mgpro-eye .mgpro-eye-slash{opacity:1;stroke:#f4c8ff;stroke-width:2.1;stroke-dasharray:24;stroke-dashoffset:0;transition:stroke-dashoffset .28s ease,opacity .2s ease}
.mgpro-eye.is-visible svg{transform:scale(1.07)}
.mgpro-eye.is-visible .mgpro-eye-pupil{transform:scale(1.15)}
.mgpro-eye.is-visible .mgpro-eye-slash{stroke-dashoffset:24;opacity:0}

/* Existing recovery and linking controls. */
.mgpro-text-link{border:0;background:transparent;color:#d8b5ff;font:inherit;text-decoration:underline;text-underline-offset:4px;cursor:pointer;padding:7px 0;align-self:center}
.mgpro-text-link:hover{color:#fff}
.mgpro-extra-panel{display:flex;flex-direction:column;gap:12px;margin-top:13px}
.mgpro-extra-panel[hidden],.mgpro-google-area[hidden],#mgproRecoveryStep2[hidden]{display:none!important}
.mgpro-extra-panel label{display:flex;flex-direction:column;gap:6px;font-size:13px;color:#f0dfff}
.mgpro-extra-panel input{width:100%;min-height:42px}
#mgproRecoveryStep2{display:flex;flex-direction:column;gap:12px}
.mgpro-helper{font-size:13px;color:#e7d7f5;line-height:1.65;text-align:center}
.mgpro-extra-error{font-size:12px;color:#ffbbc9;min-height:18px;text-align:center;margin:0}

/* Google SDK owns its button and text. The host frame does not clip,
   reflow or resize Google internals, avoiding overlapping RTL captions. */
.mgpro-google-area{margin-top:13px;width:100%;display:flex;flex-direction:column;align-items:center;gap:12px;min-width:0}
.mgpro-or{color:#d6bee6;display:flex;width:100%;align-items:center;gap:10px;font-size:12px}
.mgpro-or:before,.mgpro-or:after{content:"";height:1px;flex:1;background:#ffffff35}
#mgproGoogleButton{
  width:290px;max-width:100%;min-height:50px;max-height:none;
  padding:5px 7px;box-sizing:border-box;
  display:flex;align-items:center;justify-content:center;
  overflow:visible;direction:ltr!important;unicode-bidi:isolate;
  border:1px solid rgba(185,118,255,.65);border-radius:27px;
  background:linear-gradient(140deg,#3b1769,#261044);
  box-shadow:0 0 15px #8c33de45,inset 0 1px 0 #ffffff24;
  transition:border-color .2s ease,box-shadow .2s ease;
}
#mgproGoogleButton:hover{border-color:#d6a3ff;box-shadow:0 0 19px #9b4ae866}
/* Deliberately don't target iframe, img, SVG, span or SDK-generated div. */
/* Stars also subtly visible through the purple modal veil. */
#authModal::before{
  content:"";position:fixed;inset:0;pointer-events:none;z-index:0;opacity:.4;
  background-image:
    radial-gradient(circle at 17% 24%,#e0b7ffcc 0 1px,transparent 2px),
    radial-gradient(circle at 76% 47%,#ffffffae 0 1px,transparent 2px),
    radial-gradient(circle at 53% 81%,#e0b7ffcc 0 1.1px,transparent 2px);
  background-size:280px 310px;
  animation:mgpro-star-drift 110s linear infinite;
}
#authModal>.modal{z-index:1}

@media(max-width:480px){
  #authModal .modal{padding:23px 20px}
  #mgproGoogleButton{width:min(100%,300px)!important}
}
@media(prefers-reduced-motion:reduce){
  body::before,body::after,#authModal::before{animation:none!important;will-change:auto!important}
  .mgpro-eye,.mgpro-eye svg,.mgpro-eye .mgpro-eye-pupil,.mgpro-eye .mgpro-eye-slash,
  #mgproGoogleButton{transition:none!important}
}

/* MG PRO v3.2: prioritize phone video playback over decorative animations. */
html.mgpro-demo-playing body::before,
html.mgpro-demo-playing body::after,
html.mgpro-demo-playing #authModal::before{animation-play-state:paused!important}
@media (max-width:780px), (pointer:coarse) {
  body::before {animation:none!important;will-change:auto!important;inset:0!important;opacity:.4}
  body::after,#authModal::before{display:none!important;animation:none!important;will-change:auto!important}
  .ambient{display:none!important}
  .compare-spark,.comparison-grip,.comparison-live-dot{animation:none!important}
  .comparison-label{backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
  #mgproGoogleButton{width:290px;max-width:100%}
}


/* MG PRO v3.3 — recovery-code clock + find-your-email guidance. */
#mgproRecoveryWait.mgpro-recovery-wait{
  display:grid;gap:11px;position:relative;overflow:hidden;
  padding:13px 14px;border:1px solid rgba(194,135,255,.52);border-radius:16px;
  background:linear-gradient(125deg,rgba(100,35,174,.45),rgba(51,17,104,.68));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.12),0 8px 24px rgba(15,3,41,.16);
  color:#f5eaff;
}
#mgproRecoveryWait .mgpro-recovery-wait-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
#mgproRecoveryWait .mgpro-recovery-timer-label{font-size:12px;line-height:1.45;max-width:215px;color:#efe0ff;font-weight:600}
#mgproRecoveryWait .mgpro-recovery-clock{
  display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;
  min-width:75px;padding:6px 8px;border-radius:11px;
  border:1px solid rgba(221,166,255,.48);
  background:rgba(35,10,77,.85);box-shadow:0 0 13px rgba(177,92,255,.23);
  font:800 21px/1.2 ui-monospace,SFMono-Regular,Consolas,monospace;
  color:#fff;letter-spacing:.5px;font-variant-numeric:tabular-nums;
}
#mgproRecoveryWait .mgpro-recovery-hint{display:flex;align-items:flex-start;gap:10px;text-align:start;min-width:0}
#mgproRecoveryWait .mgpro-recovery-hint-icon{
  flex:0 0 29px;width:29px;height:29px;border-radius:9px;
  display:grid;place-items:center;background:rgba(196,121,255,.21);
  border:1px solid rgba(206,160,255,.4);color:#eacaff;font-size:17px;
}
#mgproRecoveryWait .mgpro-recovery-hint>div:last-child{min-width:0}
#mgproRecoveryWait .mgpro-recovery-hint strong{display:block;margin:0 0 3px;font-size:13px;line-height:1.5}
#mgproRecoveryWait .mgpro-recovery-hint p{margin:0 0 6px;color:#e9d9fa;font-size:12px;line-height:1.65}
#mgproRecoveryWait .mgpro-recovery-sender{
  display:inline-block;max-width:100%;overflow-wrap:anywhere;
  font:600 11px/1.55 ui-monospace,SFMono-Regular,Consolas,monospace;
  color:#fff;background:rgba(20,5,46,.53);border-radius:7px;
  padding:3px 7px;user-select:all;
}
#mgproRecoveryWait .mgpro-recovery-expiry-note{margin:0;color:#ccb1e9;font-size:11px;line-height:1.55;text-align:start}
#mgproRecoveryWait.is-expired .mgpro-recovery-clock{color:#ffcadb;border-color:rgba(255,166,194,.58)}
@media(max-width:480px){
  #mgproRecoveryWait.mgpro-recovery-wait{padding:11px 12px;gap:9px}
  #mgproRecoveryWait .mgpro-recovery-clock{min-width:69px;font-size:19px}
  #mgproRecoveryWait .mgpro-recovery-timer-label{font-size:11.5px}
}
