/* Login Page Styles */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    background-color: #0F0F1A; /* Ensure base background is dark */
    overflow: hidden; /* Prevent scrollbars from particles */
}

/* Dynamic Background Gradient */
.login-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 30% 20%, rgba(99, 102, 241, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(236, 72, 153, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(6, 182, 212, 0.1) 0%, transparent 60%);
    pointer-events: none;
    z-index: 1; /* Place above particles but below card */
    animation: bgPulse 8s ease-in-out infinite alternate;
}

@keyframes bgPulse {
    0% { opacity: 1; }
    100% { opacity: 0.7; }
}

/* Floating Particles Effect */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0; /* Base layer */
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(99, 102, 241, 0.6); /* Slightly increased opacity */
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.4); /* Add glow */
    animation: float 15s infinite linear; /* Changed to linear for smooth movement */
}

/* Particle Positions & Delays */
.particle:nth-child(1) { left: 10%; animation-delay: 0s; animation-duration: 15s; }
.particle:nth-child(2) { left: 20%; animation-delay: 2s; animation-duration: 17s; }
.particle:nth-child(3) { left: 30%; animation-delay: 4s; animation-duration: 19s; }
.particle:nth-child(4) { left: 40%; animation-delay: 6s; animation-duration: 14s; }
.particle:nth-child(5) { left: 50%; animation-delay: 8s; animation-duration: 16s; }
.particle:nth-child(6) { left: 60%; animation-delay: 10s; animation-duration: 18s; }
.particle:nth-child(7) { left: 70%; animation-delay: 12s; animation-duration: 20s; }
.particle:nth-child(8) { left: 80%; animation-delay: 14s; animation-duration: 15s; }
.particle:nth-child(9) { left: 90%; animation-delay: 1s; animation-duration: 17s; }
.particle:nth-child(10) { left: 95%; animation-delay: 3s; animation-duration: 19s; }

@keyframes float {
    0% {
        transform: translateY(110vh) scale(0.5);
        opacity: 0;
    }
    10% {
        opacity: 1;
        transform: translateY(100vh) scale(1);
    }
    90% {
        opacity: 1;
        transform: translateY(-10vh) scale(1);
    }
    100% {
        transform: translateY(-20vh) scale(0.5);
        opacity: 0;
    }
}

/* Login Card Container */
.login-container {
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 2; /* Highest layer */
}

.login-card {
    background: linear-gradient(145deg, rgba(30, 30, 50, 0.9) 0%, rgba(20, 20, 40, 0.95) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 48px 40px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 60px rgba(99, 102, 241, 0.1);
}

/* Logo Styles */
.login-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 28px;
    background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: white;
    box-shadow: 
        0 0 40px rgba(99, 102, 241, 0.4),
        0 10px 30px rgba(99, 102, 241, 0.3);
    animation: logoFloat 3s ease-in-out infinite;
}

.login-logo-img {
    width: 100px;
    height: 100px;
    margin: 0 auto 24px;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.3));
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.login-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 8px;
    letter-spacing: -0.025em;
}

.login-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 36px;
}

/* Form Styles */
.login-form .form-group {
    margin-bottom: 20px;
}

.login-form .form-control {
    padding: 16px 18px;
    font-size: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    border-radius: 12px;
    color: var(--text-primary);
}

.login-form .form-control:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-500);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
    outline: none;
}

.login-form .input-group {
    position: relative;
}

.login-form .input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 18px;
    z-index: 1;
}

.login-form .has-icon {
    padding-left: 48px;
}

.login-btn {
    width: 100%;
    padding: 16px;
    font-size: 15px;
    font-weight: 600;
    background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
    border: none;
    border-radius: 12px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
    margin-top: 32px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.4);
}

.login-btn:active {
    transform: translateY(0);
}

.login-error {
    background: rgba(244, 63, 94, 0.1);
    border: 1px solid rgba(244, 63, 94, 0.3);
    color: var(--accent-rose);
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
    20%, 40%, 60%, 80% { transform: translateX(4px); }
}

.login-error i {
    font-size: 20px;
}

.login-divider {
    margin: 28px 0;
    display: flex;
    align-items: center;
    gap: 16px;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-primary), transparent);
}

.login-divider span {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
