:root {
    --primary-blue: #2980b9;
    --accent-green: #27ae60;
}

/* --- Global Fixes --- */
body, html {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(to right, #f7c4eb, #c1d70c, #8de61a);
    /* Mobile keyboard khulne par content cut na ho isliye overflow handling */
    overflow-x: hidden;
}

/* --- Animated Background Elements --- */
.bg-animation {
    position: fixed; /* Fixed taake scroll ke saath move na ho */
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    pointer-events: none;
    overflow: hidden; /* Bahar nikalte icons zoom/scroll paida nahi karenge */
}

.icon-flow {
    position: absolute;
    top: 50%;
    left: 50%;
    color: rgba(212, 5, 5, 0.8);
    font-size: 2rem;
    opacity: 0;
}

@keyframes explode {
    0% {
        transform: translate(0, 0) scale(0.5) rotate(0deg);
        opacity: 0;
    }

    20% {
        opacity: 1;
    }

    100% {
        transform: translate(var(--x), var(--y)) scale(1.2) rotate(360deg);
        opacity: 0;
    }
}

.dir-top {
    --x: 0;
    --y: -45vh;
}

.dir-down {
    --x: 0;
    --y: 45vh;
}

.dir-east {
    --x: 45vw;
    --y: 0;
}

.dir-west {
    --x: -45vw;
    --y: 0;
}

.dir-top-east {
    --x: 35vw;
    --y: -35vh;
}

.dir-top-west {
    --x: -35vw;
    --y: -35vh;
}

.dir-down-east {
    --x: 35vw;
    --y: 35vh;
}

.dir-down-west {
    --x: -35vw;
    --y: 35vh;
}

.icon-flow {
    animation: explode 4s ease-out infinite;
}

    .icon-flow:nth-child(even) {
        animation-delay: 1s;
    }

    .icon-flow:nth-child(odd) {
        animation-delay: 2.5s;
    }

/* --- Responsive Login Container --- */
.login-container {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh; /* height 100% se behtar mobile ke liye */
    padding: 20px; /* Mobile margins */
}

.login-box {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px); /* Safari support */
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.5);
    width: 100%;
    max-width: 420px;
    text-align: center;
    transition: transform 0.3s ease;
}

    .login-box:hover {
        transform: translateY(-5px);
    }

    .login-box img {
        width: 80px; /* Mobile par thora chota */
        margin-bottom: 15px;
        filter: drop-shadow(0 0 10px rgba(255,255,255,0.3));
    }

    .login-box h2 {
        color: #fff;
        font-weight: 300;
        letter-spacing: 2px;
        margin-bottom: 25px;
        font-size: 1.5rem;
    }

/* --- Form Controls & Anti-Zoom Fix --- */
.form-floating > .form-control {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 16px; /* 16px zaroori hai mobile auto-zoom rokne ke liye */
}

.form-floating > label {
    color: rgba(255,255,255,0.7);
}

.form-floating > .form-control:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-blue);
    box-shadow: 0 0 10px rgba(41, 128, 185, 0.5);
    color: white;
}

.btn-login {
    background: var(--primary-blue);
    border: none;
    padding: 12px;
    font-weight: bold;
    letter-spacing: 1px;
    transition: 0.4s;
    margin-top: 10px;
    color: white;
}

    .btn-login:hover {
        background: var(--accent-green);
        box-shadow: 0 0 20px rgba(39, 174, 96, 0.6);
    }

.erp-tagline {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    margin-top: 20px;
}

/* --- Media Queries for extra small devices --- */
@media (max-width: 480px) {
    .login-box {
        padding: 1.5rem;
        border-radius: 15px;
    }

        .login-box h2 {
            font-size: 1.25rem;
        }

    .icon-flow {
        font-size: 1.5rem; /* Mobile par icons thore chote */
    }
}
