/* Animated Physics Tech Graphics & Ambient Layers (Dark-First Mix) */
.mp-tech-page {
  --tech-navy: #070C19;
  --tech-indigo: #6366F1;
  --tech-gold: #FBBF24;
  --tech-cyan: #38BDF8;
  --tech-grid: rgba(56, 189, 248, 0.065);
  background: var(--mp-bg);
}

[data-theme="light"] .mp-tech-page {
  --tech-grid: rgba(79, 70, 229, 0.075);
}

.mp-tech-main {
  position: relative;
  isolation: isolate;
  background-image:
    radial-gradient(ellipse at 0% 0%, rgba(99, 102, 241, 0.16), transparent 52%),
    radial-gradient(ellipse at 100% 52%, rgba(6, 182, 212, 0.14), transparent 55%),
    linear-gradient(var(--tech-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--tech-grid) 1px, transparent 1px);
  background-size: auto, auto, 40px 40px, 40px 40px;
}

.mp-tech-main::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 14% 31%, rgba(251, 191, 36, 0.55) 1.5px, transparent 2.5px),
    radial-gradient(circle at 83% 64%, rgba(56, 189, 248, 0.55) 1.5px, transparent 2.5px),
    radial-gradient(circle at 48% 18%, rgba(99, 102, 241, 0.50) 1.5px, transparent 2.5px);
  background-size: 180px 156px, 226px 198px, 260px 230px;
  opacity: 0.45;
}

.mp-tech-main > section {
  position: relative;
}

.mp-tech-stage {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-width: 0;
  --tech-wave-warm: rgba(99, 102, 241, 0.28);
  --tech-wave-cool: rgba(6, 182, 212, 0.25);
}

.mp-tech-stage::before {
  content: "";
  position: absolute;
  inset: -14%;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 18% 72%, var(--tech-wave-warm) 0, transparent 46%),
    radial-gradient(ellipse at 78% 24%, var(--tech-wave-cool) 0, transparent 46%);
}

.mp-tech-home .mp-tech-band {
  background: color-mix(in srgb, var(--mp-surf) 78%, transparent);
  backdrop-filter: blur(10px);
}

.mp-tech-stage > .container,
.mp-tech-page .mp-footer > .container {
  position: relative;
  z-index: 1;
}

