/* * login.css - Final Fix: Anti-Bug, Center Lamp & Deep Glassmorphism */

:root {
    --primary-blue: #004a99;
    --accent-gold: #d4af37;
    --neon-blue: #00d2ff;
    --glass-bg: rgba(255, 255, 255, 0.08); 
    --glass-border: rgba(255, 255, 255, 0.2);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    height: 100vh;
    font-family: 'Poppins', sans-serif;
    background: url('gereja.jpeg') no-repeat center center/cover;
    display: flex; flex-direction: column;
    justify-content: flex-end; align-items: center;
    overflow: hidden; padding-bottom: 30px; 
}

/* ==================================================
   FIX BUG: OVERLAY MENGGUNAKAN OPACITY (ANTI-GLITCH)
   ================================================== */
.bg-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: #00050f; /* Warna gelap solid */
    z-index: 1; 
    opacity: 0.95; /* Gelap pekat di awal */
    transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Gradasi bawah tambahan agar teks putih tetap terbaca saat lampu nyala */
.bg-overlay::after {
    content: '';
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, transparent 50%, rgba(0, 20, 50, 0.8) 100%);
    opacity: 0;
    transition: opacity 1.2s ease;
}

.light-cone {
    position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 150vw; height: 150vh;
    background: radial-gradient(circle at top center, rgba(255, 230, 150, 0.2) 0%, transparent 70%);
    opacity: 0; z-index: 2;
    transition: opacity 1.5s ease;
    pointer-events: none;
}

/* KONDISI LAMPU NYALA */
body.lights-on .bg-overlay { opacity: 0.3; } /* Ruangan menjadi terang */
body.lights-on .bg-overlay::after { opacity: 1; }
body.lights-on .light-cone { opacity: 1; }

/* ==================================================
   LAMPU GANTUNG (PRESISI TENGAH LINGKARAN)
   ================================================== */
.vintage-lamp-container {
    position: absolute; 
    top: -50px; /* Sesuaikan naik turunnya di sini */
    left: 51.5%; /* TEPAT DI TENGAH HORIZONTAL */
    z-index: 999; display: flex; flex-direction: column; align-items: center;
    cursor: pointer;
    transform-origin: top center;
    animation: swingLamp 6s ease-in-out infinite;
}

@keyframes swingLamp {
    0%, 100% { transform: translateX(-50%) rotate(1deg); }
    50% { transform: translateX(-50%) rotate(-1deg); }
}

.lamp-wire {
    width: 1px; 
    height: 19vh; /* Sesuaikan panjang kabel agar bohlam pas di lingkaran dinding */
    background: #222;
    box-shadow: 0 0 5px rgba(0,0,0,0.5);
}

.lamp-fixture {
    width: 20px; height: 15px;
    background: #111; border-radius: 4px 4px 0 0;
    position: relative; z-index: 2;
}

.lamp-glass {
    width: 42px; height: 58px; background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; 
    margin-top: -2px; position: relative; z-index: 1;
    display: flex; justify-content: center; align-items: center;
    backdrop-filter: blur(1px); transition: all 0.5s ease;
}

.lamp-filament {
    width: 6px; height: 20px; border: 1px solid rgba(255, 180, 50, 0.2);
    border-radius: 3px; transition: all 0.5s ease;
}

/* EFEK NYALA LAMPU */
body.lights-on .lamp-glass {
    background: rgba(255, 240, 200, 0.4);
    border-color: rgba(255, 210, 100, 0.6);
    box-shadow: 0 0 50px rgba(255, 210, 100, 0.6), inset 0 0 15px rgba(255, 255, 255, 0.5);
}

body.lights-on .lamp-filament {
    background: #fff; border-color: #fff;
    box-shadow: 0 0 15px #fff, 0 0 25px var(--accent-gold);
}

.lamp-hint {
    position: absolute; top: calc(19vh + 85px); white-space: nowrap;
    color: rgba(255,255,255,0.3); font-size: 0.7rem; font-weight: 500;
    letter-spacing: 2px; text-transform: uppercase;
    transition: 0.5s; pointer-events: none;
}
body.lights-on .lamp-hint { opacity: 0; }

/* ==================================================
   PANEL DOCK ULTRA TRANSPARAN (AESTHETIC)
   ================================================== */
.login-dock-container {
    position: relative; z-index: 10; width: 100%; max-width: 1100px; padding: 0 20px;
    transform: translateY(100px); opacity: 0; 
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

body.lights-on .login-dock-container { transform: translateY(0); opacity: 1; pointer-events: auto; }

.login-dock {
    background: var(--glass-bg); 
    backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
    border-radius: 24px; padding: 20px 35px; 
    border: 1px solid var(--glass-border); 
    display: flex; justify-content: space-between; align-items: center; gap: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.dock-left { display: flex; align-items: center; gap: 15px; }
.dock-logo {
    width: 60px; height: 60px; background: rgba(255,255,255,0.9);
    border-radius: 50%; padding: 8px; border: 1px solid var(--accent-gold);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
.dock-logo img { width: 100%; height: auto; }

.dock-title h2 { color: #fff; font-size: 1.3rem; font-weight: 700; font-family: 'Playfair Display', serif; text-shadow: 0 2px 4px rgba(0,0,0,0.3); }
.dock-title p { color: rgba(255,255,255,0.7); font-size: 0.8rem; }

.dock-center { display: flex; gap: 15px; flex: 1; justify-content: center; }

/* INPUT BOX TRANSPARAN */
.input-group { position: relative; width: 100%; max-width: 260px; }
.input-group i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: rgba(255,255,255,0.5); }

.input-group input {
    width: 100%; padding: 12px 15px 12px 42px; 
    border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 12px;
    background: rgba(255, 255, 255, 0.05); color: #fff;
    font-family: inherit; font-size: 0.9rem; outline: none; transition: 0.3s;
}

.input-group input:focus {
    border-color: var(--neon-blue); background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.5);
}

.input-group input::placeholder { color: rgba(255,255,255,0.4); }

.btn-login {
    padding: 12px 30px; background: var(--primary-blue);
    color: white; border: none; border-radius: 12px;
    font-weight: 600; cursor: pointer; transition: 0.3s;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.btn-login:hover { background: var(--accent-gold); transform: translateY(-2px); }

.dock-footer { display: flex; justify-content: space-between; width: 100%; padding: 15px 25px 0; }
.back-link { color: rgba(255,255,255,0.5); text-decoration: none; font-size: 0.85rem; transition: 0.3s; }
.back-link:hover { color: #fff; }
.copyright { color: rgba(255,255,255,0.3); font-size: 0.75rem; }

.error-message {
    background: rgba(231, 76, 60, 0.8); color: #fff;
    padding: 8px 20px; border-radius: 20px; font-size: 0.8rem;
    margin-bottom: 10px; display: none; backdrop-filter: blur(5px);
}

/* RESPONSIVE */
@media (max-width: 992px) {
    .login-dock { flex-direction: column; padding: 25px; }
    .dock-center { flex-direction: column; width: 100%; }
    .input-group { max-width: 100%; }
    .btn-login { width: 100%; }
    .lamp-wire { height: 12vh; }
}