﻿
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0f0c29;
    background: linear-gradient(to right, #24243e, #302b63, #0f0c29);
    position: relative;
    overflow: hidden;
    touch-action: pan-x pan-y;
}

/* Animated particles background */
.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    animation: float-particle 15s infinite;
}

@keyframes float-particle {
    0% {
        transform: translateY(100vh) translateX(0) scale(0);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(-100vh) translateX(100px) scale(1);
        opacity: 0;
    }
}

/* Glowing orbs */
.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    animation: float-glow 8s ease-in-out infinite;
}

.glow-orb-1 {
    width: 400px;
    height: 400px;
    background: rgba(138, 43, 226, 0.4);
    top: -200px;
    left: -200px;
}

.glow-orb-2 {
    width: 350px;
    height: 350px;
    background: rgba(255, 20, 147, 0.3);
    bottom: -150px;
    right: -150px;
    animation-delay: 2s;
}

.glow-orb-3 {
    width: 300px;
    height: 300px;
    background: rgba(0, 191, 255, 0.3);
    top: 50%;
    right: -150px;
    animation-delay: 4s;
}

@keyframes float-glow {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -30px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

.login-container {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    width: 100%;
    height: 100vh;
}

/* Login card with glassmorphism */
.login-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    padding: 25px 35px 25px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    border: 2px solid rgba(255, 255, 255, 0.18);
    position: relative;
    animation: card-entrance 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-style: preserve-3d;
    margin: 0 auto;
}

@keyframes card-entrance {
    0% {
        opacity: 0;
        transform: translateY(50px) rotateX(-10deg);
    }

    100% {
        opacity: 1;
        transform: translateY(0) rotateX(0);
    }
}

.card-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: card-shine 3s ease-in-out infinite;
    border-radius: 25px;
}

@keyframes card-shine {
    0% {
        left: -100%;
    }

    50%, 100% {
        left: 100%;
    }
}

.logo-container {
    text-align: center;
    margin-bottom: 15px;
    position: relative;
}

.logo {
    width: 75px;
    height: 75px;
    margin: -15px auto 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
    position: relative;
    overflow: hidden;
    animation: logo-glow 3s ease-in-out infinite;
}

@keyframes logo-glow {
    0%, 100% {
        box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4), 0 0 40px rgba(118, 75, 162, 0.3);
    }

    50% {
        box-shadow: 0 15px 45px rgba(102, 126, 234, 0.6), 0 0 60px rgba(118, 75, 162, 0.5);
    }
}

.logo::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: logo-rotate 4s linear infinite;
}

@keyframes logo-rotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.logo img {
    width: 55px;
    position: relative;
    z-index: 1;
}

.welcome-text {
    font-size: 22px;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff, #a8b5ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: text-glow 2s ease-in-out infinite;
    margin-bottom: 3px;
}

.subtitle {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 300;
    margin-bottom: 10px;
}

.input-group {
    margin-bottom: 14px;
    position: relative;
}

    .input-group label {
        display: block;
        margin-bottom: 6px;
        color: rgba(255, 255, 255, 0.9);
        font-weight: 500;
        font-size: 13px;
        letter-spacing: 0.5px;
    }