.mp-tech-home .mp-hero {
  background:
    radial-gradient(ellipse at 84% 24%, rgba(6, 182, 212, 0.22), transparent 46%),
    radial-gradient(ellipse at 8% 92%, rgba(99, 102, 241, 0.36), transparent 58%),
    radial-gradient(ellipse at 50% 10%, rgba(245, 158, 11, 0.12), transparent 45%),
    linear-gradient(130deg, #050914, #0B1429 54%, #141338);
}

/* Rotating Orbital Physics Atom Ring */
.mp-tech-orbit {
  --orbit-line: rgba(56, 189, 248, 0.30);
  --orbit-node: var(--tech-gold);
  position: absolute;
  width: clamp(18rem, 45vw, 44rem);
  aspect-ratio: 1;
  top: -28%;
  right: -7%;
  border: 1px solid var(--orbit-line);
  border-radius: 50%;
  pointer-events: none;
}

.mp-tech-orbit::before,
.mp-tech-orbit::after,
.mp-tech-orbit > span {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.mp-tech-orbit::before {
  inset: 11%;
  border: 1px dashed rgba(99, 102, 241, 0.42);
}

.mp-tech-orbit::after {
  inset: 27%;
  border: 1px solid var(--orbit-line);
}

.mp-tech-orbit > span { inset: 0; }

.mp-tech-orbit > span::before,
.mp-tech-orbit > span::after {
  content: "";
  position: absolute;
  width: .58rem;
  height: .58rem;
  border-radius: 50%;
  box-shadow: 0 0 1.2rem currentColor;
  background: currentColor;
}

.mp-tech-orbit > span::before {
  top: 14%;
  left: 14%;
  color: var(--orbit-node);
}

.mp-tech-orbit > span::after {
  bottom: 19%;
  right: 19%;
  color: var(--tech-cyan);
}

:is(.mp-tech-login, .mp-tech-register) .mp-tech-stage {
  min-height: min(62vh, 34rem);
  display: grid;
  align-items: center;
}

:is(.mp-tech-login, .mp-tech-register) .mp-tech-stage .mp-card {
  box-shadow: 0 22px 58px rgba(2, 6, 23, 0.48);
  transform: none;
}

.mp-tech-page .mp-footer {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-top: 0 !important;
  border-top: 2px solid transparent;
  background:
    linear-gradient(135deg, #060B18, #0A1326 54%, #101633) padding-box,
    linear-gradient(90deg, #4F46E5, #06B6D4, #FBBF24) border-box;
}

.mp-tech-page .mp-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(56, 189, 248, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.08) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(112deg, transparent 22%, #000);
}

.mp-tech-page .mp-footer::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1.5px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 10%, #38BDF8 50%, transparent 90%);
  opacity: 0;
}

/* Smooth Atom Loader */
.mp-tech-loader {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1100;
  place-items: center;
  pointer-events: none;
  background: radial-gradient(ellipse at center, #141E38, #050914 68%);
  color: #E2E8F0;
}

.mp-tech-loader-badge {
  display: grid;
  justify-items: center;
  gap: .8rem;
  font-size: .86rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  padding: 1rem;
  text-align: center;
}

.mp-tech-atom {
  position: relative;
  display: grid;
  place-items: center;
  width: 4.25rem;
  height: 4.25rem;
}

.mp-tech-atom::after {
  content: "";
  width: .52rem;
  height: .52rem;
  border-radius: 50%;
  background: var(--tech-gold);
  box-shadow: 0 0 18px var(--tech-gold);
}

.mp-tech-atom > i {
  position: absolute;
  width: 100%;
  height: 43%;
  border: 1.5px solid var(--tech-cyan);
  border-radius: 50%;
}
.mp-tech-atom > i:nth-child(2) { transform: rotate(60deg); border-color: #818CF8; }
.mp-tech-atom > i:nth-child(3) { transform: rotate(120deg); }

@media (prefers-reduced-motion: no-preference) {
  .mp-tech-main::before {
    animation: mp-tech-float-dots 22s ease-in-out infinite alternate;
  }
  .mp-tech-stage::before {
    animation: mp-tech-wave-pulse 14s ease-in-out infinite alternate;
  }
  .mp-tech-orbit > span {
    animation: mp-tech-spin-slow 26s linear infinite;
  }
  .mp-tech-orbit::before {
    animation: mp-tech-spin-rev 38s linear infinite;
  }
  .mp-tech-page .mp-footer::after {
    animation: mp-tech-scan 5.5s ease-in-out infinite;
  }
  .mp-tech-loader {
    display: grid;
    animation: mp-tech-loader-exit .72s ease-out both;
  }
  .mp-tech-atom {
    animation: mp-tech-spin-slow .85s ease-out both;
  }
  .mp-tech-page:focus-within .mp-tech-loader { display: none; }
}

@keyframes mp-tech-float-dots {
  0%   { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(18px, -22px, 0); }
}
@keyframes mp-tech-wave-pulse {
  0%   { transform: translate3d(-4%, 2%, 0) scale(1); opacity: 0.78; }
  100% { transform: translate3d(4%, -2%, 0) scale(1.06); opacity: 1; }
}
@keyframes mp-tech-spin-slow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes mp-tech-spin-rev {
  from { transform: rotate(360deg); }
  to   { transform: rotate(0deg); }
}
@keyframes mp-tech-scan {
  0%   { transform: translateX(-70%); opacity: 0; }
  40%  { opacity: 0.9; }
  100% { transform: translateX(70%); opacity: 0; }
}
@keyframes mp-tech-loader-exit {
  0%, 28% { opacity: 1; visibility: visible; }
  100%    { opacity: 0; visibility: hidden; }
}

@media (max-width: 575.98px) {
  .mp-tech-main { background-size: auto, auto, 28px 28px, 28px 28px; }
  .mp-tech-orbit { right: -35%; top: -6%; }
}
