/* ═══════════════════════════════════════════
   LOGIN PAGE — 3D ANIMATED BACKGROUND
   ═══════════════════════════════════════════ */

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
html::-webkit-scrollbar { width: 5px; }
html::-webkit-scrollbar-track { background: #e2e8f0; }
html::-webkit-scrollbar-thumb { background: #38bdf8; border-radius: 99px; }

/* ── Full-page background ── */
.lg-bg-wrapper {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: linear-gradient(135deg, #f0f9ff 0%, #ffffff 55%, #fff1f2 100%);
}

/* ── Grid overlay ── */
.lg-grid-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background-image:
        linear-gradient(rgba(56,189,248,0.09) 1px, transparent 1px),
        linear-gradient(90deg, rgba(56,189,248,0.09) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: lgGridMove 20s linear infinite;
}
@keyframes lgGridMove {
    0% { transform: translateY(0); }
    100% { transform: translateY(60px); }
}

/* ── Floating shapes ── */
.lg-shape {
    position: absolute;
    border-radius: 16px;
    opacity: 0.12;
    animation: lgShapeFloat 8s ease-in-out infinite;
}
.lg-shape-1 { width: 80px; height: 80px; border: 2px solid #a5b4fc; top: 10%; left: 8%; animation-delay: 0s; transform: rotate(15deg); }
.lg-shape-2 { width: 55px; height: 55px; background: #7dd3fc; top: 65%; right: 10%; animation-delay: 1.5s; border-radius: 50%; }
.lg-shape-3 { width: 45px; height: 45px; border: 2px solid #bae6fd; top: 28%; right: 20%; animation-delay: 2.8s; transform: rotate(45deg); }
.lg-shape-4 { width: 35px; height: 35px; background: #bae6fd; bottom: 18%; left: 10%; animation-delay: 2s; border-radius: 50%; }
.lg-shape-5 { width: 65px; height: 65px; border: 2px solid #fecdd3; bottom: 35%; right: 28%; animation-delay: 3.5s; transform: rotate(-20deg); }
.lg-shape-6 { width: 50px; height: 50px; border: 2px solid #fdba74; top: 55%; left: 4%; animation-delay: 4.2s; border-radius: 50%; opacity: 0.12; }
.lg-shape-7 { width: 40px; height: 40px; background: #fecdd3; top: 12%; right: 6%; animation-delay: 1.8s; border-radius: 12px; opacity: 0.12; }
.lg-shape-8 { width: 70px; height: 70px; border: 2px solid #7dd3fc; bottom: 10%; right: 15%; animation-delay: 5s; transform: rotate(30deg); }

@keyframes lgShapeFloat {
    0%, 100% { transform: translateY(0) rotate(var(--r, 15deg)); }
    50% { transform: translateY(-28px) rotate(calc(var(--r, 15deg) + 12deg)); }
}

/* ── Card ── */
.lg-card {
    width: 100%;
    max-width: 440px;
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(56, 189, 248, 0.28);
    border-radius: 1.5rem;
    padding: 2.5rem 2rem;
    box-shadow:
        0 0 70px rgba(56, 189, 248, 0.12),
        0 20px 45px rgba(15, 23, 42, 0.12);
}

/* ── Google Button ── */
.lg-google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 0.75rem;
    color: #334155;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}
.lg-google-btn:hover {
    background: #ffffff;
    border-color: rgba(56, 189, 248, 0.5);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.18);
    transform: translateY(-1px);
}

/* ── Inputs ── */
.lg-input-group {
    position: relative;
    display: flex;
    align-items: center;
}
.lg-input-icon {
    position: absolute;
    left: 1rem;
    color: rgba(71, 85, 105, 0.7);
    font-size: 1rem;
    pointer-events: none;
    transition: color 0.3s;
}
.lg-input {
    width: 100%;
    padding: 0.9rem 1rem 0.9rem 2.75rem;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.38);
    border-radius: 0.75rem;
    color: #0f172a;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: all 0.3s ease;
}
.lg-input::placeholder {
    color: rgba(100, 116, 139, 0.75);
}
.lg-input:focus {
    border-color: rgba(56, 189, 248, 0.75);
    background: #ffffff;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.18);
}
.lg-focused .lg-input-icon {
    color: #0284c7;
}

/* ── Password toggle ── */
.lg-toggle-pw {
    position: absolute;
    right: 0.8rem;
    background: none;
    border: none;
    color: rgba(71, 85, 105, 0.55);
    cursor: pointer;
    font-size: 1rem;
    padding: 0.25rem;
    transition: color 0.3s;
}
.lg-toggle-pw:hover { color: rgba(15, 23, 42, 0.8); }

/* ── Submit button ── */
.lg-submit-btn {
    width: 100%;
    padding: 0.95rem 1.5rem;
    background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
    border: none;
    border-radius: 0.75rem;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    box-shadow: 0 4px 20px rgba(2, 132, 199, 0.28);
}
.lg-submit-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #2563eb 0%, #0c4a6e 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}
.lg-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(2, 132, 199, 0.36);
}
.lg-submit-btn:hover::before {
    opacity: 1;
}
.lg-submit-btn:active {
    transform: translateY(0);
}

/* ── Reveal animation ── */
.reveal-lg {
    opacity: 0;
    transform: translateY(24px);
    animation: lgReveal 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: calc(var(--d, 0) * 0.1s + 0.2s);
}
@keyframes lgReveal {
    to { opacity: 1; transform: translateY(0); }
}
.reveal-lg.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Responsive ── */
@media (max-width: 640px) {
    .lg-card {
        max-width: 95%;
        padding: 2rem 1.25rem;
        border-radius: 1.2rem;
    }
    .lg-shape { opacity: 0.06; }
}
