/* =========================================================
   Latar animasi halaman akun (masuk, daftar, lupa sandi, verifikasi, reset)
   Dipakai bersama public/frontend/js/latar-akun.js. Tanpa pustaka luar.
   ========================================================= */

/* latar: gradasi biru tua yang bergeser pelan */
html body main section.pd-auth.pd-auth {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: linear-gradient(130deg, #f8fafc 0%, #eef2f7 40%, #e6edf5 70%, #f4efe3 100%);
    background-size: 220% 220%;
    animation: pdAkunGeser 26s ease-in-out infinite alternate;
    padding-bottom: 150px; /* ruang untuk gelombang */
}
@keyframes pdAkunGeser {
    from { background-position: 0% 30%; }
    to   { background-position: 100% 70%; }
}

/* kanvas partikel (disisipkan oleh latar-akun.js) */
.pd-auth-kanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* dua lapis gelombang di dasar */
html body .pd-auth::before,
html body .pd-auth::after {
    display: block;
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 130px;
    z-index: 1;
    pointer-events: none;
    background-repeat: repeat-x;
    background-size: 1440px 100%;
}
html body .pd-auth::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 130' preserveAspectRatio='none'%3E%3Cpath fill='%23132f5e' fill-opacity='.06' d='M0 60 C180 20 360 100 540 60 S900 20 1080 60 S1320 90 1440 60 V130 H0 Z'/%3E%3C/svg%3E");
    animation: pdAkunGelombang 38s linear infinite;
}
html body .pd-auth::after {
    height: 100px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 100' preserveAspectRatio='none'%3E%3Cpath fill='%23f2c12e' fill-opacity='.16' d='M0 50 C240 90 480 10 720 50 S1200 90 1440 50 V100 H0 Z'/%3E%3C/svg%3E");
    animation: pdAkunGelombang 56s linear infinite reverse;
}
@keyframes pdAkunGelombang {
    from { background-position-x: 0; }
    to   { background-position-x: -1440px; }
}

/* kartu/wadah di atas semua lapisan, masuk dengan halus */
html body .pd-auth-wadah {
    position: relative;
    z-index: 2;
    animation: pdAkunMasuk .75s cubic-bezier(.2, .75, .2, 1) both;
}
@keyframes pdAkunMasuk {
    from { opacity: 0; transform: translateY(22px) scale(.985); }
    to   { opacity: 1; transform: none; }
}
@media (min-width: 992px) {
    html body .pd-auth-wadah {
        box-shadow: 0 28px 70px rgba(19, 47, 94, .18), 0 4px 14px rgba(19, 47, 94, .08);
    }
}
@media (max-width: 991px) {
    html body .pd-auth-wadah .pd-auth-kartu {
        box-shadow: 0 20px 50px rgba(19, 47, 94, .16);
    }
}

/* gelembung air naik di panel samping */
html body .pd-auth-panel > *:not(.pd-auth-gelembung) { position: relative; z-index: 1; }
.pd-auth-gelembung {
    position: absolute;
    bottom: -40px;
    z-index: 0;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(circle at 32% 30%, rgba(255, 255, 255, .55), rgba(255, 255, 255, .12) 55%, rgba(255, 255, 255, .04) 100%);
    border: 1px solid rgba(255, 255, 255, .22);
    opacity: 0;
    animation: pdAkunGelembung linear infinite;
}
@keyframes pdAkunGelembung {
    0%   { transform: translate3d(0, 0, 0) scale(.7); opacity: 0; }
    12%  { opacity: .85; }
    50%  { transform: translate3d(14px, -300px, 0) scale(1); }
    100% { transform: translate3d(-10px, -640px, 0) scale(1.08); opacity: 0; }
}

/* hormati pengaturan "kurangi gerakan" */
@media (prefers-reduced-motion: reduce) {
    html body .pd-auth,
    html body .pd-auth::before,
    html body .pd-auth::after,
    html body .pd-auth-wadah,
    .pd-auth-gelembung { animation: none !important; }
    .pd-auth-gelembung { display: none; }
}
