/* ===== FALZZTOPUP LOGIN POLISH ===== */

/* Card lebih compact */
.login-card {
    padding: 34px 32px 23px;
    animation: loginCardEnter .75s cubic-bezier(.2,.8,.2,1) both;
    transform-origin: center;
}

@keyframes loginCardEnter {
    0% { opacity: 0; transform: translateY(24px) scale(.975); filter: blur(7px); }
    70% { filter: blur(0); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* Brand dan heading */
.brand {
    animation: loginElementEnter .65s .08s both;
}

.title-section {
    margin-bottom: 21px;
    animation: loginElementEnter .65s .15s both;
}

@keyframes loginElementEnter {
    from { opacity: 0; transform: translateY(13px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Form lebih rapat */
.login-form {
    gap: 13px;
}

.field-group {
    gap: 6px;
}

.field-label {
    margin-bottom: 1px;
}

.input-field {
    transition:
        border-color .25s ease,
        background .25s ease,
        box-shadow .3s ease,
        transform .25s ease;
}

.input-wrapper {
    transition: transform .25s ease;
}

.input-wrapper:focus-within {
    transform: translateY(-1px);
}

.field-group:nth-child(1) {
    animation: loginElementEnter .55s .2s both;
}

.field-group:nth-child(2) {
    animation: loginElementEnter .55s .28s both;
}

/* Jarak opsi dan tombol */
.options-row {
    margin-top: 1px;
    margin-bottom: 2px;
}

.btn-primary {
    margin-top: 2px;
    position: relative;
    overflow: hidden;
    transition: transform .25s ease, box-shadow .3s ease, filter .25s ease;
}

.btn-primary::before,
.btn-google::before {
    content: "";
    position: absolute;
    top: -100%;
    left: -70%;
    width: 45%;
    height: 300%;
    transform: rotate(25deg);
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.22), transparent);
    transition: left .65s ease;
    pointer-events: none;
}

.btn-primary:hover::before,
.btn-google:hover::before {
    left: 140%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(42,133,255,.3);
}

.btn-primary:active,
.btn-google:active {
    transform: scale(.985);
}

/* Divider dan Google lebih dekat */
.divider {
    margin: 17px 0 14px;
}

.btn-google {
    position: relative;
    overflow: hidden;
    transition: transform .25s ease, border-color .25s ease, background .25s ease;
}

.btn-google:hover {
    transform: translateY(-2px);
    border-color: rgba(112,183,255,.5);
}

.register-text {
    margin-top: 17px;
    margin-bottom: 4px;
}

/* Animasi elemen bawah */
.divider,
.btn-google,
.register-text,
.card-footer {
    animation: loginElementEnter .6s .35s both;
}

/* Ambient background tetap bergerak halus */
.glow {
    will-change: transform, opacity;
}

.glow-1 {
    animation-duration: 17s;
}

.glow-2 {
    animation-duration: 21s;
}

.glow-3 {
    animation-duration: 19s;
}

/* Efek cahaya lembut pada kartu */
.login-card::after {
    opacity: .7;
    animation: cardLightSweep 9s ease-in-out infinite;
}

@keyframes cardLightSweep {
    0%, 100% { opacity: .35; }
    50% { opacity: .8; }
}

/* Fokus keyboard */
.input-field:focus-visible,
.btn-primary:focus-visible,
.btn-google:focus-visible {
    outline: 2px solid rgba(103,190,255,.8);
    outline-offset: 3px;
}

/* Mobile */
@media (max-width: 480px) {
    .login-card {
        padding: 29px 21px 21px;
    }

    .login-form {
        gap: 12px;
    }

    .divider {
        margin: 16px 0 13px;
    }

    .register-text {
        margin-top: 15px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .login-card,
    .brand,
    .title-section,
    .field-group,
    .divider,
    .btn-google,
    .register-text,
    .card-footer {
        animation: none !important;
    }

    .glow,
    .login-card::after {
        animation: none !important;
    }
}