.input-wrapper {
    position: relative;
    transform-style: preserve-3d;
}

    .input-wrapper i {
        position: absolute;
        left: 16px;
        top: 50%;
        transform: translateY(-50%);
        background: linear-gradient(135deg, #667eea, #764ba2);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        font-size: 16px;
        z-index: 2;
    }

.input-group input {
    width: 100%;
    padding: 12px 18px 12px 46px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-size: 13px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Poppins', sans-serif;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    backdrop-filter: blur(10px);
}

    .input-group input::placeholder {
        color: rgba(255, 255, 255, 0.5);
    }

    .input-group input:focus {
        outline: none;
        border-color: rgba(102, 126, 234, 0.8);
        background: rgba(255, 255, 255, 0.1);
        box-shadow: 0 0 20px rgba(102, 126, 234, 0.4), inset 0 0 20px rgba(102, 126, 234, 0.1);
        transform: translateY(-2px);
    }

.field-validation-error {
    color: #fc8181;
    font-size: 11px;
    margin-top: 4px;
    display: block;
}

.forgot-password {
    text-align: right;
    margin-top: -8px;
    margin-bottom: 16px;
}

    .forgot-password a {
        color: rgba(255, 255, 255, 0.8);
        text-decoration: none;
        font-size: 12px;
        font-weight: 500;
        transition: all 0.3s ease;
        position: relative;
    }

        .forgot-password a::after {
            content: '';
            position: absolute;
            bottom: -2px;
            left: 0;
            width: 0;
            height: 2px;
            background: linear-gradient(90deg, #667eea, #764ba2);
            transition: width 0.3s ease;
        }

        .forgot-password a:hover {
            color: white;
        }

            .forgot-password a:hover::after {
                width: 100%;
            }

.login-button {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-size: 200% 200%;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
    font-family: 'Poppins', sans-serif;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {
    0%, 100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.login-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.login-button:hover::before {
    left: 100%;
}

.login-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.7);
}

.login-button:active {
    transform: translateY(-1px);
}

.login-button i {
    margin-right: 8px;
}

.error-login {
    text-align: center;
    padding: 10px;
    border-radius: 10px;
    margin-top: 15px;
    font-size: 13px;
    animation: message-slide 0.5s ease;
    backdrop-filter: blur(10px);
}

@keyframes message-slide {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.text-success {
    background: rgba(72, 187, 120, 0.2);
    color: #9ae6b4 !important;
    border: 1px solid rgba(72, 187, 120, 0.4);
}

.text-danger {
    background: rgba(245, 101, 101, 0.2);
    color: #fc8181 !important;
    border: 1px solid rgba(245, 101, 101, 0.4);
}

.divider {
    text-align: center;
    margin: 16px 0 14px;
    position: relative;
}

    .divider::before {
        content: '';
        position: absolute;
        left: 0;
        top: 50%;
        width: 100%;
        height: 1px;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    }

    .divider span {
        background: rgba(15, 12, 41, 0.8);
        backdrop-filter: blur(10px);
        padding: 0 15px;
        color: rgba(255, 255, 255, 0.7);
        font-size: 12px;
        position: relative;
        z-index: 1;
        font-weight: 500;
    }

.app-download {
    text-align: center;
    margin-top: 12px;
}

    .app-download img {
        height: 38px;
        width: auto;
        transition: all 0.3s ease;
        cursor: pointer;
        filter: brightness(0.9);
    }

        .app-download img:hover {
            transform: scale(1.08) translateY(-3px);
            filter: brightness(1.1);
        }

.version {
    text-align: center;
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 10px;
    font-weight: 300;
}

/* Responsive */
@media (max-width: 768px) {
    .login-container {
        padding: 10px;
    }

    .login-card {
        padding: 22px 20px;
        border-radius: 20px;
    }

    .logo {
        width: 70px;
        height: 70px;
    }

    .welcome-text {
        font-size: 20px;
    }

    .subtitle {
        font-size: 11px;
    }

    .glow-orb-1 {
        width: 300px;
        height: 300px;
    }

    .glow-orb-2 {
        width: 250px;
        height: 250px;
    }

    .glow-orb-3 {
        width: 200px;
        height: 200px;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 20px 18px;
        border-radius: 18px;
    }

    .logo {
        width: 65px;
        height: 65px;
    }

        .logo img {
            width: 50px;
        }

    .welcome-text {
        font-size: 19px;
    }

    .subtitle {
        font-size: 11px;
    }

    .input-group input {
        padding: 10px 14px 10px 40px;
        font-size: 12px;
    }

    .input-wrapper i {
        left: 13px;
        font-size: 14px;
    }

    .login-button {
        padding: 10px;
        font-size: 13px;
    }

    .app-download img {
        height: 36px;
    }
}
