/* Premium Login Page Styles */

/* === Full Page Background === */
.login-page {
    min-height: 100vh;
    background: linear-gradient(120deg, #ffecd2 0%, #fcb69f 25%, #a1c4fd 50%, #c2e9fb 75%, #667eea 100%);
    background-size: 400% 400%;
    animation: animatedGradient 18s ease-in-out infinite;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 25% 25%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(255,255,255,0.05) 0%, transparent 70%);
    animation: backgroundPulse 8s ease-in-out infinite;
}

.login-page::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="80" height="80" viewBox="0 0 80 80" xmlns="http://www.w3.org/2000/svg"><g fill="white" fill-opacity="0.03"><circle cx="40" cy="40" r="2"/></g></svg>');
    animation: float 30s ease-in-out infinite;
}

/* === Floating Particles === */
.login-particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    box-shadow: 0 0 8px 2px rgba(255,255,255,0.25);
    opacity: 0.85;
    will-change: transform;
    pointer-events: none;
    animation: particleMove 24s linear infinite;
}


/* Particle animation will be randomized by JS for each particle */

/* === Premium Login Container === */
.login-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 450px;
    margin: 2rem;
    animation: slideInUp 0.8s ease-out;
}

.login-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 90vh;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb);
    background-size: 200% 100%;
    animation: gradientShift 3s ease-in-out infinite;
}

/* === Login Header === */
.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    animation: logoFloat 3s ease-in-out infinite;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.login-logo svg {
    width: 40px;
    height: 40px;
    color: white;
}

.login-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(255,255,255,0.3);
}

.login-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    font-weight: 500;
}

/* === Premium Form Styles === */
.login-form {
    width: 100%;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group-floating {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    color: white;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.form-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.form-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.2rem;
    height: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s ease;
}

.form-input:focus + .form-icon,
.form-group-floating:focus-within .form-icon {
    color: white;
}

/* === Floating Labels === */
.floating-label {
    position: absolute;
    left: 3rem;
    top: 1rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    padding: 0 0.5rem;
    border-radius: 4px;
    backdrop-filter: blur(10px);
}

.form-input:focus ~ .floating-label,
.form-input:not(:placeholder-shown) ~ .floating-label {
    top: -0.5rem;
    left: 1rem;
    font-size: 0.8rem;
    color: white;
    background: linear-gradient(135deg, #667eea, #764ba2);
}

/* === Remember Me Checkbox === */
.remember-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.custom-checkbox {
    position: relative;
    width: 20px;
    height: 20px;
}

.custom-checkbox input {
    opacity: 0;
    position: absolute;
}

.checkbox-mark {
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.custom-checkbox input:checked + .checkbox-mark {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: #667eea;
}

.checkbox-mark svg {
    width: 12px;
    height: 12px;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.custom-checkbox input:checked + .checkbox-mark svg {
    opacity: 1;
}

.remember-label {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    cursor: pointer;
}

/* === Premium Login Button === */
.login-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 1.2rem;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin: 1.5rem 0;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.login-btn::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;
}

.login-btn:hover::before {
    left: 100%;
}

.login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.5);
    background: linear-gradient(135deg, #5a67d8, #6b46c1);
}

.login-btn:active {
    transform: translateY(-1px);
}

/* === Forgot Password Link === */
.forgot-link {
    text-align: center;
    margin: 1rem 0;
}

.forgot-link a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-link a:hover {
    color: white;
    text-shadow: 0 0 10px rgba(255,255,255,0.5);
}

/* === Divider === */
.divider {
    position: relative;
    text-align: center;
    margin: 2rem 0;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
}

.divider span {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    padding: 0 1rem;
    backdrop-filter: blur(10px);
    border-radius: 12px;
    font-weight: 500;
}

/* === Social Login Buttons === */
.social-login {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.social-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.social-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* === Register Link === */
.register-link {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.register-link p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1rem;
}

.register-btn {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 0.8rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.register-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
}

/* === Error & Success Messages === */
.alert {
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.alert-error {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}

.alert-success {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #6ee7b7;
}

/* === Animations === */
@keyframes animatedGradient {
    0% {
        background-position: 0% 50%;
    }
    25% {
        background-position: 50% 100%;
    }
    50% {
        background-position: 100% 50%;
    }
    75% {
        background-position: 50% 0%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes particleMove {
    0% {
        transform: translate3d(0,0,0) scale(1);
        opacity: 0.85;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translate3d(var(--tx, 0px), var(--ty, 0px), 0) scale(var(--s, 1));
        opacity: 0.85;
    }
}

@keyframes slideInUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes logoFloat {
    0%, 100% { 
        transform: translateY(0px);
        box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    }
    50% { 
        transform: translateY(-10px);
        box-shadow: 0 20px 40px rgba(102, 126, 234, 0.4);
    }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-30px); }
}

/* === Responsive Design === */
@media (max-width: 768px) {
    .login-container {
        margin: 1rem;
        max-width: 100%;
    }
    
    .login-card {
        padding: 2rem;
    }
    
    .login-title {
        font-size: 2rem;
    }
    
    .social-login {
        flex-direction: column;
    }
}

/* === Loading Animation === */
.loading-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.login-btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.login-btn.loading .loading-spinner {
    display: inline-block;
}