.site-loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: rgba(245, 249, 247, 0.68);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: opacity 0.2s ease;
}

.site-loader[hidden] {
  display: none !important;
}

.site-loader.is-initial {
  background: #f4f7f5;
}

.loader-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 38px 46px;
  border: 1.5px solid rgba(7, 110, 99, 0.18);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 70px rgba(7, 110, 99, 0.18), 0 8px 24px rgba(15, 23, 42, 0.08);
  min-width: 250px;
  animation: loader-appear 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Central Visual Container with Orbit & Waves */
.loader-visual-container {
  position: relative;
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
}

/* Ambient Pulsing Aura */
.loader-aura-glow {
  position: absolute;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 101, 0, 0.35) 0%, rgba(7, 110, 99, 0.22) 55%, transparent 75%);
  filter: blur(14px);
  animation: loader-aura-breathe 2.4s ease-in-out infinite alternate;
  pointer-events: none;
}

/* Expanding Radar Ripple Waves Outside Circle */
.loader-ripple-wave {
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  border: 2px solid #076e63;
  opacity: 0;
  pointer-events: none;
}

.loader-ripple-wave.ripple-1 {
  animation: loader-ripple 2.4s cubic-bezier(0.1, 0.8, 0.3, 1) infinite;
}

.loader-ripple-wave.ripple-2 {
  animation: loader-ripple 2.4s cubic-bezier(0.1, 0.8, 0.3, 1) infinite 0.8s;
}

.loader-ripple-wave.ripple-3 {
  animation: loader-ripple 2.4s cubic-bezier(0.1, 0.8, 0.3, 1) infinite 1.6s;
}

/* Outer Orbit Dual Spinning Rings */
.loader-orbit-outer {
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: #c96500;
  border-right-color: #076e63;
  filter: drop-shadow(0 0 6px rgba(201, 101, 0, 0.5)) drop-shadow(0 0 8px rgba(7, 110, 99, 0.4));
  animation: loader-spin 1.4s cubic-bezier(0.55, 0.05, 0.45, 0.95) infinite;
}

.loader-orbit-inner {
  position: absolute;
  inset: 15px;
  border-radius: 50%;
  border: 2px dashed rgba(7, 110, 99, 0.38);
  border-top-color: #076e63;
  border-bottom-color: #c96500;
  animation: loader-spin-rev 2.2s linear infinite;
}

/* Central Circle with Logo */
.loader-logo-circle {
  position: relative !important;
  width: 66px !important;
  height: 66px !important;
  border-radius: 50% !important;
  background: #ffffff !important;
  border: 2px solid rgba(7, 110, 99, 0.28) !important;
  box-shadow: inset 0 2px 6px rgba(255, 255, 255, 0.9), 0 10px 28px rgba(7, 110, 99, 0.22), 0 2px 10px rgba(201, 101, 0, 0.2) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 5 !important;
  overflow: hidden !important;
  animation: loader-logo-pulse 2.4s ease-in-out infinite alternate !important;
}

.loader-logo-shine {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 50% !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0) 100%) !important;
  border-top-left-radius: 50px !important;
  border-top-right-radius: 50px !important;
  pointer-events: none !important;
  z-index: 6 !important;
}

.loader-logo-img {
  display: block !important;
  width: 44px !important;
  height: 44px !important;
  max-width: 44px !important;
  max-height: 44px !important;
  object-fit: contain !important;
  z-index: 7 !important;
}

/* Legacy fallback support */
.loader-orbit {
  position: relative;
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
}
.loader-orbit:before, .loader-orbit:after {
  content: '';
  position: absolute;
  inset: 0;
  border: 2px solid #e4efe9;
  border-top-color: #176e56;
  border-right-color: #6bab90;
  border-radius: 50%;
  animation: loader-spin 1.2s linear infinite;
}
.loader-orbit:after {
  inset: 8px;
  border-top-color: transparent;
  border-bottom-color: #94c9ad;
  animation-direction: reverse;
  animation-duration: 1.8s;
}
.loader-mark {
  display: grid;
  grid-template-columns: repeat(2, 10px);
  gap: 4px;
  transform: rotate(-8deg);
}
.loader-mark i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: #176e56;
  animation: loader-breathe 1.2s ease-in-out infinite alternate;
}

/* Text and Progress Track */
.loader-card strong {
  font-size: 15px;
  font-weight: 750;
  color: #000000;
  max-width: 250px;
  text-align: center;
  line-height: 1.4;
}

.loader-track {
  height: 4px;
  width: 130px;
  background: rgba(7, 110, 99, 0.12);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.loader-track:after {
  content: '';
  display: block;
  width: 45%;
  height: 100%;
  background: linear-gradient(90deg, #c96500, #076e63);
  border-radius: inherit;
  animation: loader-slide 1.4s ease-in-out infinite;
  box-shadow: 0 0 8px rgba(7, 110, 99, 0.5);
}

/* Dark Mode */
[data-theme=dark] .site-loader {
  background: rgba(10, 16, 26, 0.78);
}

[data-theme=dark] .site-loader.is-initial {
  background: #0b111e;
}

[data-theme=dark] .loader-card {
  background: rgba(17, 24, 39, 0.95);
  border-color: rgba(7, 110, 99, 0.4);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6), 0 8px 30px rgba(7, 110, 99, 0.2);
}

[data-theme=dark] .loader-logo-circle {
  background: radial-gradient(circle at 35% 35%, #1e293b 0%, #0f172a 100%);
  border-color: rgba(7, 110, 99, 0.45);
  box-shadow: inset 0 2px 5px rgba(255, 255, 255, 0.1), 0 8px 24px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(201, 101, 0, 0.25);
}

[data-theme=dark] .loader-card strong {
  color: #ffffff;
}

[data-theme=dark] .loader-track {
  background: rgba(255, 255, 255, 0.1);
}

/* Animations */
@keyframes loader-spin {
  to { transform: rotate(360deg); }
}

@keyframes loader-spin-rev {
  to { transform: rotate(-360deg); }
}

@keyframes loader-aura-breathe {
  0% { transform: scale(0.85); opacity: 0.5; }
  100% { transform: scale(1.15); opacity: 0.95; }
}

@keyframes loader-ripple {
  0% { transform: scale(0.85); opacity: 0.85; border-color: #c96500; }
  50% { opacity: 0.5; border-color: #076e63; }
  100% { transform: scale(1.75); opacity: 0; border-color: rgba(7, 110, 99, 0); }
}

@keyframes loader-logo-pulse {
  0% { transform: scale(0.96); box-shadow: inset 0 2px 5px rgba(255, 255, 255, 0.9), 0 6px 18px rgba(7, 110, 99, 0.18), 0 2px 6px rgba(201, 101, 0, 0.15); }
  100% { transform: scale(1.04); box-shadow: inset 0 2px 5px rgba(255, 255, 255, 0.9), 0 12px 30px rgba(7, 110, 99, 0.3), 0 4px 12px rgba(201, 101, 0, 0.25); }
}

@keyframes loader-breathe {
  to { opacity: 0.35; transform: scale(0.75); }
}

@keyframes loader-slide {
  from { transform: translateX(-110%); }
  to { transform: translateX(330%); }
}

@keyframes loader-appear {
  from { opacity: 0; transform: translateY(8px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .loader-card,
  .loader-orbit-outer,
  .loader-orbit-inner,
  .loader-ripple-wave,
  .loader-aura-glow,
  .loader-logo-circle,
  .loader-track:after {
    animation: none !important;
  }
}
