/* ==========================================================================
   Login Page - Aplikasi Pencarian Jodoh
   Background full screen + kartu login center + efek kilatan flash
   pada posisi 2 orang yang duduk pada gambar background
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    width: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.login-page {
    position: relative;
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: #1a1108; /* fallback warna gelap sebelum gambar load */
}

/* Background image full cover */
.bg-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-image: url('../img/bg-login.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    z-index: 1;
}

/* Lapisan gelap tipis agar kartu login lebih kontras */
.bg-overlay {
    position: absolute;
    inset: 0;
    background: rgba(20, 12, 5, 0.35);
    z-index: 2;
}

/* ==========================================================================
   Efek Kilatan Flash - hanya diposisikan pada area 2 orang duduk
   Posisi diset dalam persentase relatif terhadap ukuran gambar background
   (kira-kira 50% lebar, 57% tinggi -> lokasi kedua figur pada gambar)
   ========================================================================== */
.flash-effect {
    position: absolute;
    top: 57%;
    left: 50%;
    width: 260px;
    height: 260px;
    transform: translate(-50%, -50%);
    z-index: 3;
    pointer-events: none;
    border-radius: 50%;
    background: radial-gradient(circle,
        rgba(255, 255, 255, 0.9) 0%,
        rgba(255, 250, 220, 0.55) 25%,
        rgba(255, 240, 180, 0.15) 50%,
        rgba(255, 255, 255, 0) 70%);
    opacity: 0;
    animation: cameraFlash 4.5s ease-in-out infinite;
}

.flash-effect::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 20px 8px rgba(255, 255, 255, 0.9);
}

/* Kilatan kecil tambahan (sparkle) supaya terasa seperti jepretan kamera */
.flash-effect .sparkle {
    position: absolute;
    background: #fff;
    border-radius: 50%;
    opacity: 0;
}
.sparkle-1 { width: 4px; height: 4px; top: 30%; left: 40%; animation: sparkleTwinkle 4.5s ease-in-out infinite; animation-delay: 0.1s; }
.sparkle-2 { width: 3px; height: 3px; top: 60%; left: 65%; animation: sparkleTwinkle 4.5s ease-in-out infinite; animation-delay: 0.3s; }
.sparkle-3 { width: 5px; height: 5px; top: 65%; left: 35%; animation: sparkleTwinkle 4.5s ease-in-out infinite; animation-delay: 0.5s; }

@keyframes cameraFlash {
    0%, 88% { opacity: 0; }
    90% { opacity: 1; }
    92% { opacity: 0.4; }
    94% { opacity: 1; }
    97% { opacity: 0; }
    100% { opacity: 0; }
}

@keyframes sparkleTwinkle {
    0%, 85% { opacity: 0; transform: scale(0.5); }
    90% { opacity: 1; transform: scale(1.3); }
    95% { opacity: 0; transform: scale(0.5); }
    100% { opacity: 0; }
}

/* ==========================================================================
   Kartu Login (posisi center)
   ========================================================================== */
.login-card {
    position: relative;
    z-index: 4;
    width: 100%;
    max-width: 380px;
    margin: 20px;
    padding: 36px 32px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(6px);
    border-radius: 16px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.35);
    text-align: center;
}

.login-card .logo-title {
    font-size: 22px;
    font-weight: 700;
    color: #7a1f1f;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.login-card .logo-subtitle {
    font-size: 13px;
    color: #6b6b6b;
    margin-bottom: 24px;
}

.form-group {
    text-align: left;
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #444;
    margin-bottom: 6px;
}

.input-wrapper {
    position: relative;
}

.input-wrapper i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 15px;
}

.form-group input {
    width: 100%;
    padding: 12px 14px 12px 40px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
}

.form-group input:focus {
    border-color: #b5352f;
    box-shadow: 0 0 0 3px rgba(181, 53, 47, 0.12);
}

.toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #999;
    font-size: 14px;
    background: none;
    border: none;
}

.btn-login {
    width: 100%;
    padding: 13px;
    margin-top: 6px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #b5352f, #7a1f1f);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
    letter-spacing: 0.3px;
}

.btn-login:hover {
    opacity: 0.92;
}

.btn-login:active {
    transform: scale(0.98);
}

.alert {
    text-align: left;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
}

.alert-error {
    background: #fdecea;
    color: #7a1f1f;
    border: 1px solid #f3c1bd;
}

.alert-success {
    background: #e9f7ef;
    color: #1e6b3c;
    border: 1px solid #b6e2c6;
}

.login-footer {
    margin-top: 20px;
    font-size: 12px;
    color: #888;
}

/* ==========================================================================
   Responsive - Smartphone
   ========================================================================== */
@media (max-width: 480px) {
    .login-card {
        max-width: 92%;
        padding: 28px 22px;
        border-radius: 14px;
    }

    .flash-effect {
        width: 160px;
        height: 160px;
    }

    .login-card .logo-title {
        font-size: 19px;
    }
}

@media (max-width: 360px) {
    .login-card {
        padding: 22px 18px;
    }
}
