/* Latar halaman login untuk mode login-google-only.
   Salinan dari apps/clean-template/index.html supaya perubahan template
   tidak memengaruhi halaman login. */

body.login-google-only {
  --night: #2A2260; --dusk: #5B3B8C; --sunset: #C4508B; --sky4: #E8845C;
  --gold: #F5C542; --gold2: #D99A1B;
  --sand: #F0C878; --sand2: #DBA84E;
  background: linear-gradient(180deg, var(--night) 0%, var(--dusk) 38%, var(--sunset) 62%, var(--sky4) 76%, var(--sand) 92%);
  overflow-x: hidden;
}

.login-scene { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
body.login-google-only #mainContent { position: relative; z-index: 3; }

/* ================= LANGIT MALAM ================= */
.login-scene #stars { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.login-scene .tw { position: absolute; background: #fff; border-radius: 50%; animation: twinkle ease-in-out infinite; }
@keyframes twinkle { 0%,100% { opacity: .15; transform: scale(.7) } 50% { opacity: 1; transform: scale(1.25) } }

.login-scene .shoot { position: fixed; top: 8%; left: -8%; width: 110px; height: 3px; border-radius: 3px; z-index: 0;
  background: linear-gradient(90deg, rgba(255,255,255,0), #fff); transform: rotate(16deg);
  animation: shoot 1.6s ease-in forwards; pointer-events: none; }
.login-scene .shoot.dariKanan { left: auto; right: -8%; transform: rotate(-16deg);
  background: linear-gradient(270deg, rgba(255,255,255,0), #fff); animation-name: shootBalik; }
@keyframes shoot { to { transform: translate(125vw, 36vh) rotate(16deg); opacity: 0; } }
@keyframes shootBalik { to { transform: translate(-125vw, 36vh) rotate(-16deg); opacity: 0; } }

.login-scene .moon { position: fixed; top: 26px; left: 26px; width: 74px; height: 74px; border-radius: 50%; z-index: 0;
  background: transparent; box-shadow: 16px 8px 0 0 #FFF4C9; filter: drop-shadow(0 0 18px rgba(255,244,180,.8));
  animation: moonFloat 7s ease-in-out infinite; }
@keyframes moonFloat { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-9px) } }

/* ================= LENTERA ================= */
.login-scene .lantern { position: fixed; top: 0; left: var(--x, 9%); z-index: 2; transform-origin: top center;
  animation: swing 4.2s ease-in-out infinite; pointer-events: none; transition: left 1.4s ease-in-out; }
.login-scene .lantern.l2 { animation-delay: -2.1s; }
@keyframes swing { 0%,100% { transform: rotate(7deg) } 50% { transform: rotate(-7deg) } }
.login-scene .lantern .rope { width: 3px; height: 56px; background: var(--gold2); margin: 0 auto; }
.login-scene .lantern .top { width: 22px; height: 9px; background: var(--gold2); border-radius: 6px 6px 0 0; margin: 0 auto; }
.login-scene .lantern .body { width: 34px; height: 46px; margin: 0 auto; border-radius: 10px 10px 14px 14px;
  background: linear-gradient(180deg, #FFE9A8, var(--gold)); border: 3px solid var(--gold2); position: relative;
  animation: glowPulse 2.6s ease-in-out infinite; }
@keyframes glowPulse { 0%,100% { box-shadow: 0 0 14px 3px rgba(245,197,66,.55) } 50% { box-shadow: 0 0 26px 8px rgba(245,197,66,.9) } }
.login-scene .lantern .body::before { content: ""; position: absolute; inset: 6px 7px; border: 2px solid rgba(217,154,27,.75); border-radius: 7px; }
.login-scene .lantern .tail { width: 10px; height: 12px; background: var(--gold2); margin: 0 auto; border-radius: 0 0 6px 6px; }

/* ================= PERMADANI ================= */
.login-scene .carpet { position: fixed; top: var(--y, 21%); left: -30vw; z-index: 1; pointer-events: none;
  animation: permadaniNaik 6s ease-in-out infinite; }
@keyframes permadaniNaik { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-16px) } }
.login-scene .carpet .mat { width: 110px; height: 34px; border-radius: 8px; position: relative;
  background: repeating-linear-gradient(90deg, #B23A67 0 14px, #8C2B77 14px 28px);
  border: 3px solid var(--gold); animation: ripple 1.6s ease-in-out infinite; }
@keyframes ripple { 0%,100% { transform: rotate(-4deg) } 50% { transform: rotate(4deg) } }
.login-scene .carpet .mat::before,
.login-scene .carpet .mat::after { content: ""; position: absolute; top: 6px; bottom: 6px; width: 0; border-left: 4px dotted var(--gold); }
.login-scene .carpet .mat::before { left: -9px }
.login-scene .carpet .mat::after { right: -9px }
.login-scene .carpet .rider { position: absolute; top: -22px; left: 38px; font-size: 22px; }

/* ================= HORIZON ================= */
.login-scene .horizon { position: fixed; bottom: 0; left: 0; width: 100%; height: 190px; z-index: 0; pointer-events: none; }
.login-scene .mosque { position: absolute; bottom: 76px; left: 50%; transform: translateX(-50%); width: 290px; height: 120px; }
.login-scene .mq { position: absolute; background: #1E1850; }
.login-scene .dome { bottom: 34px; left: 95px; width: 100px; height: 56px; border-radius: 50% 50% 6px 6px / 100% 100% 6px 6px; }
.login-scene .dome::after { content: ""; position: absolute; top: -26px; left: 46px; width: 4px; height: 26px; background: #1E1850; }
.login-scene .dome::before { content: "🌙"; position: absolute; top: -44px; left: 38px; font-size: 15px; filter: grayscale(1) brightness(3); }
.login-scene .hall { bottom: 0; left: 55px; width: 180px; height: 40px; border-radius: 8px 8px 0 0; }
.login-scene .min { bottom: 0; width: 16px; height: 104px; border-radius: 6px 6px 0 0; }
.login-scene .min::before { content: ""; position: absolute; top: -14px; left: -4px; width: 24px; height: 16px; background: #1E1850; border-radius: 50% 50% 4px 4px; }
.login-scene .m1 { left: 22px }
.login-scene .m2 { right: 22px }
.login-scene .win { position: absolute; bottom: 8px; width: 12px; height: 20px; background: var(--gold); border-radius: 8px 8px 0 0; animation: winGlow 3s ease-in-out infinite; }
@keyframes winGlow { 0%,100% { opacity: .65 } 50% { opacity: 1 } }
.login-scene .w1 { left: 85px }
.login-scene .w2 { left: 115px; animation-delay: .7s }
.login-scene .w3 { left: 163px; animation-delay: 1.2s }
.login-scene .w4 { left: 193px; animation-delay: .3s }
.login-scene .dune { position: absolute; bottom: -46px; border-radius: 50% 50% 0 0; }
.login-scene .d1 { left: -14%; width: 62%; height: 120px; background: var(--sand2); }
.login-scene .d2 { right: -16%; width: 68%; height: 104px; background: #E7B85F; }
.login-scene .d3 { left: 18%; width: 75%; height: 78px; background: var(--sand); }
.login-scene .palm { position: absolute; bottom: 56px; font-size: 44px; transform-origin: bottom center; animation: sway 5s ease-in-out infinite; }
.login-scene .p1 { left: 6% }
.login-scene .p2 { right: 7%; animation-delay: -2.4s; font-size: 38px; }
@keyframes sway { 0%,100% { transform: rotate(-4deg) } 50% { transform: rotate(5deg) } }
.login-scene .camelWalk { position: absolute; bottom: var(--y, 40px); left: -14%; font-size: 34px; transform: scaleX(var(--arah, -1)); }

/* ================= APRESIASI: HUJAN BINTANG ================= */
.login-scene .confetti { position: fixed; top: -30px; font-size: 22px; z-index: 50; pointer-events: none;
  will-change: transform; animation: loginFall linear forwards; }
@keyframes loginFall { to { transform: translate(var(--dx, 0), 112vh) rotate(var(--rot, 560deg)); opacity: .5; } }

@media (prefers-reduced-motion: reduce) {
  .login-scene *, .login-scene *::before, .login-scene *::after { animation: none !important; transition: none !important; }
}
