body.login {
    background: linear-gradient(-45deg, #323232, #404040, #2a2a2a, #383838);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

/* Animated gradient background */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}


@keyframes float {
    0% { transform: translateY(0px) translateX(0px); }
    50% { transform: translateY(-20px) translateX(10px); }
    100% { transform: translateY(0px) translateX(0px); }
}

#login {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    width: 100%;
    max-width: 400px;
    margin: 0;
    position: relative;
    transform: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.5s ease-out;
}

/* Welcome message styling - positioned after logo, before form - ONLY on login page */
body.login form#loginform::before {
    content: "Welcome to Digital Guerrilla";
    display: block;
    text-align: center;
    font-family: Verdana, sans-serif;
    font-size: 24px;
    color: #323232;
    margin: 0 0 25px 0;
    padding-bottom: 15px;
    animation: fadeIn 0.8s ease-in;
}

/* Hide welcome message on registration and lost password pages */
body.login form#registerform::before,
body.login form#lostpasswordform::before {
    display: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Login form slide-in animation */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Remove form border */
.login form {
    border: none;
    background: transparent;
    box-shadow: none;
    padding: 0;
}

/* Set Verdana font for all login elements except dashicons */
.login * {
    font-family: Verdana, sans-serif !important;
}

/* Restore dashicons font for icons */
.login .dashicons,
.login .dashicons-visibility,
.login .dashicons-hidden {
    font-family: dashicons !important;
}



/* Custom button styles with hover effects */
.wp-core-ui .button-primary {
    background: #00aded !important;
    color: white !important;
    border: 1px solid black !important;
    box-shadow: 5px 5px 10px -5px rgba(0, 0, 0, 0.5) !important;
    text-shadow: none !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    overflow: hidden !important;
}

.wp-core-ui .button-primary:hover {
    background: #323232 !important;
    color: white !important;
    border: 1px solid black !important;
    transform: translateY(-2px) !important;
    box-shadow: 5px 7px 15px -5px rgba(0, 0, 0, 0.7) !important;
}

/* Password reveal button styling */
.login .wp-hide-pw .dashicons {
    color: #323232 !important;
}

/* Mobile responsive styles */
@media (max-width: 768px) {
    body.login {
        padding: 0;
        min-height: 100vh;
        overflow-x: hidden; /* Prevent horizontal scroll */
        overflow-y: auto; /* Allow vertical scroll when needed */
    }
    
    #login {
        max-width: 100%;
        width: 100%;
        min-height: 100vh;
        max-height: none;
        padding: 30px 20px;
        border-radius: 0;
        margin: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
        background: rgba(255, 255, 255, 0.98);
        box-shadow: none;
        border: none;
    }
    
    .login form {
        padding: 0;
        width: 100%;
        max-width: 350px;
        margin: 0 auto;
    }
    
    .login .message, 
    .login .notice {
        margin: 15px 0;
        padding: 15px;
    }
    
    /* Ensure welcome message is properly centered on mobile */
    body.login form#loginform::before {
        font-size: 28px;
        margin: 0 0 30px 0;
        padding-bottom: 20px;
    }
}

@media (max-width: 480px) {
    body.login {
        padding: 0;
    }
    
    #login {
        padding: 20px 15px;
        min-height: 100vh;
        min-height: 100dvh; /* Dynamic viewport height for better mobile support */
    }
    
    .login form {
        width: 100%;
        max-width: 300px;
    }
    
    .login input[type="text"],
    .login input[type="password"],
    .login input[type="email"] {
        width: 100%;
        box-sizing: border-box;
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 12px;
        margin-bottom: 15px;
    }
    
    .wp-core-ui .button-primary {
        width: 100%;
        padding: 15px;
        font-size: 16px;
        margin-top: 10px;
    }
    
    /* Adjust welcome message for smaller screens */
    body.login form#loginform::before {
        font-size: 24px;
        margin: 0 0 25px 0;
    }
    
    /* Adjust spacing for better mobile experience */
    .login .message, 
    .login .notice {
        margin: 10px 0;
        padding: 12px;
        font-size: 14px;
    }
}

/* Landscape orientation adjustments for mobile */
@media (max-width: 768px) and (orientation: landscape) {
    body.login {
        min-height: 100vh;
        min-height: 100dvh;
    }
    
    #login {
        min-height: 100vh;
        min-height: 100dvh;
        padding: 15px 20px;
    }
    
    body.login form#loginform::before {
        font-size: 22px;
        margin: 0 0 20px 0;
    }
    
    .login input[type="text"],
    .login input[type="password"],
    .login input[type="email"] {
        margin-bottom: 10px;
    }
}