/* AndhraTwin 3D console loader (same design as MahaTwin's): a perspective grid
   floor, orbit rings and a tumbling wireframe cube with a glowing core; the steps
   light up as each part of the twin becomes ready. Scoped to .ap-loader. */
.ap-loader { position: fixed; inset: 0; z-index: 99990; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 34px; overflow: hidden;
  --tc: #22d3ee; perspective: 1000px; color: #e6edf7; font: 14px/1.5 'Space Grotesk', system-ui, sans-serif;
  background: radial-gradient(ellipse 60% 50% at 50% 42%, color-mix(in srgb, var(--tc) 16%, transparent), transparent 70%), radial-gradient(ellipse at 50% 120%, #0b1730, #03060d 60%);
  transition: opacity .7s ease .15s, visibility 0s linear .9s; }
.ap-loader.done { opacity: 0; visibility: hidden; pointer-events: none; }
.ap-loader .ld-floor { position: absolute; left: -50%; right: -50%; bottom: -12%; height: 62%; transform-origin: 50% 0; transform: rotateX(74deg); opacity: .55;
  background-image: linear-gradient(color-mix(in srgb, var(--tc) 55%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--tc) 40%, transparent) 1px, transparent 1px);
  background-size: 56px 56px; animation: apld-floor 1.1s linear infinite;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 35%, #000 70%, transparent); mask-image: linear-gradient(to bottom, transparent, #000 35%, #000 70%, transparent); }
.ap-loader .ld-stage { position: relative; width: 220px; height: 220px; transform-style: preserve-3d; animation: apld-rise .6s ease both; transition: transform .9s cubic-bezier(.6,0,.4,1), opacity .7s; }
.ap-loader .ld-scene { position: absolute; inset: 0; transform-style: preserve-3d; animation: apld-tumble 9s linear infinite; }
.ap-loader .ld-cube { position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; transform-style: preserve-3d; animation: apld-cube 7s cubic-bezier(.45,.05,.55,.95) infinite; }
.ap-loader .ld-cube b { position: absolute; inset: 0; border: 1.5px solid color-mix(in srgb, var(--tc) 85%, #fff); border-radius: 6px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--tc) 22%, transparent), color-mix(in srgb, var(--tc) 4%, transparent));
  box-shadow: 0 0 18px -2px color-mix(in srgb, var(--tc) 70%, transparent), inset 0 0 22px -6px var(--tc); animation: apld-glow 2.4s ease-in-out infinite; }
.ap-loader .ld-cube .f1 { transform: translateZ(38px); } .ap-loader .ld-cube .f2 { transform: rotateY(180deg) translateZ(38px); }
.ap-loader .ld-cube .f3 { transform: rotateY(90deg) translateZ(38px); } .ap-loader .ld-cube .f4 { transform: rotateY(-90deg) translateZ(38px); }
.ap-loader .ld-cube .f5 { transform: rotateX(90deg) translateZ(38px); } .ap-loader .ld-cube .f6 { transform: rotateX(-90deg) translateZ(38px); }
.ap-loader .ld-cube .ic { inset: 22px; border-radius: 50%; border: 0; background: radial-gradient(circle, #fff, var(--tc) 45%, transparent 70%); box-shadow: 0 0 30px 6px color-mix(in srgb, var(--tc) 60%, transparent); }
.ap-loader .ld-orbit { position: absolute; left: 50%; top: 50%; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--tc) 45%, transparent); transform-style: preserve-3d;
  box-shadow: 0 0 12px -4px var(--tc); animation: apld-orbit var(--t) linear infinite; transform: rotateX(var(--rx)) rotateY(var(--ry)); }
.ap-loader .ld-orbit i { position: absolute; top: -4px; left: 50%; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: #fff; box-shadow: 0 0 10px 3px var(--tc), 0 0 22px 6px color-mix(in srgb, var(--tc) 50%, transparent); }
.ap-loader .ld-orbit.o1 { width: 150px; height: 150px; margin: -75px 0 0 -75px; --rx: 72deg; --ry: 0deg; --t: 3.2s; }
.ap-loader .ld-orbit.o2 { width: 184px; height: 184px; margin: -92px 0 0 -92px; --rx: 60deg; --ry: 50deg; --t: 4.6s; border-color: rgba(167,139,250,.5); }
.ap-loader .ld-orbit.o2 i { background: #f5f3ff; box-shadow: 0 0 10px 3px #a78bfa, 0 0 22px 6px rgba(167,139,250,.5); }
.ap-loader .ld-orbit.o3 { width: 216px; height: 216px; margin: -108px 0 0 -108px; --rx: 64deg; --ry: -48deg; --t: 6.4s; border-style: dashed; opacity: .7; }
.ap-loader .ld-core { position: absolute; left: 50%; top: 50%; width: 30px; height: 30px; transform: translate(-50%, -50%); animation: apld-core 2.6s steps(1, end) infinite; pointer-events: none; }
.ap-loader .ld-core svg { width: 100%; height: 100%; fill: #fff; }
.ap-loader .ld-text { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 10px; animation: apld-rise .6s ease .15s both; transition: opacity .5s, transform .6s; text-align: center; padding: 0 16px; }
.ap-loader .ld-text h2 { margin: 0; font: 400 26px/1 'Marcellus SC', 'Space Grotesk', serif; letter-spacing: .14em; color: #fff; text-shadow: 0 0 22px color-mix(in srgb, var(--tc) 70%, transparent); }
.ap-loader .ld-text p { margin: 0; font: 400 13.5px 'Marcellus SC', 'Space Grotesk', serif; letter-spacing: .06em; color: #8b9bb7; }
.ap-loader .ld-steps { list-style: none; display: flex; gap: 16px; margin: 6px 0 0; padding: 0; font: 400 11.5px 'Space Grotesk', system-ui, sans-serif; color: #5d6c88; flex-wrap: wrap; justify-content: center; }
.ap-loader .ld-steps li { display: flex; align-items: center; gap: 6px; transition: color .3s; }
.ap-loader .ld-steps li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; border: 1px solid rgba(148,163,184,.26); transition: background .3s, box-shadow .3s, border-color .3s; }
.ap-loader .ld-steps li.active { color: #e2e8f0; } .ap-loader .ld-steps li.active::before { border-color: var(--tc); animation: apld-glow 1s ease-in-out infinite; box-shadow: 0 0 8px var(--tc); }
.ap-loader .ld-steps li.ok { color: #8b9bb7; } .ap-loader .ld-steps li.ok::before { background: var(--tc); border-color: var(--tc); box-shadow: 0 0 8px var(--tc); }
.ap-loader .ld-bar { position: relative; width: min(340px, 70vw); height: 3px; margin-top: 4px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.ap-loader .ld-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 3%; border-radius: inherit; background: linear-gradient(90deg, var(--tc), #a78bfa, #f0abfc); box-shadow: 0 0 10px var(--tc); transition: width .35s ease; overflow: hidden; }
.ap-loader .ld-bar i::after { content: ""; position: absolute; inset: 0; width: 30%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.8), transparent); animation: apld-shine 1.3s ease-in-out infinite; }
.ap-loader .ld-pct { font: 500 11px 'JetBrains Mono', ui-monospace, monospace; color: #5d6c88; letter-spacing: .08em; }
.ap-loader.done .ld-stage { transform: translateZ(520px) scale(1.4); opacity: 0; }
.ap-loader.done .ld-text { opacity: 0; transform: translateY(14px); }
@keyframes apld-floor { from { background-position: 0 0, 0 0; } to { background-position: 0 56px, 0 0; } }
@keyframes apld-tumble { from { transform: rotateX(-24deg) rotateY(0deg) rotateZ(8deg); } to { transform: rotateX(-24deg) rotateY(360deg) rotateZ(8deg); } }
@keyframes apld-cube { 0% { transform: rotateX(0) rotateY(0); } 50% { transform: rotateX(180deg) rotateY(90deg); } 100% { transform: rotateX(360deg) rotateY(360deg); } }
@keyframes apld-orbit { to { transform: rotateX(var(--rx)) rotateY(var(--ry)) rotateZ(360deg); } }
@keyframes apld-core { 0%, 100% { opacity: .75; transform: translate(-50%, -50%) scale(.92); filter: drop-shadow(0 0 6px var(--tc)) drop-shadow(0 0 16px var(--tc)); }
  47% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); filter: drop-shadow(0 0 10px var(--tc)) drop-shadow(0 0 26px var(--tc)); } 50% { opacity: .35; } 53% { opacity: 1; } }
@keyframes apld-glow { 0%, 100% { opacity: .55; } 50% { opacity: .95; } }
@keyframes apld-shine { from { transform: translateX(-100%); } to { transform: translateX(300%); } }
@keyframes apld-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (max-width: 700px) { .ap-loader .ld-stage { transform: scale(.75); } }
@media (prefers-reduced-motion: reduce) {
  .ap-loader .ld-floor, .ap-loader .ld-scene, .ap-loader .ld-cube, .ap-loader .ld-cube b, .ap-loader .ld-orbit, .ap-loader .ld-core, .ap-loader .ld-bar i::after, .ap-loader .ld-steps li.active::before { animation: none; }
}
